You are on page 1of 31

Project 1: Flow Code

Madison Maloney
MAE 252 Aerodynamics I
Dr. Edwards
March 31, 2017
Maloney 2

Overview

A task was set forth to write code that plots streamlines and velocity magnitude for various
elementary flows based on user input. This allows visualization of several elementary flows
under varied conditions and locations. Users are able to input the following variables:
Freestream velocity (uinf)
Cylinder radius (rcyl)
Source strength (sourcestrength)
Sink strength (sinkstrength)
Source location x-coordinate (xca)
Source location y-coordinate (yca)
Sink location y-coordinate (ycb)
Distance between sources and sinks (dist)

The code is capable of producing contour plots for a Rankine half-oval, a Rankine oval, non-
lifting flow over a cylinder, lifting flow over a cylinder, and invented flows. The invented flow
in this report features a sink and lifting flow over a cylinder at varied distances from one another.

Plots & Discussion

In the following plots, the white lines represent the streamlines for the flow. The filled contour
represents the magnitude of the velocity, with the color bar to the right of the plots showing the
velocity magnitudes corresponding to the contour colors. For each plot, values used, appropriate
equations, and general discussion is included.
Maloney 3

Rankine Half-Oval

Figure 1: Streamlines and velocity magnitude for a Rankine half-oval

Values Used:
uinf = 28, sourcestrength = 10, sinkstrength = 10, xca = 1, yca = .5, ycb = .5, dist = 1

Discussion:
A Rankine half-oval features the superposition of uniform flow and a source. The stream
function for this flow is found by superimposing the streamfunctions for uniform flow and
source flow to obtain equation 1.1.

V r sin (1.1)
2
The velocity magnitude is also calculated using the principle of superposition. The free stream
velocity and source velocity components are superimposed, and magnitude is calculated using
equation 1.2.
2

V sin
2
V V cos (1.2)
2 r

The plot matches expectations, with streamlines directed away from the source and velocity
magnitude increasing greatly around the location of the source. The source induces radial flow
from its origin, and that is represented in the plot.
Maloney 4

Rankine Oval

Figure 2: Streamlines and velocity magnitude for a Rankine oval

Values Used:
uinf = 24, sourcestrength = 10, sinkstrength = 10, xca = .5, yca = .5, ycb = .5, dist = 1

Discussion:
A Rankine oval combines a uniform flow, source, and sink. The streamfunction for a Rankine
oval is obtained by superimposing the streamfunctions for uniform flow, source flow, and sink
flow to get equation 1.3 ( 1 is for source and 2 is for sink).

V r sin 1 2 (1.3)
2 2

The velocity is also found through superposition of velocity of uniform flow, sink flow, and
source flow to obtain equation 1.4 for the velocity magnitude of the Rankine oval.

2

V sin
2
V V cos (1.4)
2 r source 2 r sin k

This plot matches expectations. Velocity magnitude is much higher near the source and sink and
a bit faster than freestream velocity between the two. The streamlines within the Rankine oval
Maloney 5

originate from the source and flow into the sink. The thick line connecting the two is often
referred to as the dividing streamline.

Non-Lifting Cylinder

Figure 3: Streamlines and velocity magnitude for non-lifting flow over a cylinder

Values Used:
uinf = 28, rcyl = .22, sourcestrength = 10, sinkstrength = 10, xca = 1, yca = .5, ycb = .5, dist = 1,
G = 15

Discussion:
Flow over a non-lifting cylinder is equivalent to the superposition of doublet flow and uniform
flow. A doublet is a singularity produced by a source-sink pair whose separation distance
approaches zero. In this flow, there is a source to the left of the sink. The streamfunction for a
non-lifting cylinder is obtained by superimposing the streamfunctions for a doublet and uniform
flow to obtain equation 1.5.
R2
V r sin 1 2 (1.5)
r

The velocity magnitude is found by superimposing doublet and uniform velocities to get
equation 1.6.
Maloney 6

2 2
1 R2 R2
V V r cos 1 2 1 2 V cos (1.6)
r r r

This plot features the streamline patterns characteristic of a doublet in the center. The source
induces outward radial flow, and the sink pulls that flow in, resulting in a clockwise streamline
direction in the center. This plot also shows velocity magnitude increasing towards the center of
the doublet, as is expected due to the induced flow between source and sink. Flow is symmetric
about a vertical and horizontal axis through the center of the doublet.

Lifting Cylinder

Figure 4: Streamlines and velocity magnitude for lifting flow over a cylinder

Values Used: uinf = 28, rcyl = .22, sourcestrength = 10, sinkstrength = 10, xca = 1, yca = .5, ycb
= .5, dist = 1, G = 15

Discussion:
Lifting flow over a cylinder combines non-lifting flow over a cylinder (uniform flow + doublet)
with vortex flow. The streamfunction for lifting flow over a cylinder is obtained by
superimposing the streamfunction for non-lifting flow over a cylinder with the streamfunction
for a vortex, as seen in equation 1.7.
Maloney 7

R2 r
V r sin 1 ln (1.7)
r 2 2 R

The velocity magnitude is also found using superposition of the velocity for uniform flow,
doublet flow, and vortex flow, as seen in equation 1.8.

2 2
R2 R2
V 1 2 V cos 1 2 V sin (1.8)
r r 2 r

Unlike the plot for non-lifting flow over a cylinder, this plot is not symmetric about a horizontal
axis through the center. This is a result of the lift provided by the vortex. As expected, the
velocity magnitude is generally a bit greater above the doublet. The flow near the center of the
vortex and doublet is clockwise in this situation due to the placement of the source and sink
composing the doublet, and the vortex.

Invented Flows

