NeuralFoil
NeuralFoil is an airfoil aerodynamics analysis tool using physics-informed machine learning, in pure Python/NumPy.
What it is and what it does
NeuralFoil is a fast aerodynamic analysis tool that replaces or complements XFoil for predicting airfoil performance. It uses neural networks trained on nearly 8 million XFoil runs, embedded with physics-based invariants, to estimate lift, drag, moment coefficients, and boundary layer properties across a wide range of angles of attack and Reynolds numbers. The package runs entirely in NumPy (trained in PyTorch but executed without PyTorch at runtime) and comes with eight model sizes trading accuracy for speed.
The tool is designed for aircraft design and optimization workflows where speed and reliability matter more than XFoil's occasional convergence failures. It returns an `analysis_confidence` metric flagging uncertain or out-of-distribution queries, making it useful for robust design optimization. The core package is lightweight (under 500 lines of user-facing code) and accepts airfoil input as .dat files, coordinate arrays, or aerosandbox airfoil objects.
Use it for:
- Rapid aerodynamic polars for aircraft conceptual design when XFoil convergence is unreliable or too slow
- Gradient-based airfoil shape optimization using the smooth, continuous predictions and confidence flagging
- Batch analysis of hundreds of airfoils at multiple Reynolds numbers and angles of attack
- Aerodynamic analysis of out-of-distribution or novel airfoil geometries where training data is sparse
- Real-time aerodynamic lookup in flight simulation or control law design needing fast, guaranteed convergence
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
NeuralFoil predicts airfoil aerodynamic coefficients (lift, drag, moment) and boundary layer properties using physics-informed neural networks trained on millions of XFoil simulations, running in pure Python+NumPy.
Yes. NeuralFoil is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and requires only two lightweight dependencies. It solves a real problem (XFoil speed and convergence) for aerodynamics-focused Python workflows. The tradeoff is accuracy within a few percent of XFoil—acceptable for design and optimization. Install if you do airfoil analysis; skip if you need XFoil's exact predictions or work outside aerodynamics.
Install
neuralfoil on PyPI
pip
pip install neuralfoiluv
uv add neuralfoilpoetry
poetry add neuralfoilInstalling NeuralFoil
Before you install
Low friction: pure Python wheel with only aerosandbox and numpy as runtime dependencies. Active maintenance (last commit 2026-07-19, 34 days since release), 462 GitHub stars. Requires Python >=3.10.
License in practice
MIT license (permissive) places no restrictions on use, modification, or redistribution in commercial or private projects.
Quickstart
pip install neuralfoil
import neuralfoil as nf
import numpy as np
aero = nf.get_aero_from_coordinates(
coordinates=numpy_array_of_airfoil_coordinates,
alpha=5,
Re=5e6,
model_size="xlarge"
)
print(aero["CL"], aero["CD"], aero["analysis_confidence"])
Requires Python >=3.10. Airfoil coordinate input must be a numpy array of shape (n, 2).
Verify before relying
- Whether the ~5 milliseconds runtime claim applies to the standalone Python+NumPy version or requires aerosandbox integration
- Specific accuracy ranges for different airfoil families and Reynolds number regimes beyond the out-of-distribution examples shown
- Whether all eight model sizes (xxsmall through xxxlarge) are available in the standalone package or only in aerosandbox
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — aerosandbox, numpy |
| Maintenance | actively maintained — 34 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 142,880/month — #11,198 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: neuralfoil-0.3.3-py3-none-any.whl
Keywords: aerodynamics, aerospace, aircraft, airfoil, airplane, analysis, cfd, design, hydrodynamics, machine learning, mdao, mdo, optimization, physics informed neural network, propeller, python, sailing, xfoil
Tags
More Physics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
pydicomPydicom reads, modifies, and writes DICOM…
permissive · top 5,000 on PyPI
albumentationsAlbumentations applies image transformations to…
permissive · top 5,000 on PyPI
CoolPropCoolProp provides thermodynamic and transport…
permissive · top 5,000 on PyPI
pyquaternionProvides quaternion representation,…
permissive · top 5,000 on PyPI
AeroSandboxAeroSandbox is an optimization toolkit for…
permissive · top 15,000 on PyPI
pytorch-forecastingPyTorch Forecasting provides neural network…
permissive · top 15,000 on PyPI
aero-open-sdkProvides Python control over TetherIA's Aero…
permissive · top 15,000 on PyPI
limeLime explains individual predictions from any…
permissive · top 15,000 on PyPI
autogradAutograd automatically computes derivatives of…
permissive · top 5,000 on PyPI
pytorch_revgradImplements a gradient reversal layer for…
permissive · top 15,000 on PyPI
tf-slimTensorFlow-Slim provides high-level layers,…
permissive · top 15,000 on PyPI
zukoZuko implements normalizing flows in PyTorch as…
permissive · top 15,000 on PyPI
cuequivariancecuEquivariance provides CUDA-accelerated…
permissive · top 15,000 on PyPI
fastaifastai is a deep learning library that provides…
permissive · top 15,000 on PyPI