2.7K views

Uploaded by vahid

save

You are on page 1of 18

**Prepared By: Brian Harrison
**

15490536

ME 163 Fall 05

December 5, 2005

Introduction

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 above mentioned requirements.

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

subsonic at high speeds.

I also attempted to write code to perform Thwaites’ method, however I was

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

the stall angle.

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

important that the wing is completely subsonic.

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

confident that it is working properly.

Figure 1. NACA 0012 Coefficient of Lift vs. Alpha.

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

for each specification for each wing.

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

NACA 6412 288,770 373,620

Table 1. Calculated Lifts for each wing at both specified constants

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

NACA 6412 to eliminate this issues.

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

NASG Airfoil Contour Data. http://www.nasg.com/afdb/list-airfoil-e.phtml. 12/4/05.

**UIUC Airfoil Coordinates Database. http://www.ae.uiuc.edu/m-
**

selig/ads/coord_database.html. 12/4/05.

Abbott & Doenhoff, “Theory of Wing Sections.” Dover.

Kuethe & Chow, “Foundations of Aerodynamics.” Wiley.

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

**% Set number of tabular and plot points
**

numSample = 10;

numPlot = 100;

**% Calculate and set profile characteristics
**

alpha_1 = 8;

c_l_1 = 2.3153;

alpha_2 = -4;

c_l_2 = .3035;

**k_0 = (c_l_1 - c_l_2)/(pi/180 * (alpha_1 - alpha_2));
**

alpha_L0 = 180/pi * (pi/180 * alpha_1 - c_l_1/k_0);

%k_0 = 2 * pi;

% Set span

b = 24;

**% Set root and tip chord lengths
**

% NOTE: Depending on the chord profile, tip chord may not be used

c_r = 3.22;

c_t = 3.22;

**% Set root and tip absolute angles of attack
**

% NOTE: Depending on the chord profile, tip angle may not be used

alpha_r = pi/180 * 4;

alpha_t = pi/180 * 4;

**% Set up names and chord functions for wing planforms
**

planform = {

'Rectangular', @(z) (ones(size(z)) * c_r);

A4

'Tapered', @(z) (c_r - 2 * (c_r - c_t) * z/b);

'Elliptical', @(z) (c_r * sqrt(1 - (2 * z/b).^2))

};

**% Prompt user for chord description
**

fprintf('\n\tThe available planforms are:\n');

for i = 1:size(planform, 1)

fprintf('\t\t%d - %s\n', i, planform{i, 1});

end

fprintf('\tWhich planform [1-%d] would you like to use? ', i);

choice = input('');

**planformString = [planform{choice, 1} ' Planform'];
**

titleString = [planformString ' with '];

chordFcn = planform{choice, 2};

**% Set up names and twist functions
**

twist = {

'Zero', @(z) (ones(size(z)) * alpha_r);

'Linear', @(z) (alpha_r - 2 * (alpha_r - alpha_t) * z/b);

'Elliptical', @(z) ((alpha_r - alpha_t) * sqrt(1 - (2 * z/b).^2) + alpha_t)

};

**% Prompt user for alpha description
**

fprintf('\n\tThe available twist distributions are:\n');

for i = 1:size(planform, 1)

fprintf('\t\t%d - %s\n', i, twist{i, 1});

end

fprintf('\tWhich twist distribution [1-%d] would you like to use? ', i);

choice = input('');

if (choice ~= 1)

titleString = [titleString num2str((alpha_t - alpha_r)*180/pi) ' Degree '];

end

**titleString = [titleString twist{choice, 1} ' Twist'];
**

alphaFcn = twist{choice, 2};

**% Calculate and print the profile characteristics at node points
**

theta = linspace(0, pi/2, (numSample + 1))';

z = b/2 * cos(theta);

chord = chordFcn(z);

thickness = chord * 0.12;

alpha = alphaFcn(z);

A5

% Print titleString

fprintf('\n\n\n\t%s\n', titleString);

**% Print coordinate information
**

fprintf('\n\t2*z/b\t\tc\t\t\talpha_a\t\tt\n');

