XFOIL User Guide
XFOIL User Guide
General Description
===================
* new TE thickness
* flap deflection
- Blending of airfoils
Mach numbers.
is also effective, but must run Unix to support the X-Windows graphics.
The source code of XFOIL is Fortran 77. The plot library also
History
-------
XFOIL 1.0 was written by Mark Drela in 1986. The main goal
Theory References
-----------------
Drela, M.,
XFOIL: An Analysis and Design System for Low Reynolds Number Airfoils,
ISBN 3-540-51884-3
ISBN 0-387-51884-3
Drela, M.,
Drela, M.,
Drela, M.,
Low-Reynolds Number Airfoil Design for the MIT Daedalus Prototype: A Case Study,
Drela, M.,
Inviscid Formulation
--------------------
with a source panel. The equations are closed with an explicit Kutta
operating points for the same airfoil but different angles of attack
-------------------
which is also used in the Eppler code and Selig's PROFOIL code.
a full-Newton method.
Viscous Formulation
-------------------
The boundary layers and wake are described with a two-equation lagged
The drag is determined from the wake momentum thickness far downstream.
at that alpha. This is not strictly correct, since viscous effects will
Data Structure
==============
XFOIL stores all its data in RAM during execution. Saving of the data
--------------------------
XFOIL 6.9 stores multiple polars and associated airfoils and parameters
during one interactive session. Each such data set is designated by its
Not all of the data need to be present for each stored polar.
For example, x,y would be absent if the CL,CD polar was read in
and stored polar at a time. The new multiple storage feature makes
on plots.
---------------------------
are performed, and they are distinct from the "polar" x,y coordinates
Program Execution
=================
% xfoil
When the program starts, the following top level menu and prompt appear:
PCOP Set current-airfoil panel nodes directly from buffer airfoil points
U Unzoom |
XFOIL c>
i integer
r real
f filename
s character string
% xfoil e387.dat
which then executes the LOAD procedure before the first menu prompt
is given.
LOAD recognizes four airfoil file formats: Plain, Labeled, ISES, MSES.
All data lines are significant with the exception of lines beginning
.....................
This contains only the X,Y coordinates, which run from the
trailing edge, round the leading edge, back to the trailing edge
in either direction:
X(1) Y(1)
X(2) Y(2)
. .
. .
X(N) Y(N)
.......................
This is the same as the plain file, except that it also has an
NACA 0012
X(1) Y(1)
X(2) Y(2)
. .
This is deemed the most convenient format to use.
"00 12 NACA Airfoil" cannot be used as a name, since the "00 12"
is OK, however.
....................
This has four or five ISES grid domain parameters in addition to the name:
NACA 0012
X(1) Y(1)
X(2) Y(2)
. .
If the second line has four or more numbers, then these are interpreted
This is the same as the ISES coordinate file, except that it can
999.0 999.0
----------------------------
to unit chord and the leading edge will be placed at the origin.
-------------------------------------------
is performed as follows:
----------------------------------
The s' values are computed separately on the top and bottom airfoil sides.
These fractional parameter values s' are then used to compute new
Treating the top and bottom surface separately ensures that the
but not quite far enough. The additional needed change can be
Airfoil "0": A
Airfoil "1": B
Output airfoil: C
A B C
Aifoil C's polar will also be changed about 40% more as intended.
Airfoil node distribution matching
----------------------------------
The INTE command can be used to impose one airfoil's node distribution
The resulting airfoil will have the shape of airfoil 1, but the
-----------------------------------
The GDES facility allows very extensive manipulation of the buffer airfoil.
-----------------------------
When the buffer airfoil coordinates are read from a file during startup,
if the input airfoil has a poor point distribution (too many, too few,
poorly spaced, etc), one can use PANE to create a better panel node
distribution for the current airfoil on the splined buffer airfoil shape.
LOAD
GDES
EXEC
With XFOIL 6.9, the GDES,EXEC commands after LOAD are now superfluous.
----------------------------------
When issuing the MSAV command, the user is also asked which element
=====
CL = L / q | V = freestream speed
CM = M / q | r = freestream density
RE = V / v | q = 0.5 r V^2
Cl = L / q c
Cd = D / q c
Cm = M / q c^2
Rc = V c / v
ALFA = 3
first with chord=1.0, and then with chord=0.5 (changed with SCAL
command in the GDES menu, say). The results produced by XFOIL are:
result that CL and CD are exactly 1/2 times their c = 1.0 values.
of the chord length. Examples are the camber line shape and BL trip
and normal to the airfoil chord line. This is done only for the user's
Analysis
========
Most of the commands in the top level XFOIL menu merely put the user
into some lower command level with its own menu and prompt. Issuing
.OPERi c>
Typing a " ? " will result in the OPER analysis menu being displayed:
Cl r Prescribe CL
CPx Plot Cp vs x
The commands are not case sensitive. Some commands expect multiple
arguments, but if the arguments are not typed, prompts will be issued.
Cl r Prescribe CL
The "A" command is the short alternative form of "ALFA", and "C"
are the short forms of "ASEQ" and "CSEQ". The CLI command
has no short form (as indicated by all capitals in the menu),
cases, the CLI and CL commands are identical. For viscous cases,
The user is always prompted for any required input. When in doubt,
line, and the inviscid Cp at that same alpha is shown as a dashed line.
Each dash covers one panel, so the local dashed line density is also
x(1) Cp(1)
x(2) Cp(2)
. .
. .
The Cp vs x plot is then displayed as usual but with the data overlaid.
for CL, CD, etc. will be requested and added to the plot next to the
computed values.
RT Plot Re_theta
RTL Plot log(Re_theta)
which uses the local Ue rather than Qinf for the normalization.
since Cf does not account for pressure drag. CD', on the other
CD = | 2 CD' ds
with the integration performed over both boundary layers and also
-- Force calculation --
The lift and moment coefficients CL, CM, are calculated by direct
/ _ /
y = y cos(a) - x sin(a)
formula at the last point in the wake --- NOT at the trailing edge.
(H+5)/2
H = shape parameter |
V = freestream velocity
the last wake point also results in the formula having a smaller
/ _
CDp = | Cp dy
-- Transition criterion --
The e^n method is always active, and free transition can occur
situation Ncrit
----------------- -----
sailplane 12-14
motorglider 11-13
version, which is the same as the full e^n method only for flows
in choosing Ncrit.
to be set as well.
Numerical accuracy
------------------
airfoil with more points, and/or with points bunched around the bubble
region. The paneling is controlled from the PPAR menu. A good rule of
thumb is that the shape parameter Hk just after transition in the bubble
should not decrease by more than 1.0 per point. Likewise, the surface
velocity Ue/Vinf should not change by more than 0.05 per point past
drag. The point values can be observed by issuing SYMB from the VPLO menu.
Moderate chord Reynolds numbers (1-3 million, say) usually require the
finest paneling, since the bubbles are still important, but very small.
the development of the small bubble which forms just behind the
leading edge can have a significant effect on CLmax. For such cases,
easy to spot.
-- Differencing order of accuracy --
will occur with the Trapezoidal Scheme if the grid cannot resolve this
resulting in the Backward Euler Scheme, which is very stable, but has
-----------------------------
this system is 1/3 full, although most of its entries are very small.
Substantial savings in CPU time (factor of 4 or more) result when
these small entries are neglected. SUBROUTINE BLSOLV which solves the
INIT, and which can be changed at runtime from the VPAR menu with the
VACC command.
of the viscous solution and thus result in more Newton iterations, although
the effect is usually too small to notice. For very low Reynolds number
cases (less than 100000), it MAY adversely affect the convergence rate
-------------------------------
The polar calculation facility driven from the OPER menu deserves
which sets the auto polar accumulation toggle and asks for the
The polar can be plotted anytime with PPLO. If previous polars have been
If automatic writing of a polar was not chosen (no filename was given
for PACC), the polar can be written later all at once with the PWRT
points will be appended to these files, but only if the airfoil name
----------------------
Polar save file(s) can also be plotted off-line with the separate
% pplot
CD(1) CL(1)
CD(2) CL(2)
. .
. .
999.0 999.0
alpha(1) CL(1)
alpha(2) CL(2)
. .
. .
999.0 999.0
alpha(1) Cm(1)
alpha(2) Cm(2)
. .
. .
999.0 999.0
Xtr/c(1) CL(1)
Xtr/c(2) CL(2)
. .
. .
999.0 999.0
and the dump file itself are somewhat redundant in this respect.
-------------------
A few comments are in order on the TYPE command, which allows the
user to set the dependence of the Mach and Reynolds numbers on CL.
airfoil polar.
undergoing trim speed changes. This is the most useful airfoil polar
form for determining a drag polar for an aircraft at 1-g. For this case,
The "Mach number" input with the MACH command is actually interpreted
as the product M sqrt(CL), and the "Reynolds number" input with the
1/2 1/2
| 2 W/S | 1 | 2 rho W |
| 1.4 p | mu | AR |
2W
mu V b
the CL must not fall below that value which makes Mach exceed
Output
======
The Xplot11 library should work on all Unix systems. The Makefile
machines.
% unsetenv XPLOT11_BACKGROUND
See the plotlib/Doc file for more info on the plot library.
can be perfomed with the "Z" and "U" commands from nearly all
the menus --- these commands are not listed to reduce clutter.
Plot Hardcopy
=============
For hardcopy, the current screen plot can be echoed to a PostScript file
plot.ps with the HARD command. The size of the plot objects on the
screen and on hardcopy can be changed with the SIZE command from most
For the geometry plot in GDES, and the Qspec(s) plots in QDES and MDES
the graphics window is resized with the cursor at the window manager
at its start-up size, the hardcopy plot widths will come out with the
its default value, then a subsequent hardcopy plot will probably not
==================================
The geometry and the surface velocities can both be computed from
x + iy = z(w;Cn)
u - iv = f(w;Cn,alpha)
The z and f functions are rather complicated but this is not important
here. The key to the full-inverse method is that the mapping coefficients
OR from a surface speed q(w) = |u-iv|. The other quantity then follows.
-------------------------------------------
if Qspec does not exist. This Qspec is then the starting point
-------------------------------------------
by specifying points with the screen cursor which are then splined.
The points can be entered in any order. The last point can be
The "Abort" button or typing "a" aborts the MODI command and
returns to the MDES menu. The BLOW command can be used to enlarge
regions of interest at any time by specifying opposite corners
The slope matching can be turned on/off with the SLOP toggle command.
If slope matching is turned off, the modified piece will match only
-- Smoothing --
Qspec can be smoothed with the SMOO command, which normally operates
whose endpoints are selected with the MARK command. The smoothing
F = 2.0 applies the Hanning filter twice, etc. The standard Hanning
filter appears to be a bit too drastic, so a filter parameter of
to the standard Hanning filter. The SPEC command displays the mapping
-- Symmetry forcing --
The MODI, BLOW, MARK, SMOO, SLOP, FILT commands can be issued repeatedly
exactly match what was input with the cursor, since corrections are
The trailing edge gap is initialized from the initial airfoil and can
The CL is simply twice the area under the Qspec(s) curve (= 2 x circulation),
This allows rapid design at multiple operating points. When the Qspec
curves correspond to specified CL values, the alpha for each curve will be
The resulting Qspec will therefore not match the input cursor points
--------------------------
===================================
The QDES menu above is intentionally geared for the redesign of a segment
-------------------------------------------
If a direct solution for the current airfoil hasn't been calculated yet,
QDES goes ahead and calculates it, using the last-set angle of attack.
If this isn't the desired angle, it can be set in OPER using ALFA.
QSET can then be used to set Qspec from the current Q distribution.
The QSET command can be used anytime later to "reset" Qspec if the
Qspec can be repeatedly modified with the screen cursor and the MODI
MARK command.
----------------------------------
EXEC modifies the airfoil over the target segment to match Qspec
modes which are added to Qspec. At least two modes are added,
roughly preserved.
Issuing PLOT after the EXEC command finishes will compare the specified
in the surface speed is required, the CPXX command just before EXEC
will enable the addition of two additional modes which allow the
set or reset the CPXX option, and issue the EXEC command in any order.
PANE or PCOP commands at top level after doing work in the QDES menu,
as the new current airfoil will be overwritten with the old buffer
airfoil.
=======================
Executing the GDES command from the top level menu will put the user
Tran rr Translate
----------------------------
The first command typically executed is GSET, which sets the temporary
menu, depending on what was done last. In either of these cases, GSET
is skipped.
--------------------------------------------------
additional points can be added with the CADD command. Using the
PANE command at top level also does this, but CADD allows the point
(displayed with CANG), and also to locations which fall within a specified
will add spline points adjacent to each existing point whose panel
angle exceeds +/-10 degrees, and only if the added point will fall
within the interval -0.1 < x < 0.2. The "2" indicates that an
Some archived airfoils, notably the Eppler airfoils and some of the
the leading edge. The spacing has apparently been tailored for
The 10.0 degree angle tolerance can be varied as needed (1/2 of the max
for Eppler airfoils), and the default x range indicates that the
to keep reducing the max panel angle, but this may or may not
------------------------
commands can then be used to modify it. The resulting new shape
The new camber line can then be added in the CAMB sub-menu:
..CAMB c>
x/c delta(Cp)
0.0 0.5
0.8 0.5
0.8 0.5
1.0 0.0
This results in a constant delta(Cp) = 0.5 for 0.0 < x/c < 0.8 ,
then decreasing linearly to delta(Cp) = 0.0 for 0.8 < x/c < 1.0
edge radius, etc. should suffice for most geometry modification tasks.
If truly frustrated, the user can "draw" the new contour with the MODI
command, which accepts cursor inputs in the same manner as the MDES
in consecutive order along the new contour, although one can "erase"
graphics window.
issuing the DELP command. Using DELP on a normal single point will
delete that point entirely.
The TGAP command sets the thickness (or gap) of the blunt trailing edge.
The gap "ds" is defined as the distance between the upper and lower
then the new TE base vector (dx,dy) will have the same orientation as
dy| dy|
--| = --|
dx| dx|
new old
If the gap is zero to begin with, then the new base vector will be
comes out in an unexpected way, it probably means that the gap was
not *exactly* zero. The fix is to first set the gap to zero, and
requested. This controls how rapidly the new TE blends into the
original airfoil, and is essentially the length scale for the blending
------------------------------------------
Once the desired buffer airfoil is created, a new current airfoil is set
directly from the buffer airfoil with the EXEC command (equivalent to
re-paneled from the buffer airfoil with the PANE command at top level.
The new current airfoil can then be analyzed in OPER. If the buffer
airfoil has any doubled corner points, the doubled points will be
buffer-airfoil corner.
Start-up Defaults
=================
F T | Lcolor Lcursor
Line 3: Specifies the absolute plot size, the plot aspect ratio,
Line 12: Mach-CL dependence type, Mach number, solution acceleration parameter
This file will be read at any time with the RDEF command, thus
Caveats
=======
The XFOIL code is not foolproof, and requires some level of aerodynamic
expertise and common sense on the part of the user. Although the
roundoff:
DELP command.
to sequence runs so that alpha does not change too drastically from one
case to another. The Newton solution method always uses the last
best if the change from the old to the new solutions is reasonably
OPER is convenient for this. If the user insists on a large change from
boundary layers with the INIT command from the VPAR menu in OPER before
whenever the viscous solution blows up but the program doesn't crash.
set by the current iteration limit each time an ALFA, CL, etc. command
can be issued as often as needed (most easily with "!"), with another
limit can be changed from its default value of 10 with the ITER command
in OPER.
to be accurate.