Notation

Units

Unless specifically noted, we use geometric units \(G=c=1\), both for documentation and the code internals. Which specific geometric units to employ is up to the user, e.g. setting \(M_\odot=1\). All EOS, TOV solver, and primitive recovery code is completely agnostic to this choice. Only when loading an EOS from file, the unit system needs to be specified. Our EOS file format is using SI units in order to unambiguously define an EOS.

We further define the fiducial baryon mass constant (used to convert baryon number density to mass density) as \(m_B = 1.66 \times 10^{-24}\, \mathrm{g}\). This is mostly a convention to make equations of state unambiguous, which is neccessary because our EOS interface is based on baryon mass density, not at all using baryon number density.

Temperatures are always measured in \([\mathrm{MeV}]\) and specific entropy in \([k_B/\mathrm{Baryon}]\). Computing temperature/entropy is the only place where the value of \(m_B\) might be used in the code.

The library contains convenient utilities to handle all unit conversions in a consistent and readable manner, see units.

Primitive variables

Math

Code

Explanation

\(n\)

Baryon number density

\(m_B\)

mbar

Fiducial baryon mass constant

\(\rho = m_B n\)

rho

Mass density

\(\rho_E\)

Fluid contribution to energy density

\(\epsilon=\frac{\rho_E}{\rho} - 1\)

eps

Fluid specific internal energy

\(P\)

press

Fluid pressure

\(h=1+\epsilon + \frac{P}{\rho}\)

h

Relativistic specific enthalpy

\(T\)

temp

Temperature

\(s\)

sentr

Entropy per baryon

\(c_s = \sqrt{\left.\frac{\partial P}{\partial \rho_E} \right|_s}\)

csnd

Speed of sound (adiabatic)

\(v^i\)

vel

Fluid 3-velocity for Eularian frame (observer normal to foliation)

\(v^2 = v^i v_i\)

vsqr

\(W\)

w_lor

Fluid Lorentz factor in Eularian frame

\(z = Wv\)

z

More useful quantity for expressing velocity

\(B^i\)

B

Magnetic field in Eularian frame

\(E^i\)

E

Electric field in Eularian frame

Magnetic and electric field are defined as

\[\begin{split}E^\mu &= n_\nu F^{\mu\nu}, \\ B^\mu &= n_\nu {}^*F^{\mu\nu}\end{split}\]

where \(F^{\mu\nu}\) is the Maxwell tensor and the star denotes the dual. Beware of competing conventions in the literature (rationalized or not). The energy density is given by

\[\frac{1}{2} \left( E^2 + B^2 \right)\]

Evolved Variables

The definition of the evolved (a.k.a. conserved) variables follows typical evolution code conventions. All evolved variables are tensor densities, i.e. incorporate a factor \(\sqrt{g}\), the square root of the 3-metric determinant. We also use that convention for the evolved magnetic field. Further, we assume that the electron fraction is evolved as a densitized tracer variable. Conversion from other conventions should be trivial.

Math

Code

Explanation

\(D = \sqrt{g} \rho W\)

dens

Evolved mass density

\(\tau = \sqrt{g}\left( \rho W \left(hW-1\right) - P + \frac{1}{2} \left(E^2 + B^2 \right) \right)\)

tau

Evolved energy density

\(S_i = \sqrt{g}\left( \rho h W^2 v_i + \epsilon_{ijk} E^j B^k \right)\)

scon

Evolved momentum density

\(Y_e^T = D Y_e\)

tracer_ye

Evolved electron fraction tracer

\(B_c^i = \sqrt{g} B^i\)

bcons

Evolved magnetic field