Figure 5: A sink flow and lifting flow over a cylinder superimposed. The left plot has the sink
flow located above the lifting flow over the cylinder, while the right plot has the two meeting at
the same point.

Values Used (Left plot):


uinf = 28, rcyl = .22, sourcestrength = 10, sinkstrength = 10, xca = 1, yca = .3, ycb = .8, dist = 0,
G = 15

Values Used (Right plot):


uinf = 28, rcyl = .22, sourcestrength = 10, sinkstrength = 10, xca = 1, yca = .3, ycb = .3, dist = 0,
G = 15
Maloney 8

Discussion:
This novel flow features lifting flow over a cylinder superimposed with a sink flow. This sink
flow is brought closer to the lifting flow in the second plot (Figure 5 right). The superposition of
the two at a distance still creates a general trend of increased velocity above the lifting cylinder,
though velocity magnitude decreases sharply right below the sink, increasing above it. There is
an interesting S shape through the doublet of the lifting flow, creating a bit of chaos in the flow.
When the sink and lifting flow over a cylinder are placed on top of one another, the general
shape of the plot from regular lifting flow over a cylinder is produced, but there is some flow
near the doublet which curves back toward the direction that the freestream flow came from.

MATLAB Code

clear all
close all
clc

% setting values
rcyl= .22; % cylinder radius
uinf = 28; % freestream velocity
sourcestrength = 10; % source strength
sinkstrength = 10; % sink strength - input a positive value
dist = 1; % distance between sources and sinks
pi = 4.0*atan(1.0); % pi
k = (rcyl^2)*(2*pi)*uinf; % doublet strength
xmax = 2.0; % max x for the plot domain
ymax = 1.0; % max y for the plot domain
xca = 1; % source x location
yca = .5; % source y location
xcb = xca + dist; % sink x location
ycb = 0.5; % sink y location
G = 15; % gamma (circulation)
N = 101; % number of points in y
M = 201; % number of points in x
dx = xmax/(M-1); % plot increment
dy = ymax/(N-1); % plot increment

% for loop used to plot contours


% each section is for a different flow type
% calculates streamfunction values
% finds u and v
% velocity magnitude calculated using u and v

for j=1:N
for i=1:M
x(i,j) = (i-1)*dx;
y(i,j) = (j-1)*dy;

% uniform flow
psi_uni = uinf*(y(i,j)-yca);
Maloney 9

u_uni = uinf;
v_uni = 0.0;
umag_uni = sqrt(u_uni^2+v_uni^2);

% source at xca,yca
rad2a = (x(i,j)-xca)^2 + (y(i,j)-yca)^2 + 1e-6;
psi_source = (sourcestrength/(2*pi))*atan2(y(i,j)-yca,x(i,j)-xca);
u_source = (sourcestrength/(2*pi))*(x(i,j)-xca)/(rad2a);
v_source = (sourcestrength/(2*pi)*(y(i,j)-yca)/(rad2a));
umag_source = sqrt(u_source^2+v_source^2);

% sink at xcb,ycb
rad2b = (x(i,j)-xcb)^2 + (y(i,j)-ycb)^2 + 1e-6;
psi_sink = -(sinkstrength/(2*pi))*atan2(y(i,j)-ycb,x(i,j)-xcb);
u_sink = -(sinkstrength/(2*pi))*(x(i,j)-xcb)/(rad2b);
v_sink = -(sinkstrength/(2*pi))*(y(i,j)-ycb)/(rad2b);
umag_sink = sqrt(u_sink^2+v_sink^2);

% Rankine half-oval
psi_half = psi_uni + psi_source;
u_half = u_uni + u_source;
v_half = v_uni + v_source;
umag_half = sqrt(u_half^2+v_half^2);

% Rankine full-oval
psi_full = psi_half + psi_sink;
u_full = u_half + u_sink;
v_full = v_half + v_sink;
umag_full = sqrt(u_full^2+v_full^2);

% non-lifting flow over cylinder (doublet + uniform)


psi_non = (uinf*sqrt(rad2a)*sin(atan2(y(i,j)-yca,x(i,j)-xca)))*(1-((rcyl^2)/rad2a));
u_non = (1-((rcyl^2))/rad2a)*uinf*cos(atan2(y(i,j)-yca,x(i,j)-xca));
v_non = -(1+((rcyl^2))/rad2a)*uinf*sin(atan2(y(i,j)-yca,x(i,j)-xca));
umag_non = sqrt(v_non^2 + u_non^2);

% lifting flow over cylinder (doublet + uniform + vortex)


psi_lift = (uinf*sqrt(rad2a)*sin(atan2(y(i,j)-yca,x(i,j)-xca)))*...
(1-((rcyl^2)/rad2a)+(G/(2*pi))*log(sqrt(rad2a)/rcyl));
u_lift = (1-((rcyl^2)/(rad2a)))*uinf*cos(atan2(y(i,j)-yca,x(i,j)-xca));
v_lift = -(1+((rcyl^2)/(rad2a)))*uinf*sin(atan2(y(i,j)-yca,x(i,j)-xca))...
-(G/(2*pi*sqrt(rad2a)));
umag_lift = sqrt(u_lift^2 + v_lift^2);

% invented flow - also varied positions


psi_new1 = psi_sink + psi_lift;
u_new1 = u_sink + u_lift;
v_new1 = v_sink + v_lift;
umag_new1 = sqrt(u_new1^2+v_new1^2);

% setting plot points throughout the running of loop


psiplot(i,j) = psi_new1;
vplot(i,j) = umag_new1;
Maloney 10

end
end

% plotting
figure
hold on;

% filled plot for velocity magnitude


contourf(x,y,vplot,0:1:125,'LineStyle','none')

% line plot for streamlines


contour(x,y,psiplot,35,'LineColor','w')

