You are on page 1of 13

AOE 5104 Assignment 8

1) We often hear the following explanation of the way lift is developed on an airfoil: when the incoming
airstream divides at the forward stagnation point, the air that passes over the upper surface travels farther
than the air that passes over the lower surface; therefore, in order for the airstreams to rejoin (i.e., to meet
up at the trailing edge at the same time), the air passing over the upper surface must travel at a greater
speed. From Bernoullis principle, the pressure on the upper surface must be less than that on the lower
surface, which causes an upward force, called lift, to develop.
Node # x
y
5
0.99369
0.0021422
10
0.96832
0.0056202
15
0.92449
0.011384
20
0.86394
0.018875
25
0.78905
0.027436
30
0.70276
0.03637
35
0.60849
0.04493
40
0.50994
0.052302
45
0 .41100
0.057602
50
0.31557
0.059963
55
0.2274
0.058691
60
0.14998
0.053449
65
0.086348
0.044352
70
0.039017
0.031927
75
0.0098513 0.016916
80
0
0
coordinates of some sample
nodes for you to check so that
were all using the same model

Node #
G1
6
0.5955
10
0.8118
14
0.9210
18
0.9925
22
1.0492
26
1.0998
30
1.1491
34
1.1997
38
1.2539
42
1.3136
46
1.3805
50
1.4566
54
1.5451
58
1.6512
62
1.7855
66
1.9691
70
2.2453
74
2.6885
78
3.1177
82
2.0745
86
0.6758
90
6.7e-010
94
-0.3381
98
-0.5320
102 -0.6536
106
-0.7336
110
-0.7875
114
-0.8240
118
-0.8488
122
-0.8653
126
-0.8758
130
-0.8811
134
-0.8812
138
-0.8747
142
-0.8581
146
-0.8232
150
-0.7475
154
-0.5612
158
-0.2379

This explanation is based on the


assumption that both airstreams
take the same time to travel from
the leading stagnation point to the
trailing edge; here we will attempt
to verify this assumption. Also,
those who give this explanation
often refer to Bernoullis principle,
but they are referring to an equation
that can be derived from more basic
principles.
Modify your program for the
flow over an arbitrary airfoil in
order to calculate the time it takes a
fluid particle to travel from the
forward stagnation point to the
trailing edge over a) the upper
surface and b) the lower surface.
I suggest that for your calculations
you use the familiar NACA0012
airfoil with 158 panels according to
a cosine distribution (159 nodes)
and = 12.0609461 degs. because
the forward stagnation point,
according to my calculations, lies
almost squarely on the 90th node.
Having the stagnation point be
coincident with a node should help
with the subsequent calculation of
times.
Compare your numbers with the
results in the tables at the left before
calculating the travel times.
Why does the air passing over the
upper surface travel faster than the
air moving over the lower surface?

%
%

NACA 0012 continuous vorticity , full thickness model


time-of-travel calculations

clc
clear
alfa = 12.0609461
alpha = alfa*pi/180;
ca = cos(alpha);
sa = sin(alpha);

nn = 80
np = nn + 1
nm = nn - 1
theta = linspace(0,pi,nn);
x = 0.5*( 1 - cos( theta) );
% from page 113 in Abbott and v.Doenhoff
t =0.12
x2 = x.*x;
x3 = x2.*x;
x4 = x3.*x;
y = t/.2*( .2969*sqrt(x) - .126*x - .3516*x2 + .2843*x3 - .1015*x4 );
xa = x; ya = y;
% combine the files for the upper and lower surfaces into one file
for i = 1:nn
x(i) = xa( np - i );
y(i) = ya( np - i );
end
for i = 2:nn
x( nm + i ) = xa(i);
y( nm + i ) = -ya(i);
end
npts =2*nn - 1;
n = npts -1;
% control points
xcp = 0.5*( x(2:npts) + x(1:n) );
ycp = 0.5*( y(2:npts) + y(1:n) );
% lengths of the panels
dl = sqrt( (x(1:n) - x(2:npts)).^2 + (y(1:n) - y(2:npts)).^2 );

% components of the vectors normal to the elements


