Skip to main content
Version: 0.2.0

Accuracy and limits

Bora's accuracy has two parts that are worth keeping separate: how closely it reproduces NeuralFoil, and how closely NeuralFoil reproduces the physics.

Bora against NeuralFoil​

Bora evaluates the same networks with the same transformations as Python NeuralFoil 0.3.3. The test suite holds it to that.

CheckReferenceTolerance
All 198 outputs, 64 cases across model sizesPython NeuralFoil10⁻⁶ relative
Analytic JacobiansCasADi derivatives of Python NeuralFoil10⁻⁶ relative
Analytic JacobiansCentral finite differences of Bora5 × 10⁻⁵ relative
Mirror symmetry of lift, moment and transitionExact property10⁻¹² absolute

The remaining differences are floating-point rounding. Bora sums in a different order from NumPy and uses fused multiply-add instructions where the processor has them, so the last few bits differ. For the same reason, results can differ in the last bits between processors and between Bora versions. These differences are many orders of magnitude below the model's error against XFoil.

NeuralFoil against XFoil​

This is the error that matters in practice, and Bora inherits it unchanged. NeuralFoil's authors measured it on 395,665 held-out cases (Sharpe and Hansman, 2025); the full table is in Choosing a network size. For the default XLarge network the mean absolute errors are 0.013 in CLC_L, about 2.4% in CDC_D, 0.002 in CMC_M and 0.010 chord in transition location.

Those averages are taken over a test set weighted toward difficult cases. On a set of ordinary NACA four-digit sections at 5° the paper reports a mean drag error of 0.37% for the largest network. Expect errors between those two figures depending on how benign the flow is, and larger ones where the analysis confidence is low.

XFoil against reality​

A surrogate cannot be better than what it imitates. XFoil couples a panel method to an integral boundary-layer formulation with an eNe^N transition model. It is very accurate for attached and mildly separated subsonic flow and loses accuracy with large separation. NeuralFoil's documentation makes the point that pushing the surrogate's error much below its present level would not make its predictions of real airfoils any better, because the remaining error would be XFoil's own (Sharpe, 2023).

Conditions to avoid​

Compressible flow. The model has no Mach number input and represents incompressible flow. Apply your own compressibility correction for moderate subsonic Mach numbers, and do not use the results near or above the critical Mach number. The Mach-dependent features described in the NeuralFoil paper are part of AeroSandbox and are not included in Bora.

Deep stall and large angles. The training data ends near ±28° and thins well before that. NeuralFoil's 360° capability comes from blending the network with an empirical post-stall model in AeroSandbox, which Bora does not include. Beyond about ±20° treat Bora's output as extrapolation; the confidence output will say so.

Shapes the parameterization cannot represent. Eighteen parameters describe smooth, conventional sections well. They cannot reproduce sharp corners, steps, gaps, multi-element sections or small surface features. If you fit such a shape, Bora analyzes the smoothed fit. Check the fit as described in Airfoil geometry.

There is a second side to this. Mark Drela, the author of XFoil, has observed of NeuralFoil that the limited shape space is likely an advantage in optimization: the small bumps that let an optimizer tune a separation bubble at a single operating point cannot appear in it, which is the mechanism behind the classic single-point optimization failure (Sharpe, 2023; Drela, 1998).

Very low and very high Reynolds numbers. The middle 95% of the training data spans roughly 2 × 10³ to 3 × 10⁸, and half of it lies between 3 × 10⁴ and 3.5 × 10⁶. Results toward the edges deserve a look at the confidence.

Unsteady or three-dimensional effects. The model is a steady two-dimensional section analysis. It has no notion of dynamic stall, sweep or finite span.

A practical checklist​

  1. Read analysis_confidence for every result you report.
  2. If you fitted the shape from coordinates, compare the fit with the original.
  3. For a design you intend to build, confirm the final section with XFoil or a higher-fidelity method. A surrogate is the right tool for the thousands of evaluations on the way to a design, not for the last one.