SpECTRE  v2024.04.12
RelativisticEuler::Valencia::ConservativeFromPrimitive< Dim > Struct Template Reference

Compute the conservative variables from primitive variables. More...

#include <ConservativeFromPrimitive.hpp>

Public Types

using return_tags = tmpl::list< RelativisticEuler::Valencia::Tags::TildeD, RelativisticEuler::Valencia::Tags::TildeTau, RelativisticEuler::Valencia::Tags::TildeS< Dim > >
 
using argument_tags = tmpl::list< hydro::Tags::RestMassDensity< DataVector >, hydro::Tags::SpecificInternalEnergy< DataVector >, hydro::Tags::SpecificEnthalpy< DataVector >, hydro::Tags::Pressure< DataVector >, hydro::Tags::SpatialVelocity< DataVector, Dim >, hydro::Tags::LorentzFactor< DataVector >, gr::Tags::SqrtDetSpatialMetric< DataVector >, gr::Tags::SpatialMetric< DataVector, Dim > >
 

Static Public Member Functions

static void apply (gsl::not_null< Scalar< DataVector > * > tilde_d, gsl::not_null< Scalar< DataVector > * > tilde_tau, gsl::not_null< tnsr::i< DataVector, Dim, Frame::Inertial > * > tilde_s, const Scalar< DataVector > &rest_mass_density, const Scalar< DataVector > &specific_internal_energy, const Scalar< DataVector > &specific_enthalpy, const Scalar< DataVector > &pressure, const tnsr::I< DataVector, Dim, Frame::Inertial > &spatial_velocity, const Scalar< DataVector > &lorentz_factor, const Scalar< DataVector > &sqrt_det_spatial_metric, const tnsr::ii< DataVector, Dim, Frame::Inertial > &spatial_metric)
 

Detailed Description

template<size_t Dim>
struct RelativisticEuler::Valencia::ConservativeFromPrimitive< Dim >

Compute the conservative variables from primitive variables.

\begin{align*} {\tilde D} = & \sqrt{\gamma} \rho W \\ {\tilde S}_i = & \sqrt{\gamma} \rho h W^2 v_i \\ {\tilde \tau} = & \sqrt{\gamma} \left( \rho h W^2 - p - \rho W \right) \end{align*}

where \({\tilde D}\), \({\tilde S}_i\), and \({\tilde \tau}\) are a generalized mass-energy density, momentum density, and specific internal energy density as measured by an Eulerian observer, \(\gamma\) is the determinant of the spatial metric, \(\rho\) is the rest mass density, \(W = 1/\sqrt{1-v_i v^i}\) is the Lorentz factor, \(h = 1 + \epsilon + \frac{p}{\rho}\) is the specific enthalpy, \(v_i\) is the spatial velocity, \(\epsilon\) is the specific internal energy, and \(p\) is the pressure.

Using the definitions of the Lorentz factor and the specific enthalpy, the last equation can be rewritten in a form that has a well-behaved Newtonian limit:

\[ {\tilde \tau} = \sqrt{\gamma} W^2 \left[ \rho \left( \epsilon + v^2 \frac{W}{W + 1} \right) + p v^2 \right] .\]


The documentation for this struct was generated from the following file: