You are on page 1of 6

# Matt\$King\$

ME\$5710\$
Homework\$7\$
\$

1.\$

\$
Figure\$1.\$Contour\$plot\$of\$flow\$over\$triangle\$airfoil\$that\$satisfies\$the\$Kutta\$Condition\$with\$psi\$
equal\$to\$0.15.\$
\$
Matlab&Code\$
%
%
%
%

Matt King
ME 5710
Homework 7
Problem 1

## % u and density at x=0:

u=1;
den=1;
% Channel Length and Height
L=1;
H=0.5;
% Increments of Mesh

dx=0.05;
dy=dx;
nx=L/dx;
ny=H/dy;
nx1=nx+1;
ny1=ny+1;
% Initial Condition
for i=1:nx1
for j=1:ny1
s(i,j)=0;
end
end
% Boundary Conditions
for i=1:nx1
s(i,1)=0;
end
for i=1:nx1
s(i,ny1)=den*u*H;
end
for i=8:12
s(i,4)=.15;
end
for i = 9:11
s(i,5)=.15;
end
s(10,6)=.15;

for j=2:ny
s(1,j)=den*u*dx*(j-1);
s(nx1,j)=(s(nx1,ny1)/ny)*(j-1);
end
% Iterations
NI=700;
for N=1:NI
for i=2:nx
for j=2:ny
if (j == 4 && (i==8 || i==9 || i==10 || i==11 || i==12) )
1+1;
elseif (j == 5 && (i==9 || i==11 || i==10) )
1+1;
elseif (j == 6 && i == 10)
1+1;
else
s(i,j)=(s(i+1,j)+s(i-1,j)+s(i,j+1)+s(i,j-1))/4;
end
end
end
end

xx=0:dx:L;
yy=0:dy:H;
% Transpose
st=s';
% Contour
C=contour(xx,yy,st,21);
clabel(C)
xlabel('Horizontal Position [m]')
ylabel('Vertical Position [m]')
% Psi for Kutta Condition is 0.15.

\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$
\$

3.b.\$

Figure\$2.\$Plot\$of\$vortex\$sheet\$strength\$versus\$angle\$at\$x=c/2\$
\$
Matlab&Code\$
%
%
%
%

Matt King
ME 5710
HW 7
Problem 3b

clear, clc
syms A0 A a c x xe th the dz dzt % dzt is dx/dx,
% dz/dx of the airfoil ******
xe(1)=0.4*c;
xe(2)=c;
dz(1)=0.2-0.5*(x/c);
%dz/dx for 0<x<xe(1)
dz(2)=0.089-0.222*(x/c);
%dz/dx for xe(1)<x<xe(2)
% Transform x to theta *******
x=.5*c*(1-cos(th));
dzt=subs(dz);
the(1)=acos(1-2*xe(1)/c);
the(2)=acos(1-2*xe(2)/c);

## % Integral in Eq.(4.61) for alpha_L=0

I1=int(dzt(1)*(cos(th)-1),th,0,the(1));
I2=int(dzt(2)*(cos(th)-1),th,the(1),the(2));
aL0=-1*(I1+I2)/pi;
%Eq.(4.61)for the zero-lift angle
% Evaluate the zero alpha angle, in rad
alpha0=eval(aL0)
% Evaluate the coeffs in Fourier Cosine series
I1=int(dzt(1),th,0,the(1));
I2=int(dzt(2),th,the(1),the(2));
A0=a-(I1+I2)/pi; % Eq. (4.50) for Ao calculation
% 10 terms only ****Eq.(4.51) for An calculation
% For the given camber line functions,dz/dt(i.e.,dzt)=0 for n>2
for n=1:10
I1=int(dzt(1)*cos(n*th),th,0,the(1));
I2=int(dzt(2)*cos(n*th),th,the(1),the(2));
A(n)=2*(I1+I2)/pi;
eval(A(n))
end
A1=eval(A(1))
A2=eval(A(2))
cm=pi*(A2-A1)/4
% Try alpha=3 degrees
a=pi*3/180;
cl=2*pi*(a-alpha0)
x_cp_over_c=(1+pi*(A1-A2)/cl)/4
% Plot the gamma(theta) distribution along the chord
c=1
% chord length = 1 m
Vinf = 50 % Free stream air speed = 50 m/s
for ip=1:20;
theta(ip)=0.1+(ip-1)*3.04/20; % gamma is singular at theta=0
A00=eval(A0);
sum=0;
for n=1:10;%10 terms in Fourier series included
sum=sum+eval(A(n)*sin(n*theta(ip)));
end
gamma(ip)=2*Vinf*(sum+A00*(1+cos(theta(ip)))/sin(theta(ip)));
end
plot(theta,gamma)
xlabel('Vortex Sheet Strength')
ylabel('Angle')