AeroJAX: A differentiable, structure-preserving framework for real-time flow simulation, control, and inverse design. Architected for neural operator integration and latent-space acceleration. Built with JAX.
Python
306
0 commits
updated Aug 13, 2026
A real-time, JAX-native CFD framework for interactive flow research, control, and inverse design.
Most CFD software is batch‑oriented: simulations are configured, run to completion, and analysed afterwards. Changing anything means starting over.
AeroJAX is an interactive CFD framework in which solver parameters, boundary conditions, and immersed geometries can be modified during runtime - without restarting the simulation.
AeroJAX is built on JAX, making each solver step end-to-end differentiable. You can run gradient‑based inverse design (optimise an airfoil shape to minimise drag) without writing a separate adjoint solver.
The framework is CPU‑optimised for real-time performance. Typical performance reaches ~297 FPS at 512×96 on a laptop CPU. No GPU is required for smaller grids.
git clone https://github.com/arriemeijer-creator/AeroJAX
cd AeroJAX
pip install -r requirements.txt
python main.py
Python 3.11+
Optional NVIDIA Hardware Acceleration
python -m pip install --upgrade "jax[cuda12]" #For CUDA 12 python -m pip install --upgrade "jax[cuda13]" #For CUDA 13

The UI is organised into collapsible panels. Everything below can be changed mid‑simulation unless noted.
A semi-transparent overlay provides instant access to the most frequent interactions without needing to navigate the sidebar:
| Panel | What you can change |
|---|---|
| Grid Size | Nx, Ny (64‑4096 / 32‑2048) - requires sim restart |
| Grid Type | Collocated or MAC (staggered) - sim restart |
| Solver Type | Navier‑Stokes or Lattice Boltzmann (D2Q9/D2Q7) - enables direct solver-to-solver comparison under identical flow conditions - sim restart required |
| Precision | float32 / float64 - GUI reload |
| Panel | What you can change |
|---|---|
| Reynolds Number | Lock any two of U_inf, ν, Re - the third auto‑updates. Apply live. |
| Flow Type | von Kármán, Lid-Driven Cavity Flow, Taylor‑Green Vortex - sim restart. |
| Control | What it does |
|---|---|
| Multigrid V‑cycles | Number of multigrid cycles (1‑10). Apply live. |
| Hyper ν | Hyperviscosity (0‑0.05) - improves stability for under‑resolved turbulence. |
| Fast Mode (RK2) | Switches from RK3 to RK2 - faster but less accurate. |
| LES | Enable, choose Smagorinsky or dynamic Smagorinsky. Apply live. |
| Pressure Solver | Multigrid, CG (iteration-dependent; slower for poorly conditioned systems), FFT (for periodic BCs like LDC), Jacobi - requires sim restart. |
| Control | What it does |
|---|---|
| Slip Walls | Toggle between no‑slip and free‑slip on domain walls. |
| Mask ε | Brinkman penalisation sharpness (0.01‑1.0). Higher = sharper but stiffer. |
| Control | What it does |
|---|---|
| Frame skip | Render every N‑th solver frame - improves UI responsiveness. |
| Target FPS | Limits visualisation framerate to save CPU. |
| Show ... | Toggle velocity, vorticity, pressure, dye, particle mode (computationally expensive due to particle advection), SDF mask, streamlines, quivers - all live. |
| Log / Spatial / Adaptive | Colour scale modes. Adaptive auto‑adjusts range to current data. |
| Smooth | Upscales low‑res fields for cleaner display 1x (default) to 10x. Note: this does NOT enhance physics - it uses bilinear interpolation to increase visual fidelity. |
| Colormaps | Separate dropdowns for velocity, vorticity, pressure. Many CET and PAL options. |
| Auto‑scale | One‑click rescaling for each field or all at once. |
| Panel | What you get |
|---|---|
| Simulation Info | Solver status, simulation time, dt, RMS divergence, Sim FPS, Vis FPS. |
| Error Metrics | L2 change, RMS change, max change, 99th percentile change, relative change, component L2 changes. Enable/disable to save performance. Save all history to CSV. |
| Airfoil Metrics | CL, CD, Strouhal number, stagnation point (in chord fractions), separation point, Cp_min, wake deficit. Toggle on/off. Markers overlay on visualisation. Copy all metrics to clipboard. |
AeroJAX now supports signal-based flow diagnostics as an alternative to explicit structure tracking.
Instead of identifying and tracking vortices, the solver extracts flow physics directly from field signals:
This approach is significantly more stable than vortex identification and tracking, especially in transitional and noisy regimes.
It reflects a broader shift in AeroJAX:
This enables robust, real-time extraction of flow characteristics without relying on fragile feature detection.
This approach is particularly well-suited for real-time and differentiable workflows.
AeroJAX now includes a fully decoupled solver trace viewer for inspecting the numerical pipeline at each timestep.
This is not a visualization layer. It reconstructs and exposes the solver itself.
Step-by-step traversal of simulation timesteps
Full decomposition of the solver pipeline:
Inspection of intermediate reconstructed fields (u*, divergence, etc.)
Subdomain-level numerical inspection (cell-by-cell values)
Live metrics (CFL, Reynolds number, extrema)
LaTeX-rendered equations for each step
The viewer is strictly decoupled from the solver:
This enables:
Most CFD tools treat the solver as a black box.
AeroJAX exposes the solver as an inspectable pipeline.
This aligns with the broader goal:
Benchmarks include full solver stepping and rendering.
| Grid resolution | Solver + rendering | With full diagnostics |
|---|---|---|
| 512 × 96 | ~297 FPS | ~170 FPS |
| 1024 × 192 | ~131 FPS | ~91 FPS |
| 2048 × 384 | ~37 FPS | ~31 FPS |
LGPL v3.0 - you can use it in proprietary software as long as you release modifications to the library itself.
Arno Meijer - Mechanical Engineer | CFD-ML Systems Developer
Python
100.0%
AeroJAX: A differentiable, structure-preserving framework for real-time flow simulation, control, and inverse design. Architected for neural operator integration and latent-space acceleration. Built with JAX.
Python
306
0 commits
updated Aug 13, 2026
A real-time, JAX-native CFD framework for interactive flow research, control, and inverse design.
Most CFD software is batch‑oriented: simulations are configured, run to completion, and analysed afterwards. Changing anything means starting over.
AeroJAX is an interactive CFD framework in which solver parameters, boundary conditions, and immersed geometries can be modified during runtime - without restarting the simulation.
AeroJAX is built on JAX, making each solver step end-to-end differentiable. You can run gradient‑based inverse design (optimise an airfoil shape to minimise drag) without writing a separate adjoint solver.
The framework is CPU‑optimised for real-time performance. Typical performance reaches ~297 FPS at 512×96 on a laptop CPU. No GPU is required for smaller grids.
git clone https://github.com/arriemeijer-creator/AeroJAX
cd AeroJAX
pip install -r requirements.txt
python main.py
Python 3.11+
Optional NVIDIA Hardware Acceleration
python -m pip install --upgrade "jax[cuda12]" #For CUDA 12 python -m pip install --upgrade "jax[cuda13]" #For CUDA 13

