Professional Documents
Culture Documents
This project required me to design an airfoil that met certain given specifications.
To do this, I was required to write code that calculated the coefficient of lift from the
profile using the vortex panel method. Then, I was to use finite wing analysis and thin
airfoil theory to calculate the coefficient of lift for the entire wing. The code for the finite
wing analysis and thin airfoil theory was provided for me. Finally, I was required to
calculate the stall angle for the wing that I designed using Thwaites’ method to find
separation points.
I ran into a couple of problems with this project and I was unable to meet all of
The airfoil that I designed had to meet specifications at a high speed and a low
speed. I found a wing that came close to satisfying those specifications. However, in
order to meet the low speed requirements, I had to select a wing that isn’t entirely
unable to get it to work. I attempted to write code that performed numerical integration
of Ue. That is the part of the code that I could not get to work. Because of this I was
unable to use Thwaites’ method to find the point of separation for the wing and therefore
Procedure
I was to find a rectangular wing with the proper airfoil shape so that it met certain
specifications. We had to design the airfoil so that the airplane can cruise at mach .7 at
an altitude of 9100 meters. However, the airfoil also had to support the airplane at mach
1
.22 at sea level. The airplane has a mass of 38,000 kg with a wing area of 77.3 m^2. The
aircraft must be trimmed for straight and level flight in both conditions. It is also
I took the code from project 2 and modified it slightly so that it would calculate
the coefficient of lift from the profile of a wing. It did this by finding Cp, and then doing
a simple calculation to find Cl. Once I had this code modified, I tested it on a symmetric
wing (NACA 0012), and compared my results against the published data for that airfoil
shape. This gave me confidence that my vortex panel code was working correctly.
Then, I used the code provided to me for homework 4 to perform finite wing
analysis using thin airfoil theory. I made one slight change to the code so that k_0 was
based off of the coefficients of lift from the profile, instead of simply assuming that k_0
was 2*pi. The code for the finite wing analysis output the coefficient of lift for the entire
wing. Finally, I used the coefficient of lift of the wing to calculate the lift that the wing
produced. I then compared the lift that the wing produced to the weight of the aircraft.
Results
The first thing that I did with the vortex panel code was to test it on an airfoil
shape that had published data for its coefficient of lift. I compared the coefficient of lift
that my code calculated with these published values. I ran the code over a wide range of
angles of attack, from -16 to 20 degrees. The results are shown below, in Figure 1. The
line in the plot below follows the published lift curve for most angles. However, once the
angle of attack of the airfoil became greater than 16 degrees, the published data shows a
large falloff in the lift curve while the curve from my code does not. This shows that the
vortex panel method code cannot calculate the stall angle. However, since the code
2
produced the correct coefficient of lift for any angle of attack below 16 degrees, I feel
Once I was confident that my vortex panel method code was working properly, I
used it along with the finite wing and thin airfoil code to find a wing that met our design
specifications. I used airfoil contours found online to perform this step of the project. I
first tested the NACA 63(3)-618 airfoil shape. This airfoil didn’t even come close to
providing the necessary lift. Next, I selected the NACA 2411. This airfoil shape, while
parts of it went supersonic, is close to meeting all specifications. Finally, I tested the
NAGA 6412 as the airfoil that met all specifications. Table 1 shows the force of the lift
3
Airfoil Shape Angle of Attack and Mach
Number
α=12 α=4
M=.22 M=.7
NACA 63(3)- 29,369 48,258
618
NACA 2411 286,660 371,090
The NACA 6412 airfoil profile comes the closest to meeting the requirement for
having the aircraft trimmed in for both conditions. However, it still doesn’t quite meet all
conditions. It does not produce enough lift for straight and level flight at M=.22. Also,
parts of the airflow around the wing become sonic at M=.7. However, all airfoils that I
tested had this same problem, and time constraints kept me from being able to modify the
For the last part of this project, I was supposed to use Thwaites’ method to
determine the stall angle. I attempted to do this with a MATLAB code that would
perform the necessary calculations. However, one of the calculations that I needed to
code was numerical integration. I was unable to get this part of the code to work, and
therefore was unable to use Thwaites’ method to calculate the stall angle.
4
Conclusion
Based on the calculated data, the best airfoil shape that I tested was the NACA
6412. However, this wing does not meet all design specifications, and therefore more
testing is required. Further testing should use either increased camber, or thickness, or
possibly both.
References
5
Appendix
Matlab Code:
%project2.m
clear all;
input=load('NACA6412.txt');
N=(length(input));
M=N-1;
mach=.7;
gmma=0272-.1874;
alpha=-4*(pi/180);
input=flipud(input);
for k=1:N
xb(k)=input(k,1);
yb(k)=input(k,2);
end
%xb=linspace(0,1,64);
%yb=spline(x,[-.1194 y -.2611], xb);
plot(xb,yb)
%length_of_panel=[];
%
% for r=1:M
% xq(r)=[input(r,1)];
% yq(r)=[input(r,2)];
% length_of_panel(r)=[sqrt((xq(r)-xq(r+1))^2 + (yq(r)-yq(r+1))^2)];
% end
X=[];
Y=[];
S=[];
theta=[];
for q=1:M
X=[X;.5*(xb(q)+xb(q+1))];
Y=[Y;.5*(yb(q)+yb(q+1))];
S=[S;sqrt((xb(q+1)-xb(q))^2+(yb(q+1)-yb(q))^2)];
A1
theta=[theta;atan2((yb(q+1)-yb(q)),(xb(q+1)-xb(q)))];
end
for i=1:M
for j=1:M
if i==j
CN1(i,j)=-1;
CN2(i,j)=1;
CT1(i,j)=pi/2;
CT2(i,j)=pi/2;
else
A=-(X(i)-xb(j))*cos(theta(j))-(Y(i)-yb(j))*sin(theta(j));
B=(X(i)-xb(j))^2+(Y(i)-yb(j))^2;
C=sin(theta(i)-theta(j));
D=cos(theta(i)-theta(j));
E=(X(i)-xb(j))*sin(theta(j))-(Y(i)-yb(j))*cos(theta(j));
F=log(1+(((S(j)^2)+2*A*S(j))/B));
G=atan2(E*S(j),(B+A*S(j)));
P=(X(i)-xb(j))*sin(theta(i)-2*theta(j))+(Y(i)-yb(j))*cos(theta(i)-2*theta(j));
Q=(X(i)-xb(j))*cos(theta(i)-2*theta(j))-(Y(i)-yb(j))*sin(theta(i)-2*theta(j));
CN2(i,j)=D+0.5*Q*F/S(j)-(A*C+D*E)*G/S(j);
CN1(i,j)=0.5*D*F+C*G-CN2(i,j);
CT2(i,j)=C+0.5*P*F/S(j)+(A*D-C*E)*G/S(j);
CT1(i,j)=0.5*C*F-D*G-CT2(i,j);
end
end
end
%CN1, CN2, CT1, CT2
%------------------
for i=1:M
AN(i,1)=CN1(i,1);
AN(i,M+1)=CN2(i,M);
AT(i,1)=CT1(i,1);
AT(i,M+1)=CT2(i,M);
RHS(i)=sin(theta(i)-alpha);
for j=2:M
AN(i,j)=CN1(i,j)+CN2(i,j-1);
AT(i,j)=CT1(i,j)+CT2(i,j-1);
end
end
AN(M+1,1)=1;
AN(M+1,M+1)=1;
for j=2:M
AN(M+1,j)=0;
end
A2
RHS(M+1)=0;
gam=cramer(AN,RHS',N);
CP_crit=(2/(gmma*mach^2)*((((2+(gmma-1)*mach^2)/(gmma+1))^(gmma/(gmma-1)))-
1));
for i=1:M
V(i)=cos(theta(i)-alpha);
for j=1:N
V(i)=V(i)+AT(i,j)*gam(j);
CP(i)=1-V(i)^2;
CP_i(i)=CP(i)/sqrt(1-mach^2);
if CP_i(i)<CP_crit
subsonic(i)=1;
else
subsonic(i)=0;
end
end
end
V;,CP;
sonic=sum(subsonic)
C_l=0;
C_d=0;
for n=1:M-1
C_l=C_l+CP_i(n)*cos(theta(n)-alpha)*S(n);
%C_d=C_d+CP_i(n)*sin(theta(n)-alpha);
end
C_l=-C_l
C_d=-C_d;
%function cramer.m
function x=cramer(A,B,N)
x=zeros(N,1);
for i=1:N
AI=A;
AI(:,i)=B;
A3
detAI=det(AI);
detA=det(A);
x(i,1)=detAI/detA;
end
return
% ME 163 Homework 4
% Author: Gregory J. McCauley
% Last Modified: December 03, 2005
alpha_2 = -4;
c_l_2 = .3035;
%k_0 = 2 * pi;
% Set span
b = 24;
A4
'Tapered', @(z) (c_r - 2 * (c_r - c_t) * z/b);
'Elliptical', @(z) (c_r * sqrt(1 - (2 * z/b).^2))
};
if (choice ~= 1)
titleString = [titleString num2str((alpha_t - alpha_r)*180/pi) ' Degree '];
end
chord = chordFcn(z);
thickness = chord * 0.12;
alpha = alphaFcn(z);
A5
% Print titleString
fprintf('\n\n\n\t%s\n', titleString);
figure;
plot(z, chordFcn(z * b/2));
title(['Chord Distribution for a ' titleString]);
xlabel('z/(b/2)');
ylabel('c');
figure;
plot(z, 0.12 * chordFcn(z * b/2));
title(['Maximal Thickness for a ' titleString]);
xlabel('z/(b/2)');
ylabel('t');
figure;
plot(z, alphaFcn(z * b/2));
title(['Absolute Angle of Attack Distribution for a ' titleString]);
xlabel('z/(b/2)');
ylabel('\alpha_a');
% Program: finiteWing.m
% Author: Gregory J. McCauley
% Last Modified: December 03, 2005
%
% Calculate the odd Fourier coefficients for a symmetric wing described by
% a chord and absolute angle of attack distribution along the half wing
%
% Input Variables:
%
% chordFcn
% Type: Function handle
A6
% Description: Points to the function which describes the chord length
% for the half wing as a function of the spanwise
% coordinate
%
% alphaFcn
% Type: Function handle
% Description: Points to the function which describes the absolute
% angle of attack for the half wing as a function of
% the spanwise coordinate
%
% k_0
% Type: Number
% Description: Lift curve slope of the wing profile
%
% c_r
% Type: Number
% Description: Root chord length of the wing
%
% b
% Type: Number
% Description: Span of the wing
%
%
%
% Output Variables:
%
% fourierCoefficients
% Type: Number Array
% Description: Values of the odd Fourier coefficients for the
% decomposition
%
% C_L
% Type: Number
% Description: Lift coefficient
%
% C_D_i
% Type: Number
% Description: Induced drag coefficient
%
% C_D_iPercent
% Type: Number
% Description: Comparison of induced drag to that of an elliptical wing
A7
% Determine wing area
S = 2 * quad(chordFcn, 0, b/2);
A8
limit = min(find(abs(fourierCoefficients) < abs(fourierCoefficients(1) * 0.01)));
% Graph the resulting gamma distribution vs. that of the elliptical wing
graphFiniteWingResults(fourierNums, fourierCoefficients);
end
A9
% Print induced drag ratio
fprintf('\n\tThe induced drag is %4.2f percent of the elliptical distribution\n\n',
C_D_iPercent);
end
% Render plot
figure;
plot(z, Gamma, z, Gamma_elliptical, '-.');
xlabel('z/(b/2)');
ylabel('\Gamma/\Gamma_s');
end
A10
Example Output of Running Code:
EDU>> project2
sonic =
70
C_l =
2.3153
EDU>> project2
sonic =
77
C_l =
0.3035
2*z/b c alpha_a t
1.0000 3.2200 0.0698 0.3864
0.9877 3.2200 0.0698 0.3864
A11
0.9511 3.2200 0.0698 0.3864
0.8910 3.2200 0.0698 0.3864
0.8090 3.2200 0.0698 0.3864
0.7071 3.2200 0.0698 0.3864
0.5878 3.2200 0.0698 0.3864
0.4540 3.2200 0.0698 0.3864
0.3090 3.2200 0.0698 0.3864
0.1564 3.2200 0.0698 0.3864
0.0000 3.2200 0.0698 0.3864
Fourier Coefficients
1 0.06059014237
3 0.00651025006
5 0.00126914165
7 0.00034958633
9 0.00012469123
11 0.00005311927
13 0.00002520673
15 0.00001243589
17 0.00000571313
19 0.00000159886
EDU>> LIFT=.5*1.226*((.22*340)^2)*.4571072*77.3
LIFT =
1.2119e+05
EDU>> LIFT=.5*.467*((.7*304)^2)*.4571072*77.3
LIFT =
3.7362e+05
EDU>>
A12