% plot formatting
title('Streamlines and Velocity Magnitude')
colorbar
caxis([0,125]);
colormap(jet);
hold off;

Published with MATLAB R2015b


Project 2: Airfoil Code

Madison Maloney
MAE 252 Aerodynamics I
Dr. Edwards
April 7, 2017
Maloney 2

Overview

For this assignment, we were asked to perform calculations and make plots for the upper surface
of airfoils using the source-panel method. Angle of attack and freestream velocity are able to be
modified by the user. For each plot in the following report, angle of attack and freestream
velocity used in calculations will be listed. For each airfoil the following were plotted versus
x :
c

y V
C p
c V
y per chord length normalized surface tangential velocity pressure coefficient (-)

The impact of varying angle of attack on negative pressure coefficient was also measured for one
airfoil. Three NACA airfoils were chosen for this set of calculations and graphing. The selected
airfoils are as follows:

NACA 0010

NACA 23018

NACA 2412

The source panel method is a numerical method used to calculate tangential velocity and
pressure coefficient for nonlifting flows (Anderson). The upper surface of an airfoil for which
the source panel method is to be applied is broken up into discrete panels over which
integrations can be taken for calculations (Edwards). In order to use this method, discrete values
of the source distribution must be obtained at each panel. The following equations are important
in the implementation of the source panel method:

Equation 1.1 integrates the incremental changes in potential over the airfoil and takes the dot
product with the surface normal vector. By setting this equal to zero, source strength can be
calculated.

TE ( s )ds ln(r )
s ns ns 0 (1.1)
LE 2
Maloney 3

Equation 1.2 gives the tangential surface velocity by adding the surface velocity induced by the
source distribution with that induced by the freestream flow. This can be solved by setting the
left-hand side equal to zero.

i N
i 1
2

j 1, j i 2
2 ( xi x j ) nx i ( yi y j )n y j s j V cos (nx i ) sin ( n y j ) 0 (1.2)
rij

Equation 1.4 gives the pressure coefficient for the i th panel. Note that negative pressure
coefficient was used for the purposes of this assignment to better visualize its changes alongside
normalized surface tangential velocity.
2
(V )i
C pi 1 (1.3)
V 2

By plotting the appropriate values for negative pressure coefficient and normalized surface
tangential velocity over the upper surface of the airfoil, aerodynamic characteristics can be better
visualized.

Plots & Discussion

NACA 0010:

Figure 1: Normalized surface tangential velocity and negative pressure coefficient for the NACA
0010 airfoil (free-stream velocity: 22 m/s; angle of attack: 12 degrees)
Maloney 4

Camber = 0 (symmetric)
Location of Camber = 0
Max Thickness = .10c

The plot for the NACA 0010 airfoil is shown in figure 1 with the black line outlining the airfoils
upper surface, the blue line representing negative pressure coefficient, and the red line
representing normalized surface tangential velocity. As indicated by the airfoil number, this
airfoil is symmetric, which is why the y/c plot exemplifies no camber. Both the negative pressure
coefficient and normalized surface tangential velocity are shown to rise quickly at the front of
the airfoil, peaking sharply at x/c values of less than 0.05, which is very close to the front of the
airfoil. The negative pressure coefficient peaks at a value around 0.8 and decreases in a slightly
parabolic but almost linear manner across the rest of the airfoil to -0.4. The normalized surface
tangential velocity is shown to peak at a value of about 1.4 and decrease across the rest of the
airfoil in a parabolic but almost linear fashion to about 0.65 for the flow parameters. Both the
negative pressure coefficient and the normalized surface tangential velocity dropped off swiftly
near the end of the airfoil (x/c=1).

NACA 23018:

Figure 2: Normalized surface tangential velocity and negative pressure coefficient for the NACA
23018 airfoil (free-stream velocity: 22 m/s; angle of attack: 12 degrees)
Maloney 5

CL,max = 3
Location of Max Camber= .15c
Max Thickness = .18c

The plot for the NACA 23018 airfoil is shown in figure 2 with the black line outlining the
airfoils upper surface, the blue line representing negative pressure coefficient, and the red line
representing normalized surface tangential velocity. Unlike the NACA 0010 airfoil, the NACA
23018 is a cambered airfoil for which specific characteristics are listed above. Both the negative
pressure coefficient and normalized surface tangential velocity peak at an x/c value of about
0.09. The peaks are more rounded than those of the NACA 0010 airfoil. The maximum negative
pressure coefficient and normalized surface tangential velocity occur slightly before the
maximum thickness of the airfoil. The normalized surface tangential velocity peaks at a value of
about 1.5, decreasing across the airfoil to a value of about 0.5. The negative pressure coefficient
peaked at 1.2 and decreased across the airfoil to -0.3 for the flow parameters. Both the negative
pressure coefficient and the normalized surface tangential velocity dropped off swiftly near the
end of the airfoil (x/c=1).

NACA 2412:

Figure 3: Normalized surface tangential velocity and negative pressure coefficient for the NACA
2412 airfoil (free-stream velocity: 22 m/s; angle of attack: 12 degrees)

Camber = .02c
Location of Camber = .4c
Max Thickness = .12c
Maloney 6

The plot for the NACA 2412 airfoil is shown in figure 3 with the black line outlining the airfoils
upper surface, the blue line representing negative pressure coefficient, and the red line
representing normalized surface tangential velocity. Like the NACA 23018 airfoil, the peaks of
the NACA 2412 airfoil at the given flow parameters are rounded rather than sharp. The peak
values occur well before the maximum thickness of the airfoil but not as close to the front of the
airfoil as the NACA 0010 plot exhibited. For the flow parameters utilized, the negative pressure
coefficient and normalized surface tangential velocity peaked at an x/c value of about 0.1. The
maximum negative pressure coefficient was 0.8, and the coefficient decreased in a roughly linear
manner to about -0.3. The normalized surface tangential velocity peaked at a value of 1.3 and
decreased to about 0.6 in a fairly linear manner. Both the negative pressure coefficient and the
normalized surface tangential velocity dropped off swiftly near the end of the airfoil (x/c=1).

