# JAX-Fluids 2.0: Towards HPC for Differentiable CFD of Compressible Two-phase Flows

arXiv: https://arxiv.org/abs/2402.05193 · HTML: https://mlsanity.com/paper/2402.05193/

## Key facts

- Cited by 7 papers in the map (data through 14 Oct 2026).
- Builds on 11 of its 67 references that are in the map.
- First posted on arXiv 7 Feb 2024.

## Builds on (most cited first, 11 of 11)

- [Machine learning accelerated computational fluid dynamics](https://mlsanity.com/paper/2102.01010/) (2021)
- [Machine Learning for Fluid Mechanics](https://mlsanity.com/paper/1905.11075/) (2019)
- [Enhancing Computational Fluid Dynamics with Machine Learning](https://mlsanity.com/paper/2110.02085/) (2021)
- [Physics-informed neural networks for inverse problems in supersonic flows](https://mlsanity.com/paper/2202.11821/) (2022)
- [DPM: A deep learning PDE augmentation method (with application to large-eddy simulation)](https://mlsanity.com/paper/1911.09145/) (2019)
- [JAX-FEM: A differentiable GPU-accelerated 3D finite element solver for automatic inverse design and mechanistic data science](https://mlsanity.com/paper/2212.00964/) (2022)
- [JAX-FLUIDS: A fully-differentiable high-order computational fluid dynamics solver for compressible two-phase flows](https://mlsanity.com/paper/2203.13760/) (2022)
- [Deep Neural Networks for Data-Driven Turbulence Models](https://mlsanity.com/paper/1806.04482/) (2018)
- [XLB: A differentiable massively parallel lattice Boltzmann library in Python](https://mlsanity.com/paper/2311.16080/) (2023)
- [Inferring incompressible two-phase flow fields from the interface motion using physics-informed neural networks](https://mlsanity.com/paper/2101.09833/) (2021)
- [A positivity-preserving high-order weighted compact nonlinear scheme for compressible gas-liquid flows](https://mlsanity.com/paper/2102.05287/) (2021)

## Built on by (most cited first, 7 of 7)

- [Automatic Differentiation-based Full Waveform Inversion with Flexible Workflows](https://mlsanity.com/paper/2412.00486/) (2024)
- [Scientific Machine Learning of Flow Resistance Using Universal Shallow Water Equations with Differentiable Programming](https://mlsanity.com/paper/2502.12396/) (2025)
- [Deep Learning of Solver-Aware Turbulence Closures from Nudged LES Dynamics](https://mlsanity.com/paper/2604.23874/) (2026)
- [Physics-constrained coupled neural differential equations for one dimensional blood flow modeling](https://mlsanity.com/paper/2411.05631/) (2024)
- [Physics-informed Reduced Order Modeling of Time-dependent PDEs via Differentiable Solvers](https://mlsanity.com/paper/2505.14595/) (2025)
- [Case study of a differentiable heterogeneous multiphysics solver for a nuclear fusion application](https://mlsanity.com/paper/2511.13262/) (2025)
- [A fully GPU-based workflow for building physics emulators of hypersonic flows](https://mlsanity.com/paper/2606.13742/) (2026)

## Abstract (arXiv)

In our effort to facilitate machine learning-assisted computational fluid dynamics (CFD), we introduce the second iteration of JAX-Fluids. JAX-Fluids is a Python-based fully-differentiable CFD solver designed for compressible single- and two-phase flows. In this work, the first version is extended to incorporate high-performance computing (HPC) capabilities. We introduce a parallelization strategy utilizing JAX primitive operations that scales efficiently on GPU (up to 512 NVIDIA A100 graphics cards) and TPU (up to 1024 TPU v3 cores) HPC systems. We further demonstrate the stable parallel computation of automatic differentiation gradients across extended integration trajectories. The new code version offers enhanced two-phase flow modeling capabilities. In particular, a five-equation diffuse-interface model is incorporated which complements the level-set sharp-interface model. Additional algorithmic improvements include positivity-preserving limiters for increased robustness, support for stretched Cartesian meshes, refactored I/O handling, comprehensive post-processing routines, and an updated list of state-of-the-art high-order numerical discretization schemes. We verify newly added numerical models by showcasing simulation results for single- and two-phase flows, including turbulent boundary layer and channel flows, air-helium shock bubble interactions, and air-water shock drop interactions.
