SpECTRE  2021.08.02
NewtonianEuler Namespace Reference

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

Namespaces

namespace  AnalyticData
 Holds classes implementing analytic data for the NewtonianEuler system.
 
namespace  BoundaryConditions
 Boundary conditions for the Newtonian Euler hydrodynamics system.
 
namespace  BoundaryCorrections
 Boundary corrections/numerical fluxes.
 
namespace  fd
 Finite difference functionality for Newtonian Euler.
 
namespace  Solutions
 Holds classes implementing a solution to the Newtonian Euler system.
 
namespace  Sources
 
namespace  subcell
 Code required by the DG-subcell/FD hybrid solver.
 
namespace  Tags
 Tags for the conservative formulation of the Newtonian Euler system
 

Classes

struct  ComputeFluxes
 Compute the fluxes of the conservative variables of the Newtonian Euler system. More...
 
struct  ComputeSources
 Compute the source terms for the NewtonianEuler evolution using a problem-specific source. More...
 
struct  ConservativeFromPrimitive
 Compute the conservative variables from the primitive variables. More...
 
struct  PrimitiveFromConservative
 Compute the primitive variables from the conservative variables. More...
 
struct  System
 
struct  TimeDerivativeTerms
 Compute the time derivative of the conserved variables for the Newtonian Euler system. More...
 

Functions

template<size_t Dim>
void characteristic_speeds (gsl::not_null< std::array< DataVector, Dim+2 > * > char_speeds, const tnsr::I< DataVector, Dim > &velocity, const Scalar< DataVector > &sound_speed, const tnsr::i< DataVector, Dim > &normal) noexcept
 Compute the characteristic speeds of NewtonianEuler system. More...
 
template<size_t Dim>
std::array< DataVector, Dim+2 > characteristic_speeds (const tnsr::I< DataVector, Dim > &velocity, const Scalar< DataVector > &sound_speed, const tnsr::i< DataVector, Dim > &normal) noexcept
 Compute the characteristic speeds of NewtonianEuler system. More...
 
template<size_t Dim>
Matrix right_eigenvectors (const tnsr::I< double, Dim > &velocity, const Scalar< double > &sound_speed_squared, const Scalar< double > &specific_enthalpy, const Scalar< double > &kappa_over_density, const tnsr::i< double, Dim > &unit_normal) noexcept
 Compute the transform matrices between the conserved variables and the characteristic variables of the NewtonianEuler system. More...
 
template<size_t Dim>
Matrix left_eigenvectors (const tnsr::I< double, Dim > &velocity, const Scalar< double > &sound_speed_squared, const Scalar< double > &specific_enthalpy, const Scalar< double > &kappa_over_density, const tnsr::i< double, Dim > &unit_normal) noexcept
 Compute the transform matrices between the conserved variables and the characteristic variables of the NewtonianEuler system. More...
 
template<typename DataType >
void internal_energy_density (gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &mass_density, const Scalar< DataType > &specific_internal_energy) noexcept
 
template<typename DataType >
Scalar< DataType > internal_energy_density (const Scalar< DataType > &mass_density, const Scalar< DataType > &specific_internal_energy) noexcept
 
template<typename DataType , size_t Dim, typename Fr >
void kinetic_energy_density (gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &mass_density, const tnsr::I< DataType, Dim, Fr > &velocity) noexcept
 
template<typename DataType , size_t Dim, typename Fr >
Scalar< DataType > kinetic_energy_density (const Scalar< DataType > &mass_density, const tnsr::I< DataType, Dim, Fr > &velocity) noexcept
 
template<typename DataType , size_t Dim, typename Fr >
void mach_number (gsl::not_null< Scalar< DataType > * > result, const tnsr::I< DataType, Dim, Fr > &velocity, const Scalar< DataType > &sound_speed) noexcept
 
template<typename DataType , size_t Dim, typename Fr >
Scalar< DataType > mach_number (const tnsr::I< DataType, Dim, Fr > &velocity, const Scalar< DataType > &sound_speed) noexcept
 
template<typename DataType , size_t Dim, typename Fr >
void ram_pressure (gsl::not_null< tnsr::II< DataType, Dim, Fr > * > result, const Scalar< DataType > &mass_density, const tnsr::I< DataType, Dim, Fr > &velocity) noexcept
 
