Introduction to Castro
Castro is a adaptive mesh, radiation/MHD hydrodynamics code that is designed to model astrophysical reacting flows on massively parallel computers.
Castro’s major capabilities:
1-, 2-, and 3-dimensional unsplit, 2nd-order finite-volume hydrodynamics; 4th order hydro for uniform grids. (see Hydrodynamics)
3-dimension constrained transport ideal MHD (single level only currently) (see MHD)
multigroup flux-limited diffusion radiation hydrodynamics (see Radiation)
generalized retry mechanism for recovering from physical violations over a timestep (see Retry Mechanism)
adaptive mesh refinement with subcycling; jumps of 2x and 4x between levels (see Adaptive Mesh Refinement)
arbitrary equation of state (provided by the companion StarKiller Microphysics project)
general nuclear reaction networks
explicit thermal diffusion (see Thermal Diffusion)
full Poisson gravity (with isolated boundary conditions) and a conservative energy formulation (see Gravity)
rotation (in the co-rotating frame) in 2-d axisymmetric and 3-d (see Rotation)
spectral deferred corrections time integration for coupling hydro and reactions (see Spectral Deferred Corrections)
parallelization via MPI + OpenMP (CPUs), MPI + CUDA (NVIDIA GPUs), or MPI + HIP (AMD GPUs)
Development Model
Castro is developed on github (https://github.com/amrex-astro/Castro
). The main
branch is stable and can be used for day-to-day
science. New changes are made via pull requests to the
development
branch. This is where the ongoing regression testing
is done (both on CPU and GPU).
At the start of each month, we merge development
→ main
and
apply a tag of the form YY.MM
(e.g. 20.02
for Feb. 2020). We
also create a github release and mint a Zenodo DOI using the
information in the .zenodo.json
file at the root level.
Castro “core developers” are those who have made substantial code
contributions (details are in the main README.md
). These
developers are coauthors on the Zenodo DOI and of any papers
describing Castro generally (science papers coauthors are decided by
the science paper lead).
Units and Conventions
Castro works in CGS units unless otherwise specified. Table 1 shows some of the common symbols / names used throughout the code documentation and papers.
name |
units |
description |
---|---|---|
\(t\) |
s |
time |
\(\rho\) |
\(\gcc\) |
mass density |
\(\ub\) |
\(\cms\) |
velocity vector |
\(p\) |
\(\presunit\) |
pressure |
\(\gb\) |
\(\accelunit\) |
gravitational acceleration |
\(\Sb\) |
varies |
source term |
\(E\) |
\(\ergg\) |
specific total energy |
\(e\) |
\(\ergg\) |
specific internal energy |
\(T\) |
\(K\) |
temperature |
\(\kth\) |
\(\mathrm{erg~cm ^{-1}~s^{-1}~K~{-1}}\) |
thermal conductivity |
\(X_k\) |
– |
mass fraction of species \(k\) |
\(\omegadot_k\) |
\(\mathrm{s^{-1} }\) |
species creation rate (from reactions) |
Physical constants, again using the CGS system are available
in Microphysics/constants/
.