Namespaces | Classes | Functions
NewtonianEuler Namespace Reference

Items related to evolving the Newtonian Euler system. More...

Namespaces

 Solutions
 Holds classes implementing a solution to the Newtonian Euler system.
 
 Sources
 

Classes

struct  ComputeFluxes
 Compute the fluxes of the conservative variables of the Newtonian Euler system. More...
 
struct  System
 

Functions

template<size_t Dim>
std::array< DataVector, Dim+2 > characteristic_speeds (const tnsr::I< DataVector, Dim > &velocity, const Scalar< DataVector > &sound_speed_squared, const tnsr::i< DataVector, Dim > &normal) noexcept
 Compute the characteristic speeds of NewtonianEuler system. More...
 
template<size_t Dim, typename DataType >
void conservative_from_primitive (gsl::not_null< tnsr::I< DataType, Dim > *> momentum_density, gsl::not_null< Scalar< DataType > *> energy_density, const Scalar< DataType > &mass_density, const tnsr::I< DataType, Dim > &velocity, const Scalar< DataType > &specific_internal_energy) noexcept
 Compute the conservative variables from the primitive variables. More...
 
template<size_t Dim, typename DataType >
void primitive_from_conservative (gsl::not_null< tnsr::I< DataType, Dim > *> velocity, gsl::not_null< Scalar< DataType > *> specific_internal_energy, const Scalar< DataType > &mass_density, const tnsr::I< DataType, Dim > &momentum_density, const Scalar< DataType > &energy_density) noexcept
 Compute the primitive variables from the conservative variables. More...
 
template<size_t Dim, typename DataType >
void velocity (gsl::not_null< tnsr::I< DataType, Dim > *> velocity, const Scalar< DataType > &mass_density, const tnsr::I< DataType, Dim > &momentum_density) noexcept
 Compute the velocity from the conservative variables.
 
template<size_t Dim, typename DataType >
tnsr::I< DataType, Dim > velocity (const Scalar< DataType > &mass_density, const tnsr::I< DataType, Dim > &momentum_density) noexcept
 Compute the velocity from the conservative variables.
 

Detailed Description

Items related to evolving the Newtonian Euler system.

Function Documentation

◆ characteristic_speeds()

template<size_t Dim>
std::array<DataVector, Dim + 2> NewtonianEuler::characteristic_speeds ( const tnsr::I< DataVector, Dim > &  velocity,
const Scalar< DataVector > &  sound_speed_squared,
const tnsr::i< DataVector, Dim > &  normal 
)
noexcept

Compute the characteristic speeds of NewtonianEuler system.

The principal symbol of the system is diagonalized so that the elements of the diagonal matrix are the characteristic speeds

\begin{align*} \lambda_1 &= v_n - c_s,\\ \lambda_{i + 1} &= v_n,\\ \lambda_{\text{Dim} + 2} &= v_n + c_s, \end{align*}

where \(i = 1,...,\text{Dim}\), \(v_n = n_i v^i\) is the velocity projected onto the normal, and \(c_s\) is the sound speed.

◆ conservative_from_primitive()

template<size_t Dim, typename DataType >
void NewtonianEuler::conservative_from_primitive ( gsl::not_null< tnsr::I< DataType, Dim > *>  momentum_density,
gsl::not_null< Scalar< DataType > *>  energy_density,
const Scalar< DataType > &  mass_density,
const tnsr::I< DataType, Dim > &  velocity,
const Scalar< DataType > &  specific_internal_energy 
)
noexcept

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.

◆ primitive_from_conservative()

template<size_t Dim, typename DataType >
void NewtonianEuler::primitive_from_conservative ( gsl::not_null< tnsr::I< DataType, Dim > *>  velocity,
gsl::not_null< Scalar< DataType > *>  specific_internal_energy,
const Scalar< DataType > &  mass_density,
const tnsr::I< DataType, Dim > &  momentum_density,
const Scalar< DataType > &  energy_density 
)
noexcept

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.