template<typename DataType , size_t Dim, typename Fr >
tnsr::II< DataType, Dim, Fr > ram_pressure (const Scalar< DataType > &mass_density, const tnsr::I< DataType, Dim, Fr > &velocity) noexcept
 
template<typename DataType , size_t ThermodynamicDim>
void sound_speed_squared (gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &mass_density, const Scalar< DataType > &specific_internal_energy, const EquationsOfState::EquationOfState< false, ThermodynamicDim > &equation_of_state) noexcept
 
template<typename DataType , size_t ThermodynamicDim>
Scalar< DataType > sound_speed_squared (const Scalar< DataType > &mass_density, const Scalar< DataType > &specific_internal_energy, const EquationsOfState::EquationOfState< false, ThermodynamicDim > &equation_of_state) noexcept
 
template<typename DataType , size_t Dim, typename Fr >
void specific_kinetic_energy (gsl::not_null< Scalar< DataType > * > result, const tnsr::I< DataType, Dim, Fr > &velocity) noexcept
 
template<typename DataType , size_t Dim, typename Fr >
Scalar< DataType > specific_kinetic_energy (const tnsr::I< DataType, Dim, Fr > &velocity) noexcept
 

Detailed Description

Items related to evolving the Newtonian Euler system.

Function Documentation

◆ characteristic_speeds() [1/2]

