SpECTRE
v2024.02.05
|
Items related to hydrodynamic systems. More...
Namespaces | |
namespace | OptionTags |
Tags for options of hydrodynamic systems. | |
namespace | Solutions |
Holds classes implementing common portions of solutions to various different (magneto)hydrodynamical systems. | |
namespace | Tags |
Tag containing TildeD * SpecificInternalEnergy Useful as a diagnostics tool, as input to volume integral. | |
namespace | units |
Functions, constants, and classes for converting between different units. | |
Classes | |
class | TemperatureInitialization |
Wrapper to add temperature variable to initial data providing only density and or energy_density initialization. More... | |
Enumerations | |
enum | MagneticFieldTreatment { AssumeZero , CheckIfZero , AssumeNonZero } |
Used to specify how to handle the magnetic field. More... | |
enum class | HalfPlaneIntegralMask { None , PositiveXOnly , NegativeXOnly } |
Functions | |
std::ostream & | operator<< (std::ostream &os, MagneticFieldTreatment t) |
std::string | name (const HalfPlaneIntegralMask mask) |
template<typename DataType > | |
void | mass_weighted_internal_energy (const gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &tilde_d, const Scalar< DataType > &specific_internal_energy) |
Compute tilde_d * specific_internal_energy Result of the calculation stored in result. | |
template<typename DataType > | |
void | mass_weighted_kinetic_energy (const gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &tilde_d, const Scalar< DataType > &lorentz_factor) |
Compute tilde_d * (lorentz_factor - 1.0) Result of the calculation stored in result. | |
template<typename DataType , size_t Dim, typename Fr = Frame::Inertial> | |
void | tilde_d_unbound_ut_criterion (const gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &tilde_d, const Scalar< DataType > &lorentz_factor, const tnsr::I< DataType, Dim, Fr > &spatial_velocity, const tnsr::ii< DataType, Dim, Fr > &spatial_metric, const Scalar< DataType > &lapse, const tnsr::I< DataType, Dim, Fr > &shift) |
Returns tilde_d in regions where u_t < -1 and 0 in regions where u_t > -1 (approximate criteria for unbound matter, theoretically valid for particles following geodesics of a time-independent metric). | |
template<HalfPlaneIntegralMask IntegralMask, typename DataType , size_t Dim> | |
void | tilde_d_in_half_plane (const gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &tilde_d, const tnsr::I< DataType, Dim, Frame::Grid > &grid_coords) |
Returns tilde_d in one half plane and zero in the other IntegralMask allows us to restrict the data to the x>0 or x<0 plane in grid coordinates (useful for NSNS). | |
template<HalfPlaneIntegralMask IntegralMask, typename DataType , size_t Dim, typename Fr = Frame::Inertial> | |
void | mass_weighted_coords (const gsl::not_null< tnsr::I< DataType, Dim, Fr > * > result, const Scalar< DataType > &tilde_d, const tnsr::I< DataType, Dim, Frame::Grid > &grid_coords, const tnsr::I< DataType, Dim, Fr > &compute_coords) |
Returns tilde_d * compute_coords IntegralMask allows us to restrict the data to the x>0 or x<0 plane in grid coordinates (useful for NSNS). | |
template<typename DataType , size_t Dim, typename Fr = Frame::Inertial> | |
void | quadrupole_moment (const gsl::not_null< tnsr::ii< DataType, Dim, Fr > * > result, const Scalar< DataType > &tilde_d, const tnsr::I< DataType, Dim, Fr > &coordinates) |
Function computing the quadrupole moment. More... | |
template<typename DataType , size_t Dim, typename Fr = Frame::Inertial> | |
void | quadrupole_moment_derivative (const gsl::not_null< tnsr::ii< DataType, Dim, Fr > * > result, const Scalar< DataType > &tilde_d, const tnsr::I< DataType, Dim, Fr > &coordinates, const tnsr::I< DataType, Dim, Fr > &spatial_velocity) |
Function computing the first time derivative of the quadrupole moment. More... | |
template<typename DataType > | |
void | energy_density (gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &rest_mass_density, const Scalar< DataType > &specific_enthalpy, const Scalar< DataType > &pressure, const Scalar< DataType > &lorentz_factor, const Scalar< DataType > &magnetic_field_dot_spatial_velocity, const Scalar< DataType > &comoving_magnetic_field_squared) |
The total mass-energy density measured by a normal observer, \(E = n_a n_b T^{ab}\). More... | |
template<typename DataType > | |
void | momentum_density (gsl::not_null< tnsr::I< DataType, 3 > * > result, const Scalar< DataType > &rest_mass_density, const Scalar< DataType > &specific_enthalpy, const tnsr::I< DataType, 3 > &spatial_velocity, const Scalar< DataType > &lorentz_factor, const tnsr::I< DataType, 3 > &magnetic_field, const Scalar< DataType > &magnetic_field_dot_spatial_velocity, const Scalar< DataType > &comoving_magnetic_field_squared) |
The spatial momentum density \(S^i = -\gamma^{ij} n^a T_{aj}\). More... | |
template<typename DataType > | |
void | stress_trace (gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &rest_mass_density, const Scalar< DataType > &specific_enthalpy, const Scalar< DataType > &pressure, const Scalar< DataType > &spatial_velocity_squared, const Scalar< DataType > &lorentz_factor, const Scalar< DataType > &magnetic_field_dot_spatial_velocity, const Scalar< DataType > &comoving_magnetic_field_squared) |
The trace of the spatial stress tensor, \(S = \gamma^{ij}\gamma_{ia}\gamma_{jb}T^{ab}\). More... | |
template<typename DataType , size_t Dim, typename Fr = Frame::Inertial> | |
void | transport_velocity (gsl::not_null< tnsr::I< DataType, Dim, Fr > * > result, const tnsr::I< DataType, Dim, Fr > &spatial_velocity, const Scalar< DataType > &lapse, const tnsr::I< DataType, Dim, Fr > &shift) |
Function computing the transport velocity. More... | |
template<typename DataType > | |
void | comoving_magnetic_field_one_form (const gsl::not_null< tnsr::a< DataType, 3 > * > result, const tnsr::i< DataType, 3 > &spatial_velocity_one_form, const tnsr::i< DataType, 3 > &magnetic_field_one_form, const Scalar< DataType > &magnetic_field_dot_spatial_velocity, const Scalar< DataType > &lorentz_factor, const tnsr::I< DataType, 3 > &shift, const Scalar< DataType > &lapse) |
The comoving magnetic field one-form \(b_\mu\). More... | |
template<typename DataType > | |
tnsr::a< DataType, 3 > | comoving_magnetic_field_one_form (const tnsr::i< DataType, 3 > &spatial_velocity_one_form, const tnsr::i< DataType, 3 > &magnetic_field_one_form, const Scalar< DataType > &magnetic_field_dot_spatial_velocity, const Scalar< DataType > &lorentz_factor, const tnsr::I< DataType, 3 > &shift, const Scalar< DataType > &lapse) |
The comoving magnetic field one-form \(b_\mu\). More... | |
template<typename DataType > | |
void | comoving_magnetic_field_squared (const gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &magnetic_field_squared, const Scalar< DataType > &magnetic_field_dot_spatial_velocity, const Scalar< DataType > &lorentz_factor) |
The comoving magnetic field one-form \(b_\mu\). More... | |
template<typename DataType > | |
Scalar< DataType > | comoving_magnetic_field_squared (const Scalar< DataType > &magnetic_field_squared, const Scalar< DataType > &magnetic_field_dot_spatial_velocity, const Scalar< DataType > &lorentz_factor) |
The comoving magnetic field one-form \(b_\mu\). More... | |
template<typename DataType > | |
void | inverse_plasma_beta (gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &comoving_magnetic_field_magnitude, const Scalar< DataType > &fluid_pressure) |
Computes the inverse plasma beta. More... | |
template<typename DataType > | |
Scalar< DataType > | inverse_plasma_beta (const Scalar< DataType > &comoving_magnetic_field_magnitude, const Scalar< DataType > &fluid_pressure) |
Computes the inverse plasma beta. More... | |
template<typename DataType , size_t Dim, typename Frame > | |
void | lorentz_factor (gsl::not_null< Scalar< DataType > * > result, const tnsr::I< DataType, Dim, Frame > &spatial_velocity, const tnsr::i< DataType, Dim, Frame > &spatial_velocity_form) |
Computes the Lorentz factor \(W=1/\sqrt{1 - v^i v_i}\). | |
template<typename DataType , size_t Dim, typename Frame > | |
Scalar< DataType > | lorentz_factor (const tnsr::I< DataType, Dim, Frame > &spatial_velocity, const tnsr::i< DataType, Dim, Frame > &spatial_velocity_form) |
Computes the Lorentz factor \(W=1/\sqrt{1 - v^i v_i}\). | |
template<typename DataType > | |
void | lorentz_factor (gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &spatial_velocity_squared) |
Computes the Lorentz factor \(W=1/\sqrt{1 - v^i v_i}\). | |
template<typename DataType > | |
Scalar< DataType > | lorentz_factor (const Scalar< DataType > &spatial_velocity_squared) |
Computes the Lorentz factor \(W=1/\sqrt{1 - v^i v_i}\). | |
template<typename DataType , size_t Dim, typename Frame > | |
void | mass_flux (gsl::not_null< tnsr::I< DataType, Dim, Frame > * > result, const Scalar< DataType > &rest_mass_density, const tnsr::I< DataType, Dim, Frame > &spatial_velocity, const Scalar< DataType > &lorentz_factor, const Scalar< DataType > &lapse, const tnsr::I< DataType, Dim, Frame > &shift, const Scalar< DataType > &sqrt_det_spatial_metric) |
Computes the vector \(J^i\) in \(\dot{M} = -\int J^i s_i d^2S\), representing the mass flux through a surface with normal \(s_i\). More... | |
template<typename DataType , size_t Dim, typename Frame > | |
tnsr::I< DataType, Dim, Frame > | mass_flux (const Scalar< DataType > &rest_mass_density, const tnsr::I< DataType, Dim, Frame > &spatial_velocity, const Scalar< DataType > &lorentz_factor, const Scalar< DataType > &lapse, const tnsr::I< DataType, Dim, Frame > &shift, const Scalar< DataType > &sqrt_det_spatial_metric) |
Computes the vector \(J^i\) in \(\dot{M} = -\int J^i s_i d^2S\), representing the mass flux through a surface with normal \(s_i\). More... | |
template<typename DataType , size_t ThermodynamicDim> | |
void | sound_speed_squared (gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &rest_mass_density, const Scalar< DataType > &specific_internal_energy, const Scalar< DataType > &specific_enthalpy, const EquationsOfState::EquationOfState< true, ThermodynamicDim > &equation_of_state) |
Computes the relativistic sound speed squared. More... | |
template<typename DataType , size_t ThermodynamicDim> | |
Scalar< DataType > | sound_speed_squared (const Scalar< DataType > &rest_mass_density, const Scalar< DataType > &specific_internal_energy, const Scalar< DataType > &specific_enthalpy, const EquationsOfState::EquationOfState< true, ThermodynamicDim > &equation_of_state) |
Computes the relativistic sound speed squared. More... | |
template<typename DataType > | |
void | relativistic_specific_enthalpy (gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &rest_mass_density, const Scalar< DataType > &specific_internal_energy, const Scalar< DataType > &pressure) |
Computes the relativistic specific enthalpy \(h\) as: \( h = 1 + \epsilon + \frac{p}{\rho} \) where \(\epsilon\) is the specific internal energy, \(p\) is the pressure, and \(\rho\) is the rest mass density. | |
template<typename DataType > | |
Scalar< DataType > | relativistic_specific_enthalpy (const Scalar< DataType > &rest_mass_density, const Scalar< DataType > &specific_internal_energy, const Scalar< DataType > &pressure) |
Computes the relativistic specific enthalpy \(h\) as: \( h = 1 + \epsilon + \frac{p}{\rho} \) where \(\epsilon\) is the specific internal energy, \(p\) is the pressure, and \(\rho\) is the rest mass density. | |
Items related to hydrodynamic systems.
void hydro::comoving_magnetic_field_one_form | ( | const gsl::not_null< tnsr::a< DataType, 3 > * > | result, |
const tnsr::i< DataType, 3 > & | spatial_velocity_one_form, | ||
const tnsr::i< DataType, 3 > & | magnetic_field_one_form, | ||
const Scalar< DataType > & | magnetic_field_dot_spatial_velocity, | ||
const Scalar< DataType > & | lorentz_factor, | ||
const tnsr::I< DataType, 3 > & | shift, | ||
const Scalar< DataType > & | lapse | ||
) |
The comoving magnetic field one-form \(b_\mu\).
The components of the comoving magnetic field vector are:
\begin{align} b^0 &= W B^j v^k \gamma_{j k} / \alpha \\ b^i &= B^i / W + B^j v^k \gamma_{j k} u^i \end{align}
Using the spacetime metric, the corresponding one-form components are:
\begin{align} b_0 &= - \alpha W v^i B_i + \beta^i b_i \\ b_i &= B_i / W + B^j v^k \gamma_{j k} W v_i \end{align}
The square of the vector is:
\begin{equation} b^2 = B^i B^j \gamma_{i j} / W^2 + (B^i v^j \gamma_{i j})^2 \end{equation}
See also Eq. (5.173) in [13], with the difference that we work in Heaviside-Lorentz units where the magnetic field is rescaled by \(1/\sqrt{4\pi}\), following [130] .
tnsr::a< DataType, 3 > hydro::comoving_magnetic_field_one_form | ( | const tnsr::i< DataType, 3 > & | spatial_velocity_one_form, |
const tnsr::i< DataType, 3 > & | magnetic_field_one_form, | ||
const Scalar< DataType > & | magnetic_field_dot_spatial_velocity, | ||
const Scalar< DataType > & | lorentz_factor, | ||
const tnsr::I< DataType, 3 > & | shift, | ||
const Scalar< DataType > & | lapse | ||
) |
The comoving magnetic field one-form \(b_\mu\).
The components of the comoving magnetic field vector are:
\begin{align} b^0 &= W B^j v^k \gamma_{j k} / \alpha \\ b^i &= B^i / W + B^j v^k \gamma_{j k} u^i \end{align}
Using the spacetime metric, the corresponding one-form components are:
\begin{align} b_0 &= - \alpha W v^i B_i + \beta^i b_i \\ b_i &= B_i / W + B^j v^k \gamma_{j k} W v_i \end{align}
The square of the vector is:
\begin{equation} b^2 = B^i B^j \gamma_{i j} / W^2 + (B^i v^j \gamma_{i j})^2 \end{equation}
See also Eq. (5.173) in [13], with the difference that we work in Heaviside-Lorentz units where the magnetic field is rescaled by \(1/\sqrt{4\pi}\), following [130] .
void hydro::comoving_magnetic_field_squared | ( | const gsl::not_null< Scalar< DataType > * > | result, |
const Scalar< DataType > & | magnetic_field_squared, | ||
const Scalar< DataType > & | magnetic_field_dot_spatial_velocity, | ||
const Scalar< DataType > & | lorentz_factor | ||
) |
The comoving magnetic field one-form \(b_\mu\).
The components of the comoving magnetic field vector are:
\begin{align} b^0 &= W B^j v^k \gamma_{j k} / \alpha \\ b^i &= B^i / W + B^j v^k \gamma_{j k} u^i \end{align}
Using the spacetime metric, the corresponding one-form components are:
\begin{align} b_0 &= - \alpha W v^i B_i + \beta^i b_i \\ b_i &= B_i / W + B^j v^k \gamma_{j k} W v_i \end{align}
The square of the vector is:
\begin{equation} b^2 = B^i B^j \gamma_{i j} / W^2 + (B^i v^j \gamma_{i j})^2 \end{equation}
See also Eq. (5.173) in [13], with the difference that we work in Heaviside-Lorentz units where the magnetic field is rescaled by \(1/\sqrt{4\pi}\), following [130] .
Scalar< DataType > hydro::comoving_magnetic_field_squared | ( | const Scalar< DataType > & | magnetic_field_squared, |
const Scalar< DataType > & | magnetic_field_dot_spatial_velocity, | ||
const Scalar< DataType > & | lorentz_factor | ||
) |
The comoving magnetic field one-form \(b_\mu\).
The components of the comoving magnetic field vector are:
\begin{align} b^0 &= W B^j v^k \gamma_{j k} / \alpha \\ b^i &= B^i / W + B^j v^k \gamma_{j k} u^i \end{align}
Using the spacetime metric, the corresponding one-form components are:
\begin{align} b_0 &= - \alpha W v^i B_i + \beta^i b_i \\ b_i &= B_i / W + B^j v^k \gamma_{j k} W v_i \end{align}
The square of the vector is:
\begin{equation} b^2 = B^i B^j \gamma_{i j} / W^2 + (B^i v^j \gamma_{i j})^2 \end{equation}
See also Eq. (5.173) in [13], with the difference that we work in Heaviside-Lorentz units where the magnetic field is rescaled by \(1/\sqrt{4\pi}\), following [130] .
void hydro::energy_density | ( | gsl::not_null< Scalar< DataType > * > | result, |
const Scalar< DataType > & | rest_mass_density, | ||
const Scalar< DataType > & | specific_enthalpy, | ||
const Scalar< DataType > & | pressure, | ||
const Scalar< DataType > & | lorentz_factor, | ||
const Scalar< DataType > & | magnetic_field_dot_spatial_velocity, | ||
const Scalar< DataType > & | comoving_magnetic_field_squared | ||
) |
The total mass-energy density measured by a normal observer, \(E = n_a n_b T^{ab}\).
This quantity sources the gravitational field equations in the 3+1 decomposition (see Eq. (2.138) in [13]).
Perfect fluid contribution (Eq. (5.33) in [13]):
\begin{equation} E_\mathrm{fluid} = \rho h W^2 - p \end{equation}
Magnetic field contribution (Eq. (5.152) in [13]):
\begin{equation} E_\mathrm{em} = b^2 \left(W^2 - \frac{1}{2}\right) - (\alpha b^t)^2 \end{equation}
where \(\alpha b^t = W B^k v_k\).
result | Output buffer. Will be resized if needed. |
rest_mass_density | \(\rho\) |
specific_enthalpy | \(h\) |
pressure | \(p\) |
lorentz_factor | \(W\) |
magnetic_field_dot_spatial_velocity | \(B^k v_k\) |
comoving_magnetic_field_squared | \(b^2\) |
Scalar< DataType > hydro::inverse_plasma_beta | ( | const Scalar< DataType > & | comoving_magnetic_field_magnitude, |
const Scalar< DataType > & | fluid_pressure | ||
) |
Computes the inverse plasma beta.
The inverse plasma beta \(\beta^{-1} = b^2 / (2 p)\), where \(b^2\) is the square of the comoving magnetic field amplitude and \(p\) is the fluid pressure.
void hydro::inverse_plasma_beta | ( | gsl::not_null< Scalar< DataType > * > | result, |
const Scalar< DataType > & | comoving_magnetic_field_magnitude, | ||
const Scalar< DataType > & | fluid_pressure | ||
) |
Computes the inverse plasma beta.
The inverse plasma beta \(\beta^{-1} = b^2 / (2 p)\), where \(b^2\) is the square of the comoving magnetic field amplitude and \(p\) is the fluid pressure.
tnsr::I< DataType, Dim, Frame > hydro::mass_flux | ( | const Scalar< DataType > & | rest_mass_density, |
const tnsr::I< DataType, Dim, Frame > & | spatial_velocity, | ||
const Scalar< DataType > & | lorentz_factor, | ||
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, Dim, Frame > & | shift, | ||
const Scalar< DataType > & | sqrt_det_spatial_metric | ||
) |
Computes the vector \(J^i\) in \(\dot{M} = -\int J^i s_i d^2S\), representing the mass flux through a surface with normal \(s_i\).
Note that the integral is understood as a flat-space integral: all metric factors are included in \(J^i\). In particular, if the integral is done over a Strahlkorper, the gr::surfaces::euclidean_area_element
of the Strahlkorper should be used, and \(s_i\) is the normal one-form to the Strahlkorper normalized with the flat metric, \(s_is_j\delta^{ij}=1\).
The formula is \( J^i = \rho W \sqrt{\gamma}(\alpha v^i-\beta^i)\), where \(\rho\) is the mass density, \(W\) is the Lorentz factor, \(v^i\) is the spatial velocity of the fluid, \(\gamma\) is the determinant of the 3-metric \(\gamma_{ij}\), \(\alpha\) is the lapse, and \(\beta^i\) is the shift.
void hydro::mass_flux | ( | gsl::not_null< tnsr::I< DataType, Dim, Frame > * > | result, |
const Scalar< DataType > & | rest_mass_density, | ||
const tnsr::I< DataType, Dim, Frame > & | spatial_velocity, | ||
const Scalar< DataType > & | lorentz_factor, | ||
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, Dim, Frame > & | shift, | ||
const Scalar< DataType > & | sqrt_det_spatial_metric | ||
) |
Computes the vector \(J^i\) in \(\dot{M} = -\int J^i s_i d^2S\), representing the mass flux through a surface with normal \(s_i\).
Note that the integral is understood as a flat-space integral: all metric factors are included in \(J^i\). In particular, if the integral is done over a Strahlkorper, the gr::surfaces::euclidean_area_element
of the Strahlkorper should be used, and \(s_i\) is the normal one-form to the Strahlkorper normalized with the flat metric, \(s_is_j\delta^{ij}=1\).
The formula is \( J^i = \rho W \sqrt{\gamma}(\alpha v^i-\beta^i)\), where \(\rho\) is the mass density, \(W\) is the Lorentz factor, \(v^i\) is the spatial velocity of the fluid, \(\gamma\) is the determinant of the 3-metric \(\gamma_{ij}\), \(\alpha\) is the lapse, and \(\beta^i\) is the shift.
void hydro::momentum_density | ( | gsl::not_null< tnsr::I< DataType, 3 > * > | result, |
const Scalar< DataType > & | rest_mass_density, | ||
const Scalar< DataType > & | specific_enthalpy, | ||
const tnsr::I< DataType, 3 > & | spatial_velocity, | ||
const Scalar< DataType > & | lorentz_factor, | ||
const tnsr::I< DataType, 3 > & | magnetic_field, | ||
const Scalar< DataType > & | magnetic_field_dot_spatial_velocity, | ||
const Scalar< DataType > & | comoving_magnetic_field_squared | ||
) |
The spatial momentum density \(S^i = -\gamma^{ij} n^a T_{aj}\).
This quantity sources the gravitational field equations in the 3+1 decomposition (see Eq. (2.138) in [13]).
Perfect fluid contribution (Eq. (5.34) in [13]):
\begin{equation} S^i_\mathrm{fluid} = \rho h W^2 v^i \end{equation}
Magnetic field contribution (Eq. (5.153) in [13]):
\begin{equation} S^i_\mathrm{em} = b^2 W^2 v^i - \alpha b^t \gamma^{ij} b_j \end{equation}
where \(\alpha b^t \gamma^{ij} b_j = B^k v_k B^i + (B^k v_k)^2 W^2 v^i\).
result | Output buffer. Will be resized if needed. |
rest_mass_density | \(\rho\) |
specific_enthalpy | \(h\) |
spatial_velocity | \(v^i\) |
lorentz_factor | \(W\) |
magnetic_field | \(B^i\) |
magnetic_field_dot_spatial_velocity | \(B^k v_k\) |
comoving_magnetic_field_squared | \(b^2\) |
void hydro::quadrupole_moment | ( | const gsl::not_null< tnsr::ii< DataType, Dim, Fr > * > | result, |
const Scalar< DataType > & | tilde_d, | ||
const tnsr::I< DataType, Dim, Fr > & | coordinates | ||
) |
Function computing the quadrupole moment.
Computes the quadrupole moment, using \(\tilde{D} x^i x^j\) (equation 21 of [161]), with \(\tilde{D}=\sqrt{\gamma}\rho W\), \(W\) being the Lorentz factor, \(\gamma\) being the determinant of the spatial metric, and \(x\) the coordinates in Frame Fr. Result of calculation stored in result.
void hydro::quadrupole_moment_derivative | ( | const gsl::not_null< tnsr::ii< DataType, Dim, Fr > * > | result, |
const Scalar< DataType > & | tilde_d, | ||
const tnsr::I< DataType, Dim, Fr > & | coordinates, | ||
const tnsr::I< DataType, Dim, Fr > & | spatial_velocity | ||
) |
Function computing the first time derivative of the quadrupole moment.
Computes the first time derivative of the quadrupole moment, using \(\tilde{D} (v^i x^j + x^i v^j)\) (equation 23 of [161]), with \(\tilde{D}=\sqrt{\gamma}\rho W\), \(W\) being the Lorentz factor, \(\gamma\) being the determinant of the spatial metric, \(x\) the coordinates in Frame Fr, and \(v\) the corresponding spatial velocity. Result of calculation stored in result.
void hydro::stress_trace | ( | gsl::not_null< Scalar< DataType > * > | result, |
const Scalar< DataType > & | rest_mass_density, | ||
const Scalar< DataType > & | specific_enthalpy, | ||
const Scalar< DataType > & | pressure, | ||
const Scalar< DataType > & | spatial_velocity_squared, | ||
const Scalar< DataType > & | lorentz_factor, | ||
const Scalar< DataType > & | magnetic_field_dot_spatial_velocity, | ||
const Scalar< DataType > & | comoving_magnetic_field_squared | ||
) |
The trace of the spatial stress tensor, \(S = \gamma^{ij}\gamma_{ia}\gamma_{jb}T^{ab}\).
This quantity sources the gravitational field equations in the 3+1 decomposition (see Eq. (2.138) in [13]).
Perfect fluid contribution (Eq. (5.36) in [13]):
\begin{equation} S_\mathrm{fluid} = 3 p + \rho h (W^2 - 1) \end{equation}
Magnetic field contribution (Eq. (5.155) in [13]):
\begin{equation} S_\mathrm{em} = b^2 (W^2 v^2 + \frac{3}{2}) - \gamma^{ij} b_i b_j \end{equation}
where \(\gamma^{ij} b_i b_j = b^2 + (B^k v_k)^2 (W^2 v^2 + 1)\).
result | Output buffer. Will be resized if needed. |
rest_mass_density | \(\rho\) |
specific_enthalpy | \(h\) |
pressure | \(p\) |
spatial_velocity_squared | \(v^2 = \gamma_{ij} v^i v^j\) |
lorentz_factor | \(W\) |
magnetic_field_dot_spatial_velocity | \(B^k v_k\) |
comoving_magnetic_field_squared | \(b^2\) |
void hydro::transport_velocity | ( | gsl::not_null< tnsr::I< DataType, Dim, Fr > * > | result, |
const tnsr::I< DataType, Dim, Fr > & | spatial_velocity, | ||
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, Dim, Fr > & | shift | ||
) |
Function computing the transport velocity.
Computes the transport velocity, using \(v_t^i=\alpha v^i-\beta^i\), with \(v^i\) being the spatial velocity, \(\alpha\) the lapse, and \(\beta^i\) the shift.