SpECTRE  2021.08.02
Equations of State

The various available equations of state. More...

Classes

class  EquationsOfState::DarkEnergyFluid< IsRelativistic >
 Equation of state for a dark energy fluid. More...
 
class  EquationsOfState::EquationOfState< IsRelativistic, ThermodynamicDim >
 Base class for equations of state depending on whether or not the system is relativistic, and the number of independent thermodynamic variables (ThermodynamicDim) needed to determine the pressure. More...
 
class  EquationsOfState::EquationOfState< IsRelativistic, 1 >
 Base class for equations of state which need one thermodynamic variable in order to determine the pressure. More...
 
class  EquationsOfState::EquationOfState< IsRelativistic, 2 >
 Base class for equations of state which need two independent thermodynamic variables in order to determine the pressure. More...
 
class  EquationsOfState::IdealFluid< IsRelativistic >
 Equation of state for an ideal fluid. More...
 
class  EquationsOfState::PolytropicFluid< IsRelativistic >
 Equation of state for a polytropic fluid. More...
 

Macros

#define EQUATION_OF_STATE_FORWARD_DECLARE_MEMBERS(DERIVED, DIM)
 Macro used to generate forward declarations of member functions in derived classes. More...
 
template<typename DataType , size_t ThermodynamicDim>
void hydro::sound_speed_squared (gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &rest_mass_density, const Scalar< DataType > &specific_internal_energy, const Scalar< DataType > &specific_enthalpy, const EquationsOfState::EquationOfState< true, ThermodynamicDim > &equation_of_state) noexcept
 Computes the relativistic sound speed squared. More...
 
template<typename DataType , size_t ThermodynamicDim>
Scalar< DataType > hydro::sound_speed_squared (const Scalar< DataType > &rest_mass_density, const Scalar< DataType > &specific_internal_energy, const Scalar< DataType > &specific_enthalpy, const EquationsOfState::EquationOfState< true, ThermodynamicDim > &equation_of_state) noexcept
 Computes the relativistic sound speed squared. More...
 
template<typename DataType >
void hydro::relativistic_specific_enthalpy (gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &rest_mass_density, const Scalar< DataType > &specific_internal_energy, const Scalar< DataType > &pressure) noexcept
 Computes the relativistic specific enthalpy \(h\) as: \( h = 1 + \epsilon + \frac{p}{\rho} \) where \(\epsilon\) is the specific internal energy, \(p\) is the pressure, and \(\rho\) is the rest mass density.
 
template<typename DataType >
Scalar< DataType > hydro::relativistic_specific_enthalpy (const Scalar< DataType > &rest_mass_density, const Scalar< DataType > &specific_internal_energy, const Scalar< DataType > &pressure) noexcept
 Computes the relativistic specific enthalpy \(h\) as: \( h = 1 + \epsilon + \frac{p}{\rho} \) where \(\epsilon\) is the specific internal energy, \(p\) is the pressure, and \(\rho\) is the rest mass density.
 

Detailed Description

The various available equations of state.

Macro Definition Documentation

◆ EQUATION_OF_STATE_FORWARD_DECLARE_MEMBERS

#define EQUATION_OF_STATE_FORWARD_DECLARE_MEMBERS (   DERIVED,
  DIM 
)
Value:
BOOST_PP_LIST_FOR_EACH( \
EQUATION_OF_STATE_FORWARD_DECLARE_MEMBERS_HELPER, DIM, \
BOOST_PP_TUPLE_TO_LIST(BOOST_PP_TUPLE_ELEM( \
BOOST_PP_SUB(DIM, 1), \
(EQUATION_OF_STATE_FUNCTIONS_1D, EQUATION_OF_STATE_FUNCTIONS_2D)))) \
\
/* clang-tidy: do not use non-const references */ \
void pup(PUP::er& p) noexcept override; /* NOLINT */ \
\
explicit DERIVED(CkMigrateMessage* /*unused*/) noexcept;

Macro used to generate forward declarations of member functions in derived classes.

Function Documentation

◆ sound_speed_squared() [1/2]

template<typename DataType , size_t ThermodynamicDim>
Scalar< DataType > hydro::sound_speed_squared ( const Scalar< DataType > &  rest_mass_density,
const Scalar< DataType > &  specific_internal_energy,
const Scalar< DataType > &  specific_enthalpy,
const EquationsOfState::EquationOfState< true, ThermodynamicDim > &  equation_of_state 
)
noexcept

Computes the relativistic sound speed squared.

The relativistic sound speed squared is given by \(c_s^2 = \left(\chi + p\kappa / \rho^2\right)/h\), where \(p\) is the fluid pressure, \(\rho\) is the rest mass density, \(h = 1 + \epsilon + p / \rho\) is the specific enthalpy \(\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 hydro::sound_speed_squared ( gsl::not_null< Scalar< DataType > * >  result,
const Scalar< DataType > &  rest_mass_density,
const Scalar< DataType > &  specific_internal_energy,
const Scalar< DataType > &  specific_enthalpy,
const EquationsOfState::EquationOfState< true, ThermodynamicDim > &  equation_of_state 
)
noexcept

Computes the relativistic sound speed squared.

The relativistic sound speed squared is given by \(c_s^2 = \left(\chi + p\kappa / \rho^2\right)/h\), where \(p\) is the fluid pressure, \(\rho\) is the rest mass density, \(h = 1 + \epsilon + p / \rho\) is the specific enthalpy \(\chi = (\partial p/\partial\rho)_\epsilon\) and \(\kappa = (\partial p/ \partial \epsilon)_\rho\), where \(\epsilon\) is the specific internal energy.