You are on page 1of 3

# J.

Murray
Hwk 3
MAE 360

Question 1:

Find the dimensionless velocities at at least 50 points along the airfoil surface.

To find these velocities the equation for the u values is (1) for this equation t is
the panel distribution according to the cosine distribution. X is the distance from
the origin along the cord from the leading edge to the trailing edge. Z is the
location of the point on the upper surface of the airfoil at a distance x along the
airfoil.

 t (i +1) − x j ti − x j  −1
 1
u = 1+   − A b ( )
 (t ( i +1) − x j ) + Z 2j (t i − x j ) + Z 2j 
(1)
 2π
2 2

 t ( i +1) − x j  t − xj 
tan −1   − tan −1  i 
 Z   Z 
A=  j   j  (this is a matrix) (2)
Zj
  −1
 1
w = − 
Zj

Zj
(
A b )
 (t ( i +1) − x j ) + Z j (t i − x j ) + Z 2j
(3)
 2π
2 2 2 

Using these equations it is possible to find the velocities of u and w of a point
along the upper surface of the airfoil.

Question 2:

Find and plot the pressure coefficients as a function of the dimensionless x at these
points.

Figure (1) is the plot that these points provided.

Cp Distribution on a NACA 0012 Airfoil at 0 Degree Angle of Attack
-0.5

0
Cp

0.5

1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Chord (Unitless)

Figure 1: MATLab Figure of the airfoil Cp
Question 3:

Compare your results with the following. Comment on how well or how poorly the
pressures compare.

The two plots compare very well. The plots are almost identical expect
where the x value approaches the leading and trailing edges. As the x value
approaches these edges the equation for the plot causes a discontinuity. This
discontinuity can not be plotted accurately using discrete methods. The plots
created using this method are very accurate until very close to the stagnation
points. As figure (2) and (3) show when the gridlines and ticks are the same, the
plots are the same until very close to 0 and 1 on the chord axis.

Cp Distribution on a NACA 0012 Airfoil at 0 Degree Angle of Attack
-0.5

0
Cp

0.5

1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Chord (Unitless)

Figure 2 Plot of the Pressure Coefficient

Figure 3 Homework Assignment 3 Provided Figure
The code:
function aero=hmk3
clc
warning off;
global Npanel mu t
N =51; Npanel = N-1; % there are N endpoints and Npanel panels
% locations of first and last endpoints - varies depending on the
number of
% panels. Determine using trial and error.xs =.0018; xf =.9985;
xs=.009;
xf=.9985;
c=linspace(xs,xf);
% distribute panels according to a cosine distribution
ths = pi-acos((.5-xs)/.5);
thf = acos((xf-.5)/.5);
dth = (thf-ths)/Npanel;
th = [ths:dth:thf];
t= 1/2 + 1/2*cos(th);
%assign field point locations at the center of the panels
for i =1 : Npanel
x(i) =(t(i) + t(i+1))/2;
end
% this is the upper surface of a NACA 0012 airfoil
Z=.6.*(.2969.*sqrt(x)-.126.*x-.3516.*x.^2+.2843.*x.^3-
.1015.*x.^4);
ma=max(Z);
Tau=ma;
rho=.5*Tau^2*1;
E=rho/2;
% creat the A matrix and the rhs b vector
for j = 1:Npanel
b(j)=2*pi;
for i = 1:Npanel
A(j,i)=(atan2(t(i+1)-x(j),Z(j))-atan2(t(i)-x(j),Z(j)))/Z(j);
end
end
%solve for the doublet strengths
mu = inv(A)*b';
for i=1:Npanel
Psi(i)=Z(i)-sum(mu(i)*atan((t(i)-x(i))/Z(i)));
for j=1:Npanel
U(j,i)=[(t(i+1)-x(j))/((t(i+1)-x(j))^2+(Z(j))^2)-((t(i)-
x(j))/((t(i)-x(j))^2+(Z(j))^2))];
W(j,i)=[(Z(j)/((t(i+1)-x(j))^2+(Z(j))^2))-(Z(j)/((t(i)-
x(j))^2+(Z(j))^2))];
end
end
u=1+(1/(2*pi)).*U*mu;
w=(-1/(2*pi)).*W*mu;
for i=1:Npanel
Cp(i)=1-(u(i))^2-(w(i))^2;
end
figure(2)
plot(x,Cp);
set(gca,'YDir','reverse');