LEONSIM Workbench demo

Validation

NASA’s flat plate and bump: LeonSim, OpenFOAM and NASA’s own codes

Two verification cases from NASA’s Turbulence Modeling Resource, run on NASA’s grids. LeonSim reproduces OpenFOAM to 0.001 to 0.04 %, and sits about 0.2 % (plate) and 0.6 % (bump) from NASA’s total drag. The bump’s pressure drag is 5 % low, and the reason is compressibility.

7 min read

Status. Code comparison passed against OpenFOAM and against NASA’s CFL3D and FUN3D results. NASA publishes code results for these cases, not wind-tunnel data, so this compares codes; we do not claim it as validation of a flow class.

NASA’s Turbulence Modeling Resource publishes small, carefully specified cases, with grids and with results from two reference codes, CFL3D and FUN3D. If a code with the same model does not reproduce them on NASA’s grids, something in the discretisation is wrong. Two cases matter for an airfoil solver: a flat plate, which is all friction, and a bump in a channel, where a pressure gradient and a mild adverse slope appear.

The set-up

LeonSim’s body-fitted solver and OpenFOAM v2412 ran on NASA’s own grids, four nested levels for each case (plate 69×49 up to 545×385; bump 89×41 up to 705×321). Both are incompressible, wall-resolved (first cell y⁺ below 1) k-ω SST with the same inlet turbulence and linear-upwind convection. The finest LeonSim levels ran on the GPU port, with the same code and settings, and are labelled so in the tables.

The comparison with NASA is not exact by construction, for three reasons we checked rather than assumed. NASA’s codes are compressible at Mach 0.2. The reference model variants are SST-V (plate) and SST-2003m (bump), and ours uses the 2003 constants with strain-rate production. And NASA plots skin friction along the wall tangent, so our x-component of the traction has to be scaled by the slope (up to 2.5 % on the bump).

The flat plate

grid (cells)LeonSim CDOpenFOAMCFL3DFUN3DLeonSim vs CFL3D
69×49 (3,264)0.00276990.00276990.00278510.0026787−0.55 %
137×97 (13,056)0.00282420.00282420.00282600.0027733−0.06 %
273×193 (52,224)0.00285020.00285010.00284560.0028213+0.16 %
545×385 (208,896), GPU0.00285930.0028630 *0.00285330.0028442+0.21 %

* OpenFOAM’s finest run is not converged (its drag was still falling about 0.05 % per 500 iterations, heading for LeonSim’s value); the 0.13 % difference is that tail, and we leave that level out of the order estimate.

At the three levels where OpenFOAM is converged the two codes agree to 0.001 % in drag and skin friction, identical to the printed digits at the middle level. The observed grid-convergence order of drag is 1.07 on the three coarsest grids and 1.51 on the three finest, extrapolated 0.0028643 with a grid-convergence index of 0.22 %; NASA’s own codes show 1.34 and 1.07. The extrapolated value is +0.38 % from CFL3D’s finest. Along the plate, LeonSim’s skin friction against CFL3D’s finest curve has an RMS difference of 2.9, 1.0, 0.1 and 0.6 % at the four levels: it gets closer through 273 and then moves to a +0.5 % mean offset, between CFL3D (compressible) and NASA’s two incompressible runs (−0.6 % and −0.7 %). That is the size and sign of the compressibility offset NASA describes, not a wall-treatment defect. We did not run a compressible case in LeonSim.

The bump in a channel

Left: flat-plate drag against cells for LeonSim, OpenFOAM, NASA CFL3D and NASA FUN3D; LeonSim and OpenFOAM overlap and sit between CFL3D and FUN3D at the finest level. Right: bump pressure drag against cells; LeonSim and OpenFOAM overlap and end about 5 percent below the two NASA codes.
Left: the plate’s total drag. Right: the bump’s pressure drag. LeonSim and OpenFOAM lie on each other wherever OpenFOAM is converged. OpenFOAM is missing at the finest plate level and the two finest bump levels (not converged or not run).
gridquantityLeonSimOpenFOAMCFL3DLeonSim vs CFL3D
353×161CD0.00355320.0035543 *0.0035812−0.78 %
CD,p0.000386130.00038666 *0.00041209−6.3 %
CD,v0.00316700.0031676 *0.0031691−0.07 %
705×321, GPUCD0.0035561not run0.0035790−0.64 %
CD,p0.00037912not run0.00039979−5.2 %
CD,v0.0031770not run0.0031792−0.07 %

* not fully converged at this level.

Against OpenFOAM on the same grid, LeonSim’s total drag is within 0.03 %, pressure drag within 0.14 %, friction drag within 0.04 %. The observed order of the pressure drag is 3.3 and then 3.7; of the friction drag 1.6 and then 1.9. The total drag is not monotone from 177 to 705 cells (0.0036032, 0.0035532, 0.0035561), because it is the sum of two terms with different orders, so we state no order for it. Against NASA the totals are −0.64 % and the friction drag −0.07 %; the pressure drag is −5.2 % at the finest level.

Where the missing 5 % of pressure drag is

The bump’s pressure drag is a small difference of two large numbers: the upslope and the downslope each carry about 50 units (10⁻⁴ of CD), and the net is 4. A pressure error of 0.07 in each of them is 0.14 %, and 0.13 of the net: 3.3 %. So a tiny, systematic pressure difference between an incompressible and a Mach 0.2 solution is amplified more than twenty times in the drag.

A Prandtl–Glauert factor takes about a third of the gap. To find the rest we ran OpenFOAM itself, with the same grid, the same SST, the same schemes and the same far field, in its compressible form at Mach 0.2. The result at 353×161: pressure drag +6.2 % compared with the incompressible run, and against NASA’s CFL3D −0.35 %, where the incompressible run was −6.2 %. The compressible run is itself not fully converged (its pressure force was still falling about 0.07 % per 1,000 iterations), so we quote that −0.35 % to no better than ±0.3 %. Our reading: the pressure-drag offset is compressibility, not the model, the discretisation or the wall treatment. LeonSim has no compressible mode, so carrying this over to LeonSim is an inference from the two incompressible codes agreeing to 0.14 %, not a measurement.

Friction and pressure by stretch

Over the bump, split into stretches (units of 10⁻⁴ of CD, LeonSim at 705×321, OpenFOAM at 353×161): friction totals 31.77 (LeonSim), 31.68 (OpenFOAM), 31.77 (CFL3D) and 31.74 (FUN3D). Friction agrees with CFL3D stretch by stretch to within 1.7 %. The skin friction on the downslope, in the adverse pressure gradient, is the weak spot: at x = 0.868 LeonSim is +2.5 % from CFL3D and +0.67 % from FUN3D, while the two NASA codes are 1.8 % apart from each other. On the upslope and the crest the error is within ±0.6 %.

What is still open

  • The downslope skin friction at x = 0.868, where NASA’s own codes disagree by 1.8 %.
  • OpenFOAM at the finest levels: the plate level is not converged and the bump level was not run (about 38 hours on CPU; not worth it here).
  • NASA’s boundary conditions and domain against ours, which we did not test.
  • A compressible LeonSim, or compressible OpenFOAM at the finest bump grid, would turn the inferred closure into a measured one.

Numbers: the TMR sections of docs/validation/validation-root-cause.md; reports results/tmr/plate_report.md and results/tmr/bump_report.md.