SpECTRE  v2021.10.04
hydro Namespace Reference

Items related to hydrodynamic systems. More...

Namespaces

namespace  Solutions
 Holds classes implementing common portions of solutions to various different (magneto)hydrodynamical systems.
 
namespace  Tags
 Tags for hydrodynamic systems.
 

Functions

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.
 

Detailed Description

Items related to hydrodynamic systems.

Function Documentation

◆ mass_flux() [1/2]

template<typename DataType , size_t Dim, typename Frame >
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 StrahlkorperGr::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.

◆ mass_flux() [2/2]

template<typename DataType , size_t Dim, typename Frame >
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 StrahlkorperGr::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.