Namespaces
hydro Namespace Reference

Items related to hydrodynamic systems. More...

Namespaces

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

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 
)
noexcept

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 
)
noexcept

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.