NewtonianEuler::PrimitiveFromConservative< Dim, ThermodynamicDim > Struct Template Reference

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

#include <PrimitiveFromConservative.hpp>

Public Types

using return_tags = tmpl::list< Tags::MassDensity< DataVector >, Tags::Velocity< DataVector, Dim >, Tags::SpecificInternalEnergy< DataVector >, Tags::Pressure< DataVector > >

using argument_tags = tmpl::list< Tags::MassDensityCons< DataVector >, Tags::MomentumDensity< DataVector, Dim >, Tags::EnergyDensity< DataVector >, hydro::Tags::EquationOfStateBase >

Static Public Member Functions

static void apply (gsl::not_null< Scalar< DataVector > *> mass_density, gsl::not_null< tnsr::I< DataVector, Dim > *> velocity, gsl::not_null< Scalar< DataVector > *> specific_internal_energy, gsl::not_null< Scalar< DataVector > *> pressure, const Scalar< DataVector > &mass_density_cons, const tnsr::I< DataVector, Dim > &momentum_density, const Scalar< DataVector > &energy_density, const EquationsOfState::EquationOfState< false, ThermodynamicDim > &equation_of_state) noexcept

Detailed Description

template<size_t Dim, size_t ThermodynamicDim> struct NewtonianEuler::PrimitiveFromConservative< Dim, ThermodynamicDim >

Compute the primitive variables from the conservative variables.

\begin{align*} v^i &= \frac{S^i}{\rho} \\ \epsilon &= \frac{e}{\rho} - \frac{1}{2}\frac{S^2}{\rho^2} \end{align*}

where $v^i$ is the velocity, $\epsilon$ is the specific internal energy, $e$ is the energy density, $\rho$ is the mass density, $S^i$ is the momentum density, and $S^2$ is the momentum density squared.

This routine also returns the mass density as a primitive, and the pressure from a generic equation of state $p = p(\rho, \epsilon)$.

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