Figure 4: Negative pressure coefficient for the NACA 2412 airfoil at various angles of attach
(free-stream velocity: 22 m/s; angle of attack: 5 degrees, 15 degrees, 25 degrees, 35 degrees)

The four plots above show negative pressure coefficient for various angles of attack (noted in
each plot) for the NACA 2412 airfoil. As angle of attack is increased in each respective graph,
maximum negative pressure coefficient increases, and this peak occurs closer to the front of the
airfoil. Likewise, the minimum value decreases as angle of attack is increased. The peak also
Maloney 7

becomes sharper and less curved as angle of attack is increased. The slope of the negative
pressure coefficient plot appears to be fairly linear for an angle of attack of 5 degrees and
becomes more and more curved as that value is increased. Visually, the increase in angle of
attack for flow over a NACA 2412 airfoil makes the plot of negative pressure coefficient appear
more extreme.

MATLAB Code

The following is the MATLAB code that was used for calculations and plotting. Please note that
the appropriate airfoil matrix was changed in the read in panel coordinates part of the code
based on which airfoil was being studied. Freestream velocity and angle of attack can be changed
in the setting conditions of flow section. The code is commented for further detail.

clear all
close all
clc

% Aero 2 Project
% Madison Maloney

% setting value of pi
pi = 4.0*atan(1.0);

% importing airfoil coordinates, putting them in matrices, & sorting

% NACA 0010
table0 = fopen('naca0010.dat.txt');
newtab0 = tdfread('naca0010.dat.txt','tab');
newcell0 = struct2cell(newtab0);
matr0 = flipud(newcell0{1,1}(1:18,:));

% NACA 23018
table23 = fopen('naca23018.dat.txt');
newtab23 = tdfread('naca23018.dat.txt','tab');
newcell23 = struct2cell(newtab23);
matr23 = flipud(newcell23{1,1}(1:18,:));

% NACA 2412
table24 = fopen('naca2412.dat.txt');
newtab24 = tdfread('naca2412.dat.txt','tab');
newcell24 = struct2cell(newtab24);
matr24 = flipud(newcell24{1,1}(1:18,:));

% NACA 0006 - Check


tablecheck = fopen('naca0006.dat.txt');
newtabcheck = tdfread('naca0006.dat.txt','tab');
newcellcheck = struct2cell(newtabcheck);
matrcheck = flipud(newcellcheck{1,1}(1:18,:));

% Read in panel coordinates


% the matrix used for these changes based on which airfoil is being plotted
Maloney 8

npanel = length(matr24)-1; % number of panels to be used


x = matr24(:,1);
y = matr24(:,2);

% Setting conditions of flow


uinf = 22.0; % free stream velocity
alpha = 12.0; % angle of attack in degrees
alpha = alpha*pi/180.0; % conversion of angle of attack to radians

% for loop to carry out the panel method


for i=1:npanel
xi(i) = 0.5*(x(i)+x(i+1)); % x location at center of ith panel
yi(i) = 0.5*(y(i)+y(i+1)); % y location at center of ith panel
dsi = sqrt((x(i+1)-x(i))^2 + (y(i+1)-y(i))^2); %delta s_i
xnxi = -(y(i+1)-y(i))/dsi; % x component of normal vector
xnyi = (x(i+1)-x(i))/dsi; % y component of normal vector
for j=1:npanel
if (j ~= i)
xj = 0.5*(x(j)+x(j+1)); % x location at center of jth panel
yj = 0.5*(y(j)+y(j+1)); % x location at center of jth panel
dsj = sqrt((x(j+1)-x(j))^2 + (y(j+1)-y(j))^2); %delta s_j
rij2 = (xi(i)-xj)^2 + (yi(i)-yj)^2; % distance^2 between panel j and panel i
a(i,j) = ((xi(i)-xj)*xnxi + (yi(i)-yj)*xnyi)*dsj/rij2; %matrix coefficient
a(i,j) = 0.5*a(i,j)/pi; %matrix coefficient
end
end
a(i,i) = 0.5; % add to diagonal of matrix
b(i,1) = -uinf*(cos(alpha)*xnxi + sin(alpha)*xnyi); % free stream; rhs of linear system
end

% Source strength calculation by solving system


ss=a\b;

% for loop to carry out panel method for tangential velocity


for i=1:npanel
xi(i) = 0.5*(x(i)+x(i+1)); % panel location
yi(i) = 0.5*(y(i)+y(i+1)); % panel location
dsi = sqrt((x(i+1)-x(i))^2 + (y(i+1)-y(i))^2); %delta s_i
tnxi = (x(i+1)-x(i))/dsi; % x component of tangent vector
tnyi = (y(i+1)-y(i))/dsi; % y component of tangent vector
sum = 0.0;
for j=1:npanel
if (j ~= i)
xj = 0.5*(x(j)+x(j+1)); % panel location
yj = 0.5*(y(j)+y(j+1)); % panel location
dsj = sqrt((x(j+1)-x(j))^2 + (y(j+1)-y(j))^2); %delta s_j
rij2 = (xi(i)-xj)^2 + (yi(i)-yj)^2; % distance^2 between panel i and j
sum = sum + 0.5*ss(j)*((xi(i)-xj)*tnxi+(yi(i)-yj)*tnyi)*dsj/...
(pi*rij2); % ss(j) = source strength for panel j
end
end
vtan(i) = (sum + uinf*(cos(alpha)*tnxi + sin(alpha)*tnyi))/uinf; %normalized tangential
velocity
Maloney 9

