SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
NewtonianEuler::PrimitiveFromConservative< Dim > Struct Template Reference

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

#include <PrimitiveFromConservative.hpp>

Public Types

using return_tags = implementation defined
 
using argument_tags = implementation defined
 

Static Public Member Functions

template<size_t ThermodynamicDim>
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)
 

Detailed Description

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

Compute the primitive variables from the conservative variables.

vi=Siρϵ=eρ12S2ρ2

where vi is the velocity, ϵ is the specific internal energy, e is the energy density, ρ is the mass density, Si is the momentum density, and S2 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(ρ,ϵ).


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