- 1D, 2D and 3D hydrodynamics and magnetohydrodynamics simulations
- provably divergence free magnetic fields based on the approach of Pang and Wu (2024) (different from their approach not yet provably positivity preserving)
- novel (possibly) conservative self gravity scheme, stable at strong discontinuities
- spherically symmetric simulations such that mass and energy are conserved based on the scheme of Crittenden and Balachandar (2018)
- backwards and forwards differentiable with adaptive timestepping
- easily extensible, all code is open source
jf1uids can be installed via pip
pip install jf1uidsNote that if JAX is not yet installed, only the CPU version of JAX will be installed
as a dependency. For a GPU-compatible installation of JAX, please refer to the
JAX installation guide.
- hydrodynamics
- magnetohydrodynamics
- self-gravity
- stellar wind
![]() |
![]() |
|---|---|
| Orszag-Tang Vortex | 3D Collapse |
| Gradients Through Stellar Wind |
| Novel (Possibly) Conservative Self Gravity Scheme, Stable at Strong Discontinuities |
![]() |
|---|
| Wind Parameter Optimization |
We have currently only published on the previous 1d-only version of this code.


