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

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

#include <PrimitiveFromConservative.hpp>

Public Types

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

Static Public Member Functions

template<size_t ThermodynamicDim>
static void apply (gsl::not_null< Scalar< DataVector > * > rest_mass_density, gsl::not_null< Scalar< DataVector > * > specific_internal_energy, gsl::not_null< Scalar< DataVector > * > lorentz_factor, gsl::not_null< Scalar< DataVector > * > specific_enthalpy, gsl::not_null< Scalar< DataVector > * > pressure, gsl::not_null< tnsr::I< DataVector, Dim, Frame::Inertial > * > spatial_velocity, const Scalar< DataVector > &tilde_d, const Scalar< DataVector > &tilde_tau, const tnsr::i< DataVector, Dim, Frame::Inertial > &tilde_s, const tnsr::II< DataVector, Dim, Frame::Inertial > &inv_spatial_metric, const Scalar< DataVector > &sqrt_det_spatial_metric, const EquationsOfState::EquationOfState< true, ThermodynamicDim > &equation_of_state)
 

Detailed Description

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

Compute the primitive variables from the conservative variables.

For the Valencia formulation of the Relativistic Euler system, the conversion of the evolved conserved variables to the primitive variables cannot be expressed in closed analytic form and requires a root find. We use the method from [Appendix C of Galeazzi et al, PRD 88, 064009 (2013)] (https://journals.aps.org/prd/abstract/10.1103/PhysRevD.88.064009). The method finds the root of

\[ f(z) = z - \frac{r}{h(z)} \]

where

\begin{align*} r = & \frac{\sqrt{\gamma^{mn} {\tilde S}_m {\tilde S}_n}}{\tilde D} \\ h(z) = & [1+ \epsilon(z)][1 + a(z)] \\ \epsilon(z) = & W(z) q - z r + \frac{z^2}{1 + W(z)} \\ W(z) = & \sqrt{1 + z^2} \\ q = & \frac{\tilde \tau}{\tilde D} \\ a(z) = & \frac{p}{\rho(z) [1 + \epsilon(z)]} \\ \rho(z) = & \frac{\tilde D}{\sqrt{\gamma} W(z)} \end{align*}

and where the conserved variables \({\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\) and \(\gamma^{mn}\) are the determinant and inverse of the spatial metric \(\gamma_{mn}\), \(\rho\) is the rest mass density, \(W = 1/\sqrt{1 - \gamma_{mn} v^m v^n}\) 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. The pressure is determined from the equation of state. Finally, once \(z\) is found, the spatial velocity is given by

\[ v^i = \frac{{\tilde S}^i}{{\tilde D} W(z) h(z)} \]


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