SpECTRE  v2024.05.11
hydro::units::cgs Namespace Reference

Entities for converting between geometric units where \(G=c=M_{\odot}=1\) and CGS units. More...

Variables

constexpr double speed_of_light = 29979245800.0
 The speed of light in cm/s (This is exact)
 
constexpr double G_Newton = 6.67430e-8
 Newton's gravitational constant as given by https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.93.025010. G is likely to vary between sources, even beyond the reported uncertainty.
 
constexpr double mass_unit = G_Newton_times_m_sun / G_Newton
 mass_cgs = mass_geometric * mass_unit Heuristically the mass of the sun in grams
 
constexpr double length_unit = G_Newton_times_m_sun / square(speed_of_light)
 length_cgs = length_geometric * length_unit Heuristically, half the schwarzschild radius of the sun in cm
 
constexpr double time_unit = length_unit / speed_of_light
 time_cgs = time_geometric * time_unit Heuristically, half the light crossing time of a solar schwarzschild radius in seconds
 
constexpr double rest_mass_density_unit
 rho_cgs = rho_geometric * rho_unit Heuristically, the density in g/cm^3 of matter ~2200 times the density of atomic nuclei. Note this is much larger than any density realized in the universe. More...
 
constexpr double pressure_unit
 pressure_cgs = pressure_geometric * pressure_unit Heuristically, the quantity above but times the speed of light squared in cgs More...
 
constexpr double atomic_mass_unit = 1.66053906660e-24
 The accepted value for the atomic mass unit in g, uncertainty +-30e-10.
 
constexpr double neutron_mass = 1.67492749804e-24
 The neutron mass, given in grams, uncertainty at 5.7 x 10^-10 level.
 
constexpr double proton_mass = 1.672621898e-24
 The proton mass, given in grams. Uncertainty at 2e-8 level.
 
constexpr double electron_volt = 1.602176634e-12
 The electron-volt (eV) given in ergs, which is known exactly in SI/cgs.
 
constexpr double gauss_unit = 2.3558985e+19
 CGS unit of Gauss. More...
 

Detailed Description

Entities for converting between geometric units where \(G=c=M_{\odot}=1\) and CGS units.

Variable Documentation

◆ gauss_unit

constexpr double hydro::units::cgs::gauss_unit = 2.3558985e+19
constexpr

CGS unit of Gauss.

Equals mass_unit^(1/2) * length_unit^(-1/2) * time_unit^(-1).

Conversion rule for electromagnetic fields is

magnetic_field_cgs = magnetic_field_geometric * gauss_unit
constexpr double gauss_unit
CGS unit of Gauss.
Definition: Units.hpp:116

or

electric_field_cgs = electric_field_geometric * gauss_unit
Warning
Before changing units using this value, make sure the unit systems you are converting values between are using the same unit convention for electromagnetic variables as well. Gaussian and Heaviside-Lorentz unit convention (in electromagnetism) have a factor of \(\sqrt{4\pi}\) difference in variables. See this Wikipedia page for how to convert between different unit systems in electromagnetism.

Note that ForceFree and grmhd::ValenciaDivClean evolution systems are adopting the geometrized Heaviside-Lorentz unit for magnetic fields.

e.g. Suppose magnetic field has value \(10^{-5}\) with the code unit in the ValenciaDivClean evolution system. This corresponds to

10^(-5) * gauss_unit = 2.3558985e+14 Gauss

in the CGS Heaviside-Lorentz unit.

If one wants to convert it to the usual CGS Gaussian unit, extra factor of \(\sqrt{4\pi}\) needs to be multiplied:

10^(-5) * gauss_unit * sqrt(4pi) = 8.35144274e+14 Gauss
void pi(gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame > * > pi, const Scalar< DataType > &lapse, const Scalar< DataType > &dt_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::I< DataType, SpatialDim, Frame > &dt_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi)
Computes the conjugate momentum of the spacetime metric .
auto sqrt(const TensorExpression< T, X, Symm, IndexList, tmpl::list< Args... > > &t)
Returns the tensor expression representing the square root of a tensor expression that evaluates to a...
Definition: SquareRoot.hpp:253

◆ pressure_unit

constexpr double hydro::units::cgs::pressure_unit
constexpr
Initial value:
=
constexpr double mass_unit
mass_cgs = mass_geometric * mass_unit Heuristically the mass of the sun in grams
Definition: Units.hpp:45
constexpr double time_unit
time_cgs = time_geometric * time_unit Heuristically, half the light crossing time of a solar schwarzs...
Definition: Units.hpp:53
constexpr double length_unit
length_cgs = length_geometric * length_unit Heuristically, half the schwarzschild radius of the sun i...
Definition: Units.hpp:49

pressure_cgs = pressure_geometric * pressure_unit Heuristically, the quantity above but times the speed of light squared in cgs

◆ rest_mass_density_unit

constexpr double hydro::units::cgs::rest_mass_density_unit
constexpr
Initial value:

rho_cgs = rho_geometric * rho_unit Heuristically, the density in g/cm^3 of matter ~2200 times the density of atomic nuclei. Note this is much larger than any density realized in the universe.