SpECTRE  v2024.04.12
NewtonianEuler::ConservativeFromPrimitive< Dim > Struct Template Reference

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

#include <ConservativeFromPrimitive.hpp>

Public Types

using return_tags = tmpl::list< Tags::MassDensityCons, Tags::MomentumDensity< Dim >, Tags::EnergyDensity >
 
using argument_tags = tmpl::list< hydro::Tags::RestMassDensity< DataVector >, hydro::Tags::SpatialVelocity< DataVector, Dim >, hydro::Tags::SpecificInternalEnergy< DataVector > >
 

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.


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