cp(i) = 1.0 - vtan(i)^2; % pressure coefficient


end

% Plotting
% now plot yi, normalized vtan, -cp vs xi

figure % open new figure


hold on
yyaxis left % set left y axis
title('NACA 2412 Airfoil'); % gives plot a title
ylim([0 .5]); % graph properties
xlabel('x/c'); % labels x axis
ylabel('y/c'); % labels left y axis
plot(x,y,'k-'); % plots airfoil

yyaxis right
ylim([-.8 2]); % graph properties
ylabel('V_{tan}/V_{\infty} and -C_p'); % labels right y axis
plot(xi,vtan,'r-'); % plots tangential velocity
plot(xi,(-1*cp),'b-'); % plots -Cp
hold off
grid on; % turns grid on for plot

set(gca,'XMinorTick','on','YMinorTick','on'); % turns on minor tick marks for x and right y axes


legend('y/c','V_{tan}/V_{\infty}','-C_p'); % creates a lengend for the plot
annotation('textbox',[.2 .6 .3 .3],'String','V_{\infty} = 22 m/s & \alpha = 12 deg.',...
'FitBoxToText','on'); % adds annotation about values used

Published with MATLAB R2017a

Sources

Anderson, John David. Fundamentals of Aerodynamics. New York, NY: McGraw-Hill

Education, 2017. Print.

Edwards, Jack. "Panel Metjod." 27 Mar. 2017. Lecture.

NACA 0010. Digital image. Imgur. N.p., n.d. Web. 06 Apr. 2017.

<https://i.stack.imgur.com/u7vzC.png>.

NACA 23018. Digital image. AirfoilTools. N.p., n.d. Web. 06 Apr. 2017.

<http://airfoiltools.com/images/airfoil/naca23018-il_m.png>.

NACA 2412. Digital image. AirfoilTools. N.p., n.d. Web. 07 Apr. 2017.

<http://airfoiltools.com/airfoil/details?airfoil=naca2412-il>.
Project 3: Hess-Smith
Panel Method

Madison Maloney
MAE 252 Aerodynamics I
Dr. Edwards
May 5, 2017
Maloney 2

Overview

This project seeks to apply the Hess-Smith source-vortex panel method to airfoils associated
with three historical airplanes. Additionally, it aims to compare the results of this method with
that of thin airfoil theory. For each airfoil, CP vs. x will be graphed for several angles of
c
attack. Graphs of CL vs. will also be presented in the following report as well as historical
background for each chosen aircraft. The following aircraft were selected for analysis throughout
this project and report:

Aircraft Associated Airfoil


Boeing 80A Boeing 106
Northrop XP-79 NACA 66-018
Douglas A2D Skyshark NACA 0012

The Hess-Smith method was formulated at Douglas Aircraft in the 1960s. It is a type of panel
method which holds the vortex strength constant over the airfoil and allows source strength to
vary. Using this concept along with the Kutta condition, a few aerodynamic qualities can be
calculated. The following report compares results with the values given by thin airfoil theory for
reference.

Plots & Discussion

Boeing 80A Boeing 106 Airfoil


Aircraft Airfoil

Figure 1: Photograph of a Boeing 80A Figure 2: Plot of a Boeing 106 airfoil

The Boeing 80A was one of the first passenger planes built for the comfort of people
onboard. It featured leather seats, ventilation, hot and cold running water, and reading lamps.
Prior to this aircraft, most commercial aircraft in the US were designed to transport mail rather
than humans. The focus of this design on the passenger experience helped to usher in a new
commercial aircraft design perspective that still carries on today. Additionally, the Boeing 80A
was the first aircraft to feature female flight attendants in flight. The 80A, which flew for the first
Maloney 3

time in 1929, had a capacity of eighteen passengers, 3 crewmembers, and 898 pounds of cargo, a
span of 80 feet, and top speed of 138 miles per hour.

The Boeing 106 airfoil is a


cambered airfoil used in the
design of the Boeing 80A. As
shown in the figure 3, the
magnitude of maximum pressure
coefficient increases with angle of
attack. For a freestream velocity
of 100 m/s for this airfoil,
pressure coefficient magnitude
peaks at a value of about 9 (15
degrees angle of attack). The
increase in magnitude of pressure
coefficient makes sense, as
positive pressure buildup on the
lower surface, coupled with
negative pressure buildup on the
Figure 3: Plot of negative pressure coefficient over a Boeing 106 top surface leads the airfoil to lift
airfoil upward. As angle of attack is
increased, it is logical for the
pressure coefficient to become
more pronounced as more
pressure is being applied to the
lower surface of the airfoil.
Figure 4 compares the results of
the Hess-Smith source-vortex
panel method with the results of
thin airfoil theory based on
coefficient of lift, which is
graphed based on angle of attack
in degrees. The Hess-Smith
method is a more accurate
representation since the Boeing
106 airfoil is not a good
representation of a thin airfoil.
Figure 4: Plot of lift coefficient and angle of attack for a Boeing
For the Boeing 106 airfoil, the
106 airfoil
Hess-Smith method gave greater
lift coefficients by about 0.3-0.5
across the angles of attack for
which lift coefficient was
calculated.
Maloney 4

Cessna 120 - NACA 2412


Aircraft Airfoil

Figure 5: Photograph of a Cessna 120 Figure 6: Plot of a NACA 2412 airfoil

