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

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

#include <ConservativeFromPrimitive.hpp>

Public Types

using return_tags
using argument_tags

Static Public Member Functions

static void apply (gsl::not_null< Scalar< DataVector > * > mass_density_cons, gsl::not_null< tnsr::I< DataVector, Dim > * > momentum_density, gsl::not_null< Scalar< DataVector > * > energy_density, const Scalar< DataVector > &mass_density, const tnsr::I< DataVector, Dim > &velocity, const Scalar< DataVector > &specific_internal_energy)

Detailed Description

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

Compute the conservative variables from the primitive variables.

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

where \(S^i\) is the momentum density, \(e\) is the energy density, \(\rho\) is the mass density, \(v^i\) is the velocity, \(v^2\) is its magnitude squared, and \(\epsilon\) is the specific internal energy. In addition, this method returns the mass density as a conservative.

Member Typedef Documentation

◆ argument_tags

template<size_t Dim>
using NewtonianEuler::ConservativeFromPrimitive< Dim >::argument_tags
Initial value:
tmpl::list<hydro::Tags::RestMassDensity<DataVector>,
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

◆ return_tags

template<size_t Dim>
using NewtonianEuler::ConservativeFromPrimitive< Dim >::return_tags
Initial value:
tmpl::list<Tags::MassDensityCons, Tags::MomentumDensity<Dim>,
The energy density of the fluid.
Definition Tags.hpp:46

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