fprintf('\t%5.4f\t\t%5.4f\t\t%5.4f\t\t%5.4f\n', [cos(theta), chord, alpha, thickness]');

**% Plot planform and twist distributions
**

theta = linspace(0, pi/2, numPlot);

z = cos(theta);

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');

**[fourierCoefficients, C_L, C_D_i, C_D_iPercent] = finiteWing(chordFcn, alphaFcn, k_0,
**

c_r, b);

**title(['Non-dimensional Circulation Distribution for a ' titleString]);
**

legend(planformString, 'Elliptical Planform');

% 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

**function [fourierCoefficients, C_L, C_D_i, C_D_iPercent] = finiteWing(chordFcn,
**

alphaFcn, k_0, c_r, b)

A7

% Determine wing area

S = 2 * quad(chordFcn, 0, b/2);

**% Set accuracy flag
**

accurate = false;

**% Set initial guess for number of odd Fourier coefficients
**

% necessary for A_n to be less than one percent of A_1

%

% NOTE: For speed, an expected overestimate is initially used

%

% Due to the matrix solution, little penalty should be

% incurred by this overestimate

numFourier = 10;

**while (accurate ~= true)
**

% Create point set for linear algebraic problem

% NOTE: A column vector is created to ease replication

theta = linspace(0, pi/2, (numFourier + 1));

theta = theta(2:end)';

coordinate = b/2 * cos(theta);

**% Determine the chord and angle of attack at the given positions
**

chord = chordFcn(coordinate);

alpha = alphaFcn(coordinate);

**% Create odd Fourier coefficient vector and matrix
**

fourierNums = 2 * [1:numFourier] - 1;

fourierOddMat = repmat(fourierNums, numFourier, 1);

**% Create sine matrix [sine(n * theta)]
**

sinMat = sin(fourierOddMat .* repmat(theta, 1, numFourier));

**% Create coefficient submatrices
**

C1Mat = repmat(1./(k_0 .* chord), 1, numFourier);

C2Mat = 1/(4 * b) * fourierOddMat .* repmat(1./sin(theta), 1, numFourier);

**% Create coefficient matrix
**

M = k_0 * c_r * (C1Mat + C2Mat) .* sinMat;

**% Calculate odd Fouier coefficients
**

fourierCoefficients = M\alpha;

**% Calculate how many coefficients necessary for A_n to be
**

% less than one percent of A_1

A8

limit = min(find(abs(fourierCoefficients) < abs(fourierCoefficients(1) * 0.01)));

**% Increase number of odd Fourier coefficients calculated
**

% if accuracy is not achieved.

if (isempty(limit))

numFourier = numFourier + 5;

else

accurate = true;

end

end

**% Calculate the lift and induced drag
**

C_L = (k_0 * c_r * pi * b)/(4 * S) * fourierCoefficients(1);

C_D_i = (k_0^2 * c_r^2 * pi)/(16 * S) * fourierNums * fourierCoefficients.^2;

**% Calculate the induced drag percentage compared to the elliptical wing
**

C_D_iPercent = (1 + (fourierNums(2:end) *

fourierCoefficients(2:end).^2)/fourierCoefficients(1)^2) * 100;

**% Print the results
**

printFiniteWingResults(fourierNums, fourierCoefficients, limit, C_L, C_D_i,

C_D_iPercent);

**% Graph the resulting gamma distribution vs. that of the elliptical wing
**

graphFiniteWingResults(fourierNums, fourierCoefficients);

end

**function printFiniteWingResults(fourierNums, fourierCoefficients, limit, C_L, C_D_i,
**

C_D_iPercent);

**% Print all Fourier coefficients calculated
**

fprintf('\n\tFourier Coefficients\n');

fprintf('\t%d\t\t%12.11f\n', [fourierNums', fourierCoefficients]');

**% Print number of odd Fourier coefficients necessary for A_n
**

% to be less than one percent of A_1

fprintf('\n\tNumber of odd Fourier coefficients necessary for 1%% of A_1: %d\n', (limit

- 1));

**% Print lift and drag coefficients
**

fprintf('\n\tLift coefficient: %8.7f\n', C_L);

fprintf('\tInduced drag coefficient: %8.7f\n', C_D_i);

A9

% Print induced drag ratio

fprintf('\n\tThe induced drag is %4.2f percent of the elliptical distribution\n\n',

C_D_iPercent);

end

function graphFiniteWingResults(fourierNums, fourierCoefficients)

**% Set number of points to use for plotting
**

numPlot = 100;

**% Create coordinates for plotting
**

theta = linspace(0, pi/2, numPlot)';

z = cos(theta);

**% Create matrices to solve for value of Fourier transform at given
**

% coordinates

fourierNumsMat = repmat(fourierNums, numPlot, 1);

thetaMat = repmat(theta, 1, length(fourierNums));

fourierCoefficientsMat = repmat(fourierCoefficients, 1, numPlot)';

**% Determine gamma distributions
**

Gamma = sum(fourierCoefficientsMat .* sin(fourierNumsMat .* thetaMat),

2)./(fourierCoefficients' * sin(fourierNums * pi/2)');

Gamma_elliptical = sqrt(1 - z.^2);

% 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

**EDU>> clear all
**

EDU>> ME163Homework4

**The available planforms are:
**

1 - Rectangular

2 - Tapered

3 - Elliptical

Which planform [1-3] would you like to use? 1

**The available twist distributions are:
**

1 - Zero

2 - Linear

3 - Elliptical

Which twist distribution [1-3] would you like to use? 1

Rectangular Planform with Zero Twist

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

Number of odd Fourier coefficients necessary for 1% of A_1: 3

**Lift coefficient: 0.4571072
**

Induced drag coefficient: 0.0092546

The induced drag is 103.71 percent of the elliptical distribution

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

- Compressible Fluid Dynamics Thompson)Uploaded bykiapoulo
- Introduction to Vortex Panel MethodUploaded bysiva_ksr
- Aerodynamics and the Stability of AircaraftUploaded byMohd Rozi Mohd Perang
- vlmUploaded byhkhouader
- Aerodynamics Lab 2 - Airfoil Pressure MeasurementsUploaded byDavid Clark
- Intro to Programming Using FORTRAN90Uploaded bymyebooks9
- Modern Adaptation of Prandtl's Classic Lifting-Line TheoryUploaded byRobert Kulhanek
- Aircraft Design Project 2Uploaded byMahesh J Rao
- Lateral and Directional StabilityUploaded byk_s_mahendiran777
- AIAA-2007-6616-438Uploaded bylord-soth
- AerodynamicsUploaded byPhani Kumar
- Vortex panel method - sUploaded bySattar Al-Jabair
- Introduction to fortron programmingUploaded bymallikedula
- Aerodynamics_WorkbookUploaded byaarulmurugu
- longitudinalStabilityDerivativesUploaded byJoão Morgado
- RWPAEThesisUploaded byTalha Mutlu
- StabilityUploaded byAli Raza
- AEAT Longitudinal Dynamic Paper FinalUploaded bydumflab
- StabilityUploaded byAleksandar Vekić
- Climb Performance of a Turbojet AircraftUploaded byaeroengineer1
- multi disciplinary optimisationUploaded byismailovic2
- AerodynamicUploaded byمحمد أبشر
- AerodynamicsUploaded byPham Hai
- GuidelinesUploaded bychethanaprao
- MECN 4016 AerodynamicsUploaded byJamie Bentley