-
Notifications
You must be signed in to change notification settings - Fork 0
/
xfoil_doc.txt
1895 lines (1496 loc) · 76.8 KB
/
xfoil_doc.txt
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
XFOIL 6.9 User Primer THE last update 30 Nov 2001
Mark Drela, MIT Aero & Astro
Harold Youngren, Aerocraft, Inc.
General Description
===================
XFOIL is an interactive program for the design and analysis of subsonic
isolated airfoils. It consists of a collection of menu-driven routines
which perform various useful functions such as:
- Viscous (or inviscid) analysis of an existing airfoil, allowing
* forced or free transition
* transitional separation bubble(s)
* limited trailing edge separation
* lift and drag predictions just beyond CLmax
* Karman-Tsien compressibility correction
- Airfoil design and redesign by interactive specification of
a surface speed distribution via screen cursor or mouse. Two
such facilities are implemented.
* Full-Inverse, based on a complex-mapping formulation
* Mixed-Inverse, an extension of XFOIL's basic panel method
Full-inverse allows multi-point design, while Mixed-inverse allows
relatively strict geometry control over parts of the airfoil.
- Airfoil redesign by interactive specification of
new geometric parameters such as
* new max thickness and/or camber
* new LE radius
* new TE thickness
* new camber line via geometry specification
* new camber line via loading change specification
* flap deflection
* explicit contour geometry (via screen cursor)
- Blending of airfoils
- Drag polar calculation with fixed or varying Reynolds and/or
Mach numbers.
- Writing and reading of airfoil geometry and polar save files
- Plotting of geometry, pressure distributions, and polars
(Versaplot-derivative plot package used)
XFOIL is best suited for use on a good workstation. A high-end PC
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
uses a few C routines for the X-Windows interface.
History
-------
XFOIL 1.0 was written by Mark Drela in 1986. The main goal
was to combine the speed and accuracy of high-order panel methods
with the new fully-coupled viscous/inviscid interaction
method used in the ISES code developed by Drela and Giles.
A fully interactive interface was employed from the beginning
to make it much easier to use than the traditional batch-type
CFD codes. Several inverse modes and a geometry manipulator
were also incorporated early in XFOIL's development, making
it a fairly general airfoil development system.
Since version 1.0, XFOIL has undergone numerous revisions,
upgrades, hacks, and enhancements. These changes mainly originated
from perceived shortcomings during actual design use, so XFOIL
is now strongly geared to practical airfoil development.
Harold Youngren provided the Xplot11 plot package which
is a vast improvement over the grim Versaplot-type package
used initially. Enhancements and suggestions from Youngren
and other people were also incorporated into XFOIL itself
along the way.
Over the past few years, bug reports and enhancement
suggestions have slowed to practically nil, and so
after a final few enhancements from version 6.8, XFOIL 6.9
is officially "frozen" and being made public. Although
any bugs will likely be fixed, no further development
is planned at this point. Method extensions are being
planned, but these will be incorporated in a completely
new next-generation code.
Note to code developers and code enhancers...
XFOIL does not exactly have the cleanest implementation,
but it isn't too bad considering its vast modification
history. Feel free to muck with the code as you like,
provided everything is done under the GPL agreement.
Drela and Youngren will not be inclined to assist with
any code modifications at this point, however, since we
each have a dozen other projects waiting. So proceed
at your own risk.
Theory References
-----------------
The general XFOIL methodology is described in
Drela, M.,
XFOIL: An Analysis and Design System for Low Reynolds Number Airfoils,
Conference on Low Reynolds Number Airfoil Aerodynamics,
University of Notre Dame, June 1989.
which also appears as a chapter in:
Low Reynolds Number Aerodynamics. T.J. Mueller (Editor).
Lecture Notes in Engineering #54. Springer Verlag. 1989.
ISBN 3-540-51884-3
ISBN 0-387-51884-3
The boundary layer formulation used by XFOIL is described in:
Drela, M. and Giles, M.B.
Viscous-Inviscid Analysis of Transonic and Low Reynolds Number Airfoils
AIAA Journal, 25(10), pp.1347-1355, October 1987.
The blunt trailing edge treatment is described in:
Drela, M.,
Integral Boundary Layer Formulation for Blunt Trailing Edges,
Paper AIAA-89-2166, August 1989.
Other related literature:
Drela, M.,
Elements of Airfoil Design Methodology,
Applied Computational Aerodynamics, (P. Henne, editor),
AIAA Progress in Aeronautics and Astronautics, Volume 125, 1990.
Drela, M.,
Low-Reynolds Number Airfoil Design for the MIT Daedalus Prototype: A Case Study,
Journal of Aircraft, 25(8), pp.724-732, August 1988.
Drela, M.,
Pros and Cons of Airfoil Optimization,
Chapter in "Frontiers of Computational Fluid Dynamics, 1998",
D.A. Caughey, M.M. Hafez, Eds.
World Scientific, ISBN 981-02-3707-3
Inviscid Formulation
--------------------
The inviscid formulation of XFOIL is a simple linear-vorticity stream
function panel method. A finite trailing edge base thickness is modeled
with a source panel. The equations are closed with an explicit Kutta
condition. A high-resolution inviscid calculation with the default
160 panels requires seconds to execute on a RISC workstation. Subsequent
operating points for the same airfoil but different angles of attack
are obtained nearly instantly.
A Karman-Tsien compressibility correction is incorporated, allowing
good compressible predictions all the way to sonic conditions. The
theoretical foundation of the Karman-Tsien correction breaks down
in supersonic flow, and as a result accuracy rapidly degrades as the
transonic regime is entered. Of course, shocked flows cannot be
predicted with any certainty.
Inverse Formulation
-------------------
There are two types of inverse methods incorporated in XFOIL:
Full-Inverse and Mixed-Inverse. The Full-Inverse formulation
is essentially Lighthill's and van Ingen's complex mapping method,
which is also used in the Eppler code and Selig's PROFOIL code.
It calculates the entire airfoil geometry from the entire surface
speed distribution. The Mixed-Inverse formulation is simply
the inviscid panel formulation (the discrete governing equations
are identical) except that instead of the panel vortex strengths
being the unknowns, the panel node coordinates are treated as
unknowns wherever the surface speed is prescribed. Only a part
of the airfoil is altered at any one time, as will be described later.
Allowing the panel geometry to be a variable results in a non-linear
problem, but this is solved in a straightforward manner with
a full-Newton method.
Viscous Formulation
-------------------
The boundary layers and wake are described with a two-equation lagged
dissipation integral BL formulation and an envelope e^n transition
criterion, both taken from the transonic analysis/design ISES code.
The entire viscous solution (boundary layers and wake) is strongly
interacted with the incompressible potential flow via the surface
transpiration model (the alternative displacement body model is used
in ISES). This permits proper calculation of limited separation regions.
The drag is determined from the wake momentum thickness far downstream.
A special treatment is used for a blunt trailing edge which fairly
accurately accounts for base drag.
The total velocity at each point on the airfoil surface and wake, with
contributions from the freestream, the airfoil surface vorticity, and
the equivalent viscous source distribution, is obtained from the panel
solution with the Karman-Tsien correction added. This is incorporated
into the viscous equations, yielding a nonlinear elliptic system
which is readily solved by a full-Newton method as in the ISES code.
Execution times are quite rapid, requiring about 10 seconds on a RISC
workstation for a high-resolution calculation with 160 panels. For a
sequence of closely spaced angles of attack (as in a polar), the
calculation time per point can be substantially smaller.
If lift is specified, then the wake trajectory for a viscous calculation
is taken from an inviscid solution at the specified lift. If alpha is
specified, then the wake trajectory is taken from an inviscid solution
at that alpha. This is not strictly correct, since viscous effects will
in general decrease lift and change the trajectory. This secondary
correction is not performed, since a new source influence matrix would
have to be calculated each time the wake trajectory is changed. This
would result in unreasonably long calculation times. The effect of this
approximation on the overall accuracy is small, and will be felt mainly
near or past stall, where accuracy tends to degrade anyway. In attached
cases, the effect of the incorrect wake trajectory is imperceptible.
Data Structure
==============
XFOIL stores all its data in RAM during execution. Saving of the data
to files is NOT normally performed automatically, so the user must be
careful to save work results before exiting XFOIL. The exception to
this is optional automatic saving to disk of polar data as it's being
computed in OPER (described later).
Stored airfoils and polars
--------------------------
XFOIL 6.9 stores multiple polars and associated airfoils and parameters
during one interactive session. Each such data set is designated by its
"stored polar" index:
polar 1: x,y, CL(a), CD(a)... Re, Ma, Ncrit...
polar 2: x,y, CL(a), CD(a)... Re, Ma, Ncrit...
.
.
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
from an external file rather than computed online.
Earlier XFOIL versions in effect only allowed one stored airfoil
and stored polar at a time. The new multiple storage feature makes
iterative redesign considerably more convenient, since the cases
can contain multiple design versions which can be easily overlaid
on plots.
Current and buffer airfoils
---------------------------
XFOIL 6.9 retains the concept of a "current airfoil"
and "buffer airfoil" used in previous versions.
These are the airfoils on which the various calculations
are performed, and they are distinct from the "polar" x,y coordinates
described above. The polar x,y are simply archived data,
and do not directly participate in computations. The polar
x,y must first be transferred into the current airfoil if
they are to be used for computation.
Program Execution
=================
XFOIL is executed with
% xfoil
When the program starts, the following top level menu and prompt appear:
QUIT Exit program
.OPER Direct operating point(s)
.MDES Complex mapping design routine
.QDES Surface speed design routine
.GDES Geometry design routine
SAVE f Write airfoil to labeled coordinate file
PSAV f Write airfoil to plain coordinate file
ISAV f Write airfoil to ISES coordinate file
MSAV f Write airfoil to MSES coordinate file
REVE Reverse written-airfoil node ordering
LOAD f Read buffer airfoil from coordinate file
NACA i Set NACA 4,5-digit airfoil and buffer airfoil
INTE Set buffer airfoil by interpolating two airfoils
NORM Buffer airfoil normalization toggle
BEND Display structural properties of current airfoil
PCOP Set current-airfoil panel nodes directly from buffer airfoil points
PANE Set current-airfoil panel nodes ( 140 ) based on curvature
.PPAR Show/change paneling
.PLOP Plotting options
WDEF f Write current-settings file
RDEF f Reread current-settings file
NAME s Specify new airfoil name
NINC Increment name version number
Z Zoom | (available in all menus)
U Unzoom |
XFOIL c>
The commands preceded by a period place the user in another
lower-level menu. The other commands are executed immediately
and the user is prompted for another top level command.
The lowercase letters i,r,f,s following some commands indicate
the type of argument(s) expected by the command:
i integer
r real
f filename
s character string
Commands will be shown here in uppercase, although they are not
case sensitive.
Typically, either the LOAD or the NACA command is issued first
to create an airfoil for analysis or redesign. The NACA command
expects an integer argument designating the airfoil:
XFOIL c> NACA 4415
As with all commands, omitting the argument will produce a prompt:
XFOIL c> NACA
Enter NACA 4 or 5-digit airfoil designation i> 4415
The LOAD command reads and processes a formatted airfoil coordinate
file defining an arbitrary airfoil. It expects a filename argument:
XFOIL c> LOAD e387.dat
The NACA or LOAD commands can be skipped if XFOIL is executed with
a filename as an argument, as for example
% xfoil e387.dat
which then executes the LOAD procedure before the first menu prompt
is given.
Airfoil file formats
--------------------
LOAD recognizes four airfoil file formats: Plain, Labeled, ISES, MSES.
All data lines are significant with the exception of lines beginning
with "#", which are ignored.
Plain coordinate file
.....................
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)
Labeled coordinate file
.......................
This is the same as the plain file, except that it also has an
airfoil name string on the first line:
NACA 0012
X(1) Y(1)
X(2) Y(2)
. .
This is deemed the most convenient format to use.
The presence of the name string is automatically recognized if
it does not begin with a Fortran-readable pair of numbers. Hence,
"00 12 NACA Airfoil" cannot be used as a name, since the "00 12"
will be interpreted as the first pair of coordinates. "0012 NACA"
is OK, however.
Some Fortran implementations will also choke on airfoil names
that begin with T or F. These will be interpreted as logical
variables, defeating the name-detection logic. Beginning the
name with _T or _F is a workable solution to this "feature".
ISES coordinate file
....................
This has four or five ISES grid domain parameters in addition to the name:
NACA 0012
-2.0 3.0 -2.5 3.0
X(1) Y(1)
X(2) Y(2)
. .
If the second line has four or more numbers, then these are interpreted
as the grid domain parameters.
MSES coordinate file
....................
This is the same as the ISES coordinate file, except that it can
contain multiple elements, each one separated by the line
999.0 999.0
The user is asked which of these elements is to be read in.
Buffer airfoil normalization
----------------------------
XFOIL will normally perform all operations on an airfoil with the
same shape and location in cartesian space as the input airfoil.
However, if the normalization flag is set (toggled with the NORM
command), the airfoil coordinates will be immediately normalized
to unit chord and the leading edge will be placed at the origin.
A message is printed to remind the user.
Buffer airfoil generation via interpolation
-------------------------------------------
The INTE command is new in XFOIL 6.9, and allows interpolating
or "blending" of airfoils in various proportions. The interpolation
is performed as follows:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Airfoils 0 and 1 are defined by their cubic splines,
x0(s0), y0(s0) x1(s1), y1(s1)
with the discrete secant arc length parameters s computed from
the coordinates x(i),y(i):
s(i) = s(i-1) + sqrt[ (x(i)-x(i-1))^2 + (y(i)-y(i-1))^2 ]
To perform the interpolation, the discrete s0(i) points are first
used to define discrete fractional parameter values s'(i) = 0...1,
from the Leading Edge to the Trailing Edge:
s'(i) = [s0(i) - s0_LE]/[s0_TE - s0_LE]
The s' values are computed separately on the top and bottom airfoil sides.
These fractional parameter values s' are then used to compute new
spline-parameter values s0,s1 for each airfoil, separately on the
top and bottom sides:
s0(i) = s0_LE + s'(i) * [s0_TE - s0_LE] ; same as original s0(i)
s1(i) = s1_LE + s'(i) * [s1_TE - s1_LE] ; same as original s0(i)
The interpolated-airfoil points are then computed by computing x,y
from the splines and interpolating them:
x_new(i) = (1-f) x0(s0(i)) + f x1(s1(i))
y_new(i) = (1-f) y0(s0(i)) + f y1(s1(i))
Treating the top and bottom surface separately ensures that the
leading edge point of the new airfoil is the interpolated result
of the exact 0 and 1 leading edges.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The polar shape of an interpolated airfoil will often be quite close
to the interpolated polars of its two parent airfoils. Extrapolation
can also be done by specifying a blending fraction outside
the 0..1 range, although the resulting airfoil may be quite
weird if the extrapolation is excessive.
A good way to use INTE is to "augment" or "tone down" the
modifications to an airfoil performed in MDES or GDES.
For example, say airfoil B is obtained by modifying airfoil A:
A -> MDES -> B
Suppose the modification changed A's polar in the right direction,
but not quite far enough. The additional needed change can be
done by extrapolating past airfoil B in INTE:
Airfoil "0": A
Airfoil "1": B
Interpolating fraction 0..1 : 1.4
Output airfoil: C
Plotted along the "modification axis", the airfoils are:
A B C
0.0 1.0 1.4 ...
So airfoil C has 40% more of the change received by B in the redesign.
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
onto another airfoil shape. This is done as follows:
Airfoil 0: airfoil providing the node distribution ( s'(i) values )
Airfoil 1: airfoil providing the shape ( x, y values )
Interpolating fraction: 1.0
The resulting airfoil will have the shape of airfoil 1, but the
node distribution of airfoil 0.
Further buffer airfoil manipulation
-----------------------------------
The GDES facility allows very extensive manipulation of the buffer airfoil.
This will be described in much more detail in a later section. If only
analysis is performed, the GDES facility would not normally be used.
Generation of current airfoil
-----------------------------
When the buffer airfoil coordinates are read from a file during startup,
or read in via the LOAD command, they are by default
also copied directly into the ``current'', or working airfoil.
Hence, no special action is needed to start analysis operations. However,
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.
The paneling routine increases the point density in areas of
high curvature (i.e. the leading edge) and at the trailing edge
to a degree specified by the user. The user can also increase
panel density over one additional interval on each airfoil side,
perhaps near transition. The current-airfoil paneling can be
displayed and/or modified with PPAR.
In some cases it is desirable to explicitly re-copy the buffer
airfoil into the current airfoil via PCOP. In previous XFOIL
versions this had to be done with the equivalent command sequence
LOAD
GDES
EXEC
With XFOIL 6.9, the GDES,EXEC commands after LOAD are now superfluous.
The NACA command automatically invokes the paneling routine to create
a current airfoil with a suitable paneling.
Saving current airfoil coordinates
----------------------------------
A coordinate file in any one of these four formats can be written
with the PSAV, SAVE, ISAV, or MSAV command, respectively.
When issuing the MSAV command, the user is also asked which element
in the file is to be overwritten. XFOIL can thus be used to easily
"edit" individual elements in MSES multielement configurations.
Of course, normalization should not be performed on an element if
it is to be written back to the same multielement file.
Only the current-airfoil coordinates can be saved to a file.
If the buffer or polar x,y coordinates need to be saved, they
must first be copied into the current airfoil.
Units
=====
Most XFOIL operations are performed on the airfoil's cartesian
coordinates x,y , which do not necessarily have a unit chord c.
Since the chord is ambiguous for odd shapes, the XFOIL
force coefficients CL, CD, CM are obtained by normalizing the
forces and moment with only the freestream dynamic pressure
(the reference chord is assumed to be unity). Likewise, the
XFOIL Reynolds number RE is defined with the freestream velocity
and viscosity, and an implied unit chord:
CL = L / q | V = freestream speed
CD = D / q | v = freestream kinematic viscosity
CM = M / q | r = freestream density
RE = V / v | q = 0.5 r V^2
The conventional definitions are
Cl = L / q c
Cd = D / q c
Cm = M / q c^2
Rc = V c / v
so that the conventional and XFOIL definitions differ only by
the chord factor c or c^2.
For example, a NACA 4412 airfoil is operated in the OPER menu at
RE = 500000
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:
c = 1.0 : CL = 0.80 CD = 0.0082 (RE = 500000, Rc = 500000)
c = 0.5 : CL = 0.40 CD = 0.0053 (RE = 500000, Rc = 250000)
Since CL is not normalized with the chord, it is nearly proportional
to the airfoil size. It is not exactly proportional, since the true
chord Reynolds number Rc is different, and there is always a weak
Reynolds number effect on lift. In contrast, the CD for the smaller
airfoil is significantly greater than 1/2 times the larger-airfoil CD,
since chord Reynolds number has a significant impact on profile drag.
Repeating the c = 0.5 case at RE = 1000000, produces the expected
result that CL and CD are exactly 1/2 times their c = 1.0 values.
c = 0.5 : CL = 0.40 CD = 0.0041 (RE = 1000000, Rc = 500000)
Although XFOIL performs its operations with no regard to the size
of the airfoil, some quantities are nevertheless defined in terms
of the chord length. Examples are the camber line shape and BL trip
locations, which are specified in terms of the relative x/c,y/c along
and normal to the airfoil chord line. This is done only for the user's
convenience. In the input and output labeling, "x,y" always refer
to the cartesian coordinates, while "x/c,y/c" refer to the chord-
based coordinates which are shifted, rotated, and scaled so that
the airfoil's leading edge is at (x/c,y/c) = (0,0), and
the airfoil's trailing edge is at (x/c,y/c) = (1,0). The two
systems cooincide only if the airfoil is normalized.
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
The OPER command, for instance, will produce the prompt
.OPERi c>
Typing a " ? " will result in the OPER analysis menu being displayed:
<cr> Return to Top Level
! Redo last ALFA,CLI,CL,ASEQ,CSEQ,VELS
Visc r Toggle Inviscid/Viscous mode
.VPAR Change BL parameter(s)
Re r Change Reynolds number
Mach r Change Mach number
Type i Change type of Mach,Re variation with CL
ITER Change viscous-solution iteration limit
INIT Toggle BL initialization flag
Alfa r Prescribe alpha
CLI r Prescribe inviscid CL
Cl r Prescribe CL
ASeq rrr Prescribe a sequence of alphas
CSeq rrr Prescribe a sequence of CLs
SEQP Toggle polar/Cp(x) sequence plot display
CINC Toggle minimum Cp inclusion in polar
HINC Toggle hinge moment inclusion in polar
Pacc i Toggle auto point accumulation to active polar
PGET f Read new polar from save file
PWRT i Write polar to save file
PSUM Show summary of stored polars
PLIS i List stored polar(s)
PDEL i Delete stored polar
PSOR i Sort stored polar
PPlo ii. Plot stored polar(s)
APlo ii. Plot stored airfoil(s) for each polar
ASET i Copy stored airfoil into current airfoil
PREM ir. Remove point(s) from stored polar
PNAM i Change airfoil name of stored polar
PPAX Change polar plot axis limits
RGET f Read new reference polar from file
RDEL i Delete stored reference polar
GRID Toggle Cp vs x grid overlay
CREF Toggle reference Cp data overlay
FREF Toggle reference CL,CD.. data display
CPx Plot Cp vs x
CPV Plot airfoil with pressure vectors (gee wiz)
.VPlo BL variable plots
.ANNO Annotate current plot
HARD Hardcopy current plot
SIZE r Change plot-object size
CPMI r Change minimum Cp axis annotation
BL i Plot boundary layer velocity profiles
BLC Plot boundary layer velocity profiles at cursor
BLWT r Change velocity profile scale weight
FMOM Calculate flap hinge moment and forces
FNEW rr Set new flap hinge point
VELS rr Calculate velocity components at a point
DUMP f Output Ue,Dstar,Theta,Cf vs s,x,y to file
CPWR f Output x vs Cp to file
CPMN Report minimum surface Cp
NAME s Specify new airfoil name
NINC Increment name version number
The commands are not case sensitive. Some commands expect multiple
arguments, but if the arguments are not typed, prompts will be issued.
The most commonly-used commands have alternative short forms,
indicated by the uppercase part of the command in the menu list.
For example, the menu shows...
Alfa r Prescribe alpha
CLI r Prescribe inviscid CL
Cl r Prescribe CL
ASeq rrr Prescribe a sequence of alphas
CSeq rrr Prescribe a sequence of CLs
The "A" command is the short alternative form of "ALFA", and "C"
is the short alternative of "CL". Likewise, "AS" and "CS"
are the short forms of "ASEQ" and "CSEQ". The CLI command
has no short form (as indicated by all capitals in the menu),
and must be fully typed.
Hopefully, most of the commands are self-explanatory. For inviscid
cases, the CLI and CL commands are identical. For viscous cases,
CLI is equivalent to specifying alpha, this being determined a priori
from the specified lift coefficient via an inviscid solution. CL will
return a viscous solution with the specified true viscous lift
coefficient at an alpha which is determined as part of the solution
(prescribing a CL above CLmax will cause serious problems, however!).
The user is always prompted for any required input. When in doubt,
typing a " ? " will always produce a menu.
After an ALFA, CL, or CLI command is executed, the Cp vs x distribution
is displayed, and can be displayed again at any time with CPX.
If the viscous mode is active, the true viscous Cp is shown as a solid
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
a useful visual indicator of panel resolution quality. If the inviscid
mode is active, only the inviscid Cp is shown as a solid line.
The difference between the true viscous Cp distribution (solid line)
and the inviscid Cp distribution (dashed line) is due to the
modification of the effective airfoil shape by the boundary layers.
This effective airfoil shape is shown superimposed on the actual
current airfoil shape under the Cp vs x plot. The gap between
these effective and actual shapes is equal to the local displacement
thickness delta*, which can also be plotted in the VPAR menu.
This is only about 1/3 to 1/2 as large as the overall boundary
layer thickness, which can be visualized via the BL or BLC commands
which diplay velocity profiles through the boundary layer.
BL displays a number of profiles equally spaced around the
airfoil's perimeter, while BLC displays profiles at cursor-selected
locations. The zooming commands Z, U, may be necessary to better
see these small profiles in most cases.
If the Cp reference data overlay option is enabled with CREF,
initiating a Cp vs x plot will first result in the user being
prompted for a formatted data file with the following format:
x(1) Cp(1)
x(2) Cp(2)
. .
. .
The Cp vs x plot is then displayed as usual but with the data overlaid.
If FREF has been issued previously, then numerical reference values
for CL, CD, etc. will be requested and added to the plot next to the
computed values.
Boundary-layer quantities are plotted from the VPLO menu:
H Plot kinematic shape parameter
DT Plot top side Dstar and Theta
DB Plot bottom side Dstar and Theta
UE Plot edge velocity
CF Plot skin friction coefficient
CD Plot dissipation coefficient
N Plot amplification ratio
CT Plot max shear coefficient
RT Plot Re_theta
RTL Plot log(Re_theta)
X rrr Change x-axis limits
Y rrr Change y-axis limits on current plot
Blow Cursor blowup of current plot
Rese Reset to default x,y-axis limits
SIZE r Change absolute plot-object size
.ANNO Annotate plot
HARD Hardcopy current plot
GRID Toggle grid plotting
SYMB Toggle node-symbol plotting
LABE Toggle label plotting
CLIP Toggle line-plot clipping
This menu is largely self-explanatory. The skin friction
coefficient plotted with the CF command is defined as
2
Cf = tau / 0.5 rho Qinf
This differs from the standard boundary layer theory definition
which uses the local Ue rather than Qinf for the normalization.
Using the constant freestream reference makes Cf(x) have the
same shape as the physical shear stress tau(x).
The dissipation coefficient CD' (this is NOT the drag coefficient!!!)
is plotted with the CD command. CD'(x) is proportional to the local
energy dissipation rate due to viscous shear and turbulent mixing.
Hence, it indicates where on the airfoil drag is being created.
It is in fact a much better indicator of drag production than Cf(x),
since Cf does not account for pressure drag. CD', on the other
hand, accounts for everything. Its relationship to the total
profile drag coefficient is simply
/
CD = | 2 CD' ds
/
with the integration performed over both boundary layers and also
the wake. It will be seen that if the flow is separated at the
trailing edge, much of the drag contribution (energy dissipation)
of CD' occurs in the wake.
As mentioned earlier, all forces are normalized with freestream
dynamic pressure only. CL, CD, CM are the usual chord-based
definitions only if the airfoil has a unit chord -- in general,
they will scale with the airfoil's chord. Also, CM is defined
about the cartesian point (xref,yref) = (0.25,0.0), which is not
necessarily the airfoil's 1/4 chord point.
-- Force calculation --
The lift and moment coefficients CL, CM, are calculated by direct
surface pressure integration:
/ _ /
CL = L/q = | Cp dx CM = M/q = | -Cp [(x-xref) dx + (y-yref) dy]
/ /
_
where x = x cos(a) + y sin(a) ; a = angle of attack
_
y = y cos(a) - x sin(a)
The integrals performed in the counterclockwise direction
around the airfoil contour. The pressure coefficient Cp is
calculated using the Karman-Tsien compressibility correction.
The drag coefficient CD is obtained by applying the Squire-Young
formula at the last point in the wake --- NOT at the trailing edge.
(H+5)/2
CD = D/q = 2 Theta_i = 2 Theta (u/V)
where Theta = momentum thickness |
u = edge velocity | at end of wake
H = shape parameter |
V = freestream velocity
Theta_i = momentum thickness at "downstream infinity"
The Squire-Young formula in effect extrapolates the momentum
thickness to downstream infinity. It assumes that the wake behaves
in a asymptotic manner downstream of the point of application.
This assumption is strongly violated in the near-wake behind an
airfoil with trailing edge separation, but is always reasonable
some distance behind the airfoil. Hence, the usual application
of Squire-Young at the trailing edge is questionable with separation
present, but its application at the last wake point (typically
1 chord downstream) is always reasonable. Also, application at
the last wake point also results in the formula having a smaller
effect in any case, since there u ~ V, and hence Theta_i ~ Theta.
In most 2-D airfoil experiments, drag is measured indirectly by
measuring 2 Theta/c in the wake, often within one chord of the
airfoil's trailing edge. For consistency, this should be compared
to the Theta value predicted by XFOIL at the same wake location,
rather than the "true" Cd = 2 Theta_i/c value which is effectively
at downstream infinity. In general, Theta_i will be smaller
than Theta. In most airfoil drag measurement experiments, this
difference may amount to the drag measurement being several
percent too large, unless some correction is performed.
In addition to calculating the total viscous CD from the wake
momentum thickness, XFOIL also determines the friction and pressure
drag components CDf,CDp of this total CD. These are calculated by
/ _
CDf = | Cf dx CDp = CD - CDf
/
Here, Cf is the skin friction coefficient defined with the
freestream dynamic pressure, not the BL edge dynamic pressure
commonly used in BL theory. Note that CDp is deduced from
CD and CDf instead of being calculated via surface pressure
integration. This conventional definition
/ _
CDp = | Cp dy
/
is NOT used, since it is typically swamped by numerical noise.
-- Transition criterion --
Transition in an XFOIL solution is triggered by one of two ways:
free transition: e^n criterion is met
forced transition: a trip or the trailing edge is encountered
The e^n method is always active, and free transition can occur
upstream of the trip. The e^n method has the user-specified
parameter "Ncrit", which is the log of the amplification factor
of the most-amplified frequency which triggers transition.
A suitable value of this parameter depends on the ambient
disturbance level in which the airfoil operates, and mimics
the effect of such disturbances on transition. Below are typical
values of Ncrit for various situations.
situation Ncrit
----------------- -----
sailplane 12-14
motorglider 11-13
clean wind tunnel 10-12
average wind tunnel 9 <= standard "e^9 method"
dirty wind tunnel 4-8
Note: The e^n method in XFOIL is actually the simplified envelope
version, which is the same as the full e^n method only for flows
with constant H(x). If H is not constant, the two methods differ
somewhat, but this difference is typically within the uncertainty
in choosing Ncrit.
The e^n method is only appropriate for predicting transition in
situations where the growth of 2-D Tollmien-Schlichting waves via
linear instability is the dominant transition-initiating mechanism.
Fortunately, this happens to be the case in a vast majority of airfoil
applications. Other possible mechanisms are:
* Crossflow instabilities. These occur on swept wings with significant
favorable chordwise pressure gradients.
* Attachment-line transition. This requires large sweep, large LE
radius, and a large Reynolds number. Occurs primarily on big jets.
* Bypass transition. This occurs in cases with sufficient wall
roughness and/or large freestream turbulence or vibration levels.
The linear-instability phase predicted by the e^n method is
"bypassed", giving relatively early transition. Usually occurs
in favorable pressure gradients, while the linear-instability
mechanism usually dominates in adverse pressure gradients.
If any of these alternative transition mechanisms are present, the
trips must be set to mimick their effect. The bypass transition
mechanism can be mimicked to some extent by the e^n method by
setting Ncrit to a small value --- Ncrit=1 or less. This will
cause transition just after linear instability begins. For
very large freestream turbulence or roughness in favorable
pressure gradients, bypass transition can occur before the
linear instability threshold, and in this case trips will have
to be set as well.
Numerical accuracy
------------------
-- Panel density requirements --
If strong separation bubbles are present in a viscous solution, then
it is very important to have good panel resolution in the region of the
bubble(s). The large gradients at a bubble tend to cause significant
numerical errors even if a large number of panels is used. If a separation
bubble appears to be poorly resolved, it is a good idea to re-panel the
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
transition, otherwise there may be significant numerical errors in the
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.
On many airfoils, especially those with small leading edge radii,
the development of the small bubble which forms just behind the
leading edge can have a significant effect on CLmax. For such cases,
the default paneling density at the bubble may not be adequate.
In all cases, inadequate bubble resolution results in a "ragged"
or "scalloped" CL vs CD drag polar curve, so fortunately this is
easy to spot.
-- Differencing order of accuracy --
The BL equations are normally discretized with two-point central
differencing (i.e. the Trapezoidal Scheme), which is second-order
accurate, but only marginally stable. In particular, it has problems
with the relatively stiff shape parameter and lag equations at
transition, where at high Reynolds number the shape parameter must
change very rapidly. Oscillations and overshoots in the shape parameter
will occur with the Trapezoidal Scheme if the grid cannot resolve this