Skip to main content
Version: 0.3.1

Comparison with XFOIL and mfoil

Scirocco implements the model of mfoil, Fidkowski's Python reimplementation of XFOIL's panel method and integral boundary layer. Wherever both converge, Scirocco reproduces mfoil's forces and transition locations to every stored digit. Both differ from XFOIL by the same small amount: on average 0.3–0.5% in Cl and 0.5–1% in Cd.

CaseConverged (Scirocco / XFOIL / mfoil)Cl vs XFOIL, mean / maxCd vs XFOIL, mean / maxTransition vs XFOIL, maxvs mfoil
NACA 2412, inviscid, α = −4…12°9 / 9 / 90.00% / 0.00%——identical
NACA 0012, Re = 10⁶, α = 0…15°16 / 15 / 120.31% / 0.89%0.94% / 3.8%0.0014cidentical
NACA 2412, Re = 3×10⁶, α = −4…14°19 / 18 / 140.50% / 1.6%0.54% / 1.0%0.0023cidentical
NACA 4412, Re = 2×10⁵, α = −2…12°15 / 15 / 130.35% / 0.85%0.84% / 2.8%0.0082cidentical
NACA 2412, Re = 6×10⁶, M = 0.4, α = −2…6°8 / 9 / 70.47% / 0.68%0.48% / 0.77%0.0024cidentical

Differences are relative, over the angles where both codes converged; Cl differences skip |Cl| < 0.05. "Identical" means equal to the six significant digits stored, which leaves a largest transition difference of 1e-4c from rounding.

Setup​

  • Same nodes. mfoil panels each airfoil with 199 panels. Scirocco takes those nodes, arc lengths and tangents unchanged, and XFOIL loads the nodes without repaneling (PCOP). Paneling differences are therefore ruled out; what remains is the solver.
  • Same physics. ncrit = 9, free transition on both surfaces, Kármán–Tsien correction at M = 0.4.
  • How each code runs. Scirocco and XFOIL sweep each polar the way a user would, starting at the angle nearest 0° and continuing up, then down, each point warm-starting from the last. mfoil solves every point from a cold start. XFOIL is version 6.99 with 100 iterations allowed per point.
  • Precision. XFOIL's forces and distributions are read from its binary polar dump, in double precision, not from the rounded text polar.

Inviscid​

On the same nodes the three linear-vorticity panel methods give the same lift and moment to five or more significant digits. The inviscid Cp is the starting point for everything else, so the viscous differences below don't come from the panel method.

  • Scirocco
  • XFOIL 6.99
  • mfoil
-1-0.500.511.500.20.40.60.81x/c−Cp
NACA 2412, inviscid, α = 4°.

Viscous polars​

  • Scirocco
  • XFOIL 6.99
  • mfoil
00.511.5-404812α (deg)Cl
NACA 2412, Re = 3×10⁶. Not converged: XFOIL 6.99 at 6°; mfoil at 7°, 8°, 9°, 10°, 12°.
Show data
Scirocco
α (deg)Cl
-4-0.206
-3-0.094
-20.018
-10.130
00.241
10.352
20.462
30.569
40.675
50.804
60.913
71.008
81.107
91.206
101.303
111.395
121.483
131.555
141.617
XFOIL 6.99
α (deg)Cl
-4-0.208
-3-0.096
-20.017
-10.130
00.242
10.354
20.465
30.573
40.677
50.806
71.009
81.109
91.209
101.307
111.400
121.489
131.564
141.627
mfoil
α (deg)Cl
-4-0.206
-3-0.094
-20.018
-10.130
00.241
10.352
20.462
30.569
40.675
50.804
60.913
111.395
131.555
141.617
  • Scirocco
  • XFOIL 6.99
  • mfoil
00.511.500.0050.010.0150.02CdCl
Show data
Scirocco
CdCl
0.00637-0.206
0.00607-0.094
0.005820.018
0.005640.130
0.005470.241
0.005190.352
0.005080.462
0.005140.569
0.005700.675
0.006770.804
0.007910.913
0.008921.008
0.009941.107
0.011031.206
0.012161.303
0.013481.395
0.014821.483
0.016601.555
0.018521.617
XFOIL 6.99
CdCl
0.00639-0.208
0.00609-0.096
0.005840.017
0.005660.130
0.005490.242
0.005210.354
0.005110.465
0.005180.573
0.005740.677
0.006800.806
0.008961.009
0.009981.109
0.011071.209
0.012211.307
0.013561.400
0.014971.489
0.016721.564
0.018711.627
mfoil
CdCl
0.00637-0.206
0.00607-0.094
0.005820.018
0.005640.130
0.005470.241
0.005190.352
0.005080.462
0.005140.569
0.005700.675
0.006770.804
0.007910.913
0.013481.395
0.016601.555
0.018521.617

