Validation
NACA 0012 against OpenFOAM, region by region
On the same mesh and with the same model, LeonSim and OpenFOAM agree on pressure and friction drag in every part of the wall. Against the wind tunnel, lift and zero-incidence drag hold. Drag at 10° is 15 % high, and we can say why.
Status. Code comparison passed against OpenFOAM (same mesh, model, schemes, wall treatment, converged LeonSim state, per-region agreement), and solution verification passed on the grid ladder with its stated orders. Not validated against experiment: CL at 10° and CD at 0° are within 0.5 % of Ladson’s tripped data, and CD at 10° is 15 % high and open. This post replaces the NACA 0012 numbers of 15 October, which came from the cut-cell solver and are no longer published.
The NACA 0012 at a chord Reynolds number of 6 million is the first test any external-flow code has to pass. We ran it three ways: Ladson’s NASA wind-tunnel data as the published reference, OpenFOAM v2412 as the computational reference, and LeonSim’s body-fitted C-grid solver. The question for each pair is the same: where along the wall do they differ, and by how much?
The set-up
Both codes use the identical mesh: 139,776 cells in a C-grid around the section, 320 wall faces per side, a first cell 2 µm high (y⁺ below 0.35 at 0°, below 0.74 at 10°), growth ratio 1.1, a far boundary 200 chords away. Both solve the incompressible RANS equations with k-ω SST all the way to the wall, with no wall function, linear-upwind convection and SIMPLEC pressure coupling. Both use OpenFOAM’s under-relaxation (0.8 on velocity, 0.7 on pressure). LeonSim’s states were started from the free stream and never from an OpenFOAM field, and they were run until the velocity update was about 10⁻⁶ and no cell was clipped by a limiter.
The experiment is Ladson’s tripped data (TM-4074, Re 6·10⁶), interpolated to the exact angle from the files on NASA’s Turbulence Modeling Resource: CD 0.00807 at 0°, CL 1.063 and CD 0.01169 at 10°. A third reference, NASA’s CFL3D with the same SST model, gives 0.0080937 and 0.012362 for drag and 1.0778 for lift.
Region by region
Totals can agree while the parts do not, so we integrate over ten wall regions, five on each surface (0–2 %, 2–10 %, 10–30 %, 30–70 % and 70–100 % of the chord), and compare pressure and friction separately.
| C-grid, 320 per side | CL | CD | CD pressure | CD friction |
|---|---|---|---|---|
| 0°, OpenFOAM (40,000 it) | 0 | 0.0080274 | 0.0013374 | 0.0066900 |
| 0°, LeonSim (16,000 it) | −4·10⁻⁸ | 0.0080275 | 0.0013375 | 0.0066900 |
| 10°, OpenFOAM (16,000 it) | 1.06362 | 0.013434 | 0.0072437 | 0.0061903 |
| 10°, LeonSim (10,000 it) | 1.06372 | 0.013445 | 0.0072546 | 0.0061907 |
In every one of the ten regions the pressure drag differs by at most 6.5·10⁻⁷ at 0° and 7.7·10⁻⁶ at 10° (the largest is on the upper surface between 70 % and 100 % chord). The friction drag differs by at most 1.6·10⁻⁷ in every region at both angles. Over the 640 wall faces the largest difference in pressure coefficient is 1.1·10⁻⁴ at 0° and 5.3·10⁻⁴ at 10°, both at the nose, where the pressure changes fastest. At 10° LeonSim’s pressure drag is 0.15 % above OpenFOAM’s and its lift is 0.01 % above.
A gap that was not a model error
An earlier comparison showed LeonSim’s 0° pressure drag 3 to 7 % above OpenFOAM’s. It was not the model; neither side had converged. LeonSim’s stored state at 6,000 iterations was a slow tail (pressure drag 0.001420), and the reference was drifting too: OpenFOAM’s 0° pressure drag on this mesh is 0.001373 after 8,000 iterations, 0.001349 after 16,000 and 0.0013374 after 40,000, with a time constant of about 7,500 iterations. LeonSim’s own tail extrapolates to about 0.001335, and so does the GPU port’s fixed point. Comparing against the 40,000-iteration state, the difference is 10⁻⁷. The lesson we wrote into our rules: use a reference only after it has been shown to converge, and say so when it has not.
The answer depends on the under-relaxation, in both codes
At 10° the converged steady state moves with the relaxation factors, by up to 1.5 % in pressure drag between 0.9/0.9 and 0.7/0.3 on this mesh (at 0° the same change is under 0.07 %). OpenFOAM does it too. The cause is the Rhie–Chow term of the face flux, which carries the relaxed diagonal. We found the cause with a test that could have failed: a correction that cancels the term at a fixed point removes the dependence (0.002 % spread on a 9,112-cell mesh, 0.003 % on the 214 grid). The correction is an option and is off by default; the comparisons above are at OpenFOAM’s own relaxation with it off. Compared with OpenFOAM extrapolated to full relaxation, the corrected LeonSim state is within 0.06 % in pressure drag on the 320 grid.
Grid study
| faces per side | cells | 0°: OpenFOAM / LeonSim CD,p | 10°: OpenFOAM / LeonSim CD,p |
|---|---|---|---|
| 142 | 31,044 | 0.001488 / 0.001483 | 0.007268 / 0.007348 (unsteady) |
| 214 | 65,780 | 0.001392 (not converged) / 0.001382 | 0.007095 / 0.007141 |
| 320 | 139,776 | 0.0013374 / 0.0013375 | 0.007244 / 0.007255 |
The two codes follow each other on every grid and the difference at 10° shrinks from 1.1 % to 0.65 % to 0.15 %. We do not state a grid-convergence order for LeonSim on the CPU: the 142 grid at 10° is not a steady state in either code (a limit cycle of period about 210 iterations), and a 480-face grid costs 5 seconds per iteration on the CPU. The GPU port ran 214, 320 and 480: pressure-drag order 1.9 and friction-drag order 2.7 at 0°, pressure-drag order 2.7 at 10°. Those are the orders to quote, labelled as GPU.
Against the wind tunnel
At 0° LeonSim’s drag is −0.5 % from Ladson’s (0.00803 against 0.00807), and at 10° its lift is +0.1 % (1.0637 against 1.063). Those two hold. At 10° the drag is +15 % (0.01344 against 0.01169). Both codes agree with each other, so this is not a LeonSim bug; it is what a fully turbulent SST model on this grid gives. Two pieces, in our measurements:
- The model: NASA’s own SST codes are 5.7 to 7.2 % above the same data at 10° (CFL3D 0.01236, FUN3D 0.01253).
- The far field: our validation grids end 200 chords away with a plain free-stream condition. NASA’s grids end 500 chords away with a point-vortex correction. On the 214 grid, in both codes, OpenFOAM’s drag at 10° falls from 0.013248 at 200 chords to 0.012615, 0.012476 and 0.012384 at 1,000, 2,000 and 4,000 chords; LeonSim agrees with OpenFOAM to 0.02 % at 1,000. At 4,000 chords OpenFOAM’s drag is +0.2 % from CFL3D. What remains over the experiment is the SST model.
So drag at lift from these 200-chord grids is not a validation figure. A 320-face grid at several thousand chords, or a point-vortex far field, has not been run yet. The earlier reference we quoted for 10° drag, 0.0123 attributed to Ladson, is not in his data: interpolating his tripped runs gives 0.01169.
What this does not show
- It says nothing about the cut-cell solver of the earlier posts. This is the body-fitted C-grid solver, whose wall is the grid.
- There is no experimental pressure distribution here: the usual data set (Gregory and O’Reilly) is at a Reynolds number near 3 million, not 6.
- Code-to-code agreement on one mesh cannot reveal an error that both codes share: the model, the far-field size, the transition.
Numbers: docs/airfoil-cgrid-report/comparison.md and the NACA 0012 section of docs/validation/validation-root-cause.md; data in results/airfoil_cgrid/.