Special Relativity - PrincetonUniversity/athena-public-version GitHub Wiki

Governing equations

Athena++ supports special-relativistic fluid dynamics. In this mode the primitive variables are

  • comoving rest mass density Ļ,
  • gas pressure pgas,
  • spatial components uā€‰i of the 4-velocity, and
  • passive scalar dimensionless concentration Ļ‡ (one for each species).

In MHD we also have a magnetic field B with components Bā€‰i.

The conserved variables are

  • coordinate-frame density DāŸ=āŸĪ³Ļ,
  • total energy density EāŸ=āŸĪ³ā€‰2wtotāŸāˆ’āŸptotāŸāˆ’āŸbā€‰tbā€‰t,
  • momentum density M with components Mā€‰iāŸ=āŸĪ³ā€‰2wtotvā€‰iāŸāˆ’āŸbā€‰tbā€‰i, and
  • coordinate-frame species density SāŸ=āŸĻ‡D.

Here we define the following useful quantities:

  • Lorentz factor Ī³āŸ=āŸ(1āŸ+āŸu1u1āŸ+āŸu2u2āŸ+āŸu3u3)1/2,
  • 3-velocity components vā€‰iāŸ=āŸuā€‰i/Ī³,
  • projected 4-field with components bā€‰tāŸ=āŸĪ³ā€‰vā‹…B and bā€‰iāŸ=āŸBā€‰i/Ī³āŸ+āŸbā€‰tvā€‰i,
  • magnetic pressure pmagāŸ=āŸĪ·Ī¼Ī½bā€‰Ī¼bā€‰Ī½/2,
  • total pressure ptotāŸ=āŸpgasāŸ+āŸpmag,
  • adiabatic index Ī“,
  • comoving gas enthalpy wgasāŸ=āŸĻāŸ+āŸĪ“/(Ī“āˆ’1)āŸĆ—āŸpgas,
  • comoving magnetic enthalpy wmagāŸ=āŸ2pmag,
  • comoving total enthalpy wtotāŸ=āŸwgasāŸ+āŸwmag.

The evolution equations are then

  • āˆ‚tDāŸ+āŸāˆ‚jā€‰(Ī³Ļvā€‰j)āŸ=āŸ0,
  • āˆ‚tEāŸ+āŸāˆ‚jMā€‰jāŸ=āŸ0,
  • āˆ‚tMā€‰iāŸ+āŸāˆ‚jā€‰(Ī³ā€‰2wtotvā€‰ivā€‰jāŸ+āŸptotĪ“ā€‰ijāŸāˆ’āŸbā€‰ibā€‰j)āŸ=āŸ0,
  • āˆ‚tBā€‰iāŸ+āŸāˆ‚jā€‰(Ī³vā€‰jbā€‰iāŸāˆ’āŸĪ³vā€‰ibā€‰j)āŸ=āŸ0, and
  • āˆ‚tSāŸ+āŸāˆ‚jā€‰(Ļ‡Ī³Ļvā€‰j)āŸ=āŸ0.

The momentum equation might have source terms on the right-hand side in non-Cartesian coordinates.

General code considerations

To enable special relativity, add the -s flag when configuring. This option will automatically select an appropriate Riemann solver and equation of state. The Riemann solver can be local Lax-Friedrichs, HLLE, HLLC (hydrodynamics only), or HLLD (MHD only). Note the Roe solver is unavailable for relativity. The equation of state must be adiabatic (i.e. gamma-law).

SR is compatible with the same set of coordinates as Newtonian physics: Cartesian, cylindrical, and spherical-polar. Note the coordinates labeled "Minkowski" are for use with general relativity only. For those with GR experience, it is worth noting that cylindrical and spherical-polar coordinates are implemented in a locally orthonormal way for SR, rather than in the natural coordinate way. For example, a purely radial velocity field that is everywhere half the speed of light will have constant components (0.5, 0, 0) in spherical coordinates, rather than spatially varying components and understood basis vectors that also vary in magnitude spatially. This is reflected in the output data.

When calculating timesteps in SR, Athena++ assumes a signal speed of the speed of light (i.e. unity). Therefore a fixed grid will have fixed timesteps given by the CFL number multiplied by the smallest cell width.

SR is fully compatible with static and adaptive mesh refinement.

Floors and ceilings on variables

Caution is advised when simulating extreme conditions (very high Lorentz factors, high magnetizations, etc.). Due to the extra nonlinear coupling in SR compared to Newtonian physics, there are more ways in which a simulation can go wrong, often manifesting in recovering superluminal velocities in the conserved-to-primitive variable inversion.

In order to help robustness, various limits are available in the <hydro> section of the input file, described below:

Name Default Value Description
dfloor ā‰ˆ10-35 floor on Ļ
pfloor ā‰ˆ10-35 floor on pgas
sfloor ā‰ˆ10-35 floor on Ļ‡
gamma_max 1000 ceiling on Ī³
sigma_max 0 ceiling on 2pmag/Ļ; only used if positive
beta_min 0 floor on pgas/pmag; only used if positive

If Lorentz factors above Ī³max are found, the primitive velocities are all rescaled by the same factor in order to make Ī³āŸ=āŸĪ³max. For the limits on plasma Ļƒ and Ī², Ļ and pgas are adjusted and the magnetic field is left alone in order to preserve āˆ‡ā‹…BāŸ=āŸ0.

āš ļø **GitHub.com Fallback** āš ļø