NEURALFOIL
Every lift, drag and moment curve on this site is computed by NeuralFoil. What that is, what the stored sweep covers, and where its answers stop being trustworthy.
NeuralFoil is a deep neural network trained on a large body of XFOIL runs, written by Peter Sharpe as part of the AeroSandbox project. It reproduces what XFOIL's viscous–inviscid coupled panel method returns — Cl, Cd and Cm against angle of attack — in about the time it takes to multiply a few matrices, which is what makes a whole-library sweep and an on-demand run of an arbitrary section both affordable.
It is a surrogate, not a solver. It does not converge, it cannot fail to converge, and it has no boundary layer to inspect. What it has instead is an error against the thing it was trained on, and against closed-form results that are exact — both stated below.
The stored sweep — what is already in the database
Every section in the library carries the same grid. Coverage is the whole grid or nothing: there is no section with a partial sweep to design around, and no figure anywhere on the site is interpolated between Reynolds levels.
Ncrit is the amplification factor at which the boundary layer is taken to transition: 9 is the conventional clean-tunnel value and the one every summary figure on this site uses; 4 and 1 model progressively rougher surfaces or more turbulent inflow, and move the drag bucket, not the lift-curve slope.
The sweep runs past stall at both ends — and that matters
A curve that ends at +25° is well past the stall of most sections in this library, and on a real fraction of them the lift climbs again after stalling. So the largest Cl anywhere in a stored curve is not reliably the section's Clmax, and the first angle at which lift crosses zero is not reliably its zero-lift angle — both readings can land in stalled flow.
That is not a hypothetical: it is why app/utils/lift-curve.ts exists. Every Clmax and zero-lift angle this site reports is found by walking out from the best-L/D sample rather than by scanning the whole sweep, and reports a dash rather than a number when the sweep ends before the section stalls. If you are reading figures off a raw polar — from the public API or an export — do the same.
Separately, past ±20° an AeroSandbox answer is blended away from NeuralFoil and toward a 360° model whose constants are fitted to one section and whose Cm is identically zero. The weight at each angle is tabulated on the validation page.
Accuracy — against results that are exact
The checks below are run by scripts/validation/suite.py against AeroSandbox 4.2.9 and committed, not computed when you load this page. They compare NeuralFoil to closed-form theory, where the right answer is known exactly rather than measured.
| Quantity | Case | Reference | NeuralFoil | Error |
|---|---|---|---|---|
| Lift-curve slope dCL/d-alpha | NACA 0012, Re = 3x10^6, alpha -4 to +4 deg | Thin-airfoil theory: 2*pi per radian | 6.3575 /rad | 1.18% |
| CL and CM about c/4 | NACA 0012 at alpha = 0 | Symmetry: both identically zero | ≈0 (1e−16) | — |
| Zero-lift angle of attack | NACA 2412, Re = 3x10^6 | Thin-airfoil camber-line integral: -2.07 deg | -2.0997 deg | 1.44% |
The full set, including the 3D wing solvers and the cases where the answer degrades, is on the validation page. Generated 2026-09-04.
Where it stops being trustworthy
- Past stall. See above. The sweep carries samples there because they are cheap, not because they are a stall model.
- Below the bottom of the grid. The lowest stored Reynolds number is 2×10⁴. Indoor and micro-scale flight sits below that, where laminar separation bubbles dominate and neither XFOIL nor a network trained on it has much to say.
- Anything compressible. The sweep is at Mach 0.00. Nothing on this site applies a compressibility correction, so a transonic section is being answered as if it were not one.
- Shapes unlike the training set. The library is stored as CST (Kulfan) parameters, so every section here is a smooth curve of the family NeuralFoil was trained over. A shape carrying a sharp kink — a deflected flap hinge, for instance — is not. Flap deflection on this site is modelled by default as an equivalent angle-of-attack shift on the clean section rather than by bending the geometry; that keeps the input smooth, and leaves the pitching moment uncorrected.
- It is XFOIL underneath. Where XFOIL is known to be optimistic — thick sections at high lift, heavily separated flow — a network trained on XFOIL inherits that, faithfully.
Stored curves versus an on-demand run
A section page shows the stored sweep. The Run NeuralFoil control on the same page, the API and the MCP tools run the same network live, at a Reynolds number you name — the same model size, the same Mach and, by default, the same Ncrit, so the two are directly comparable.
The one difference is range: an on-demand run defaults to a narrower, coarser angle sweep than the stored grid's -20° to +25° at 0.5°. Values at a shared angle should agree; the curve you get will not extend as far.
The "at a glance" figures on a section page are read off the stored sweep at 2×10⁵, 1×10⁶, 5×10⁶ at Ncrit 9.