The three curves lie on top of each other until stall approaches. The largest XFOIL differences, 1–4%, come at the highest angles.

  • Scirocco
  • XFOIL 6.99
  • mfoil
00.511.50481216α (deg)Cl
NACA 0012, Re = 10⁶. Not converged: XFOIL 6.99 at 1°; mfoil at 5°, 7°, 11°, 13°.
Show data
Scirocco
α (deg)Cl
00.000
10.106
20.212
30.318
40.428
50.556
60.693
70.830
80.914
90.997
101.078
111.165
121.238
131.306
141.348
151.351
XFOIL 6.99
α (deg)Cl
0-0.000
20.214
30.320
40.428
50.556
60.694
70.827
80.910
90.995
101.078
111.167
121.242
131.312
141.351
151.357
mfoil
α (deg)Cl
0-0.000
10.106
20.212
30.318
40.428
60.693
80.914
90.997
101.078
121.238
141.348
151.351
  • Scirocco
  • XFOIL 6.99
  • mfoil
00.511.500.010.020.03CdCl
Show data
Scirocco
CdCl
0.005390.000
0.005480.106
0.005790.212
0.006390.318
0.007280.428
0.008460.556
0.009720.693
0.010910.830
0.012080.914
0.013400.997
0.015151.078
0.016731.165
0.019391.238
0.021861.306
0.025211.348
0.032551.351
XFOIL 6.99
CdCl
0.00541-0.000
0.005820.214
0.006410.320
0.007300.428
0.008490.556
0.009750.694
0.010950.827
0.012110.910
0.013440.995
0.015241.078
0.016861.167
0.019611.242
0.022141.312
0.026041.351
0.033821.357
mfoil
CdCl
0.00539-0.000
0.005480.106
0.005790.212
0.006390.318
0.007280.428
0.009720.693
0.012080.914
0.013400.997
0.015151.078
0.019391.238
0.025211.348
0.032551.351

At low Reynolds number a laminar separation bubble forms ahead of transition. The codes agree on it as closely as at the higher Reynolds numbers:

  • Scirocco
  • XFOIL 6.99
  • mfoil
00.511.504812α (deg)Cl
NACA 4412, Re = 2×10⁵. Not converged: mfoil at 9°, 10°.
Show data
Scirocco
α (deg)Cl
-20.248
-10.352
00.490
10.593
20.696
30.801
40.905
51.008
61.109
71.201
81.284
91.349
101.367
111.359
121.357
XFOIL 6.99
α (deg)Cl
-20.250
-10.354
00.488
10.591
20.696
30.801
40.906
51.010
61.111
71.203
81.287
91.353
101.372
111.366
121.368
mfoil
α (deg)Cl
-20.248
-10.352
00.490
10.593
20.696
30.801
40.905
51.008
61.109
71.201
81.284
111.359
121.357
  • Scirocco
  • XFOIL 6.99
  • mfoil
00.511.500.010.020.030.04CdCl
Show data
Scirocco
CdCl
0.012790.248
0.010760.352
0.010000.490
0.010370.593
0.010970.696
0.011740.801
0.012620.905
0.013571.008
0.014541.109
0.015421.201
0.016431.284
0.017971.349
0.021821.367
0.028841.359
0.037091.357
XFOIL 6.99
CdCl
0.012840.250
0.010810.354
0.010020.488
0.010400.591
0.011010.696
0.011780.801
0.012660.906
0.013611.010
0.014591.111
0.015481.203
0.016511.287
0.018171.353
0.022331.372
0.029661.366
0.038121.368
mfoil
CdCl
0.012790.248
0.010760.352
0.010000.490
0.010370.593
0.010970.696
0.011740.801
0.012620.905
0.013571.008
0.014541.109
0.015421.201
0.016431.284
0.028841.359
0.037091.357

