SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
NewtonianEuler::PrimitiveFromConservative< Dim > Struct Template Reference

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

#include <PrimitiveFromConservative.hpp>

Public Types

using return_tags
using argument_tags

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.

\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)\).

Member Typedef Documentation

◆ argument_tags

template<size_t Dim>
using NewtonianEuler::PrimitiveFromConservative< Dim >::argument_tags
Initial value:
tmpl::list<Tags::MassDensityCons, Tags::MomentumDensity<Dim>,
The energy density of the fluid.
Definition Tags.hpp:46
The equation of state retrieved from the analytic solution / data in the input file.
Definition Tags.hpp:112

◆ return_tags

template<size_t Dim>
using NewtonianEuler::PrimitiveFromConservative< Dim >::return_tags
Initial value:
tmpl::list<hydro::Tags::RestMassDensity<DataVector>,
The fluid pressure .
Definition Tags.hpp:234
The spatial velocity of the fluid, where . Here is the spatial part of the 4-velocity of the fluid,...
Definition Tags.hpp:257
The specific internal energy .
Definition Tags.hpp:286

The documentation for this struct was generated from the following file:
  • src/Evolution/Systems/NewtonianEuler/PrimitiveFromConservative.hpp