JAX-Fluids
New1. Overview
JAX-Fluids is a fully auto-differentiable computational-fluid-dynamics solver built on Google JAX, and its defining property is that gradients flow all the way back through the simulation, from a downstream loss to the geometry, the boundary conditions and the physical parameters. For a physics-AI practitioner this is what makes it different from a classical CFD code such as OpenFOAM: instead of only producing a flow field, it produces the sensitivity of that field to design choices, so it becomes the differentiable forward model inside optimisation, inverse problems and neural-network-coupled loops. The aim of this guide is to let you judge when that differentiability is worth the cost. This site compares JAX-Fluids with NVIDIA Warp for differentiable simulation and with PhysicsNeMo for large-scale physics ML.
After reading, you should know what JAX-Fluids buys you, where it stops, and how to place it in a pipeline next to a classical solver and an operator surrogate. The companion classical-solver cost-boundary guide explains when to defer back to a verified solver, and the fluid-simulation toolkit collection collects the surrounding entry points. All version and capability statements below were verified against the project repository, release pages and the JAX-Fluids paper on 11 November 2026, and any claim that is the project's own description rather than an independent measurement is labelled as such in Section 9.
2. How It Works
JAX-Fluids casts a finite-volume or finite-difference CFD method as a pure function over arrays, then lets JAX's automatic differentiation compute derivatives of the whole simulation with respect to inputs. The spatial discretisation is high-order: the project implements WENO (weighted essentially non-oscillatory) schemes, with a TENO (targeted ENO) option for sharp interfaces, so the same code that solves the compressible Navier-Stokes equations also returns their gradient. Because the solver is written in JAX, multi-GPU and TPU execution uses the SPMD (single-program multiple-data) abstraction with effectively no code changes, and the same function can run on CPU, GPU or TPU.
The differentiability is what unlocks the downstream uses. You can define a loss on the simulation output - drag, a target velocity profile, a parameter to recover - and back-propagate it to the design variables, which is the basis for shape optimisation and inverse problems without a hand-derived adjoint. JAX-Fluids also couples with neural networks as the physics forward model inside a Neural-ODE or a physics-informed loop, so the network and the simulation share one differentiable graph. Two-phase flow (VOF) and level-set capabilities are part of the same code path, which keeps multiphase cases inside the same differentiable framework rather than a separate tool.
3. Scope and Assumptions
JAX-Fluids assumes you are comfortable working in Python and JAX, and that your problem fits a grid-based finite-volume or finite-difference formulation of the (compressible) Navier-Stokes equations. It is a research-grade differentiable solver, not a turnkey industrial CFD suite: it does not ship the mesh-generation, pre-processing and post-processing ergonomics of a classical code, and it expects you to drive the workflow from scripts. The accuracy and stability you obtain depend on the scheme, the grid resolution and the time step, all of which the framework leaves to you rather than choosing automatically.
The licensing assumption matters for deployment. The project is distributed under GPL-3.0, which is a strong copyleft licence: using it inside a distributed derivative work carries obligations that a permissive licence such as Apache-2.0 would not. This is distinct from a claimed MIT status; the authoritative licence is GPL-3.0 as stated in the repository. For any closed-source product you should obtain legal review before embedding the code. JAX-Fluids is also not the right tool when the deliverable is a certified, mesh-rich, massively parallel industrial solve where a classical solver such as SU2 or OpenFOAM remains the reference.
4. Getting Started
The fastest entry is the repository's documented examples: clone tumaer/JAXFLUIDS, install JAX for your accelerator, and run a tutorial case such as a 2D shock or a canonical vortex to see a working differentiable simulation before writing your own. A first problem follows the documented workflow: define the simulation parameters and level-set or VOF fields, choose the numerical scheme and the level set method, set the time stepping, and train or optimise with a gradient-based method. The official documentation and the JAX-Fluids paper walk through the compressible-flow cases as the gentlest path rather than starting from an empty script.
Before trusting a result, run a manufactured-solution or grid-convergence test: confirm that the residual and the observed order of accuracy match theory as you refine the grid, because a differentiable solver that has not been verified is just as wrong as a classical one. Then evaluate any optimised geometry or recovered parameter on a held-out configuration with an independent reference, ideally a classical solve. The companion CFD Python primer and the physics-based deep-learning material on this site supply the surrounding theory, and the PINN landscape guide organises when a differentiable method is worth the compute.
5. Comparison with Alternatives
The useful comparison is by contract. OpenFOAM and SU2 are classical, mature CFD codes with deep industrial tooling and parallelism; they are the reference for certified accuracy but are not differentiable end-to-end without significant custom adjoint work. NVIDIA Warp is a JIT-compiled differentiable simulation language that spans particle, rigid-body and FEM physics rather than being CFD-specific. PhysicsNeMo is a training framework for physics ML at scale, whereas JAX-Fluids is a single differentiable solver you embed in your own loop. DeepXDE trains networks from a residual and is complementary rather than competing.
Within differentiable CFD, JAX-Fluids' differentiator is the high-order WENO/TENO formulation on JAX with SPMD multi-accelerator scaling and a two-phase path in one codebase. A classical reduced-order or adjoint-based method can also deliver sensitivities, but each needs its own derivation and tooling, and a neural surrogate such as an FNO trained from scratch must generate its own training data. The classical-solver cost-boundary guide keeps these comparisons honest by stating the deliverable: a certified single solve, an interactive design sweep, or a surrogate that amortises thousands of queries. A framework that wins on differentiability may lose where certified accuracy or a mature mesh pipeline dominates.
6. Benchmarks and Evidence
Public evidence is the project's own paper and example suite. The JAX-Fluids papers (arXiv 2203.13760 and its HPC follow-up arXiv 2402.05193, published in Computer Physics Communications in 2023 and 2024 respectively) demonstrate high-order WENO/TENO schemes on canonical compressible-flow cases and reports scaling to large accelerator counts - the project reports runs using on the order of hundreds of A100 GPUs and thousands of TPU cores for strong-scaling studies. These are project-authored capability statements tied to the published examples, not independent blind validations of accuracy or speed at scale, and the numbers are measured on the project's own hardware and configurations.
Independent context tempers the optimism. A 2024 review finding that many "ML beats classical solvers" papers compared against weak baselines is a reminder that any accuracy or speed figure from a differentiable solver should be re-measured on an independent reference for your specific case. Classical adjoint and finite-volume methods have decades of verification behind them, so the burden of proof sits with the new differentiable path. These are not reasons to reject JAX-Fluids; they are reasons to treat any result as unverified until the scheme, grid, time step and hardware are stated, following the same discipline used by the aerospace-CFD case and the automotive-aero case on this site.
7. Role in Physics-AI Workflows
In a production pipeline JAX-Fluids sits at the differentiable-forward-model end. It generates paired input and output fields for training surrogates, supplies the gradient that drives shape optimisation and inverse problems, and remains the reference against which any surrogate's error is measured on the queries it was built for. The value concentrates in small-data or gradient-hungry regimes inside a narrow, validated distribution: a JAX-Fluids-gradient can recover a shape or a coefficient from a scalar loss without a hand-derived adjoint, and its credibility rests entirely on how thoroughly the result was validated against held-out classical references. Datasets such as PDEBench and CFDBench are examples where classical and neural solvers provide the ground truth that surrogates learn from.
JAX-Fluids also fits into a longer verification chain. A classical solver remains the reference for correctness and for any certification claim; a physics-informed model such as DeepXDE can supply residual corrections where labels are scarce; and a foundation-style model such as POSEIDON can provide a pretrained operator starting point. None of these removes the need for an independent reference solve on held-out configurations. The performance-engineering collection on this site places these roles in sequence, and the numerics-and-solvers collection collects the underlying entry points. Writing down the expected query count before optimising is still the cheapest way to avoid an unrecoverable compute investment.
8. Limitations and Failure Modes
JAX-Fluids inherits every limitation of high-order finite-volume methods plus the overhead of a differentiable graph. Sharp discontinuities such as shocks are resolved by WENO/TENO but still need sufficient grid resolution, and under-resolved gradients propagate into the adjoint, silently corrupting the optimisation. Multi-scale or stiff problems strain a single-level grid, and the differentiability does not by itself improve physical accuracy - it only makes the gradient available. A badly posed loss, a poor initialisation, or too few optimisation steps yields smooth, plausible and wrong shapes, and the framework will not flag that for you.
There are practical limits too. JAX-Fluids is Python and JAX-centric, so effective use on a cluster needs batch-scheduler competence separate from the physics, and large problems still face memory and communication costs that a compiled classical solver may handle more efficiently for a single query. Training and optimisation are sensitive to hyperparameters (scheme, grid, time step, optimiser schedule), so two runs can differ; recording the seed, configuration and hardware is mandatory for reproducibility. JAX-Fluids does not provide a certified accuracy or an audit trail on its own; when the deliverable must be defended, a classical solve stays in the loop as the reference, and the classical-solver cost-boundary guide explains why a deferral rule back to the solver belongs in the design.
9. Version and Source Notes
Record 1: JAX-Fluids is distributed under GPL-3.0 (a strong copyleft licence), and any embedding in a closed-source product needs legal review; this is the authoritative licence in the repository, distinct from any earlier claimed MIT status. Record 2: the project is built on Google JAX and uses SPMD for multi-GPU/TPU execution, with high-order WENO and TENO schemes and a two-phase (VOF/level-set) path. Record 3: the reference paper is "JAX-FLUIDS: A fully-differentiable high-order computational fluid dynamics solver for compressible two-phase flows", arXiv 2203.13760, published in Computer Physics Communications in 2023; the repository is tumaer/JAXFLUIDS.
Record 4 (reconciliation discipline): when citing a JAX-Fluids result, the version, the scheme, the grid resolution, the time step and the hardware must be recorded together, because the solution and its gradient depend on exactly those choices. A drag or accuracy figure quoted without its scheme and grid cannot be reproduced and should not be carried into a proposal. The GPL-3.0 licence permits use and modification with the copyleft condition noted above. All records were verified on 11 November 2026 against the project repository, release pages and the JAX-Fluids paper; vendor-stated scaling figures are treated as project-authored capability statements rather than independent validations.
10. References
- Bezgin G., Buhendwa A., Adams R. P., "JAX-FLUIDS: A fully-differentiable high-order computational fluid dynamics solver for compressible two-phase flows", Computer Physics Communications, arXiv:2203.13760 (2023).
- The JAX-Fluids Project, "JAX-Fluids repository", GitHub, github.com/tumaer/JAXFLUIDS (accessed 11 November 2026).
- Bradbury J. et al., "JAX: composable transformations of Python+NumPy programs", github.com/google/jax (2023).
- Jiang G. S., Shu C. W., "Efficient implementation of weighted ENO schemes", Journal of Computational Physics 126, 202-228 (1996).
- Fu L., Hu X. Y., Adams N. A., "A family of high-order targeted ENO schemes for compressible-fluid simulation", Journal of Computational Physics 305, 333-359 (2016).
- Raissi M., Perdikaris P., Karniadakis G. E., "Physics-informed neural networks", Journal of Computational Physics 378, 686-707 (2019).
- The OpenFOAM Project, "OpenFOAM: the open-source CFD toolbox", openfoam.org (accessed 11 November 2026).
- The SU2 Project, "SU2: an open-source suite for multiphysics simulation", su2code.github.io (accessed 11 November 2026).
- McGreivy N., Hakim A., "Weak baselines and reporting biases lead to overoptimism in machine learning for fluid-related partial differential equations", Nature Machine Intelligence (2024), arXiv:2407.07218.
- Takamoto M. et al., "PDEBench: An Extensive Benchmark for Scientific Machine Learning", NeurIPS 2022, arXiv:2210.07182.