Report
Report
Abstract
The work I would like to propose involves development of an evolutionary optimization algorithm
based technique that can help design otherwise tricky components such as aero foil blades.
For instance, in case of components such as turbine or propeller blades, I propose the
development and use of a coding system that can uniquely define various sections of the aero foil
(such as hub, mean, tip and intermediate ones) using a finite number of parameters. A fast flow
solver would serve as a cost function. This would be developed using fundamental principles of
the physical system. It would then evaluate its performance and serve the data into an
optimization routine by calculating the values of the mechanical/aerospace objective function (in
this case based on lift, drag, pressure distribution, etc.) that we are trying to optimize.
An evolutionary algorithm, such as a Real Coded Genetic Algorithm, could then be used to
optimize existing designs through numerous iterations of crossovers and mutations. This process
would be carried out for various sections of the blade to ultimately create a complete lofted 3D
geometry. There is a lot of potential to make blades for various purposes including wind turbines,
impellers and even aircraft wings.
Contents
Acknowledgements 3
Problem Introduction 4
Literature Review 5
Methodology 6
Parameterization Methods 7
Panel Method 12
Solver Validation 15
Results 19
Bibliography 20
Acknowledgements
First and foremost, I would like to convey my gratitude towards the Dept. of Applied Mechanics, IIT
Madras for considering me for the Summer Research Fellowship Programme 2012. The time spent here
has been one of the more fruitful experiences of my life. I would always be grateful for this opportunity.
I would like to thank my guide Prof. Arul Prakash of the Fluid Mechanics Division for giving me freedom to
work on my own problem and guiding me throughout. His encouragement and support were essential for
the completion of the project. He also connected me to other students whose assistance I could take to
understand certain aspects of the project.
I would also like to thank Vasanth, a research scholar in the dept. who helped me a lot with the
understanding of the working of a grid-less flow solver.
Lastly, I would like to thank everyone around me in lab and in the hostel who played a role in making my
stay here enjoyable.
Problem Introduction
Aerofoil design has always been one of the more challenging problems in aerospace engineering. The
phenomenon is highly non-linear and results often become non-intuitive. It is very hard to design aerofoils
or for the matter hydrofoils that are meant to be operated at specific flow conditions. Optimal
performance may demand that the aerofoil to generate maximum lift with minimum drag. Another way of
saying this is maximize L/D ratio with some bounds on the pitching moment. This is a simplified single
objective function optimization problem.
In other cases, if there is a particular desired amount of lift required, we need to minimize the square of
the difference between the target lift and the lift in our aerofoil such that it becomes nearly zero. The same
can be said about the pressure distribution. Simultaneously, the drag would have to be minimized
independently, giving scope for multi-objective function optimization problems. In all problems, even the
aerodynamic moment must be used in defining the objective function as we don’t want very large values
of the same as it puts torsional load at the point of attachment. If used in aircraft, it affects equilibrium.
Multi-objective problems may also be of the form where we need the foil to attain certain values of lift and
drag for particular angles of attacks. This process introduces new complications into the problem where
there is no single unique solution. On the other hand, some problems may force us to introduce pareto-
optimality, where we need to compromise on some criterion in order to satisfy some other.
Lift, drag and aerodynamic moments depend heavily on the shape of aerofoil. When we take into account
viscous effects as well, it becomes a daunting task to come up with the right shape of an aerofoil for a
specific application.
In the past, engineers tackled this problem through a compromise. Thousands of 2D slices of aerofoils were
catalogued into a vast database and organized into various families based on numerous traits such as flow
regime, etc. The engineer would then choose the aerofoil based on how closely it matched the
experimental characteristics of his application.
With the advent of affordable, powerful and easy to use computing tools, this can now take a whole new
approach. This project aims to integrate an analysis as well as an optimization routine that can modify a set
of randomly generated aerofoils till it matches the design criteria. Any design criterion can be specified as a
function of the pressure distribution, and an evolutionary optimization algorithm will perform the required
shape optimization so that its performance tends to the desired criteria.
Literature Review
1. Design and Analysis of Low Reynolds Number Airfoils, by Nicholas K. Borer from Georgia Tech
provided brief but informative section on the conventional approaches to aerofoil design and the
primary design criteria engineers use in the process. The report also contains an introduction to
vortex panel methods.
2. NACA Four-Digit Airfoil Section Generation using Cubic Parametric Curve Segments and The
Golden Section, by William T. Scarbrough from Rochester Institute of Technology gave detailed
information on generating ordinates for a NACA aerofoil. This helped me greatly with the
parameterization and geometry generation.
3. NACA Airfoil Evaluation, by Evan Kontras et al from University of Missouri evaluated the NACA
4212 aerofoil using both analytical and numerical methods. This gave me data to validate my panel
based solver before using it for optimization.
4. Algorithm for Calculating Coordinates of Cambered NACA Airfoils at Specified Chord Locations, by
Ralph L. Carmichael from Public Domain Aeronautical Software gave detailed mathematical outline
on the process of writing code that generates NACA aerofoil ordinates. The mathematical basis of
my code is from this paper.
5. Panel Methods: An Introduction, by Larry Erickson from NASA Ames Research Center gave a
holistic view of panel methods and its capabilities as well as its limitations. A clear explanation of
the distinctions between various panel codes was very helpful in choosing the approach while
coding the solver.
6. Parameterization of Airfoils and its Application in Aerodynamic Optimization, by J. Hajek of
Charles University gave a qualitative review of various approaches to optimizing aerofoils. The
author used adopted a popular open source solver X-FOIL with BEZIER-Parsec parameterization to
accomplish the same.
7. Automatic 2D Airfoil Generation, Evaluation and Optimisation using MATLAB and XFOIL, by
Xavier Mauclère of Technical University of Denmark implemented a program to generate wind
turbine aerofoil sections using multi-objective optimization.
8. Shape Optimization of Low Speed Airfoils using MATLAB and Automatic Differentiation, by
Christian Wauquiez from Royal Institute of Technology had pretty much the same goals as this
project. Interesting insights on posing an optimization problem were obtained from this paper.
9. Bezier-PARSEC: An Optimized Aerofoil Parameterization for Design, by R.W. Derksen & Tim
Rogalsky from Winnipeg, Canada discusses the influence of the choice of parameterization on the
time it takes for the solution to converge. Potential for this new approach as a parameterization
tool in optimization is explored qualitatively in this article.
10. Developments in the use of the Genetic Algorithm in Engineering Design, by G. N. Bullock et al
from the University of Plymouth discusses about how the use of Genetic Algorithms has cut across
various disciplines and has tremendous potential in helping us with detailed designs of complex
components.
11. Airfoil Aerodynamics Using Panel Methods, by Richard L. Fearn implements a type of Panel
Method using the package Mathematica. The article discusses the thought behind each step of the
process and the test results were used for solver validation.
Methodology
The project is entirely software programming based where I have divided my code into three
independent tasks, namely:
1. Aerofoil Parameterization
2. Flow Solver
3. Optimization Routine
1. Aerofoil Parameterization
Parameterization in simple terms is a process where we uniquely define a particular aerofoil in terms of a
finite number of independent variables. Our code should be able to generate all the required geometrical
details of the aerofoil simply with the help of those numbers which we can refer to as a tuple or a vector.
We are converting the problem of finding the most optimal aerofoil geometry to the most optimal
combination of those numbers (in other words, the most optimal vector) for our desired application.
2. Flow Solver
The process of shape optimization is an iterative process where the ‘fitness’ of an aerofoil vector (as
previously defined) is computed and appropriate modifications are performed till an end criterion is met.
Here fitness is the objective function we choose to optimize (or extremize). It could be Lift, Drag or their
ratio, or even deviation from the required characteristics. Within a single iteration, one may have to
evaluate numerous aerofoil vectors. Hence, we need a generic (applicable to all feasible aerofoils), fast
(computation cost/time must be minimum) and scalable (geometrical approximations can be controlled)
solver in order to accomplish the task.
3. Optimization Routine
This is the process where the feasible space of the aerofoil vector is searched till an appropriate candidate
is found, or time runs out. A number of Global Optimization Algorithms can be used for this problem.
Being a highly non-linear phenomenon, there is no intuitive method to obtain the right shape. In general, a
global search based optimization routine works in the following manner:
Evaluate Fitness
of the new
Population
Generate Random
Vectors or Use Print Optimal Vector
Search for Check for
Seed Data & Relevant Plots
new Set of Optimality or
Vectors based Stopping
on Heuristic Criteria
Parameterization Methods
It is completely in the choice of the user to create a parametric representation of an aerofoil. The
parameterization technique must be able to fit the shapes of a wide range of aerofoils. For it to work well
with commonly used Global Search Techniques, it should be an n-vector. The other function of this part of
the code is to generate geometrical input for the solver. However, it is necessary to make sure that the task
of calculating the geometric data from the given vector should be computationally cheap. Some of the
parameterization techniques developed are:
1. Bezier-PARSEC Method
With the help of 3/4 degree parametric polynomial curves, we can uniquely define the thickness and the
camber profile of the foil. There are two different implementations of this approach which go by the name
of BP3333 & BP3434 (5 more parameters introduced).
Fig.1. BP 3333 Aerofoil Geometry and Bezier Control Points Defined By Twelve Basic Aerodynamic Parameters
The NACA aerofoils are aerofoil shapes for aircraft wings developed by the National Advisory Committee
for Aeronautics (NACA). The shape of the NACA aerofoils is described using a series of digits following the
word "NACA." The parameters in the numerical code can be entered into equations to precisely generate
the cross-section of the aerofoil and calculate its properties.
For example, the NACA 4412 aerofoil has a maximum camber of 4% located 40% (0.4 chords) from the
leading edge with a maximum thickness of 12% of the chord. Four-digit series aerofoils by default have
maximum thickness at 30% of the chord (0.3 chords) from the leading edge.
Fig. 3. Profile Geometry – 1: Zero Lift Line; 2: Leading Edge; 3: Nose Circle; 4: Camber; 5: Max. Thickness; 6: Upper
Surface; 7: Trailing Edge; 8: Camber Mean-Line; 9: Lower Surface
Here, the last coefficient can be changed to -0.1036 to ensure that thickness is zero at the trailing edge i.e.
when x=c. Also, c stands for chord length.
The above is a piecewise continuous as well as differentiable polynomial that describes the camber of the
aerofoil. For symmetric aerofoils, the x-axis itself is the camber.
Besides these, engineers have come up with more parameterization techniques that can define an even
wider variety of aerofoils. One might also come up with one that can generalize for any kind of a foil, or an
impeller blade. Some other alternatives may include NACA 5 and 6 digit aerofoils. In addition, NACA has
also introduced 1,6,7,8 Series of aerofoils for specific applications. Series 8 aerofoils are only for
supercritical applications.
People have also used Grid Parameterization which is nothing but a dense sequence of two-dimensional (x
– axis and z – axis) coordinates of sample points along the aerofoil surface. In principle, it is possible to use
the coordinates of these points directly as design variables for aerofoil optimization. In this manner, a
very flexible parameterization is obtained; however, great care must be taken to preserve smoothness and
reasonable shape of the aerofoil. Moreover, the number of design variables in this scheme is very high,
which makes the optimization problem quite difficult.
PARSEC Parameterization includes the variables as defined in the figure below. There are many variations
of the same.
Depending on various constrains one might have for their specific problems; it is possible to define a
specific parameterization scheme for some particular class of foils. Example below shows a scheme for
designing foils with a flat lower surface.
For this reason, since the 1960s, the aerospace industry has been depending on grid-less solvers. They are
much faster and not iterative in process. The accuracy purely depends on how finely the test surface has
been divided. The grid less flow solver I would be using in this project would be variation of the popular
panel method.
Panel Methods
These are grid-less methods of solving flow past an aerofoil where we approximate the curved surface of
an aerofoil as an assembly of connected panels. For simplicity, the method applied to this problem uses
only flat panels. On each flat panel in 2D, the ends of the panels are called corner points and in the centre
of the panel, we have a control or collocation point.
The main assumptions of all panel methods are incompressible, irrotational flow, often called potential
flow. These two assumptions greatly simplify the governing equations of fluid motion.
These methods work by stating that the governing flow equations can be solved via a superposition of
elementary flows. These elementary flows can be sources, sinks, doublets, vortices, and others. The
elementary flows are placed at control points along the perimeter of a body, typically at the centre of a
straight segment. Lifting bodies can only be approximated with vortex flows, while non-lifting
(symmetrical) flow can be approximated with sources and sinks, among others. The vortex allows for the
creation of circulation, an abstraction quite necessary for lifting flow fields.
Panel methods basically attempt to solve the Laplace’s Equation, which is one of the fundamental linear
partial differential equations. The basic solution procedure for panel methods consists of discretizing the
surface of the object with flat panels and selecting singularities to be distributed over the panels in a
specified manner, but with unknown singularity-strength parameters. Since each singularity is a solution
to Laplace’s equation, a linear combination of the singular solutions is also a solution. The tangent-flow
boundary condition is required to be satisfied at a discrete number of points called collocation points. This
process leads to a system of linear algebraic equations to be solved for the unknown singularity-strength
parameters. The procedures vary depending on the singularities used and other details of problem
formulation, but the end result is always a system of linear algebraic equations to be solved for the
unknown singularity-strength parameters.
In this problem, I use a particular panel method variation called the Hess-Smith Panel Method.
The spacing between the corner points is decided using cosine or half-cosine spacing.
The strengths of these distributions is unknown. Hence, if there are n panels, there would n different
values for σ, one for each panel. Also, there would be one value for the vorticity distribution that is
common for all the panels. Totally, we have n+1 unknown quantities.
For fully streamlined or attached flow, we put the boundary condition of no flow through surface at the
centre of each panel. Essentially, we make the normal component of the velocity zero at the centre of each
panel.
Velocity around the panels is influenced by the source and vortex distribution existing on each of the
panels and also the free stream with an angle of attack. The extent to which the distribution strength
located on each panel influences the velocities in others is determined by a quantity known as the
influence coefficient. There would be n+1 influence coefficients for each panel.
These coefficients are evaluated only using the geometrical data obtained from the discretization of the
aerofoil surfaces using the following expressions:
Here, n and t superscripts represent normal and tangent components respectively. The A coefficients
represent the influence due to a Source Strength Distribution and B coefficients represent the influence due
to a Vortex Strength Distribution where,
This gives n equations for n+1 unknown terms. We make another equation using the aerofoil’s Kutta
Condition. By this condition, the panels sharing the sharp trailing edge of the foil must have the same
tangential velocity component. We calculate the difference between the two using the tangential influence
coefficients and thus form the equation.
The free stream influence is nothing but the component (projection) of the free stream velocity in the
direction of the normal of the respective panel.
Finally, the set of n+1 equations can be represented in the matrix form by the following manner:
This system of equation can simply be solved by inverting the matrix on the LHS and multiplying it with the
vector on the RHS.
The next step of the process is to find the tangential velocity component magnitude on each of the panels.
Using the values of the source and vortex strengths, we can evaluate the tangential velocities using the
tangential influence coefficients. Using these values of VT, we then obtain the value of the coefficient of
pressure at the centre of each panel using the formula:
Finally, the dimensionless pressure in the appropriate directions is integrated to compute the aerodynamic
force and the coefficients for lift (CL) and pitching moment (CM) about the leading edge of the aerofoil.
Similarly, one can also obtain the value of the pressure drag coefficient (CL) as well.
A simple set of functions were coded in MATLAB to implement the same routine.
Solver Validation
The results of the solver were matched with those from literature and a good amount of agreement was
found. Dimensionless Pressure distribution from exact conformal mapping and panel method from
literature was matched with that from the coded solver.
Fig. 9. Top-Left figure shows the plot from literature and Top-Right figure shows the generated plot in MATLAB for the
o
simulation of NACA 4212 aerofoil with 6 of Angle of Attack. Bottom figure shows the aerofoil with its panels and
control points. (The y-axis quantities have reversed signs in the top-right figure)
In other words, these methods narrow the search area for possible solutions, thereby reducing
computational loads compared to brute-force methods. These are very efficient techniques of solving
multivariable as well as combinatorial problems as they provide avenues for testing the right set of
combinations that lead to the optimal solution.
MATLAB Global Optimization Toolbox is a very powerful tool for making use of these techniques in cross
disciplinary problems.
• Genetic Algorithm, inspired from Darwin’s theory of Natural Selection (Evolution of Species) that
successfully explains the level of sophistication different living creatures have achieved depending
on the natural constraints on the species.
• Particle Swarm Optimization, inspired from the searching/hunting techniques of swarm creatures
such as honeybees, locusts or hornets. They work by constantly communicating locations of high
food availability to the rest of the swarm and maintaining a memory of previous locations for the
same.
• Ant Colony Optimization is inspired from the way social terrestrial insects such as ants and
termites search for food locations. The worker ants leave behind a trail of pheromones which
indicates to the next batch of workers locations of high food availability. Greater workforce is
allocated to such locations.
• Simulated Annealing, inspired from the physical process of annealing, where random motion of
particles inside a mass of near molten metal tries to achieve a state of minimum energy through
slow cooling.
The process mimics natural evolution with biological processes like inheritance, selection, crossover, and
mutation.
The basic necessity of GA is a chromosome which is nothing but a string of numbers of a vector that in
itself has managed to uniquely define all the required characteristics of a design. A set of randomly
generated chromosomes or a seed pool is used as an initial set of solutions to the problem.
A fitness function, which is nothing but the objective function calculates the performance index of each
solution. This is used to select the best solutions in the population to be to the offspring that will comprise
the next generation. The fitter the parent, the greater its probability of selection.
Offsprings are produced by selecting parent chromosomes for breeding, and crossing over the genetic
material. For real numbers in each gene of the chromosome, operations such as weighted means are used
for crossovers and they are governed by the fitness of each parent.
Small amount of mutation is encouraged so that the algorithm explores new region of state space. This is
basically a randomized change in a few offspring where one or more genes attain values different from
those attainable from their parents.
In engineering, GAs are being used to solve diverse interdisciplinary problems as they are capable of
finding satisfactory solutions without going into the physics of the problem. Although computationally
heavy and stochastically driven, GAs have empirically proven themselves in solving problems otherwise
harder without these soft computing techniques.
For this reason, some of the premier institutes in the world work on Genetic Algorithms research. This
includes IIT Kanpur, which has its own Genetic Algorithms Laboratory headed by Prof. Kalyanmoy Deb.
University of Illinois, Urbana-Champagne also has its own lab called IlliGAL. University of Sydney also has
a research group called ADVENT in its Aerospace Division which focuses on multi-disciplinary research with
Evolutionary Optimization Algorithms.
Results
A basic single-objective problem of minimizing the ratio between lift and pressure drag for a given angle
of attack of 4o was posed and tested. With a limit of 30 iterations, an instance from the MATLAB Global
Optimization Toolbox was started and here is the result:
Please note that the result above is carried out only for the inviscid case. The viscous effects are yet to be
coded fully. We also need to pose our problems better if the generated aerofoil needs of be relevance
when it comes to practical use.
• The Viscous-Boundary Layer routine must be fully implemented for physically correct values of lift,
drag and aerodynamic moment
• Compressibility Effects may be accounted for slightly higher Mach numbers of 0.4-0.6
• Multi-Objective Optimization needs a lot of testing and tweaking
• The solver itself needs a lot of testing using results from analytical as well as numerical techniques
Additional Features:
• If the foil is being used in an environment where free stream velocity is a function of the position in
the z-axis, then the panel method should be capable of evaluating the aerodynamic load
coefficients simply using the velocity profile of the chamber/duct.
• In order to construct aircraft wings, a way of accounting the chord length into the optimization
routine must be established. Various sections from the hub to the tip can be designed and lofted in
a CAD software to generate the final wing.
This application need not limit itself to just aerofoils. Infact, turbomachinery impeller blades and hydrofoils
could just as easily be designed using this. A diverse variety of geometrical routines must be made to take
advantage of the modular and independent nature of the code created.
In addition, alternative optimization methods such as Differential Evolution can readily be implemented.
A comparative study on various evolutionary methods is due.
This presents a design methodology abstraction where analogous applications could be made for design
of tricky components from various disciplines of engineering.
Bibliography
• Low Speed Aerodynamics by Katz & Plotkin
• Computational Fluid Dynamics for Engineers by Tuncer Cebeci
• Fundamentals of Aerodynamics by J D Anderson
• Aerodynamics4Students Online Textbook by Prof. Douglas Auld from University of Sydney
• MATLAB Help Documentation by MathWorks Inc.
m=naca(1)/100;
p=naca(2)/10;
t=naca(3)/100;
if mod(npanel,2) ~= 0
sprintf('Please choose an even number of panels');
sprintf('Exiting...');
exit;
end
% camber distribution
for i=1:nside
xx(i) = (1-cos(i*pi/nside))/2; %full cosine spacing
%xx(i) = 1-cos(i*pi/(2*nside)); %half cosine spacing
yt(i) = ( 0.29690*sqrt(xx(i)) -0.12600*xx(i) ...
-0.35160*xx(i)^2 +0.28430*xx(i)^3 ...
-0.10360*xx(i)^4) * t / 0.20;
if xx(i) < p
yc(i) = m/p^2 * (2*p*xx(i) -xx(i)^2);
else
yc(i) = m/(1 -p)^2 * ((1 -2*p) + 2*p*xx(i)-xx(i)^2);
end
end
for i=1:nside
x(nside+i-1) = xx(i);
x(nside-i+1) = xx(i);
y(nside+i-1) = yc(i) +yt(i);
y(nside-i+1) = yc(i) -yt(i);
end
return
for i=1:npanel
l (i) = sqrt((x(i+1) -x(i))^2 +(y(i+1) -y(i))^2);
st (i) = (y(i+1) -y(i))/l(i);
ct (i) = (x(i+1) -x(i))/l(i);
return
pi2inv = 1 / (2*pi);
for i=1:npanel
for j=1:npanel
log_term = 0.0;
tan_term = pi;
if i ~= j
dxj = xbar(i) -x(j);
dxjp = xbar(i) -x(j+1);
dyj = ybar(i) -y(j);
dyjp = ybar(i) -y(j+1);
log_term = 0.5*log((dxjp*dxjp+dyjp*dyjp)/(dxj*dxj+dyj*dyj));
tan_term = atan2(dyjp*dxj-dxjp*dyj,dxjp*dxj+dyjp*dyj);
end
if (i == 1 | i == npanel)
if rank(ainfl) ~= npanel+1
exit
end
return
function vt = veldis(qg,x,y,xbar,ybar,st,ct,al,npanel)
for i=1:npanel
vt(i) = ct(i)*cos(al) +st(i)*sin(al);
for j=1:npanel
rp = sqrt((xbar(i) -x(j+1))^2 +(ybar(i) -y(j+1))^2);
rm = sqrt((xbar(i) -x(j) )^2 +(ybar(i) -y(j) )^2);
betaij = atan2 ((ybar(i) -y(j+1))*(xbar(i) -x(j)) ...
-(xbar(i) -x(j+1))*(ybar(i) -y(j)), ...
(xbar(i) -x(j+1))*(xbar(i) -x(j)) ...
+(ybar(i) -y(j+1))*(ybar(i) -y(j)));
return
cl = 0;
cd = 0;
cm = 0;
for i=1:npanel
dx = x(i+1) -x(i);
dy = y(i+1) -y(i);
xa = 0.5*(x(i+1) +x(i)) -0.25;
ya = 0.5*(y(i+1) +y(i));
dcl = -cp(i)*dx;
dcd = cp(i)*dy;
cl = cl +dcl;
cd = cd +dcd;
cm = cm +dcd*ya -dcl*xa;
end
return
x = zeros(npanel+1,1);
y = zeros(npanel+1,1);
cp = zeros(npanel+1,1);
%
% generate airfoil surface panelization
%
[x,y] = naca4(naca,npanel,x,y);
%
% generate panel geometry data for later use
%
l = zeros(npanel,1);
st = zeros(npanel,1);
ct = zeros(npanel,1);
xbar = zeros(npanel,1);
ybar = zeros(npanel,1);
[l,st,ct,xbar,ybar] = panel_geometry(x,y,npanel);
%
% compute matrix of aerodynamic influence coefficients
%
ainfl = zeros(npanel+1);
ainfl = infl_coeff(x,y,xbar,ybar,st,ct,ainfl,npanel);
%ainfl
%
% compute right hand side vector for the specified angle of attack
%
b = zeros(npanel+1,1);
al = alpha * pi / 180;
for i=1:npanel
b(i) = st(i)*cos(al) -sin(al)*ct(i);
end
%
% solve matrix system for vector of q_i and gamma
%
qg = inv(ainfl) * b;
%
% compute the tangential velocity distribution at the midpoint of panels
%
vt = veldis(qg,x,y,xbar,ybar,st,ct,al,npanel);
%
% compute pressure coefficient
%
cp = 1 -vt.^2;
%mincp=min(cp)
%
% compute force coefficients
%
[cl,cd] = aero_coeff(x,y,cp,al,npanel);
%
% plot the output
%
subplot(2,1,1),plot(xbar,-cp),xlabel('x/c'),ylabel('Cp'),title('Coefficient of
Pressure Distribution'),grid
subplot(2,1,2),plot(x,y,x,y,'o'),xlabel('x/c'),ylabel('y/c'),title('Airfoil
Geometry'),axis('equal'),grid
lbyd=-cl/cd;
%cd
%cl
return