Professional Documents
Culture Documents
JavaFoil Theory Document
JavaFoil Theory Document
Contents
Contents ...............................................................................................................................................1
Panel Method .......................................................................................................................................1
Critical Pressure Coefficient.................................................................................................................1
Compressibility Corrections .................................................................................................................2
Boundary Layer Analysis .....................................................................................................................2
Transition Criteria .................................................................................................................................2
Stall Corrections ...................................................................................................................................4
Finite Wings in JavaFoil .......................................................................................................................6
Panel Method
JavaFoil implements a classical panel method with linearly varying vorticity distribution.
This is somewhere between the panel methods in XFOIL (constant vorticity per panel) and
Epplers PROFIL code (parabolic variation of vorticity). The resulting equation system
consists therefore of a (# of panels +1)² sized matrix and two right hand sides. These are for
0° and 90° angle of attack and can be solved for the two corresponding vorticity distributions
efficiently. The vorticity distribution for any arbitrary angle of attack is then derived from
these two solutions (remember that potential theory is linear and allows for superposition).
There is no interaction with the boundary layer, as in XFOIL, though.
κ ⋅ M ∞2 ⎜⎜ ⎝⎜ κ + 1 ⎜⎝ 2 ⎠⎠ ⎟⎟
⎝ ⎠
(Küchemann, „The Aerodynamic Design of Aircraft“, p.115).
1
⎛ v ⎞ 1 + M ∞2
⎜ ⎟ = 1 + 2 ⋅
⎝ v∞ ⎠ crit (κ + 1) ⋅ M ∞2
(Küchemann, „The Aerodynamic Design of Aircraft“, p.114).
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. 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 up to
maybe Mach = 0.6, but the error grows rapidly when Mach exceeds 0.8.
In JavaFoil, the panel analysis is always running on the given airfoil shape – it is never
geometrically distorted. Compressibility corrections are applied later to the local surface
velocities according to the Kàrmàn-Tsien approximation (usually written for Cp)
M ∞2
1−
⎛ v ⎞ ⎛ v ⎞ 2 − M ∞2
⎜ ⎟ = ⎜ ⎟ ⋅ 2
.
⎝ v∞ ⎠comp. ⎝ v∞ ⎠inc. M ∞2 ⎛ v ⎞
1− ⋅⎜ ⎟
2 − M ∞2 ⎝ v∞ ⎠inc.
(Cebeci, "An Engineering Approach to the Calculation of Aerodynamic Flows", p. 32).
Note: the local skin friction coefficient as given on the Boundary Layer card is twice the value
( )
as used by Eppler to follow the more common convention C f = τ 0 / ρ2 ⋅ v∞2 .
In JavaFoil there is no interaction between the boundary layer and the external flow, as in
XFOIL, though. Therefore largely separated flows cannot be analyzed – a short flow
separation (ssep < 10%) at the trailing edge does not affect the results very much. Also laminar
separation bubbles are not modeled; when laminar separation is detected the code switches to
turbulent flow.
Transition Criteria
Methods to predict transition from laminar to turbulent flow have been developed by many
authors since the early days of Prandtl’s 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).
2
Drela approximates the envelopes of the amplification rate n versus Reδ 2 by straight lines of
( )
the form n = f Reδ 2 , H12 . Two versions of this approximation were used in his codes of the
XFOIL and MSES/ISES family.
Transition can occur when Reδ 2 > Reδ 2 ,crit and n > ncrit .
∂n
( 2.4 ⋅ H + 2.5 ⋅ tanh (1.5 ⋅ H12 − 4.65) − 3.7 ) ) + 0.25
2
= 0.01⋅ 12
∂Reδ 2
⎛ 1.415 ⎞ ⎛ 20 ⎞ 3.295
( )
log10 Reδ 2 ,crit = ⎜ − 0.489 ⎟ ⋅ tanh ⎜ -12.9 ⎟ + + 0.44
⎝ H12 − 1 ⎠ ⎝ H12 -1 ⎠ H12 -1
[described in Mark Drela, Giles, AIAA-86-1786-CP, 1986
also cited in Xiao-liang Wang, Xue-xiong Shan, “Shape Optimization of Stratosphere
Airship”, Journal of Aircraft V43N1, 2006.]
XFOIL 5.7
Modification in 1991
∂n 0.0345
= 0.028 ⋅ ( H12 − 1) -
∂Reδ 2
2
⎛ 3.87 ⎞
-⎜ -2.52 ⎟
⎝ H12 -1 ⎠
e
0.43
⎛ 14 ⎞ ⎛ 1 ⎞
(
log10 Reδ 2 ,crit ) = 0.7 ⋅ tanh ⎜ - 9.24 ⎟ + 2.492 ⋅ ⎜ ⎟ + 0.66
⎝ H12 -1 ⎠ ⎝ H12 -1 ⎠
XFOIL 6.8
only a tiny modification (term 0.66 -> 0.62)
∂n 0.0345
= 0.028 ⋅ ( H12 − 1) -
∂Reδ 2
2
⎛ 3.87 ⎞
-⎜ -2.52 ⎟
-1
e ⎝ 12 ⎠
H
0.43
⎛ 14 ⎞ ⎛ 1 ⎞
(
log10 Reδ 2 ,crit ) = 0.7 ⋅ tanh ⎜ - 9.24 ⎟ + 2.492 ⋅ ⎜ ⎟ + 0.62
⎝ H12 -1 ⎠ ⎝ H12 -1 ⎠
Method of Arnal:
A set of tables produced by D. Arnal has been approximated by W. Würz with polynomials:
3
∂n
= a1 + a2 ⋅ H12 + a3 ⋅ H122
∂Reδ 2
( )
log10 Reδ 2 ,crit = b1 + b2 ⋅ H12 + b3 ⋅ H122
(see doctoral thesis of Werner Würz, IAG Stuttgart)
Abbreviations:
approximation of n n
displacement thickness δ1
momentum thickness δ2 = θ
δ
shape factor displacement thickness / momentum thickness H12 = 1
δ2
Reynolds number based on local momentum thickness Reδ 2 = Reθ
Stall Corrections
Emprirical Stall Correction #1 („CalcFoil“)
if ( α > 0 )
{
// handle separation on upper surface
// drag increment
Cd , upper = Cd , upper + sin 2 α ⋅ ( xTE − xsep , upper ) + 0.025 ⋅ cos α ⋅ ( xTE − xsep , upper )
2 2
// moment multiplier
Cm , corrected = Cm, panel method ⋅ 0.9 ⋅ x sep
2
, lower
⋅ x sep
2
, upper
4
Emprirical Stall Correction #2 („Eppler“)
if ( α > 0 )
{
// handle separation on upper surface
if ( xsep , upper < xTE )
{
// trailing edge angle of upper surface
⎛ y −y ⎞
θTE = arctan ⎜ − sep , upper TE ⎟
⎜ xsep , upper − xTE ⎟
⎝ ⎠
}
else
{
θTE = 0
}
// drag increment
Cd , upper = Cd , upper + 0.2 ⋅ sin (α + θTE ) ⋅ ( xTE − xsep , upper )
2
if ( ΔCA > 0 )
{
// lift reduction
CA = CA − ΔCA
}
else
{
// lift multiplier
(
CA = CA ⋅ 1 − sin α ⋅ ( xTE − xsep , upper ) )
}
// moment increment
(
Cm = Cm − sin α ⋅ ( xTE − xsep , upper ) ⋅ 0.5 ⋅ (1 + xsep , upper ) − 0.25 )
}
else if ( α < 0 )
{
// handle separation on lower surface
if ( xsep , lower < xTE )
{
// trailing edge angle of lower surface
⎛ y −y ⎞
θTE = arctan ⎜ − sep , lower TE ⎟
⎜ xsep , lower − xTE ⎟
⎝ ⎠
}
else
{
5
θTE = 0
}
// drag increment
Cd , lower = Cd , lower − 0.2 ⋅ sin (α + θTE ) ⋅ ( xTE − xsep , lower )
2
if ( ΔCA < 0 )
{
// lift reduction
CA = CA − ΔCA
}
else
{
// lift multiplier
(
CA = CA ⋅ 1 − sin α ⋅ ( xTE − xsep , lower ) )
}
// moment increment
(
Cm = Cm − sin α ⋅ ( xTE − xsep , lower ) ⋅ 0.5 ⋅ (1 + xsep , lower ) − 0.25 )
}
6
Polars for a constant Wing Loading
Airfoil data has traditionally been presented in form of graphs and tables for constant
Reynolds numbers. This form results from the typical way wind tunnel experiments and
numerical analyses are conducted. In a wind tunnel it is relatively easy to maintain a constant
wind speed and Reynolds number.
Now the lift coefficient of a real airplane depends on the speed because the wing loading is
usually fixed during flight – flying at low lift coefficients results in high speeds (and high
Reynolds numbers) and vice versa. Therefore the operating points during flight would slice
through a set of polars having constant Reynolds numbers.
It is possible to create polars more closely related to the conditions during flight. This would
require adjusting the wind speed to each lift coefficient, which is cumbersome and expensive
in a wind tunnel, but feasible in a numerical tool like JavaFoil.
Abbreviations:
mass of aircraft m kg
gravity constant g m/s2
density of medium ρ∞ m/s2
kinematic viscosity υ m2/s
flight speed v∞ m/s
wing area S m2
chord length A m
Reynolds number Re -
Basic Equations
m⋅ g
The definition of the lift coefficient is CL = ρ∞
. Solving the definition of the Reynolds
2 ⋅ v∞ ⋅ S
2
v ⋅A Re⋅ν
number Re = ∞ for the velocity v∞ yields v∞ = . Inserting this result into the
ν A
definition of the lift coefficient produces
m ⋅ g ⋅ A2
CL = ρ∞ .
2 ⋅ Re ⋅ν ⋅ S
2 2
Using these results an aircraft oriented airfoil polar for a given wing loading mS and given
mean chord length A can be derived. Due to the dependency between lift coefficient and
Reynolds number an iteration scheme must be used. The calculation procedure for a polar
would be as follows:
7
● perform the following calculation sequence:
inital value
Re* = 106
for (α = α 0 to α1 step Δα )
{
iterate
{
Re = Re*
CL = f (α , Re)
g m
Re* = ρ∞
⋅ ⋅ A2
2 ⋅ CL ⋅ν S
2
}
Re* − Re
while ( > ε)
Re
}
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 m
Λ , eliminating the chord length
A . This has not been implemented in JavaFoil as it was considered more abstract to think in terms of
Λ instead of the aircraft design parameters S and A . But as the relation is S ⋅ A = Λ it would be
m m m 2 m
8
CA
CL =
2⋅ π
1− M ∞2 +
Λ⋅ π
Implementation in JavaFoil
CL2
C D ,i = k ⋅
π ⋅Λ
In JavaFoil the “k-Factor” is assumed to be 1.0 (planar wing with elliptical lift distribution).
Implementation in JavaFoil
9
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);
}
10