% note: these are not unit vectors; instead they are
% unit vectors x panel lengths
nx = y(2:npts) - y(1:n);
ny = -x(2:npts) + x(1:n);
% the influence matrix A(j,i)
for j = 1:n;
% end points of the sending panels
x1 = x(j);
y1 = y(j);
x2 = x(j+1);
y2 = y(j+1);
% negative of the normal component of the freestream velocity
R(j) = -ca*nx(j)-sa*ny(j);
for i = 1:n;
% control points of the receiving panels
xp = xcp(i);
yp = ycp(i);
% function that calculates the velocity associated with the
% the distributed vorticity on the panel, components in the
% global reference frame
[ u1x,u1y, u2x,u2y ] = vpan( x1,y1, x2,y2, xp,yp );
U1x(i,j) = u1x; % x-component of velocity associated with f1
U2x(i,j) = u2x; % x-component of velocity associated with f2
U1y(i,j) = u1y; % y-component of velocity associated with f1
U2y(i,j) = u2y; % x-component of velocity associated with f2
end
end
for i = 1:n
for j = 1:n-1
A(i,j) = ( U2x(i,j) + U1x(i,j+1) )*nx(i)...
+ ( U2y(i,j) + U1y(i,j+1) )*ny(i);
end
end
G = -inv(A'*A)*A'*R';
% impose the Kutta condition formally
% its already incorporated into the way A(i,j) is calculated
G1(1) = 0;
for i = 1:n-1
G1(i+1) = G(i);
end
G1(npts) = - G1(1);

% average speed on the elements


avg_spd = abs( 0.5*( G1(2:npts) + G1(1:n) ) );
% time to travel along the upper surface from
% the stagnation point to the trailing edge
% note: node 1 is the beginning of the first
% panel, node 90 is at the end of panel 89
dtu = dl(1:89)./avg_spd(1:89);
t_upper = sum(dtu)
% time to travel along the lower surface from
% the stagnation point to the trailing edge
% note: node 90 is at the beginning of panel 90
% node 159 is at the end of panel 158
dtl = dl(90:158)./avg_spd(90:158);
t_lower = sum(dtl)
answers:
t_upper = 1.0144 and t_lower = 1.5188
2) Consider the flow over a flat plate that lies along the x-axis between zero and one. (see Special topics
-- Flat plate num soln)
a) Modify the exact solution to fit the shortened plate (it is customary to use the length of the plate as the
characteristic length for dimensionless variables).
x =

( x + 2)
4

x = 0 at x = 2, x = 1 at x = 2

b) Write a program that uses a distribution of discrete vortices to imitate the merged boundary layers.
See Flat plate num soln.ppt
c) Write a program that uses continuous-vorticity panels to imitate the merged boundary layers.
See Flat plate num soln.ppt
d) Plot on the same graph u x from the three methods: represent the exact solution with a solid line, the
discrete-vortex method with + points, and the continuous-vorticity method with . points. Use 10
uniform panels for the two numerical methods.

__ exact solution
+ discrete-vortex solution

. continuous-vorticity solution
o xv,

% discrete-vortex method
clc
clear
n = 10
alphad = 10
alpha = alphad*pi/180;
sa = sind(alpha);
ca = cosd(alpha);
fac = 1/(2*pi);
dx = 1/n;
for i = 1:n;
R(i)= -sa;
xc(i) = (i - 0.25)*dx;
xv(i) = (i - 0.75)*dx;
end
yv(1:n+1) = 0;
for i = 1:n;
for j = 1:n;
A(i,j) = fac/( xc(i)-xv(j) );
end

. nodes on the plate

end
G_dis = inv(A)*R';
s_dis = sum(G_dis)
sexact = pi*sa
% velocity jump across the plate
du_dis = G_dis./dx;
% trailing edge conditions that reflect
% the Kutta condition
G_dis(n+1) = 0;
xc(n+1) = 1;
xv(n+1) = 1;
y(1:n+1) =0;
du_dis(n+1) = 0;
% exact solution
xe = linspace(0.01, 1, 100);
due = 2*sa*sqrt((1-xe)./xe);
uue = ca + 0.5*due;
ule = ca - 0.5*due;
xplate = [0,1]; yplate = [0, 0];
% XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
%*******************************************************
% steady flow past a flat plate at an angle of attack
% continous vorticity, unifrom panels
% npts = the number of points on the plate
npts = n+1;
% uniform lengths of a panels, plate has unit length
dx = 1/n;
% end points of the panels
x = dx*(0:n);
y = 0*(0:n);
% control points of the panels
xcp = 0.5*( x(2:npts) + x(1:n) );
ycp(1:n) = 0;
for j = 1:n;
% coordinates of the sender
x1 = x(j);
y1 = 0;
x2 = x(j+1);

