/BabyGRChombo

A spherically symmetric BSSN code used for teaching NR

Primary LanguageJupyter NotebookBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

BabyGRChombo

BabyGRChombo is a spherically symmetric BSSN code designed for teaching Numerical Relativity (NR), which is the solution of the Einstein Equations of General Relativity (GR) using numerical methods. The code includes a scalar field (obeying the Klein Gordon equation for a minimally coupled spin 0 field) as the matter source of the metric curvature. It currently includes two physical examples - a black hole and a real scalar boson star (or oscillaton).

Warning: This code was not designed to be a good example of optimised python usage or even of numerical relativity. The goal was to write a code where some non trivial physical examples could be studied and users could get an overview of the different parts of a numerical relativity code in action, without the optimisation and level of detail that exists in a typical research code like its parent GRChombo.

For more information and class resources see the wiki.

Installation

  1. Fork and clone this repository.

  2. Create a Python environment, e.g. in ./env:

    python3 -m venv ./env
  3. Install the Python requirements:

    # Activate the Python environment
    . ./env/bin/activate
    # Install the requirements
    pip install -r ./requirements.txt
  4. Run the Jupyter notebook use either:

    jupyter-lab

    or

    jupyter notebook

    (depending on the style of interface that your prefer)

Acknowledgements

This code is based on a private spherically adapted (but not spherically symmetric) code by Thomas Baumgarte, and the NRpy code of Zac Etienne, in particular the formalism used closely follows that described in the papers Numerical relativity in spherical polar coordinates: Evolution calculations with the BSSN formulation and SENR/NRPy+: Numerical relativity in singular curvilinear coordinate systems.

This code has also benefitted from input from Nils Vu @nilsvu ("You don't use python environments? I don't even know where to start..."), Leo Stein @duetosymmetry ("Why wouldn't you use the existing numpy functions for that?") and bug spotting from Cristian Joana @cjoana and Cheng-Hsin Cheng @chcheng3 when this code debuted at the ICERM Numerical Relativity Community Summer School in August 2022.

The main developer of BabyGRChombo is Katy Clough, who is supported by a UK STFC Ernest Rutherford Fellowship ST/V003240/1.