JavaFoil Users Guide
JavaFoil Users Guide
Martin Hepperle
3-March-2014
Contents
Contents ................................................................................................................................................. 1
JAVAFOIL .................................................................................................................................................. 1
Limitations ............................................................................................................................................2
JAVAFOILs Cards ................................................................................................................................... 3
The Geometry Card..............................................................................................................................3
JAVAFOILS Geometry Generators ........................................................................................................5
The Modify Card................................................................................................................................ 17
The Flowfield Card ............................................................................................................................ 19
The Panel Method................................................................................................................................ 21
Boundary Layer Analysis ................................................................................................................... 22
Transition Criteria .............................................................................................................................. 22
Effect of Roughness .......................................................................................................................... 24
Stall Corrections ................................................................................................................................ 25
Compressible Flow.............................................................................................................................. 28
Critical Pressure Coefficient.............................................................................................................. 28
Compressibility Corrections .............................................................................................................. 28
Finite Wings in JAVAFOIL ..................................................................................................................... 29
Swept Wings in JAVAFOIL .................................................................................................................... 34
The Aerodynamic Center .................................................................................................................... 36
Effect of a Ground Surface ................................................................................................................. 36
Effect of a Water Surface .................................................................................................................... 38
Multi-Element Airfoils.......................................................................................................................... 39
Automating JAVAFOIL with a Script .................................................................................................... 41
References ........................................................................................................................................... 41
Version History .................................................................................................................................... 42
JAVAFOIL
JAVAFOIL is a relatively simple program, which uses several traditional methods for the
analysis of airfoils in subsonic flow.
The main purpose of JAVAFOIL is to determine the lift, drag and moment characteristics of
airfoils. The program will first calculate the distribution of the velocity on the surface of the
airfoil. For this purpose it uses a potential flow analysis module which is based on a higher
order panel method (linear varying vorticity distribution). This local velocity and the local
pressure are related by the Bernoulli equation. In order to find the lift and the pitching
moment coefficient the distribution of the pressure can be integrated along the surface.
Next JAVAFOIL will calculate the behavior of the flow layer close to the airfoil surface (the
boundary layer). The boundary layer analysis module (a so called integral method) steps
along the upper and the lower surfaces of the airfoil, starting at the stagnation point. It solves
a set of differential equations to find the various boundary layer parameters. The boundary
layer data is then be used to calculate the drag of the airfoil from its properties at the trailing
edge.
Both analysis steps are repeated for each angle of attack, which yields a complete polar of the
airfoil for one fixed Reynolds number.
Additional tools for the creation and modification of airfoils have been added to fill the
toolbox. These tools are wrapped in a Graphical User Interface (GUI) which was designed to
be easy to use and not overly complicated. The GUI is organized into a stack of cards, which
will be described later.
All calculations are performed by a computer code of my own. JAVAFOIL is neither a rewrite
of Eppler PROFIL nor of Drelas XFOIL program. The boundary layer module is based on
the same equations which are also used in the initial version of the Eppler program. Additions
include new stall and transition models. The panel method was developed with the help of the
extensive survey of panel methods found in [14].
Compared with similar programs, JAVAFOIL can also handle multi-element airfoils and also
simulate ground effect.
Limitations
As already noted, JAVAFOIL is a relatively simple program with some limitations. Like with
all engineering computer codes, it is up to the user to judge and to decide how far he wants to
trust a program.
As JAVAFOIL does not model laminar separation bubbles and flow separation, its results will
become inaccurate if such effects occur. The boundary layer method does not include any
feedback to the potential flow solution, which means that it is limited to mostly attached
flows. Flow separation, as it occurs at stall, is modeled to some extent by empirical
corrections, so that maximum lift can be estimated for conventional airfoils. If you analyze an
airfoil beyond stall, the results will be quite inaccurate. On the other hand, it is somewhat
questionable, whether any two-dimensional analysis method can be used at all in this regime,
as the flow field beyond stall becomes fully three dimensional with spanwise flow and strong
vortices developing.
In the case of multi element airfoils, one must be aware, that in the real world very complex
flows can develop due to interaction of trailing wakes and the boundary layers of the
individual elements or if the boundary layers separate locally. An accurate analysis would
require a more sophisticated solver for the Navier-Stokes equations, which would also imply
an increase in computer time in the order of 1000. Nevertheless a simple tool like JAVAFOIL
can be helpful to estimate the main effects and to improve a design to avoid suction peaks and
flow separation.
JAVAFOILs Cards
The user interface of JAVAFOIL is divided into a stack of cards. Each card contains interface
elements for a specific task. The content of some cards is also relevant for actions executed on
other cards, for example the Mach number specified on the Options card affects the analyses
on all other cards.
*.txt
multi-element airfoil geometry in form of simple x-y coordinate sets arranged in two
columns. The elements of multi-element airfoils must be separated by a pair of xand y-values each having a value of 999.0 or larger.
*.xml
multi-element airfoil geometry in JAVAFOILs hierarchically structured xml format.
*.png, *.gif, *.bmp, *.jpg
single element airfoil geometry from an image file. For details, see next section.
Note that JAVAFOIL selects the input file format according to the file name extension.
Importing scanned images
You can also load an airfoil from a bitmap image in GIF, PNG, BMP or JPG format.
JAVAFOIL then tries to find an airfoil shape in this image by comparing the image points with
the color found in the upper left corner of the image. Therefore the image should have no
border, and a monochrome background. Before scanning the image, a smoothing filter is
applied to remove spurious points from the image. To achieve acceptable results an image
width of 1000 or more pixels is recommended. The interior of the airfoil shape can be empty
or arbitrarily filled, because the algorithm searches from the top and bottom edges of the
image and stops when it detects the border of the shape. The resulting points are filtered again
to improve the smoothness of the shape. Nevertheless the results will not be perfect, but this
method can be considered as a last resort to quickly determine airfoil coordinates if only a
scanned image is available. It is recommended to inspect the resulting velocity distribution
and to use the inverse design method for smoothing the airfoil shape.
Figure 2: Airfoil image (top) and comparison of the original (dashed) and the reconstructed airfoil shape
(solid) using JAVAFOILs bitmap import capability on the Geometry card.
follow this construction principle and add the thickness just to the y-coordinates of the camber
line. This leads to larger deviations from the true airfoil section when the camber line is
inclined, e.g. close to the leading edge or close to the trailing edge of airfoils with a high
amount of aft camber.
The correct construction method may lead to points extending slightly into the negative xrange, when a large amount of camber is located close to the leading edge. This is a correct
behavior and an expected result.
Note also that most NACA sections have a thick trailing edge by definition. In order to
produce a thin, sharp trailing edge, JAVAFOIL has an option to close the airfoil shape by
bending the upper und lower surfaces to close the trailing edge.
t
f
xf
Parameters:
Free: t/ c , f / c , x f / c
Fixed x t / c = 0.3
Naming Scheme
The first two integers define the camber line, while the last two integers define the thickness.
1st digit: maximum ordinate of camber 100 f / c
2nd digit: location of maximum camber 10 x f / c
3rd and 4th digit: maximum thickness 100 t/ c
Example:
NACA 2412: 2% camber at 40% chord, 12% thickness
The thickness distribution for the 10% thick section is given by the polynomial:
y = (0.29690 x - 0.12600 x - 0.35160 x 2 + 0.28530 x 3 - 0.10150 x 4 )
The coefficients of this thickness distribution had been chosen according to the following four
constraints [4] (for a 10% thick section):
maximum thickness occurs at x / c = 0.3 yx (0.3) = 0 ,
6
r
xt
xf
f
c
Parameters:
Free: t/ c , f / c , x t / c , x f / c , r
Naming Scheme
The name consists of a 4 digit prefix which is identical to the 4-digit series designation,
followed by a dash and two additional digits.
1st digit: maximum ordinate of camber 100 f / c
2nd digit: position of the maximum camber 10 x f / c
3rd and 4th digit: maximum thickness 100 t/ c
dash
5th digit: indicates the leading edge radius and is usually one of 0, 3, 6, or 9:
o 0: sharp leading edge,
o 3: normal radius,
o 6: the normal radius of the 4-digit series,
o 9: 3 times the normal radius.
6th digit: position of the maximum thickness 10 x t / c
Example:
NACA 1410-35: 1% camber at 40% chord, 10% thickness, reduced leading edge radius,
maximum thickness at 50% x/c
t
xf
Parameters:
Free: t/ c , x f / c , C design
Fixed x t / c = 0.3
Naming Scheme
1st digit: design 10 2 / 3 C design
2nd and 3rd digit: 2 100 x f / c . Note that the 3rd digit is usually a zero, i.e. the
position of the maximum camber is a multiple of 5%.
4th and 5th digit: maximum thickness 100 t/ c
Example:
NACA 23012: design lift coefficient 0.3, maximum camber at 15% chord, 12% thickness.
t
xf
Parameters:
Free: t/ c , x f / c , C design
Fixed x t / c = 0.3
Naming Scheme
1st digit: design 10 2 / 3 C design
2nd and 3rd digit: 2 100 x f / c plus 1. Assuming that the position of the maximum
camber is a multiple of 5% the 3rd digit is always a 1.
4th and 5th digit: maximum thickness 100 t/ c
Example:
NACA 23112: like NACA 23012: design lift coefficient 0.3, maximum camber at 15%
chord, 12% thickness, but with a reflexed aft camber line.
8
t
c
Figure 7: Parameters of NACA 1-series airfoil sections.
Parameters:
Free: t/ c , C design
Fixed x f / c = 0.5 , x t / c = 0.5
Naming Scheme
1st digit 1: series designation
2nd digit: position of minimum pressure of the thickness distribution 10 x / c
a dash
3rd digit: 10 C design
4rd and 5th digit: maximum thickness 100 t/ c
Example:
16-212: 1-series, minimum pressure at 60% chord, design lift coefficient 0.2, 12%
thickness.
While these airfoil shapes are not based on analytical expressions, the published coordinates
have been approximated to produce an accurate representation of these airfoils. The camber
lines used are of the uniform load type (a=1.0, see next section about NACA 6-series airfoils).
The 63A, 64A, and 65A sections use a modified a = 0.8 camber line which is straight aft of
x / c = 0.8 . The thickness distribution of these airfoils has also been modified to yield
straight lines from x / c = 0.8 to the trailing edge.
The a camber line shapes are specified in terms of the design lift coefficient and the
position x/c where the constant loading ends. This is indicated with an additional a = x.y
label in the airfoil name.
If you specify a 1 in JAVAFOILs input, the camber line has a constant loading from leading
edge to trailing edge. The resulting airfoils do not carry the a label.
Note that officially no intermediate airfoils (e.g. a NACA64.5-012) exist.
Naming Scheme
1st digit 6: series designation
2nd digit: chordwise position of minimum pressure of the thickness distribution
10 x / c
single digit suffix following a comma, which is 10 DC . It represents the range
DC above and below C design where favorable (accelerating) pressure gradients
for laminar flow exist (therefore DC is approximately the semi-width of laminar
bucket)
a dash
3rd digit: design 10 C design
4rd and 5th digit: maximum thickness 100 t/ c
A camber line shape different from a = 1.0 is indicated by the additional designation
a = x.y , where x.y is replaced by the location x / c where the constant part of the loading
ends and the linear drop towards the trailing edge starts..
t
c
Figure 8: Parameters of TsAGI B airfoil sections.
Parameters:
Free: t/ c
Fixed x t / c = 0.3388 , maximum (positive) camber at x f / c = 0.3018 ,
minimum (negative) camber at x f / c = 0.9204 .
10
xt
t
c
Parameters:
Free: t/ c , x t / c
After some reverse engineering, I have used the following assumptions for these airfoils:
the trailing edge thickness is 2% of the airfoil thickness,
in case of the C and Q series the rear end is attached with C0, C1, C2
continuity (position, tangent, curvature) to the elliptic front part,
in case of the Q series the second derivative at the trailing edge is set to -0.2,
(this gave the best approximations for 1240 to 1260 airfoils),
the H modification closes the thick trailing edge by a hyperbolic curve which is
attached with C0, C1 continuity (position, tangent) to the thickness distribution at
x / c = 0.965 .
Camber lines are 3rd order polynomials which allow to place the location of the maximum
camber approximately between 30 and 60% of the chord length.
Note: I am still looking for the official description of the airfoil geometry of the EQ and
EQH aerofoils, especially how the quartic curve was defined and how the hyperbolic closure
was attached to the quartic curve. It seems to be that the procedure to generate these shapes
was not published.
Biconvex airfoils
These are symmetrical airfoils, formed by two arcs. They can be represented by the following
formula:
y = a (x - x b )
The exponent b can be found from the location of the maximum thickness, i.e. the point
where y / x = 0
1
1 b-1
x t max = ,
b
while the factor a depends on the value of the maximum thickness:
11
If the maximum thickness is placed at x / c = 0.5 , the airfoil is composed of two equal
circular arcs. These airfoils are normally used for application in supersonic flow.
t
xt
Parameters:
Free: t/ c , x t / c
t
xt
Parameters:
Free: t/ c , x t / c
Plate airfoils
The thickness distribution of these sections represents a plate with a rounded nose and a sharp
trailing edge. The nose shape is formed by a so called Cassini curve, which provides a smooth
curvature transition to the flat part of the surface. The trailing edge closure is modeled by a
cubic parabola. This thickness distribution is superimposed over a NACA 4-series camber line
to produce a cambered plate.
t
xf
f
c
12
Parameters:
Free: t/ c , f / c , x f / c
Fixed: Leading edge shape. The trailing edge closure begins at x / c = 0.8
Newman airfoils
These sections consist of a circular nose to which straight tapered tail is attached. It can be
manufactured easily, but has a curvature jump at the junction between the nose and the
trailing wedge, leading to suction peaks and a risk of flow separation.
t
c
Figure 13: Parameters of Newman airfoil sections.
Parameters:
Free: t/ c
Joukowsky airfoils
These classical airfoil sections are generated by applying a conformal mapping procedure.
They were the first practical airfoils developed on a theoretical model. Besides producing the
airfoil shape, the mapping procedure was also used to find the flow field around the airfoil as
well as the force and the moment acting on the wing section. The airfoils have very thin
cusped trailing edges and are therefore difficult to analyze with panel methods and difficult to
manufacture.
The conformal mapping is performed using the Joukowsky transformation of the complex
points zcircle on a unit circle with is center at (x 0 , y 0 ) .
l2
zairfoil = zcircle +
, where l = -x 0 + 1 - y20 .
zcircle
In order to match the prescribed airfoil thickness and camber, JAVAFOIL performs an iterative
search for the center of the circle. As usual, the resulting coordinates are scaled to unit length.
t
f
c
Figure 14: Parameters of Joukowsky airfoil sections.
Parameters:
Free: t/ c , f / c
13
(1 - zcircle )
=
k-1 .
(e - zcircle )
zairfoil
They can be used to create sections with thick trailing edge regions e.g. for fairings. A
description of this shape can be found in [14].
Note that not all thicknesses can be achieved for all trailing edge angles; therefore the final
maximum thickness may not be what was desired. Also only symmetrical sections are
generated in JAVAFOIL.
fTE
c
Parameters:
Free: t/ c , fTE
Helmbold-Keune airfoils
In the 1940s many attempts were made to extend the then classical NACA airfoil section
methodology to more general airfoil shapes. Helmbold and Keune [15] developed elaborate
methods to characterize and parameterize airfoil sections. While the mathematical approach
allowed for representation of a wide range of shapes, the methodology was not really
successful in these years of manual calculation. Later in the age of numerical shape
optimization similar methods have been developed, e.g. the Parsec shape functions.
The parameters of the symmetrical airfoil must be carefully chosen to generate a realistic
airfoil shape. The center curvature must be large enough to avoid self-crossing of the outline.
rcurvature
rnose
fTE
t
xt
Parameters:
Free: t/ c , x t / c , trailing edge angle, curvature radius at middle, nose radius.
Roner airfoils
Another algorithm to generate analytical airfoil shapes based on conformal mapping was
published by Roner [16]. Like all methods using conformal mapping, his solution also
allowed for the exact analytical determination of the corresponding pressure distributions.
14
rnose
fTE
t
xt
Parameters:
Free: t/ c , x t / c , trailing edge angle, nose radius.
Parsec airfoils
The Parsec geometry parameterization was developed by H. Sobietzky in the 1990s. It tries to
model airfoil shapes by superposition of selected polynomial terms. The parameters resemble
the Helmbold-Keune approach and are mainly intended to be used for numerical shape
optimization. JAVAFOIL implements the so called Parsec-11 formulation which uses 11
parameters. The parameters of the airfoil must be carefully chosen to generate realistic airfoil
shapes. The center curvature parameters, the nose radius as well as the trailing edge wedge
angle must be carefully adjusted to avoid self-crossing of the outline.
x1
y1
rnose
x2
curvatureupper
y/ x
fTE
curvaturelower
y2
c
Parameters:
Free: leading edge radius parameter P1 , ( P2 , P3 ) and ( P4 , P5 ) the coordinates of
control points on the upper and the lower surfaces, P6 and P7 curvature control
parameters for upper and lower surfaces, P8 the trailing edge vertical position, P9 the
gradient of the camber line at the trailing edge, P10 the trailing edge slenderness, and
P11 the bluntness angle at the trailing edge.
Horten airfoils
The Horten brothers are well known for their development of flying wing airplanes. For most
of their wings, they used airfoil sections with a reflexed camber line. These were based on a
camber line of low or zero pitching moment (following the thin airfoil theory of Birnbaum) to
which a thickness distribution was added. A description of these rather simple functions can
be found in [17].
t
c
15
Parameters:
Free: t/ c , f / c
Fixed x t / c = 0.293 , maximum camber at x f / c = 0.25 .
DHMTU airfoils
The stable flight of ground effect vehicles depends on wing planform and airfoil shape. This
family of flat bottom airfoils has been developed for this specific application at the
Department of Hydromechanics of the Marine Technical University in Saint Petersburg,
Russia. Similar to the NACA 4-digit series, the airfoil shape is composed of polynomial
segments and a straight lower surface. Their camber line is slightly reflexed and the outline
between points 2 and 3 is a straight line segment. A description of the shape can be found in
[18].
x1
y1
rnose
y / x
-y2
x2
-y3
x3
Parameters:
Free: point x1 / c, y1 / c on the upper and points x 2 / c, y2 / c and x 3 / c, y 3 / c
2
Guderley airfoils
This shape was derived from theoretical considerations of sonic flow and is of mostly
academic interest. It is characterized by an accelerating flow with a linear pressure
distribution in the forward portion followed by a set of expansion waves. The maximum
thickness is located at x / c = 3 / 5 . A description of the shape can be found in [26].
t
c
Figure 20: Parameters of Guderley airfoil sections.
Parameters:
Free: t/ c .
16
Figure 21: View of the Modify card showing a two-element airfoil with element #2 selected.
17
18
FLIP Y
Reflects the selected elements across a horizontal line passing through the pivot
point.
SMOOTH Y
This command uses the smoothing factor specified in the text field to the right of the
button. Currently it supports two smoothing variants:
If the smoothing factor is positive, the coordinates are approximated by a smoothing
spline curve. A reasonable smoothing factor is 0.1.
If the smoothing factor is negative, a filter is applied to the y-coordinates to reduce
waviness. This filter applies a weighted average to each point and its two neighbor
points. If for example the smoothing factor is -0.1, the y coordinate of the smoothed
point is 90% of its initial value and 10% of the linear interpolation between the two
neighboring points according to:
s - s i-1
This filter can be applied several times, but subsequent application will also smooth
out details like a pointed airfoil nose.
You can also modify individual points by dragging them up or down with the left mouse
button depressed. This modification method is restricted to movements in the y-direction. If
you need more freedom, you have to modify the numerical coordinate values on the Geometry
card.
The COPY (TEXT) command button at the bottom of the card copies the airfoil geometry to the
clipboard with the following data:
a table with the x-y coordinates, similar to the copy on the GEOMETRY card, but
additionally with the local curvature 1/r, and
a second table with the coordinates of the camber line and the thickness distribution as
reconstructed from the airfoil shape.
Note concerning multi-element airfoils
Modifications are applied only to the airfoil element(s) selected in the Elements list box.
The selection is also used by other cards. Only selected elements are taken into account when
total force, moment and drag coefficients are determined.
Moving the mouse pointer over the colored field shows the corresponding pressure coefficient
or velocity ratio at the bottom of the screen.
ANALYZE IT! Performs the analysis of the flow field and if selected the integration of
the path of streamlines. Note that the classical Runge-Kutta scheme used to integrate
streamlines with increased accuracy can take quite some time. Standard accuracy uses
a fast but simple forward stepping Newton algorithm which introduces larger errors in
regions of high curvature. Progress is indicated in the status line.
COPY (TEXT) copies the field data to the clipboard in tabular format suitable for
plotting with the Tecplot software. Remember that you can copy or export the picture
using the context menu of the graph window.
INTEGRATE uses the momentum equation to integrate the momentum and pressure field
along a circular path with a radius of 50 around the airfoil. As we neglect friction and
hence follow dAlemberts thoughts, the result should produce zero drag, but a lift
coefficient close to what we obtain from the integration of the surface pressure.
Remember that the lift coefficient given in the table includes friction, so that both
results can only agree if the Reynolds number is rather high. The result is displayed in
a message box and also copied to the clipboard in text format.
Figure 23: View of the Flowfield card showing an airfoil with times streamlines.
20
R = 50.0
=
= |
= |
total
-0.1193 |
0.6763 |
comparison)
Figure 24: Result of momentum and pressure integration over a circular path around the airfoil.
Compare the lift coefficient with the value obtained from surface pressure integration (The stall model
was set to none on the Polar card). The total force is the result of the change of the momentum passing
through the control volume and the pressure acting on its surface. Note that the pressure part is very
important, even if the integration boundary is rather far away from the airfoil.
C1,1
CN+1,1 g1, 0
g2, 0
CN+1,N
C1,N
1 0
g N+1, 0
1
g1, 90 RHS1, 0
g2, 90 RHS2, 0
=
g N+1, 90 RHS
N+1, 0
RHS1, 90
RHS2, 90
RHSN+1, 90
Like with most panel methods the solution time for the system of linear equations increases
with the square of the number of unknowns. Therefore it is advisable to limit the number of
points to values between 50 and 150. This relatively small number already yields sufficient
accuracy of the results (in contrast to more complex CFD methods for solving the NavierStokes equations, where you quickly need several 100 points on the airfoil surface and many
more points to fill the space around the shape).
21
18
16
14
12
10
8
6
4
2
0
0
20
40
60
80
100
120
Figure 25: Graph of the solution time versus number of points on the airfoil (Pentium 4, 2.4 GHz).
Transition Criteria
Methods to predict transition from laminar to turbulent flow have been developed by many
authors since the early days of Prandtls boundary layer theory. While it is possible to analyze
the stability of a boundary layer numerically, all methods which are practical and fast are
more or less approximate and rely on empirical relations (usually derived from experiments).
Because the local boundary layer parameters at a station s are the result of an integration
process starting at the stagnation point, they contain a history of the flow.
Local Criteria
Many methods predict transition by applying a criterion based on local boundary layer
parameters. These criteria are based on relations, which can be evaluated at any station along
the surface. They do not need an extra integration of some instability parameter, but of course
are affected by the history of the flow. Most of these criteria are relating Red2 to the shape
of the boundary layer profile.
22
Eppler
Transition is assumed to occur when Red2 e18.4H32 -21.74-0.36r .
Eppler enhanced
2
= f (Red2 , H12 ) . Two versions of this approximation were used in his codes of the
the form n
XFOIL and MSES/ISES family.
The approximation is expressed by
=
n
n
(Red2 - Red2 ,crit ) .
Red2
n
= 0.01
Red2
+ 0.25
1.415
20
3.295
- 0.489 tanh
+ 0.44
log10 (Red2 ,crit ) =
- 12.9 +
H - 1
H - 1
H12 - 1
12
12
23
n
0.0345
= 0.028 (H12 - 1) -
2
3.87
Red2
-
-2.52
e H12 -1
0.43
14
H12 - 1
Drela, XFOIL 6.8
only a tiny modification (term 0.66 0.62)
n
0.0345
= 0.028 (H12 - 1) -
2
3.87
Red2
-
-2.52
H12 -1
e
0.43
14
H12 - 1
Method of Arnal:
A set of tables produced by D. Arnal has been approximated by W. Wrz with polynomials:
n
2
= a1 + a 2 H12 + a 3 H12
Red2
2
log10 (Red2 ,crit ) = b1 + b2 H12 + b3 H12
Here the envelope is not a straight line as in Drelas method. For details see [21].
In JAVAFOIL transition is assumed to occur when the value n crit = 9 - r is exceeded.
Method of Granville
This method is not described here. It also works by integrating a stability parameter starting
from a point of instability.
Abbreviations:
approximation of n
roughness factor (0 = smooth)
displacement thickness
momentum thickness
shape factor displacement thickness / momentum thickness
Reynolds number based on local momentum thickness
Reynolds number based on local arc length
n
r
d1
d2 = q
d
H12 = 1
d2
Red2 = Req
Res
Effect of Roughness
The effect of roughness on transition and drag is complex and cannot be simulated accurately.
Even modern resource hungry direct numerical simulation methods have difficulties to
simulate the effect.
In JAVAFOIL two effects of surface roughness are modeled:
laminar flow on a rough surface will be destabilized leading to premature transition,
laminar as well as turbulent flow on rough surfaces produce a higher skin friction drag.
24
Stall Corrections
Empirical Stall Correction #1 (CalcFoil)
if ( a > 0 )
{
// handle separation on upper surface
// drag increment
))
}
else if ( a < 0 )
{
// handle separation on lower surface
// drag increment
))
25
}
// moment multiplier
Cm, corrected = Cm, panel method 0.9 x 2sep, lower x 2sep, upper
// lift multiplier due to suction peak criterion
1
C = C
, where DCP, max is the difference between the minimum pressure
2
DCP, max
20 + 1
coefficient close to the nose of the airfoil and the pressure close to the trailing edge.
}
else
{
q TE = 0
}
// drag increment
if ( DC > 0 )
{
// lift reduction
C = C - DC
}
else
{
// lift multiplier
))
}
// moment increment
)(
}
else if ( a < 0 )
{
// handle separation on lower surface
if ( x sep, lower < x TE )
{
// trailing edge angle of lower surface
y sep, lower - y TE
}
else
{
q TE = 0
}
// drag increment
if ( DC < 0 )
{
// lift reduction
C = C - DC
}
else
{
// lift multiplier
))
}
// moment increment
)(
30 + 1
coefficient close to the nose of the airfoil and the pressure close to the trailing edge.
27
Compressible Flow
JAVAFOIL analyzes airfoils in incompressible flow, which means low Mach numbers as they
are common in model aircraft of general aviation airplanes. In practical application this means
Mach numbers below M = 0.25 . It is possible however to extend the Mach number range
somewhat by applying compressibility corrections to the incompressible results. This is only
possible, as long as the flow speed is subsonic all over the surface of the airfoil and
compressibility effects are small.
Cp, crit
2
=
k M2
k-1
2
k -1
2
1+
M - 1
k + 1
crit
1 + M2
= 1+2
(k + 1) M2
Compressibility Corrections
There are different ways to correct incompressible flow results for compressibility effects.
One should keep in mind that these are only corrections they can never produce the correct
physical effects when the flow locally reaches or exceeds supersonic speed. Therefore the
applicability of all compressibility corrections is limited to cases where the local flow velocity
(which can be much higher than the onset flow velocity) is well beyond the speed of sound.
In practical application one can use such corrections well up to about M = 0.5 , the error
grows very rapidly when the onset Mach number exceeds 0.7 .
In JAVAFOIL, the incompressible panel analysis is always performed for the given airfoil the
shape is never geometrically distorted. The compressibility correction is applied later to the
local surface pressure according to the Krmn-Tsien approximation
28
CP ,c
2 CP ,i 1 1 M 2
2 1 1 M M
2
C P ,i
The corrected pressure coefficient is then used to calculate the lift and moment coefficients.
NACA 0012
CL
1.0
0.5
0.0
0.000
0.010
0.020
0.030
0.040
0.050
0.060
0.070
0.080
0.090
0.100
CD
29
Figure 26: Lift versus drag coefficient polars for a NACA 0012 airfoil and wings of different aspect ratio.
The graph above shows the effect of the wing aspect ratio on lift over drag coefficient.
Starting with infinite aspect ratio (aspect ratio = 0 on the Options card) three wings with
increasing aspect ratio have been analyzed. For each curve the maximum of the lift over drag
(L/D) ratio is indicated by a filled circle. It can be clearly seen, that depending on the aspect
ratio the additional induced drag distorts the polar so that the optimum L/D ratio is shifted to
lower lift coefficients. While the two dimensional airfoil achieves its maximum of L/D at
slightly above C 1.0 , the low aspect ratio wing of 5 requires to operate the airfoil at
C 0.5 because this is the optimum CL of the whole wing. If we compare with another
airfoil we would better compare the airfoils at the lift coefficients corresponding to the wing
aspect ratios.
Note that the results as shown above are accurate for a wing having an elliptical lift
distribution and an elliptical, untwisted planform. Due to the spanwise lift distribution on a
generic wing, the airfoils along the span of the wing will operate somewhat above and below
the total lift coefficient of the wing. To study this effect requires using a more sophisticated
three dimensional wing analysis code (e.g. for subsonic flow lifting line, vortex lattice or
panel methods). Also no additional wing effects (like Reynolds number variation due to taper)
are taken into account.
mass of aircraft
gravity constant
density of medium
kinematic viscosity
flight speed
wing area
chord length
Reynolds number
30
m
g
r
n
v
S
c
Re
kg
m/s2
m/s2
m2/s
m/s
m2
m
-
Basic Equations
v c
r
2
mg
. Solving the definition of the
v2 S
n
into the definition of the lift coefficient produces
CL =
m g c2
r
2
Re2 n2 S
Re n
. Inserting this result
c
c
2g m
.
n r CL S
c 2g m
Re* = 106
for (a = a 0 to a1 step Da)
{
iterate
{
Re = Re*
CL = f(a, Re)
Re* =
g
r
2
CL n
m 2
c
S
}
while(
}
Re* - Re
Re
> e)
Note that the result still is an airfoil polar, even if wing loading and chord length are involved.
Only when you additionally specify an aspect ratio on the options card, the polars include the
induced drag and approximate a finite wing.
31
A precaution must be undertaken to handle cases where CL 0 . Here JAVAFOIL limits the
Reynolds number to a value corresponding to a small lift coefficient, e.g. CL = 0.02 .
Note: One can also derive the Reynolds number for a constant ratio mL , eliminating the chord
length c . This has not been implemented in JAVAFOIL as it was considered more abstract to
think in terms of m instead of the aircraft design parameters mS and c . But as the relation is
m
S
c2 =
m
L
m
L
instead of
m
S
CL =
C
2
2 p
2p
1 - M2 +
+
L p
Lp
C
1 - M2 +
2p
Lp
Implementation in JAVAFOIL
public final static double LiftForAspectRatio(double dCl,
double dAspectRatio,
double dMachNumber)
{
double dReturn = dCl;
// correction for finite wings
if (dAspectRatio > 0.1)
{
// Source: Anderson, "Aircraft Performance and Design"
// lift gradient reduction factor
// a_0 / (pi*AR)
double dGradientRatio = 2.0 * Math.PI / (Math.PI *
dAspectRatio);
if (dAspectRatio < 4.0)
{
// low aspect ratio, compressible (Anderson [2.18b])
dReturn /=
(Math.sqrt(1.0 - Math.pow(dMachNumber, 2.0) +
Math.pow(dGradientRatio, 2.0)) +
dGradientRatio);
32
}
else
{
// high aspect ratio, compressible (Anderson [2.16])
dReturn /=
(Math.sqrt(1.0 - Math.pow(dMachNumber, 2.0)) +
dGradientRatio);
}
}
return (dReturn);
}
C2L
pL
In JAVAFOIL the k-Factor is assumed to be 1.0 (planar wing with elliptical lift distribution).
Note that the idea of these simple corrections is to give you a feeling for the relative
importance of the induced drag in relation to the airfoil drag only. For real wing design you
should use a more appropriate 3D aerodynamic analysis tool, e.g. a vortex lattice or panel
method.
Implementation in JAVAFOIL
public final static double DragForAspectRatio(double dCd, double dCl,
double dAspectRatio,
double dMachNumber)
{
double dReturn = dCd;
if (dAspectRatio > 0.1)
{
// add the induced drag of finite wing according to Prandtl
dReturn += dCl * dCl / (Math.PI * dAspectRatio);
}
return (dReturn);
}
Note that all finite wing results are only approximations. If you need more accurate results,
you must use a 3D wing analysis code, which ideally can also handle friction effects.
33
v, x
xn
v, t
v, n
cn
j
cn = c cos j
y
x
Figure 27: Top view of a swept wing with sections in the x - z and in the normal plane x n - z .
JAVAFOIL assumes that the wing has no taper and that it is infinitely long. In practical
application, these assumptions are not too far from the conditions at mid-span of a low taper
ratio wing having an aspect ratio of 10 or higher.
Note that JAVAFOIL can predict the velocity or pressure distribution over the section quite
accurately, but all of its transition criteria are not made for swept wings. Typically wing
sweep introduces additional disturbances due to crossflow and spanwise flow at the leading
edge of the wing, which both may lead to premature transition. Therefore the drag coefficients
should not be taken too serious when the sweep angle is larger than, say, 20 except if
transition is fixed close to the leading edge.
In order to analyze an airfoil on a swept wing we align the defining wing section with the
streamwise direction (this is also called a sheared wing planform). The sweep angle must be
specified on the Options card and then the analyses on all other cards (including the Design
card) take this angle into account. Following classical sweep theory as devised by the German
aerospace engineer Busemann in the 1930s, JAVAFOIL internally analyzes the airfoil section at
right angles to the leading edge at an increased angle of attack and combines the result with
the tangential flow past the wing. The resulting velocity resp. pressure distribution matches
perfectly with the result of a three-dimensional analysis produced with a 3D-panel method.
The following figures show a comparison between JAVAFOIL and VSAERO.
34
1.8
1.8
v/v
v/v
a = 0
1.6
1.4
j = 0
j = 0
1.2
1.2
j = 45
j = 45
0.8
0.8
attachment line point (j=45)
0.6
0.6
0.4
0.4
0.2
0.2
stagnation point (j=0)
0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
x/c
0.6
0.7
0.8
0.9
x /c
Figure 28: Velocity ratio past a NACA 0015 airfoil for sweep angles of 0 and 45. Left: two dimensional
analysis; right: three dimensional analysis of a finite wing of very high aspect ratio.
1.8
1.8
v/v
v/v
Cl = 0.604
1.6
Cl = 0.5984
1.6
j = 0
1.4
1.4
j = 45
1.2
1.2
j = 0
j = 45
a=6.73
a=6.72
0.8
0.8
attachment line point (j=45)
0.6
a=5.0
0.6
0.4
0.4
0.2
0.2
stagnation point (j=0)
0.1
0.2
0.3
0
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
x/c
x/c
Figure 29: Velocity ratio past a NACA 0015 airfoil for sweep angles of 0 and 45. Left: two dimensional
analysis, data see Table 1; right: three dimensional analysis of a finite wing of very high aspect ratio.
j
[]
0
45
[]
5.00
6.72
[-]
0.604
0.604
Cd
C m 0.25
[-]
[-]
0.01710 -0.008
0.01611 -0.009
C p*
Mcrit .
[-]
-1.787
-1.650
[-]
0.564
0.579
Table 1: Two dimensional analysis results for a NACA 0015 airfoil at same lift coefficient.
As can be seen in the table above, the swept wing requires a larger angle of attack to achieve
the same lift. Due to the changed velocity distribution this example exhibits lower drag and,
the main reason for sweeping wings, a higher critical Mach number.
35
x C.P. = 0.25 -
Cm 0.25
C
Note that both, center of pressure as well as the aerodynamic center, are for the airfoil only,
not for the complete aircraft with tailplanes.
36
pivot
point
25%
25%
a = 0
a = 10
100%
100%
mirror image
mirror image
Figure 30: Changing the angle of attack in ground effect rotates around the pivot point.
The angle of attack of the airfoil is always changed by rotating the section around the pivot
point specified on the Modify card. If you want to analyze an airfoil at a height of 25% of the
chord length and want to maintain the trailing edge point, you would first translate the airfoil
in y-direction by 25% and then set the pivot point to x=100%,y=25%. Then any subsequent
change of angle of attack would maintain the trailing edge point and elevate the nose of the
airfoil above the y=25% line. Note that the airfoil is rotated and thus its projection on the x/c
axis becomes shorter, but pressure, velocity or Mach number distributions on the Velocity
card are still plotted over x/c.
-2.5
CP
Calculation JavaFoil
Experiment Steinbach
Calculation Chun/Chang
-1.5
-1.0
-0.5
0.0
0.5
1.0
0
0.2
0.4
0.6
0.8
x/c
Figure 31: Distributions of the pressure coefficient on a Clark Y airfoil in ground proximity.
Results of the numerical solution of the Navier-Stokes equations have been taken from [19],
the experimental results have been reproduced from [20]. The experiments were carried out
with a fixed ground board, equipped with a suction system. The results of JAVAFOIL match
the experimental results quite well. The Navier-Stokes solutions should model boundary layer
displacement effects more accurately.
The ground effect on a wing of a finite span is approximated by applying a modified
calculation of the induced drag. If you specify the aspect ratio of the wing L = b2 / S (span
b and wing area S ), and the height of the wing above ground h / b (height h over wing span
37
b ) on the Options card, these values are used to calculate an approximation of the induced
drag using
CD, i
1.5
33 (h / b)
C2L
=
1 1.5 .
p L
1 + 33 (h / b)
Fr =
v
gc
In JAVAFOIL you have to move the airfoil below the water surface to the appropriate depth,
which is always located at y = 0. This translation can be performed using the Modify card.
Note that the surface effect diminishes with immersion depth and it can be assumed that it can
be neglected when the airfoil is submersed deeper than 10 chord lengths below the surface.
2.0
v/V
5.00
5.00 (WIG)
5.00 (FR)
Velocity Distributions
1.0
0.0
0.0
x/c
0.2
0.4
0.6
0.8
1.0
Figure 32: Velocity distribution past a NACA 2412 at an angle of attack of 5. The results are for free
flow, at 50% c above the ground and submerged 50% c below the water surface. Note that the pivot point
has to be set to y=0, +50%, -50% respectively to minimize distortion of the x-axis die to angle of attack for
the ground effect and Froude effect analysis.
Sometimes the Froude number is given as the square of this expression be careful when comparing data.
38
Case
NACA 2412
free
ground effect
Froude effect
[]
5.0
5.0
5.0
Cl
[-]
0.843
0.875
1.234
Cd
[-]
0.01610
0.01403
0.02354
Cm 0.25
[-]
-0.089
-0.064
-0.091
Reference
Point
25% / 0%
25% / +50%
25% / -50%
Force and moment coefficients for the three cases depicted above.
Flow Field
Figure 33: Streamlines around the submersed hydrofoil (note that image is clipped at y=0) but the
generated surface wave are extending above this border.
Multi-Element Airfoils
The maximum lift of single element airfoils is limited by onset of flow separation. The
achievable limit for single element airfoils seems to be at lift coefficients between 2 and 3.
For maximum lift it can be beneficial to split an airfoil unto several elements, arranged to
form a slotted cascade. Each element then develops its own fresh boundary layer and positive
interference effects between the elements allow for a higher lift loading per element.
JAVAFOIL can handle such multi-element airfoils to a limited extent. Limitations are imposed
by the fact that boundary layer effects are not modeled. Therefore inaccurate results must be
expected when slots are very narrow (less than twice the displacement thickness of the
boundary layer and when the wake of a leading element interacts with a following element.
Nevertheless JAVAFOIL should be useful to produce a reasonable first design for a slotted
airfoil with appropriate gap, overlap and element angle settings. Also one can design such
sections so that suction peaks and too steep pressure gradients are avoided.
The following script shows how a two element downforce wing section can be generated
starting with a basic NACA 4-digit section.
//
//
// A simple JavaFoil example which creates a two element
// airfoil for downforce generation.
//
39
40
Alternatively, you can specify the script file using as a command line argument to JAVAFOIL
like this:
javaw.exe -cp "Path\mhclasses.jar" -jar "Path\javafoil.jar" Script="Path\Script"
Both ways methods are equivalent and produce the same result.
Note that this example in Windows style uses the backslash as file separator, for Unix-like
systems you have to use the appropriate separator, usually a forward slash.
Note:
As JAVAFOIL is running without showing a window, you must make sure that the script ends
with an Exit() command to terminate the JAVAFOIL run properly. Otherwise, the JAVAFOIL
process will continue to run. In Windows you can check for running JAVAFOIL processes
using the Task Manager window. In Unix-like operating systems you can use the ps
command to list all processes running under your user account.
References
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22]
[23]
[24]
[25]
[26]
Version History
/**
*
*
*
*
*
*
1.00
1...
1.46
1...
1.49
1.50
42
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
1.51
1.52
1.60
1.61
1.70
1.71
1.72
1.73
1.74
1.75
1.76
1.77
1.78
1.79
1.80
1.81
1.82
1.83
1.84
1.85
1.86
1.87
1.88
1.90
1.91
1.92
1.93
1.94
1.95
1.96
1.97
1.98
1.99
2.00
2.01
2.02
2.03
2.04
2.05
2.06
2.07
2.08
2.09
2.10
2.11
2.12
2.13
2.14
2.15
2.16
2.17
2.18
2.19
2.20
43
* 2.21
*
*/
02.03.2014
Option to enter the number of decimal places added to the Geometry card.
Momentum and ressure field integration on Flowfield card added.
44