differentiable (magneto)hydrodynamics for astrophysics in JAX
Project description
jf1uids - differentiable (magneto)hydrodynamics for astrophysics in JAX
Features
- 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
Installation
jf1uids
can be installed via pip
pip install jf1uids
Note 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.
Notebooks for Getting Started
- hydrodynamics
- magnetohydrodynamics
- self-gravity
- stellar wind
Showcase
Orszag-Tang Vortex | 3D Collapse |
Gradients Through Stellar Wind |
Novel (Possibly) Conservative Self Gravity Scheme, Stable at Strong Discontinuities |
Wind Parameter Optimization |
Citable References
We have currently only published on the previous 1d-only version of this code.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jf1uids-0.2.4.tar.gz
(38.2 kB
view details)
Built Distribution
jf1uids-0.2.4-py3-none-any.whl
(58.4 kB
view details)
File details
Details for the file jf1uids-0.2.4.tar.gz
.
File metadata
- Download URL: jf1uids-0.2.4.tar.gz
- Upload date:
- Size: 38.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/6.8.0-55-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
06edb0da986046400a659dc43d6615770e5687f26c1a832152bd26770924728e
|
|
MD5 |
3d649093a97cd1ad3eb219cf053e63b0
|
|
BLAKE2b-256 |
d1379bef92356b66799de42707ee945ef2e138c9bda84a477e6941c7ecc598ad
|
File details
Details for the file jf1uids-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: jf1uids-0.2.4-py3-none-any.whl
- Upload date:
- Size: 58.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/6.8.0-55-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
2a79abb215c6112f364d56b0cf3e1e467391741f08892555538af45b68a89b6a
|
|
MD5 |
267c901dd16ce7aabd6c25c91f1bec73
|
|
BLAKE2b-256 |
b1589926d58813e4c609aeba921232ec0ee850dd63b44b4e13c7c8028f50d791
|