y2 = 0;
% the normal component of the freestream velocity
R(j) = -sa;
for i = 1:n;
% control point of the receiver
xp = xcp(i);
yp = ycp(i);
[ u1x,u1y, u2x,u2y ] = vpan( x1,y1, x2,y2, xp,yp );
u1(i,j) = u1y;
u2(i,j) = u2y;
end
end
for i = 1:n
% special treatment fot the first gamma,
%it's associted with one panel only
A(i,1) = u1(i,1);
for j = 2:n
A(i,j) = u2(i,j-1) + u1(i,j);
end
end
G_con = -inv(A)*R';
% set G = 0 at the trailing edge
G_con(npts) = 0;
% delta-U at the control points
G1 = 0.5*( G_con(1:n) + G_con(2:npts) );
%circulation
s_con = sum(G1)*dx

%********************************************************************
plot(xplate,yplate,':k','linewidth',1)
hold on
plot(xv,yv,'o', x,y,'.')
xlabel('\it\bfx,
position along the plate','fontsize',11 )
ylabel({'\it\bf\Deltau
'},'fontsize',12)
set(get(gca,'YLabel'),'Rotation',0.0)
plot(xe,due, xv, -du_dis,'+r', x,G_con,'.g')
axis([-0.05, 1.05, -0.015, 0.07])
grid
hold off;
%******************************************************

e) Plot the component of the normal force in the direction perpendicular to the freestream on the same
graph with the experimental data for the NACA0012.

X
X
X
X
X
X
X

CN
0
2
4
6
8
10
12

cos
0
0.22
0.44
0.65
0.86
1.06
1.25

plotted as x

3) Use your program for modeling the flow around airfoils to calculate the flow around a Zhukovskii
airfoil at an angle of attack and compare your results with the exact solution obtained by conformal
mapping plot the surface velocities from the two solutions in the same figure.

% Exact & numerical solutions for flow past a Zhukovskii airfoil


% by continuous-vorticity panels
clc
clear
%
%
%
%

generate the coordinates of the airfoil


Input the complex value of A = a+ib, a and b are the coordinates
of the center of the unit circle that is to be mapped into the
airfoil.

a = -0.1
b = +0.05
A = a + b*j;

% determines the thickness: smaller a, smaller thickness


% determines the camber: b = 0 --> no camber
% the location of the center of the unit circle

% alpha is the angle of attack on the unit circle, which is the same
% as that on the airfoil

alpha = 10
alfa = alpha*pi/180;
Alfa = complex(0, alfa);
EAP = exp( Alfa );
EAM = exp( -Alfa );
% Input the number of points to draw the profile: circle and its image
npts = 37;
n = npts -1 % the number of elements in subsequent numerical
solutions
% Program
%*******************************************************************
% angular location of the point on the unit circle where the mapping
% is nonconformal, the point on the circle that maps into the TE
T0 = -asin(b);
% the measure of the circulation that satisfies the Kutta condition
B = 2*sin( alfa - T0 );
c = a + cos(T0); % the parameter "c" used in the Zhukovskii mapping
csqr = c*c;
% theta at the nodes on the unit circle
T = linspace(T0,2*pi+T0,npts);
Theta = complex(0,T);
%
z
x
y

the points on the unit circle


= A + exp(Theta);
= real(z);
= imag(z);

% the image of the points on the unit circle, the nodes on the airfoil
zeta = z + csqr./z;
xi = real(zeta);
eta = imag(zeta);
% the figure showing the circle and its image, the airfoil
%******************** FIGURE (1)*************************************
% the exact solution
% theta at the nodes on the unit circle
Te = linspace(T0,2*pi+T0,361);
The = complex(0,Te);
% the points on the unit circle
ze = A + exp(The);
xe = real(z);
ye = imag(z);
% the image of the points on the unit circle, the nodes on the airfoil

zetae = ze + csqr./ze;
xie = real(zetae);
etae = imag(zetae);

for i = 2:360;
V(i) = (EAM - EAP/((ze(i)-A)^2) + j*B/(ze(i)A))*ze(i)*ze(i)/((ze(i)-c)*(ze(i)+c));
s(i) = abs(V(i));
end
% the exact speed at the trailing edge, EQ.(5.6.5)
VTE = c*cos(alfa-T0)
s(1)= VTE; s(361) = VTE;
%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX FIGURE 1 XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
% comparison of the numerical and exact solutions for speed on the
% surface of the airfoil as functions of horizontal position
figure(1)

% exact solution
plot(xie, s,'b','linewidth',1)
% grid
hold on
%******************************************************************
% calculation of the exact solution
% a and b are the coordinates of the center of the unit circle that
% is mapped into the Zhukovskii airfoil; a, b, and A given above
% alpha is the angle of attack on the unit circle, which is the same
% as that on the airfoil
% alfa = angle of attack in radians
ca = cos (alfa);
sa = sin(alfa);
% input the number of points for the numerical solution, much less
% than the number used for the exact solution
npts = 181;
n = npts - 1;
% here we switch: the circle is in zeta-plane, the airfoil in the
% z-plane
% Program for the numerical solution
T0 = -asin(b);
% location of the point where the mapping is
nonconformal,
% the point on the unit circle that maps into the TE
c = a + cos(T0); % the parameter "c" used in the Zhukovskii mapping
csqr = c*c;

A = a + b*j;

% the location of the center of the unit circle

T = linspace(0,2*pi,npts);
Theta = complex(0,T);
Theta0 = complex(0,T0);
% the points on the unit circle with its center at A
zeta = A + exp(Theta+Theta0);
xi = real(zeta);
eta = imag(zeta);
%
z
x
y

the image of the unit circle


= zeta + csqr./zeta;
= real(z);
% coordinates of the nodes on the airfoil
= imag(z);
% coordinates of the nodes on the airfoil

% control points
xcp = 0.5*( x(2:npts) + x(1:n) );
ycp = 0.5*( y(2:npts) + y(1:n) );
% lengths of the panels
dl = sqrt( (x(1:n) - x(2:npts)).^2 + (y(1:n) - y(2:npts)).^2 );
% components of the vectors normal to the elements
% note: these are not unit vectors
nx = y(2:npts) - y(1:n);
ny = -x(2:npts) + x(1:n);
% generation of the influence matrix A(j,i)
for j = 1:n;
x1 = x(j);
% end points of the sending panels
y1 = y(j);
x2 = x(j+1);
y2 = y(j+1);
% negative of the normal component of the freestream velocity
R(j) = -ca*nx(j)-sa*ny(j);
for i = 2:n;
xp = xcp(i);
% control points of the receiving panels
yp = ycp(i);
% function that calculates the velocity associated with the
% the distributed vorticity on the panel, components in the
% global reference frame
[ u1x,u1y, u2x,u2y ] = vpan( x1,y1, x2,y2, xp,yp );
U1x(i,j) = u1x;
U2x(i,j) = u2x;
U1y(i,j) = u1y;
U2y(i,j) = u2y;
end
end

for i = 1:n
for j = 1:n-1
A(i,j) = ( U2x(i,j) + U1x(i,j+1) )*nx(i) + ( U2y(i,j) +
U1y(i,j+1) )*ny(i);
end
end
% there are n panels and n-1 unknown surface velocities at the nodes
% so "least squares" is used to obtain the solution
% G = -inv(A'*A)*A'*R';
G = -inv(A'*A)*A'*R';
G1(1) = 0;
G1(2:n) = G(1:n-1);
G1(npts) = -G1(1);
% plot of the numerical solution at the nodes
plot(x(1:2:npts),abs(G1(1:2:npts)),'+r')
xlabel('\it\bfx, horizontal position along the airfoil',
'fontsize',12)
ylabel('\it\bfspeed on the upper and lower surfaces', 'fontsize',12)
title(['\bfZhukovskii airfoil: a = ',num2str(a),', b =
',num2str(b),...
' \alpha = ',num2str(alpha),'degs.
', num2str(n),' panels'
],...
'fontsize', 11)
text(-1, 3.5,'\bfsolid line: exact solution,
Eq.(5.6.1)','fontsize',11)
text(-1, 3.25,'\bf +
numerical solution, continuous
vorticity','fontsize',11)
text(-1, 3.,['\bf
every other value plotted'],'fontsize',11)
hold off

You might also like