The UI is organised into collapsible panels. Everything below can be changed mid‑simulation unless noted.
A semi-transparent overlay provides instant access to the most frequent interactions without needing to navigate the sidebar:
| Panel | What you can change |
|---|---|
| Grid Size | Nx, Ny (64‑4096 / 32‑2048) - requires sim restart |
| Grid Type | Collocated or MAC (staggered) - sim restart |
| Solver Type | Navier‑Stokes or Lattice Boltzmann (D2Q9/D2Q7) - enables direct solver-to-solver comparison under identical flow conditions - sim restart required |
| Precision | float32 / float64 - GUI reload |
| Panel | What you can change |
|---|---|
| Reynolds Number | Lock any two of U_inf, ν, Re - the third auto‑updates. Apply live. |
| Flow Type | von Kármán, Lid-Driven Cavity Flow, Taylor‑Green Vortex - sim restart. |
| Control | What it does |
|---|---|
| Multigrid V‑cycles | Number of multigrid cycles (1‑10). Apply live. |
| Hyper ν | Hyperviscosity (0‑0.05) - improves stability for under‑resolved turbulence. |
| Fast Mode (RK2) | Switches from RK3 to RK2 - faster but less accurate. |
| LES | Enable, choose Smagorinsky or dynamic Smagorinsky. Apply live. |
| Pressure Solver | Multigrid, CG (iteration-dependent; slower for poorly conditioned systems), FFT (for periodic BCs like LDC), Jacobi - requires sim restart. |
| Control | What it does |
|---|---|
| Slip Walls | Toggle between no‑slip and free‑slip on domain walls. |
| Mask ε | Brinkman penalisation sharpness (0.01‑1.0). Higher = sharper but stiffer. |
| Control | What it does |
|---|---|
| Frame skip | Render every N‑th solver frame - improves UI responsiveness. |
| Target FPS | Limits visualisation framerate to save CPU. |
| Show ... | Toggle velocity, vorticity, pressure, dye, particle mode (computationally expensive due to particle advection), SDF mask, streamlines, quivers - all live. |
| Log / Spatial / Adaptive | Colour scale modes. Adaptive auto‑adjusts range to current data. |
| Smooth | Upscales low‑res fields for cleaner display 1x (default) to 10x. Note: this does NOT enhance physics - it uses bilinear interpolation to increase visual fidelity. |
| Colormaps | Separate dropdowns for velocity, vorticity, pressure. Many CET and PAL options. |
| Auto‑scale | One‑click rescaling for each field or all at once. |
| Panel | What you get |
|---|---|
| Simulation Info | Solver status, simulation time, dt, RMS divergence, Sim FPS, Vis FPS. |
| Error Metrics | L2 change, RMS change, max change, 99th percentile change, relative change, component L2 changes. Enable/disable to save performance. Save all history to CSV. |
| Airfoil Metrics | CL, CD, Strouhal number, stagnation point (in chord fractions), separation point, Cp_min, wake deficit. Toggle on/off. Markers overlay on visualisation. Copy all metrics to clipboard. |
AeroJAX now supports signal-based flow diagnostics as an alternative to explicit structure tracking.
Instead of identifying and tracking vortices, the solver extracts flow physics directly from field signals:
This approach is significantly more stable than vortex identification and tracking, especially in transitional and noisy regimes.
It reflects a broader shift in AeroJAX:
This enables robust, real-time extraction of flow characteristics without relying on fragile feature detection.
This approach is particularly well-suited for real-time and differentiable workflows.
AeroJAX now includes a fully decoupled solver trace viewer for inspecting the numerical pipeline at each timestep.
This is not a visualization layer. It reconstructs and exposes the solver itself.
Step-by-step traversal of simulation timesteps
Full decomposition of the solver pipeline:
Inspection of intermediate reconstructed fields (u*, divergence, etc.)
Subdomain-level numerical inspection (cell-by-cell values)
Live metrics (CFL, Reynolds number, extrema)
LaTeX-rendered equations for each step
The viewer is strictly decoupled from the solver:
This enables:
Most CFD tools treat the solver as a black box.
AeroJAX exposes the solver as an inspectable pipeline.
This aligns with the broader goal:
Benchmarks include full solver stepping and rendering.
| Grid resolution | Solver + rendering | With full diagnostics |
|---|---|---|
| 512 × 96 | ~297 FPS | ~170 FPS |
| 1024 × 192 | ~131 FPS | ~91 FPS |
| 2048 × 384 | ~37 FPS | ~31 FPS |
LGPL v3.0 - you can use it in proprietary software as long as you release modifications to the library itself.
Arno Meijer - Mechanical Engineer | CFD-ML Systems Developer
Python
100.0%