The Cessna 120 is a lightweight aircraft that was first produced right after the end of
World War II. This aircraft was a general aviation craft that was considered affordable. Over
7,000 Cessna 120s and 140s sold between 1946 and 1850, which was important period of growth
for the aviation giant Cessna. The design of the Cessna 120 featured a strut-braced wing design
that became characteristic of many Cessna crafts as time went on. This airplane has a single
Continental Model C-90 engine rated at 85 horsepower. It has an empty weight of just 785
pounds, span of 32.833 feet, crew capacity of two, and maximum speed of 120 miles per hour.
This craft sold for around $3000.
The NACA 2412 airfoil is a
cambered airfoil used in the
design of the Cessna 120. As
shown in the figure 7, the
magnitude of maximum pressure
coefficient increases with angle of
attack. For a freestream velocity
of 100 m/s for this airfoil, pressure
coefficient magnitude peaks at a
value of about 9.5 (15 degrees
angle of attack). The increase in
magnitude of pressure coefficient
makes sense, as mentioned
previously with the pressure
buildup on the surface of the
airfoil. I found it interesting that
the very front of this airfoil (along
Figure 7: A plot of negative pressure coefficient over a NACA with the other two) has a positive
2412 airfoil pressure coefficient for both the
top and bottom surface at zero
angle of attack.
Maloney 5

Figure 8 compares the results of the


Hess-Smith source-vortex panel
method with the results of thin airfoil
theory based on coefficient of lift,
which is graphed based on angle of
attack in degrees. As mentioned, the
Hess-Smith method is a more accurate
representation since the NACA 2412
airfoil is not a good representation of
a thin airfoil. Like the Boeing 106, the
NACA 2412 airfoil is expected to
have a higher lift coefficient based on
the Hess-Smith method than with thin
airfoil theory. The difference between
Figure 8: A plot lift coefficient and angle of attack for a the two calculation methods is quite
NACA 2412 airfoil small for the 2412 airfoil, whose plots
appear to vary by a practically
constant value of 0.2.
Douglas A2D Skyshark NACA 0012
Aircraft Airfoil

Figure 9: Photograph of a Douglas A2D


Figure 10: Plot of a NACA 0012 airfoil
Skyshark

The Douglas A2D Skyshark was a carrier-based attack aircraft designed by the Douglas
Aircraft Company for the US Navy. It was first serviced in 1954 and was a successor of the
Douglas Skyraider. The design of this aircraft was intended to serve as an alternative to turbojet
military aircraft because turbojet aircraft were not believed to have the capability to reliably
operate from ships at sea. The Skyshark utilized turboprop engines, but Douglas design did not
meet expectations of excellence. The aircraft was heavy and bulky for a fighter and had issues
with its turboprop engines. Only twelve Skysharks were produced, with only eight actually
flying. Two crashes resulted from the flight of the eight aircraft that flew. The Skyshark had an
empty weight of 23,005 pounds, length of 41.27 feet, and maximum speed of 506 miles per hour.
Maloney 6

The NACA 0012 airfoil is a


symmetric airfoil used in the design
of the Douglas A2D Skyshark. As
shown in the figure 11, the
magnitude of maximum pressure
coefficient increases with angle of
attack. For a freestream velocity of
100 m/s for this airfoil, pressure
coefficient magnitude peaks at a
value of about 13 (15 degrees angle
of attack). It is worth noting that the
magnitudes of pressure coefficient
for the top and bottom surface of
this airfoil at zero angle of attack
Figure 11: A plot of negative pressure coefficient over a are equal since the freestream
NACA 0012 airfoil impacts the airfoil straight-on. This
can be seen by following the blue
plot for negative pressure
coefficient at zero angle of attack in
figure 11.
Figure 12 compares the results of
the Hess-Smith source-vortex panel
method with the results of thin
airfoil theory based on coefficient of
lift, which is graphed based on
angle of attack in degrees. Unlike
the other two airfoils analyzed, the
NACA 0012 does not always have a
higher predicted lift coefficient
using the Hess-Smith method than
with thin airfoil theory. In fact, thin
airfoil theory predicts a greater lift
coefficient at negative angles of
attack than the Hess-Smith method.
Figure 12: A plot of lift coefficient and angle of attack for a The two calculation methods
NACA 0012 airfoil produce equal results around zero
angle of attack. Following this
point, the Hess-Smith method
predicts greater lift coefficients than
thin airfoil theory.
Maloney 7

MATLAB Code

clear all;
close all;
clc;

% Aero 1 Project 3
% Madison Maloney

Setting Up

% Boeing 106
table_boe = fopen('boe106.dat.txt'); % open file
newtab_boe = tdfread('boe106.dat.txt','tab'); % separate file
newcell_boe = struct2cell(newtab_boe); % convert to usable form
up_boe = flipud(newcell_boe{1,1}(2:18,:)); % upper surface coords
low_boe = flipud(newcell_boe{1,1}(19:35,:)); % lower surface coords
mat_boe = [low_boe(1:16,:);flipud(up_boe)]; % ordered matrix
for k_boe = 1:length(up_boe) % for loop for camber & theta calculations
xcambboe(k_boe) = .5*(up_boe(k_boe,1)+low_boe(k_boe,1));
ycambboe(k_boe) = .5*(up_boe(k_boe,2)+low_boe(k_boe,2));
thetaboe(k_boe) = acos(1-(2*xcambboe(k_boe)));
end

% NACA 2412
table_24 = fopen('naca2412.dat.txt'); % open file
newtab_24 = tdfread('naca2412.dat.txt','tab'); % separate file
newcell_24 = struct2cell(newtab_24); % convert to usable form
up_24 = newcell_24{1,1}(1:18,:); % upper surface coords
low_24 = flipud(newcell_24{1,1}(18:35,:)); % lower surface coords
mat_24 = flipud(newcell_24{1,1}); % ordered matrix
for k_24 = 1:length(up_24) % for loop for camber & theta calculations
xcamb24(k_24) = .5*(up_24(k_24,1)+low_24(k_24,1));
ycamb24(k_24) = .5*(up_24(k_24,2)+low_24(k_24,2));
theta24(k_24) = acos(1-(2*xcamb24(k_24)));
end

