Documente Academic
Documente Profesional
Documente Cultură
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
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);