template<size_t Dim>
std::array< DataVector, Dim+2 > NewtonianEuler::characteristic_speeds ( const tnsr::I< DataVector, Dim > &  velocity,
const Scalar< DataVector > &  sound_speed,
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.

◆ characteristic_speeds() [2/2]

template<size_t Dim>
void NewtonianEuler::characteristic_speeds ( gsl::not_null< std::array< DataVector, Dim+2 > * >  char_speeds,
const tnsr::I< DataVector, Dim > &  velocity,
const Scalar< DataVector > &  sound_speed,
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.

◆ internal_energy_density() [1/2]

template<typename DataType >
Scalar< DataType > NewtonianEuler::internal_energy_density ( const Scalar< DataType > &  mass_density,
const Scalar< DataType > &  specific_internal_energy 
)
noexcept

Compute the internal energy density, \(\rho \epsilon\), where \(\rho\) is the mass density, and \(\epsilon\) is the specific internal energy.

◆ internal_energy_density() [2/2]

template<typename DataType >
void NewtonianEuler::internal_energy_density ( gsl::not_null< Scalar< DataType > * >  result,
const Scalar< DataType > &  mass_density,
const Scalar< DataType > &  specific_internal_energy 
)
noexcept

Compute the internal energy density, \(\rho \epsilon\), where \(\rho\) is the mass density, and \(\epsilon\) is the specific internal energy.

◆ kinetic_energy_density() [1/2]

template<typename DataType , size_t Dim, typename Fr >
Scalar< DataType > NewtonianEuler::kinetic_energy_density ( const Scalar< DataType > &  mass_density,
const tnsr::I< DataType, Dim, Fr > &  velocity 
)
noexcept

Compute the kinetic energy density, \(\rho v^2/2\), where \(\rho\) is the mass density, and \(v\) is the magnitude of the velocity.

◆ kinetic_energy_density() [2/2]

template<typename DataType , size_t Dim, typename Fr >
void NewtonianEuler::kinetic_energy_density ( gsl::not_null< Scalar< DataType > * >  result,
const Scalar< DataType > &  mass_density,
const tnsr::I< DataType, Dim, Fr > &  velocity 
)
noexcept

Compute the kinetic energy density, \(\rho v^2/2\), where \(\rho\) is the mass density, and \(v\) is the magnitude of the velocity.

◆ left_eigenvectors()

template<size_t Dim>
Matrix NewtonianEuler::left_eigenvectors ( const tnsr::I< double, Dim > &  velocity,
const Scalar< double > &  sound_speed_squared,
const Scalar< double > &  specific_enthalpy,
const Scalar< double > &  kappa_over_density,
const tnsr::i< double, Dim > &  unit_normal 
)
noexcept

Compute the transform matrices between the conserved variables and the characteristic variables of the NewtonianEuler system.

Let \(u\) be the conserved (i.e., evolved) variables of the Newtonian Euler system, and \(w\) the characteristic variables of this system with respect to a unit normal one form \(n_i\). The function left_eigenvectors computes the matrix \(\Omega_{L}\) corresponding to the transform \(w = \Omega_{L} u\). The function right_eigenvectors computes the matrix \(\Omega_{R}\) corresponding to the inverse transform \(u = \Omega_{R} w\). Here the components of \(u\) are ordered as \(u = \{\rho, \rho v_x, \rho v_y, \rho v_z, e\}\) in 3D, and the components of \(w\) are ordered by their corresponding eigenvalues (i.e., characteristic speeds) \(\lambda = \{v_n - c_s, v_n, v_n, v_n, v_n + c_s\}\). In these expressions, \(\rho\) is the fluid mass density, \(v_{x,y,z}\) are the components of the fluid velocity, \(e\) is the total energy density, \(v_n\) is the component of the velocity along the unit normal \(n_i\), and \(c_s\) is the sound speed.

For a short discussion of the characteristic transformation and the matrices \(\Omega_{L}\) and \(\Omega_{R}\), see [70] Chapter 3.

Here we briefly summarize the procedure. With \(F^x(u)\) the Newtonian Euler flux in direction \(x\), then the flux Jacobian along \(x\) is the matrix \(A_x = \partial F^x_{\beta}(u) / \partial u_{\alpha}\). The indices \(\alpha, \beta\) range over the different evolved fields. In higher dimensions, the flux Jacobian along the unit normal \(n_i\) is \(A = n_x A_x + n_y A_y + n_z A_z\). This matrix can be diagonalized as \(A = \Omega_{R} \Lambda \Omega_{L}\). Here \(\Lambda = \mathrm{diag}(v_n - c_s, v_n, v_n, v_n, v_n + c_s)\) is a diagonal matrix containing the characteristic speeds; \(\Omega_{R}\) is a matrix whose columns are the right eigenvectors of \(A\); \(\Omega_{L}\) is the inverse of \(R\).

◆ mach_number() [1/2]

template<typename DataType , size_t Dim, typename Fr >
Scalar< DataType > NewtonianEuler::mach_number ( const tnsr::I< DataType, Dim, Fr > &  velocity,
const Scalar< DataType > &  sound_speed 
)
noexcept

Compute the local Mach number, \(\text{Ma} = v/c_s\), where \(v\) is the magnitude of the velocity, and \(c_s\) is the sound speed.

◆ mach_number() [2/2]

template<typename DataType , size_t Dim, typename Fr >
void NewtonianEuler::mach_number ( gsl::not_null< Scalar< DataType > * >  result,
const tnsr::I< DataType, Dim, Fr > &  velocity,
const Scalar< DataType > &  sound_speed 
)
noexcept

Compute the local Mach number, \(\text{Ma} = v/c_s\), where \(v\) is the magnitude of the velocity, and \(c_s\) is the sound speed.

◆ ram_pressure() [1/2]

template<typename DataType , size_t Dim, typename Fr >
tnsr::II< DataType, Dim, Fr > NewtonianEuler::ram_pressure ( const Scalar< DataType > &  mass_density,
const tnsr::I< DataType, Dim, Fr > &  velocity 
)
noexcept

Compute the ram pressure, \(\rho v^i v^j\), where \(\rho\) is the mass density, and \(v^i\) is the velocity.

◆ ram_pressure() [2/2]

template<typename DataType , size_t Dim, typename Fr >
void NewtonianEuler::ram_pressure ( gsl::not_null< tnsr::II< DataType, Dim, Fr > * >  result,
const Scalar< DataType > &  mass_density,
const tnsr::I< DataType, Dim, Fr > &  velocity 
)
noexcept

Compute the ram pressure, \(\rho v^i v^j\), where \(\rho\) is the mass density, and \(v^i\) is the velocity.

◆ right_eigenvectors()

template<size_t Dim>
Matrix NewtonianEuler::right_eigenvectors ( const tnsr::I< double, Dim > &  velocity,
const Scalar< double > &  sound_speed_squared,
const Scalar< double > &  specific_enthalpy,
const Scalar< double > &  kappa_over_density,
const tnsr::i< double, Dim > &  unit_normal 
)
noexcept

Compute the transform matrices between the conserved variables and the characteristic variables of the NewtonianEuler system.

Let \(u\) be the conserved (i.e., evolved) variables of the Newtonian Euler system, and \(w\) the characteristic variables of this system with respect to a unit normal one form \(n_i\). The function left_eigenvectors computes the matrix \(\Omega_{L}\) corresponding to the transform \(w = \Omega_{L} u\). The function right_eigenvectors computes the matrix \(\Omega_{R}\) corresponding to the inverse transform \(u = \Omega_{R} w\). Here the components of \(u\) are ordered as \(u = \{\rho, \rho v_x, \rho v_y, \rho v_z, e\}\) in 3D, and the components of \(w\) are ordered by their corresponding eigenvalues (i.e., characteristic speeds) \(\lambda = \{v_n - c_s, v_n, v_n, v_n, v_n + c_s\}\). In these expressions, \(\rho\) is the fluid mass density, \(v_{x,y,z}\) are the components of the fluid velocity, \(e\) is the total energy density, \(v_n\) is the component of the velocity along the unit normal \(n_i\), and \(c_s\) is the sound speed.

For a short discussion of the characteristic transformation and the matrices \(\Omega_{L}\) and \(\Omega_{R}\), see [70] Chapter 3.

Here we briefly summarize the procedure. With \(F^x(u)\) the Newtonian Euler flux in direction \(x\), then the flux Jacobian along \(x\) is the matrix \(A_x = \partial F^x_{\beta}(u) / \partial u_{\alpha}\). The indices \(\alpha, \beta\) range over the different evolved fields. In higher dimensions, the flux Jacobian along the unit normal \(n_i\) is \(A = n_x A_x + n_y A_y + n_z A_z\). This matrix can be diagonalized as \(A = \Omega_{R} \Lambda \Omega_{L}\). Here \(\Lambda = \mathrm{diag}(v_n - c_s, v_n, v_n, v_n, v_n + c_s)\) is a diagonal matrix containing the characteristic speeds; \(\Omega_{R}\) is a matrix whose columns are the right eigenvectors of \(A\); \(\Omega_{L}\) is the inverse of \(R\).

◆ sound_speed_squared() [1/2]

template<typename DataType , size_t ThermodynamicDim>
Scalar< DataType > NewtonianEuler::sound_speed_squared ( const Scalar< DataType > &  mass_density,
const Scalar< DataType > &  specific_internal_energy,
const EquationsOfState::EquationOfState< false, ThermodynamicDim > &  equation_of_state 
)
noexcept

Compute the Newtonian sound speed squared \(c_s^2 = \chi + p\kappa / \rho^2\), where \(p\) is the fluid pressure, \(\rho\) is the mass density, \(\chi = (\partial p/\partial\rho)_\epsilon\) and \(\kappa = (\partial p/ \partial \epsilon)_\rho\), where \(\epsilon\) is the specific internal energy.

◆ sound_speed_squared() [2/2]

template<typename DataType , size_t ThermodynamicDim>
void NewtonianEuler::sound_speed_squared ( gsl::not_null< Scalar< DataType > * >  result,
const Scalar< DataType > &  mass_density,
const Scalar< DataType > &  specific_internal_energy,
const EquationsOfState::EquationOfState< false, ThermodynamicDim > &  equation_of_state 
)
noexcept

Compute the Newtonian sound speed squared \(c_s^2 = \chi + p\kappa / \rho^2\), where \(p\) is the fluid pressure, \(\rho\) is the mass density, \(\chi = (\partial p/\partial\rho)_\epsilon\) and \(\kappa = (\partial p/ \partial \epsilon)_\rho\), where \(\epsilon\) is the specific internal energy.

◆ specific_kinetic_energy() [1/2]

template<typename DataType , size_t Dim, typename Fr >
Scalar< DataType > NewtonianEuler::specific_kinetic_energy ( const tnsr::I< DataType, Dim, Fr > &  velocity)
noexcept

Compute the specific kinetic energy, \(v^2/2\), where \(v\) is the magnitude of the velocity.

◆ specific_kinetic_energy() [2/2]

template<typename DataType , size_t Dim, typename Fr >
void NewtonianEuler::specific_kinetic_energy ( gsl::not_null< Scalar< DataType > * >  result,
const tnsr::I< DataType, Dim, Fr > &  velocity 
)
noexcept

Compute the specific kinetic energy, \(v^2/2\), where \(v\) is the magnitude of the velocity.