Skip to content
uwplasmaPublic

About

JAX BSSN is an implementation of the BSSN evolution equations for fully dynamical simulations of the Einstein field equations

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

171 Commits

Folders and files

Repository files navigation

JAX BSSN

JAX BSSN logo

JAX-BSSN is an autodifferentiable implementation of the BSSN evolution system for numerical relativity. JAX-BSSN features Kreiss–Oliger dissipation, momentum constraint damping, and fixed mesh refinement.

Installation

From the repository root:

python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[demos,test]"

The supported, tested minimum is JAX 0.9.2 with JAXLIB 0.9.2. Package metadata requires jax>=0.9.2 and jaxlib>=0.9.2; JAX supplies the compatible JAXLIB version constraints. The default installation supports CPU execution. For CUDA, install the appropriate JAX accelerator extra in the same environment; see the installation guide.

Supported demos

The supported physical examples are:

  1. Gauge wave
  2. Linear wave
  3. Spherical Cartoon puncture
  4. Axisymmetric black hole head-on collision

Each demo owns its initial data and run configuration. There is no generic simulation CLI or installed initial-data dispatcher.

Run the periodic analytic gauge wave:

python demos/gravitational_waves/gauge_wave.py

Run the linear wave through a nested fixed-refinement hierarchy and write composite openPMD output:

python demos/gravitational_waves/linear_wave.py

Run the compact spherical Cartoon puncture and write its complete reflected axis to openPMD:

python demos/spherically_symmetric_cartoon_puncture/cartoon_puncture.py

Run the axisymmetric Cartoon head-on collision of two black holes:

python demos/axisymmetric_blackhole_collision/axisymmetric_blackhole_collision.py

The default production runs compile substantial JAX kernels. The demo guide describes the evolution and configuration options.

Package structure

JAX_BSSN/
├── bssn/          # state, tensor algebra, geometry, equations, raw constraints
├── cartoon/       # spherical and axisymmetric reconstruction/evolution
├── evolution/     # derivatives, boundaries, RHS assembly, projections, RK4
├── fmr/           # nested-patch geometry, transfers, stage-synchronous RK4
├── diagnostics/   # constraint reductions, openPMD output
└── utilities/     # reusable initial-data and numerical helper routines

Demos own their physical initial data and configuration; reusable Bowen–York helpers live in JAX_BSSN.utilities. Analytic reference data lives under tests/, while integration tests also exercise demo runners.

Tests

Install test dependencies and run the complete suite with:

python -m pip install -e ".[test]"
python -m pytest

Tests use double precision and write no simulation output except dedicated openPMD round-trip tests in temporary directories.

About

JAX BSSN is an implementation of the BSSN evolution equations for fully dynamical simulations of the Einstein field equations

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages