skillfed

NeuralFoil

NeuralFoil is an airfoil aerodynamics analysis tool using physics-informed machine learning, in pure Python/NumPy.

neuralfoil v0.3.3 142.9K downloads/30d#11,198 on PyPI462
Permissive license MIT Active released

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 neuralfoil

uv

uv add neuralfoil

poetry

poetry add neuralfoil

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: Physics

Tags

airfoil aerodynamics predictionxfoil alternative pythonneural network aerodynamicsphysics-informed machine learning airfoilfast airfoil analysisaerodynamic coefficient estimationaircraft design aerodynamics
aerodynamicsmachine-learningoptimization

More Physics packages