Leveraging Physics-Informed Neural Networks (PINNs) to simulate airflow patterns around arbitrary airfoil geometries in real-time — replacing expensive CFD solvers with fast, physics-constrained deep learning.
Traditional Computational Fluid Dynamics (CFD) simulations require mesh generation, boundary condition setup, and significant compute time for each airfoil design iteration. For engineers iterating over hundreds of designs, this becomes a bottleneck — both in time and cost.
AeroPINN solves this by training a neural network that embeds the governing physics (Navier-Stokes equations) directly into the loss function, enabling real-time predictions of pressure and velocity fields around any NACA airfoil geometry.
An airfoil is a streamlined shape designed to produce lift and minimize drag as air flows around it. The NACA 4-digit naming convention encodes the geometry:
Airfoil geometry — leading edge, trailing edge, camber line, and thickness distribution
A standard neural network learns purely from data. A Physics-Informed Neural Network adds a second objective — the network must also satisfy the underlying physical laws.
PINNs combine deep learning with physics knowledge
The loss function has two components:
Total Loss = Data Loss + Physics Loss
Data Loss → |predicted - CFD ground truth|
Physics Loss → Residuals of Navier-Stokes equations
(Continuity: du/dx + dv/dy = 0)
The network takes spatial coordinates (x, y) as input and predicts flow variables (u, v, p) — velocity components and pressure. Automatic differentiation computes spatial derivatives to enforce physical consistency.
The difference is striking. Without physics constraints, a neural network overfits to noise. With PINN, the model learns the true underlying trajectory:
Left: Standard NN overfits noisy data | Right: PINN recovers the true trajectory
The pipeline follows:
- Data Collection — CFD simulation results for 6 NACA airfoils (OpenFOAM)
- Preprocessing — Coordinate extraction, normalization, missing data handling
- Loss Construction — Data loss + Navier-Stokes residuals + boundary conditions
- Training — Adam optimizer, 1000 epochs, combined loss minimization
- Deployment — Streamlit web app for real-time inference
CFD simulation data for 6 NACA airfoil profiles, each with ~1M data points:
| Airfoil | Type | Data Points | Fields |
|---|---|---|---|
| NACA 0012 | Symmetric | 999,000 | p, U:0, U:1, U:2, x, y, z |
| NACA 0015 | Symmetric | 999,000 | p, U:0, U:1, U:2, x, y, z |
| NACA 0021 | Symmetric | 999,000 | p, U:0, U:1, U:2, x, y, z |
| NACA 2412 | Cambered | 999,000 | p, U:0, U:1, U:2, x, y, z |
| NACA 2415 | Cambered | 999,000 | p, U:0, U:1, U:2, x, y, z |
| NACA 4412 | High Camber | 999,000 | p, U:0, U:1, U:2, x, y, z |
Total: ~6M data points across symmetric and cambered airfoil families.
NACA 0012 — Pressure field (left) | Velocity magnitude (right)
NACA 2412 — Cambered airfoil showing asymmetric flow distribution
NACA 4412 — Higher camber producing stronger pressure differential
Four approaches were benchmarked on the same airfoil data. PINN achieves the lowest MSE by leveraging physics constraints:
Predicted vs true values — PINN (MSE: 0.000091) closely follows the perfect prediction line
| Model | MSE |
|---|---|
| Linear Regression | 0.093992 |
| Basic Neural Network | 0.000985 |
| Random Forest | 0.000414 |
| PINN | 0.000091 |
Left: Without physics loss (smooth but higher plateau) | Right: With physics loss (converges lower)
An interactive web interface for uploading airfoil data, running automated EDA, training models, and visualizing flow fields:
- Upload — Load CSV/Excel airfoil simulation data
- Profiling — Automated exploratory data analysis with dataset statistics
- Unpinned Data — Raw data exploration and preprocessing
- Piped Data — PINN-powered flow field predictions with streamline and contour visualizations
Demo video: Google Drive
AeroPINN/
├── Streamlit.py # Main Streamlit application
├── Dataset/
│ ├── 0012.csv, 0015.csv, 0021.csv # Symmetric airfoils (NACA 00xx)
│ ├── 2412.csv, 2415.csv # Cambered airfoils (NACA 24xx)
│ ├── 4412.csv # High-camber airfoil (NACA 4412)
│ └── *.png # CFD visualization snapshots
├── notebooks/
│ ├── comparining_model.ipynb # Model training & comparison
│ └── preprocessing-missing-data.ipynb # Data cleaning & imputation
├── src/
│ └── airfoil-cfd-model.ipynb # Core PINN model development
├── asset/ # Banner, workflow diagram, demo video
├── docs/ # Presentation slides
└── LICENSE
- Deep Learning — TensorFlow / Keras (PINN architecture)
- Data Processing — NumPy, Pandas, scikit-learn
- Visualization — Matplotlib, Seaborn, SciPy (griddata interpolation)
- App — Streamlit, ydata-profiling, PyCaret
- CFD Data — OpenFOAM simulation exports
git clone https://github.com/sidd707/AeroPINN.git
cd AeroPINN
pip install -r requirements.txt
streamlit run Streamlit.pyThis project is licensed under the MIT License.


