1
1
addpath(' ../../' );
2
2
3
3
% User input: airfoil, onset flow, kinematics
4
- f = foil_naca4(' 0012' ,50 ,true );
4
+ f = foil_naca4(' 0012' ,100 ,true );
5
5
Uinf = [1 ,0 ]; % onset flow
6
6
f .setPitchAxisOnChordLine(0 ); % pitch position as fraction of chord: 0=LE, 1=TE
7
7
k = 1 ; % reduced frequency
8
8
alpmax = 2.5 * pi / 180 ; % max angle of attack
9
- nosc = 3 ; % number of oscillations
10
- res = 50 ; % number of steps at fastest time scale
9
+ nosc = 4 ; % number of oscillations
10
+ res = 100 ; % number of steps at fastest time scale
11
11
12
12
% Kinematics
13
13
spdinf = norm(Uinf );
87
87
figure ;
88
88
hold on ;
89
89
fill(f .x / f .chord ,f .y / f .chord ,[.9 .9 .9 ]);
90
- xlabel(' $x/c$' ,' Interpreter' ,' latex' );
91
- ylabel(' $y/c$' ,' Interpreter' ,' latex' );
90
+ % xlabel('$x/c$','Interpreter','latex');
91
+ % ylabel('$y/c$','Interpreter','latex');
92
92
ip = find(stepper .wake .nu > 0 );
93
93
in = find(stepper .wake .nu < 0 );
94
94
plot(stepper .wake .x(ip )/f .chord ,stepper .wake .y(ip )/f .chord ,' .r' ,...
99
99
plot(cx ,cy ,' sk' ,' MarkerSize' ,16 );
100
100
set(gca ,' FontSize' ,14 );
101
101
axis(' equal' );
102
- grid on ;
102
+ % grid on;
103
103
saveTightFigure(' plots/wake.pdf' );
104
104
105
105
figure ;
109
109
legend({' $C_L$' ,' $C_M$' ,' $10 C_D$' },' Interpreter' ,' latex' );
110
110
set(gca ,' FontSize' ,14 );
111
111
grid on ;
112
- saveTightFigure(' plots/aerodynamic_coefficients.pdf' );
112
+ saveTightFigure(' plots/aerodynamic_coefficients.pdf' );
113
+
114
+ % -------------------------------------------------------------
115
+ % Wall picture
116
+ % -------------------------------------------------------------
117
+ figure ;
118
+ subplot(2 ,1 ,1 );
119
+ hold on ;
120
+ fill(-f .x / f .chord ,f .y / f .chord ,[.75 .75 .75 ]);
121
+ text(-4.25 ,-1 ,' {\it Pitch oscillations about the leading edge of a NACA 0012 airfoil}' );
122
+ text(-4.00 ,-1.2 ,' {\it Michael J. Fairchild, Princeton University, 2016}' );
123
+ ip = find(stepper .wake .nu > 0 );
124
+ in = find(stepper .wake .nu < 0 );
125
+ plot(-stepper .wake .x(ip )/f .chord ,stepper .wake .y(ip )/f .chord ,' .r' ,...
126
+ ' MarkerSize' ,10 );
127
+ plot(-stepper .wake .x(in )/f .chord ,stepper .wake .y(in )/f .chord ,' .b' ,...
128
+ ' MarkerSize' ,10 );
129
+ set(gca ,' FontSize' ,14 );
130
+ axis(' equal' );
131
+ axis(' off' );
132
+
133
+ subplot(2 ,1 ,2 );
134
+ hold on ;
135
+ tt= t(I )/T ;
136
+ plot(tt ,CL(I ),' k-' ,tt ,CM(I ),' k--' ,tt ,10 * CD(I ),' k-.' ,' LineWidth' ,1.5 );
137
+ text(4.05 ,1.25 ,' $C_L$' ,' Interpreter' ,' Latex' ,' FontSize' ,14 );
138
+ text(4.05 ,0.25 ,' $C_M$' ,' Interpreter' ,' Latex' ,' FontSize' ,14 );
139
+ text(4.05 ,-.75 ,' $C_D$' ,' Interpreter' ,' Latex' ,' FontSize' ,14 );
140
+ axis(' off' );
141
+ saveas(gca , ' plots/naca0012pitch.pdf' );
0 commit comments