% NACA 0012
table_12 = fopen('n0012.dat.txt'); % open file
newtab_12 = tdfread('n0012.dat.txt','tab'); % separate file
newcell_12 = struct2cell(newtab_12); % convert to usable form
up_12 = flipud(newcell_12{1,1}(2:67,:)); % upper surface coords
low_12 = flipud(newcell_12{1,1}(68:133,:)); % lower surface coords
mat_12 = flipud(newcell_12{1,1}(1:end,:));
mat_12 = [mat_12(1:66,:);flipud(mat_12(67:131,:))]; % ordered matrix
for k_12 = 1:length(up_12) % for loop for camber & theta calculations
xcamb12(k_12) = .5*(up_12(k_12,1)+low_12(k_12,1));
ycamb12(k_12) = .5*(up_12(k_12,2)+low_12(k_12,2));
theta12(k_12) = acos(1-(2*xcamb12(k_12)));
end

% Gottingen 765 - Check


Maloney 8

table_check = fopen('goe765.dat.txt'); % open file


newtab_check = tdfread('goe765.dat.txt','tab'); % separate file
newcell_check = struct2cell(newtab_check); % convert to usable form
check_up = newcell_check{1,1}(1:106,:); % upper surface coords
check_low = flipud(newcell_check{1,1}(106:211,:)); % lower surface coords
mat_check = flipud(newcell_check{1,1}(1:end,:)); % ordered matrix
for k_check = 1:length(check_up) % for loop for camber & theta calculations
xcambcheck(k_check) = .5*(check_up(k_check,1)+check_low(k_check,1));
ycambcheck(k_check) = .5*(check_up(k_check,2)+check_low(k_check,2));
thetacheck(k_check) = acos(1-(2*xcambcheck(k_check)));
end

fclose('all');

Calculations

pi = 4.0*atan(1.0);

mat = mat_12; % coords changed based on which airfoil is being analyzed


xcamb = xcamb12; % x camber changed based on which airfoil is being analyzed
ycamb = ycamb12; % y camber changed based on which airfoil is being analyzed
theta = theta12; % theta changed based on which airfoil is being analyzed
uinf = 100; % freestream velocity
npanel = length(mat)-1; % number of panels for Hess-Smith method
x = mat(:,1); % x/c is column 1
y = mat(:,2); % y/c is column 2

% import panel coordinates (x, y (1:npanel+1))


% Note: ordering must be from bottom trailing edge to top trailing edge (clockwise)

ang = [-5:1:15]; % angles of attack to be used


for count0 = 1:21 % for loop to vary angle of attack
alpha(count0) = degtorad(ang(count0)); % converts the angle to radians
for j=1:npanel
ds(j) = sqrt((x(j+1)-x(j))^2 + (y(j+1)-y(j))^2); % panel length
tnx(j) = (x(j+1)-x(j))/ds(j); % x component of panel tangent = cos(theta_j)
tny(j) = (y(j+1)-y(j))/ds(j); % y component of panel tangent = sin(theta_j)
xnx(j) = -tny(j); % x component of panel normal
xny(j) = tnx(j); % y component of panel normal
end

% apply V dot n = 0.0 for every panel


for i=1:npanel
xi = 0.5*(x(i)+x(i+1));
yi = 0.5*(y(i)+y(i+1));
sumn = 0.0;
sumt = 0.0;
for j=1:npanel
xj = x(j);
yj = y(j);
xip = tnx(j)*(xi-xj) + tny(j)*(yi-yj); %x* location in panel coord. system
yip = -tny(j)*(xi-xj) + tnx(j)*(yi-yj); %y* location in panel coord. system
Maloney 9

upv = 0.5/pi*(atan2(yip,xip-ds(j))-atan2(yip,xip)); %x* velocity in panel coord.


system.
vpv = 0.25/pi*log(((xip-ds(j))^2 + yip^2)/(xip^2 + yip^2)); %y* velocity in panel
coord. system
if (i==j)
upv = 0.5;
vpv = 0.0;
end
uv = tnx(j)*upv - tny(j)*vpv; %x component of induced velocity in Cart. system
vv = tny(j)*upv + tnx(j)*vpv; %y component of induced velocity in Cart. system
us = -vv; % x component of source velocity
vs = uv; % y component of source velocity
a(i,j) = us*xnx(i) + vs*xny(i); %matrix elements
at(i,j) = us*tnx(i) + vs*tny(i); %matrix elements storing tangential components
sumn = sumn + uv*xnx(i) + vv*xny(i);
sumt = sumt + uv*tnx(i) + vv*tny(i);
end
a(i,npanel+1) = sumn;
b(i) = -uinf*(cos(alpha(count0))*xnx(i) + sin(alpha(count0))*xny(i));
at(i,npanel+1) = sumt;
end

% apply Kutta condition


for j=1:npanel+1
a(npanel+1,j) = at(1,j)+at(npanel,j);
end
b(npanel+1) = -uinf*(cos(alpha(count0))*(tnx(1)+tnx(npanel)) +
sin(alpha(count0))*(tny(1)+tny(npanel)));

% now solve A*ss = b to get the source strengths (ss(1:npanel)) and vortex strength
(ss(npanel+1))
ss=a\b';

% Note that your matrix is (npanel+1,npanel+1)

% now compute tangential velocity and cp for each panel