At M = 0.4 the Kármán–Tsien correction matches XFOIL's to the same level as the incompressible cases. Scirocco and mfoil both fail to converge at 4°, from the same model, where XFOIL converges.

  • Scirocco
  • XFOIL 6.99
  • mfoil
00.5104α (deg)Cl
NACA 2412, Re = 6×10⁶, M = 0.4. Not converged: Scirocco at 4°; mfoil at 4°, 6°.
Show data
Scirocco
α (deg)Cl
-20.016
-10.142
00.268
10.393
20.517
30.638
50.870
61.010
XFOIL 6.99
α (deg)Cl
-20.015
-10.142
00.269
10.395
20.520
30.642
40.762
50.876
61.012
mfoil
α (deg)Cl
-20.016
-10.142
00.268
10.393
20.517
30.638
50.870
  • Scirocco
  • XFOIL 6.99
  • mfoil
00.5100.0050.01CdCl
Show data
Scirocco
CdCl
0.005740.016
0.005580.142
0.005450.268
0.005360.393
0.005300.517
0.005570.638
0.006830.870
0.007961.010
XFOIL 6.99
CdCl
0.005760.015
0.005600.142
0.005480.269
0.005380.395
0.005320.520
0.005600.642
0.006130.762
0.006890.876
0.008021.012
mfoil
CdCl
0.005740.016
0.005580.142
0.005450.268
0.005360.393
0.005300.517
0.005570.638
0.006830.870

Transition​

The transition point is where the codes could disagree most, because it depends on the amplification-factor march and on where in the interval the cut cell places it. Scirocco and XFOIL put it within 0.0025c of each other at Re ≥ 10⁶, and within 0.01c at Re = 2×10⁵:

  • Scirocco
  • XFOIL 6.99
  • mfoil
00.20.40.60.81-2024681012α (deg)x/c transition, upper
NACA 4412, Re = 2×10⁵: transition location on the upper surface.
Show data
Scirocco
α (deg)x/c transition, upper
-20.855
-10.814
00.766
10.713
20.665
30.623
40.585
50.549
60.510
70.460
80.403
90.319
100.192
110.103
120.074
XFOIL 6.99
α (deg)x/c transition, upper
-20.855
-10.814
00.766
10.714
20.665
30.623
40.585
50.549
60.510
70.459
80.402
90.316
100.184
110.099
120.072
mfoil
α (deg)x/c transition, upper
-20.855
-10.814
00.766
10.713
20.665
30.623
40.585
50.549
60.510
70.460
80.403
110.103
120.074

Surface distributions​

NACA 2412 at Re = 3×10⁶ and α = 4°. The markers are every sixth mfoil node.

  • Scirocco
  • XFOIL 6.99
  • mfoil
-1-0.500.511.500.20.40.60.81x/c−Cp
NACA 2412, Re = 3×10⁶, α = 4°.
  • Scirocco
  • XFOIL 6.99
  • mfoil
00.0040.00800.20.40.60.81x/cCf
NACA 2412, Re = 3×10⁶, α = 4° on the upper surface. The axis cuts off the leading-edge peak.

Away from transition the skin friction from Scirocco and XFOIL agrees to about 1e-6 (the median difference). The largest differences, up to 6e-4, are in the first few turbulent stations, where XFOIL's Cf rises a little faster. The pressure differs most near the trailing edge, by up to 0.008 in Cp.

NACA 4412 at Re = 2×10⁵ and α = 4°: Cf drops below zero on the upper surface from x/c = 0.39 to 0.59. That is the laminar separation bubble; transition at 0.58c closes it.

  • Scirocco
  • XFOIL 6.99
  • mfoil
00.0040.00800.20.40.60.81x/cCf
NACA 4412, Re = 2×10⁵, α = 4° on the upper surface. The axis cuts off the leading-edge peak.

Convergence​

Scirocco converged at 58 of the 59 viscous points, XFOIL at 57, and mfoil, from cold starts, at 46. XFOIL's miss at 1° on NACA 0012 is a limit cycle: its Newton iteration settles on Cl = 0.1075 and stalls there for all 100 iterations. mfoil's misses are all at α ≥ 4°, each solved from a cold start.

Reproducing​

The scripts are in scirocco/validation/vv. vv.py codes runs all three codes and writes docs/src/data/vv_codes.json, which the figures on this page read. It needs XFOIL on the PATH and takes about 80 seconds on an Apple M1 Pro; the mfoil solves dominate.