Public Types | Static Public Member Functions | List of all members
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< DataVector >, Tags::MomentumDensity< DataVector, Dim >, Tags::EnergyDensity< DataVector > >
using argument_tags = tmpl::list< Tags::MassDensity< DataVector >, Tags::Velocity< DataVector, Dim >, 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) noexcept

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: