Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Ashlin Augusty
Constant vortex method is used in this case, which is better than the constant strength
vortex.
Singularity element
(x
x
)
+
z
z
1
1
Up =
tan1
tan1
+
z ln
tan1
+ 2x tan1
2
2
2
x x2
x x1
4
x
x
x x1
(x x1 ) + z
1
"
#
z
z
0 (x x1 )2 + z 2 1 x (x x1 )2 + z 2
ln
tan1
+ (x1 x2 ) + z tan1
Vp = ln
4 (x x2 )2 + z 2 2 2 (x x2 )2 + z 2
x x2
x x1
Discretization of Geometry
The aerofoil used is a NACA0012 aerofoil but the code is such that any NACA 4 digit series
aerofoil can be used. The panels are created with cosine spacing between them . The panel
midpoints are taken as collocation points.
Influence coefficients
The zero normal boundary condition is implemented in this phase. The free stream velocity
component RHSi is calculated as in the case for discrete vortex, using the equation
RHSi = (U , V ) . (cos i , sin i )
Specification of boundary condition fr each (i = 1 n) of the collocation points result in
n linear algebraic equations with the unknowns j (j = 1 n + 1).The additional equation
can be found by specifying the Kutta condition at the trailing edge:
a11
a21
an1
1
3.1
1 + n + 1 = 0
a12 a13 ... a1n
1
RHS1
a22 a13 ... a1n
2 RHS2
.
. ...
3 RHS3
. = .
.
. ...
. .
.
. ...
an2 an3 ... ann n RHSn
0
0 ... 1
n+1
0
Once the strength of the vortices are known ,the perturbation velocity at each collocation
point can be calculated using the the results.
Qtj = (Qt )j +
j + j+1
4
Q2t
Q2i nf ty
NACA profile = );
of NACA Profile= );
of NACA Profile= );
of NACA Profile= );
of panels = );
of Attack = );
nbpo2 = npanel;
c = 1;
% x distribution
beta = (0:(pi/nbpo2):pi).;
xc = c.*(1-.5.*(1-cos(beta)));
% Thickness distribution = f(x)
thdis=5.*to.*c.*(0.2969.*sqrt(xc./c)-0.126.*xc./c-0.3537.*(xc./c).^2 +...
0.2843.*(xc./c).^3-0.1015.*(xc./c).^4);
% Camberline = f(x)
if p~=0 && eps~=0
I1=find(xc(1:nbpo2+1)<=p*c);
I2=find(xc(1:nbpo2+1)>p*c);
camberline(I1,1) = (eps.*xc(I1))./(p.^2).*(2.*p-xc(I1)./c);
camberline(I2,1) = (eps.*(c-xc(I2)))./(1-p).^2.*(1+xc(I2)./c-2.*p);
end;
% Airfoil = camberline and thickness
if p==0 || eps==0
xupper = xc;
yupper = thdis;
xlower = xc;
ylower = -thdis;
else
theta(I1,1) = atan(2.*eps./p.*(-xc(I1)./(c.*p)+1));
theta(I2,1) = atan(2.*eps./(1-p.^2).*(p-(xc(I2)./c)));
xupper = xc
- thdis.*sin(theta);
yupper = camberline + thdis.*cos(theta);
xlower = xc
+ thdis.*sin(theta);
3
angle = mod(angle-pi,2*pi)-pi;
tmp = X2(:);
X2mat = ones(nbp,1)*tmp;
th2mth1 = angle./(2*pi*X2mat);
RR = log(r2./r1)./(2*pi*X2mat);
u2l = (Z.*RR+X.*th2mth1);
u1l = -(u2l-X2mat.*th2mth1);
cnst = 1/(2*pi);
TMP = cnst - Z.*th2mth1;
w1l = -TMP+(X2mat-X).*RR;
w2l = TMP+X.*RR;
tmp
u1l
tmp
u2l
tmp
w1l
tmp
w2l
=
=
=
=
=
=
=
=
)./X2;
% Velocity in global cs
ca = ones(nbp,1)*cos(-theta);
sa = ones(nbp,1)*sin(-theta);
u1
u2
w1
w2
=
=
=
=
u1l.*ca+w1l.*sa;
u2l.*ca+w2l.*sa;
-u1l.*sa+w1l.*ca;
-u2l.*sa+w2l.*ca;
RHSi(nbp+1,1) = 0;
%RHSi(nbp+2,1) = 0;
% Solve
gamma = Aij\RHSi;
%gamma = gamma(1:nbp+1,1);
% Compute velocity
vel = Bij*gamma;
velocity = vel + cos(alfar)*cos(theta)+sin(alfar)*sin(theta);
% turn z back to anti-clockwise
z = z(nbp+1:-1:1);
% turn velocity to anti-clockwise
velocity = -velocity(nbp:-1:1);
% Velocity at nodes
Qtj = (velocity(1:nbp-1) + velocity(2:nbp))./2;
dz12 = abs(z(1)-z(2));
dz23 = abs(z(3)-z(2));
dznbp1 = abs(z(nbp)-z(1));
dznbpnbpm1 = abs(z(nbp)-z(nbp-1));
Qtj1 = Qtj(1)+dz12.*(Qtj(1)-Qtj(2))./dz23;
Qtj2 = Qtj(nbp-1)+dznbp1.*(Qtj(nbp-1)-Qtj(nbp-2))./dznbpnbpm1;
v(1) = (Qtj1-Qtj2)./2;
v(2:nbp) = Qtj;
v(nbp+1)= - v(1);
% compute cp
cp = 1-velocity.^2/uinf.^2;
% Graphics
cpmax = max(cp); cpmin = min(cp);
zplot = real(z)-1i*(cpmax-cpmin)*imag(z);
plot(zplot);hold on;
axis(ij);
axis([-0.1 1.1 cpmin cpmax]);
plot(real(m),cp),xlabel(x/c),ylabel(Cp),...
6
0;
0;
0;
= 0;
for jj=1:nbp
fxj = -cp(jj)*imag(z(jj+1)-z(jj));
fyj = cp(jj)*real(z(jj+1)-z(jj));
Fx = Fx + fxj;
Fy = Fy + fyj;
cm = cm + fxj*imag(m(jj)) - fyj*(real(m(jj))-chord/4);
cmle = cmle + fxj*imag(m(jj)) - fyj*real(m(jj));
end
cl = Fy*cos(alfar) - Fx*sin(alfar);
xcp = -cmle/Fy;
if abs(cl)<0.001
cl = 0;
cm = 0;
xcp = 0;
else
cl = floor(10000*cl)/10000;
cm = floor(10000*cm)/10000;
end
xcp = floor(100*xcp)/100;
res(1) = cl;
res(2) = cm;
res(3:nbp+3)
res(nbp+4) =
res(nbp+5) =
res(nbp+6) =
= v;
xcp;
cpmin;
cpmax;
7
dlmwrite(cl.out,res(1), ;);
dlmwrite(cm.out,res(2), ;);
hold off;
cl
cm
% STREAMLINE ..
[gridx, gridy] = meshgrid(-2:.01:2, -2:.01:2);
grid = gridx+1i*gridy;
q=size(gridx,1);
p=size(gridx,2);
z=z(nbp+1:-1:1);
r1=zeros(p,q,nbp);
r2=zeros(p,q,nbp);
comtheta=cos(theta)-1i*sin(theta);
zz=diff(z).*comtheta;
for t=1:nbp
r1(:,:,t) =(grid-ones(p,q)*z(t))*comtheta(t);
r2(:,:,t) =r1(:,:,t)-ones(p,q)*zz(t);
end
dtheta=imag(log(r2./r1));
ratio=log(abs(r1)./abs(r2));
length=abs(xz2t);
gamma1=diff(gamma)./length;
im=imag(r1);
re=real(r1);
uvel=0;vvel=0;
u=zeros(p,q);
v=zeros(p,q);
for i=1:p
for j=1:q
for t=1:nbp
uvel=dtheta(i,j,t)*gamma(t)/(2*pi)+gamma1(t)/(4*pi)*(im(i,j,t)*ratio(i,j,t
2*re(i,j,t)*dtheta(t));
vvel=-gamma(t)/(4*pi)*ratio(i,j,t)-gamma1(t)/(2*pi)*(re(i,j,t)/2*ratio(i,j
length(t)+im(i,j,t)*dtheta(i,j,t));
u(i,j)=u(i,j)+uvel*cos(theta(t))-vvel*sin(theta(t));
v(i,j)=v(i,j)+uvel*sin(theta(t))+vvel*cos(theta(t));
end
end
end
ut=ones(p,q)*cos(alfar)+u;
vt=ones(p,q)*sin(alfar)+v;
stary=(2:-.1:-2);
starty = [stary;ones(1,size(stary,2))*-2];
startx = [-2*ones(1,size(starty,2));stary];
% scale=1;
8
%quiver(gridx,gridy,ut,vt,scale);
hold on;
streamline(gridx,gridy,ut,vt,startx,starty);
fill(real(z),imag(z),r);
Results
The tests were run for various parameters of the aerofoil and the cases are:
Sl.No NACA 4 Digit series Number of panels Angle of attack
1
0012
90
7
2
0012
70
10
3
0012
90
10
4
0016
70
7
5
2412
90
6
case 1
Figure 3: Streamlines
10
Cl
0.8382
1.1918
1.1939
0.8624
0.9741
Cm
-0.003
-0.0046
-0.0042
-0.0024
-0.0584
case 2
11
case 3
case 5
12