for i=1:npanel
xi(i) = 0.5*(x(i)+x(i+1));
yi = 0.5*(y(i)+y(i+1));
summation = 0.0;
for j=1:npanel+1
summation = summation + at(i,j)*ss(j);
end
vtan = summation + uinf*(cos(alpha(count0))*tnx(i) + sin(alpha(count0))*tny(i));
cp(count0,i) = 1.0 - vtan^2/uinf^2; %Cp
clpan(count0) = (2/uinf)*ss(end)*sum(ds); %CL from Hess-Smith

end

end

% Cps to be used for graphing


Maloney 10

cp = [cp(1,:);cp(6,:);cp(11,:);cp(16,:);cp(21,:)];
cpn5 = cp(1,:);
cp0 = cp(2,:);
cp5 = cp(3,:);
cp10 = cp(4,:);
cp15 = cp(5,:);

TAT

alphat = degtorad(-5:1:15); % angles of attack


for count = 1:21 % for loop to calculate CL based on thin airfoil theory
for num = 1:length(xcamb)-1
dydx(num) = (ycamb(num+1)-ycamb(num))/(xcamb(num+1)-xcamb(num));
xc(num) = .5*-2*(xcamb(num)+xcamb(num+1));
dth(num) = theta(num+1)-theta(num);
cltat(count) = 2*pi*(alphat(count)+((1/pi)*dydx(num)*-2*xc(num)*dth(num)));
end
end

GRAPHING

% -Cp vs x/c plot


figure % open new figure
hold on
yyaxis left % set left y axis
title('Airfoil -C_P vs. x/c'); % gives plot a title
ylim([-5 10]); % graph properties
xlabel('x/c'); % labels x axis
ylabel('-C_p'); % labels left y axis
set(gca,'YMinorTick','on'); % turns tick marks on

% plotting for a few angles of attack


plot(xi,(-1*cpn5),'-k'); % plots -Cp for -5 deg
plot(xi,(-1*cp0),'-b'); % plots -Cp for 0 deg
plot(xi,(-1*cp5),'-g'); % plots -Cp for 5 deg
plot(xi,(-1*cp10),'-c'); % plots -Cp for 10 deg
plot(xi,(-1*cp15),'-r'); % plots -Cp for 15 deg

yyaxis right
ylim([-.2 1.5]); % graph properties
ylabel('y/c'); % labels right y axis
plot(x,y,'k-'); % plots airfoil
hold off
grid on; % turns grid on
set(gca,'XMinorTick','on','YMinorTick','on'); % turns tick marks on
legend('-5^{o}','0^{o}','5^{o}','10^{o}','15^{o}'); % creates a lengend for the plot
annotation('textbox',[.15 .6 .3 .3],'String','Aircraft: Cessna 120; Airfoil: NACA 2412',...
'FitBoxToText','on'); % adds annotation for plot

% Comparing TAT and HS plot for CL vs alpha


figure(2)
hold on
title('C_L vs. \alpha'); % gives plot a title
Maloney 11

xlim([-15 25]); % graph properties


ylim([-1 3]);
ylabel('C_L');
xlabel('\alpha (degrees)');
plot(-5:1:15,cltat); % plots CL for TAT
plot(-5:1:15,clpan); % plots CL for HS
grid on
set(gca,'XMinorTick','on','YMinorTick','on');
legend('Thin Airfoil Theory','Hess-Smith Panel'); % creates a lengend for the plot
annotation('textbox',[.15 .5 .3 .3],'String','Aircraft: Douglas A2D Skyshark; Airfoil: NACA
0012',...
'FitBoxToText','on'); % adds annotation about values used
hold off

Published with MATLAB R2017a

Sources

"Airfoil Search." Airfoil Tools. N.p., 2017. Web. 04 May 2017.

<http://airfoiltools.com/search/index>.

Anderson, John David. Fundamentals of Aerodynamics. New York, NY: McGraw-Hill

Education, 2017. Print.

"Boeing 80A-1." The Museum of Flight. N.p., 27 June 2016. Web. 04 May 2017.

<http://www.museumofflight.org/aircraft/boeing-80a-1>.

Boeing. "Model 80 Commercial Transport." Boeing. N.p., n.d. Web. 04 May 2017.

<http://www.boeing.com/history/products/model-80.page>.

"Cessna 120." Skytamer. N.p., 2016. Web. 04 May 2017.

<http://www.skytamer.com/Cessna_120.html>.

"Cessna 120/140." AOPA. N.p., 10 Sept. 2009. Web. 04 May 2017. <https://www.aopa.org/go-

fly/aircraft-and-ownership/aircraft-fact-sheets/cessna-120-140>.

Dorr, Robert F. "The U.S. Navy's Douglas A2D Skyshark Turboprop Heavy Attack Aircraft."

Defense Media Network. N.p., 09 Nov. 2011. Web. 04 May 2017.

<http://www.defensemedianetwork.com/stories/brilliant-mistakes-a2d-skyshark/>.
Maloney 12

Lednicer, David. "The Incomplete Guide to Airfoil Usage." Illinois.edu. N.p., n.d. Web. 04 May

2017. <https://m-selig.ae.illinois.edu/ads/aircraft.html>.

Lengyel, David. UIUC Airfoil Data Site. N.p., n.d. Web. 04 May 2017. <http://m-

selig.ae.illinois.edu/ads/coord_database.html>.

N.d. Aviastar. Web. 04 May 2017.

<http://www.aviastar.org/pictures/usa/douglas_skyshark_1.jpg>.

N.d. Live Journal. Web. 04 May 2017.

<http://ic.pics.livejournal.com/brussels_air/23514551/64269/64269_original.jpg>.

N.d. Vintage Aircraft Museum. Web. 04 May 2017. <http://vintageaircraftmuseum.org/wp-

content/gallery/cessna-120/1202.jpg>.

Stanford University. Hess-Smith.pdf. N.p.: n.p., 07 Apr. 2000. PDF.

You might also like