SpECTRE  v2024.09.29
EquationsOfState::IdealFluid< IsRelativistic > Class Template Reference

Equation of state for an ideal fluid. More...

#include <IdealFluid.hpp>

Classes

struct  AdiabaticIndex
 

Public Types

using options = tmpl::list< AdiabaticIndex >
 
- Public Types inherited from EquationsOfState::EquationOfState< IsRelativistic, 2 >
using creatable_classes = typename detail::DerivedClasses< IsRelativistic, 2 >::type
 

Public Member Functions

 IdealFluid (const IdealFluid &)=default
 
IdealFluidoperator= (const IdealFluid &)=default
 
 IdealFluid (IdealFluid &&)=default
 
IdealFluidoperator= (IdealFluid &&)=default
 
 IdealFluid (double adiabatic_index)
 
std::unique_ptr< EquationOfState< IsRelativistic, 2 > > get_clone () const override
 
std::unique_ptr< EquationOfState< IsRelativistic, 3 > > promote_to_3d_eos () const override
 
bool is_barotropic () const override
 Returns true if the EOS is barotropic. More...
 
bool operator== (const IdealFluid< IsRelativistic > &rhs) const
 
bool operator!= (const IdealFluid< IsRelativistic > &rhs) const
 
bool is_equal (const EquationOfState< IsRelativistic, 2 > &rhs) const override
 
 WRAPPED_PUPable_decl_base_template (SINGLE_ARG(EquationOfState< IsRelativistic, 2 >), IdealFluid)
 
double rest_mass_density_lower_bound () const override
 The lower bound of the rest mass density that is valid for this EOS. More...
 
double rest_mass_density_upper_bound () const override
 The upper bound of the rest mass density that is valid for this EOS. More...
 
double specific_internal_energy_lower_bound (const double) const override
 The lower bound of the specific internal energy that is valid for this EOS at the given rest mass density \(\rho\). More...
 
double specific_internal_energy_upper_bound (double rest_mass_density) const override
 The upper bound of the specific internal energy that is valid for this EOS at the given rest mass density \(\rho\). More...
 
double specific_enthalpy_lower_bound () const override
 The lower bound of the specific enthalpy that is valid for this EOS. More...
 
double baryon_mass () const override
 The vacuum baryon mass for this EoS. More...
 
- Public Member Functions inherited from EquationsOfState::EquationOfState< IsRelativistic, 2 >
 EquationOfState (const EquationOfState &)=default
 
EquationOfStateoperator= (const EquationOfState &)=default
 
 EquationOfState (EquationOfState &&)=default
 
EquationOfStateoperator= (EquationOfState &&)=default
 
 EquationOfState (CkMigrateMessage *msg)
 
 WRAPPED_PUPable_abstract (EquationOfState)
 
virtual std::unique_ptr< EquationOfState< IsRelativistic, 2 > > get_clone () const =0
 
virtual bool is_equal (const EquationOfState< IsRelativistic, 2 > &rhs) const =0
 
virtual std::unique_ptr< EquationOfState< IsRelativistic, 2 > > promote_to_2d_eos () const
 
virtual std::unique_ptr< EquationOfState< IsRelativistic, 3 > > promote_to_3d_eos () const =0
 
virtual bool is_barotropic () const =0
 Returns true if the EOS is barotropic. More...
 
virtual bool is_equilibrium () const
 Returns true if the EOS is in beta-equilibrium.
 
virtual double electron_fraction_lower_bound () const
 The lower bound of the electron fraction that is valid for this EOS.
 
virtual double electron_fraction_upper_bound () const
 The upper bound of the electron fraction that is valid for this EOS.
 
virtual double rest_mass_density_lower_bound () const =0
 The lower bound of the rest mass density that is valid for this EOS. More...
 
virtual double rest_mass_density_upper_bound () const =0
 The upper bound of the rest mass density that is valid for this EOS. More...
 
virtual double specific_internal_energy_lower_bound (const double rest_mass_density) const =0
 The lower bound of the specific internal energy that is valid for this EOS at the given rest mass density \(\rho\). More...
 
virtual double specific_internal_energy_upper_bound (const double rest_mass_density) const =0
 The upper bound of the specific internal energy that is valid for this EOS at the given rest mass density \(\rho\). More...
 
virtual double temperature_lower_bound () const
 The lower bound of the temperature that is valid for this EOS.
 
virtual double temperature_upper_bound () const
 The upper bound of the temperature that is valid for this EOS.
 
virtual double specific_enthalpy_lower_bound () const =0
 The lower bound of the specific enthalpy that is valid for this EOS. More...
 
virtual double baryon_mass () const
 The vacuum mass of a baryon for this EOS. More...
 
virtual Scalar< double > equilibrium_electron_fraction_from_density_temperature (const Scalar< double > &rest_mass_density, const Scalar< double > &) const
 
virtual Scalar< DataVectorequilibrium_electron_fraction_from_density_temperature (const Scalar< DataVector > &rest_mass_density, const Scalar< DataVector > &) const
 
virtual Scalar< double > pressure_from_density_and_energy (const Scalar< double > &, const Scalar< double > &) const =0
 
virtual Scalar< DataVectorpressure_from_density_and_energy (const Scalar< DataVector > &, const Scalar< DataVector > &) const =0
 
virtual Scalar< double > pressure_from_density_and_enthalpy (const Scalar< double > &, const Scalar< double > &) const =0
 
virtual Scalar< DataVectorpressure_from_density_and_enthalpy (const Scalar< DataVector > &, const Scalar< DataVector > &) const =0
 
virtual Scalar< double > specific_internal_energy_from_density_and_pressure (const Scalar< double > &, const Scalar< double > &) const =0
 
virtual Scalar< DataVectorspecific_internal_energy_from_density_and_pressure (const Scalar< DataVector > &, const Scalar< DataVector > &) const =0
 
virtual Scalar< double > temperature_from_density_and_energy (const Scalar< double > &, const Scalar< double > &) const =0
 
virtual Scalar< DataVectortemperature_from_density_and_energy (const Scalar< DataVector > &, const Scalar< DataVector > &) const =0
 
virtual Scalar< double > specific_internal_energy_from_density_and_temperature (const Scalar< double > &, const Scalar< double > &) const =0
 
virtual Scalar< DataVectorspecific_internal_energy_from_density_and_temperature (const Scalar< DataVector > &, const Scalar< DataVector > &) const =0
 
virtual Scalar< double > chi_from_density_and_energy (const Scalar< double > &, const Scalar< double > &) const =0
 
virtual Scalar< DataVectorchi_from_density_and_energy (const Scalar< DataVector > &, const Scalar< DataVector > &) const =0
 
virtual Scalar< double > kappa_times_p_over_rho_squared_from_density_and_energy (const Scalar< double > &, const Scalar< double > &) const =0
 
virtual Scalar< DataVectorkappa_times_p_over_rho_squared_from_density_and_energy (const Scalar< DataVector > &, const Scalar< DataVector > &) const =0
 

Static Public Attributes

static constexpr size_t thermodynamic_dim = 2
 
static constexpr bool is_relativistic = IsRelativistic
 
static constexpr Options::String help
 
- Static Public Attributes inherited from EquationsOfState::EquationOfState< IsRelativistic, 2 >
static constexpr bool is_relativistic = IsRelativistic
 
static constexpr size_t thermodynamic_dim = 2
 

Detailed Description

template<bool IsRelativistic>
class EquationsOfState::IdealFluid< IsRelativistic >

Equation of state for an ideal fluid.

An ideal fluid equation of state:

\[ p = \rho \epsilon(\gamma-1) \]

where \(\rho\) is the rest mass density, \(\epsilon\) is the specific internal energy, and \(\gamma\) is the adiabatic index.

The temperature \(T\) is defined as

\[ T = (\gamma - 1) \epsilon \]

Member Function Documentation

◆ baryon_mass()

template<bool IsRelativistic>
double EquationsOfState::IdealFluid< IsRelativistic >::baryon_mass ( ) const
inlineoverridevirtual

The vacuum baryon mass for this EoS.

Reimplemented from EquationsOfState::EquationOfState< IsRelativistic, 2 >.

◆ get_clone()

template<bool IsRelativistic>
std::unique_ptr< EquationOfState< IsRelativistic, 2 > > EquationsOfState::IdealFluid< IsRelativistic >::get_clone ( ) const
overridevirtual

◆ is_barotropic()

template<bool IsRelativistic>
bool EquationsOfState::IdealFluid< IsRelativistic >::is_barotropic ( ) const
inlineoverridevirtual

Returns true if the EOS is barotropic.

Implements EquationsOfState::EquationOfState< IsRelativistic, 2 >.

◆ is_equal()

template<bool IsRelativistic>
bool EquationsOfState::IdealFluid< IsRelativistic >::is_equal ( const EquationOfState< IsRelativistic, 2 > &  rhs) const
overridevirtual

◆ promote_to_3d_eos()

template<bool IsRelativistic>
std::unique_ptr< EquationOfState< IsRelativistic, 3 > > EquationsOfState::IdealFluid< IsRelativistic >::promote_to_3d_eos ( ) const
overridevirtual

◆ rest_mass_density_lower_bound()

template<bool IsRelativistic>
double EquationsOfState::IdealFluid< IsRelativistic >::rest_mass_density_lower_bound ( ) const
inlineoverridevirtual

The lower bound of the rest mass density that is valid for this EOS.

Implements EquationsOfState::EquationOfState< IsRelativistic, 2 >.

◆ rest_mass_density_upper_bound()

template<bool IsRelativistic>
double EquationsOfState::IdealFluid< IsRelativistic >::rest_mass_density_upper_bound ( ) const
inlineoverridevirtual

The upper bound of the rest mass density that is valid for this EOS.

Implements EquationsOfState::EquationOfState< IsRelativistic, 2 >.

◆ specific_enthalpy_lower_bound()

template<bool IsRelativistic>
double EquationsOfState::IdealFluid< IsRelativistic >::specific_enthalpy_lower_bound ( ) const
inlineoverridevirtual

The lower bound of the specific enthalpy that is valid for this EOS.

Implements EquationsOfState::EquationOfState< IsRelativistic, 2 >.

◆ specific_internal_energy_lower_bound()

template<bool IsRelativistic>
double EquationsOfState::IdealFluid< IsRelativistic >::specific_internal_energy_lower_bound ( const double  ) const
inlineoverridevirtual

The lower bound of the specific internal energy that is valid for this EOS at the given rest mass density \(\rho\).

Implements EquationsOfState::EquationOfState< IsRelativistic, 2 >.

◆ specific_internal_energy_upper_bound()

template<bool IsRelativistic>
double EquationsOfState::IdealFluid< IsRelativistic >::specific_internal_energy_upper_bound ( double  rest_mass_density) const
overridevirtual

The upper bound of the specific internal energy that is valid for this EOS at the given rest mass density \(\rho\).

Implements EquationsOfState::EquationOfState< IsRelativistic, 2 >.

Member Data Documentation

◆ help

template<bool IsRelativistic>
constexpr Options::String EquationsOfState::IdealFluid< IsRelativistic >::help
staticconstexpr
Initial value:
= {
"An ideal fluid equation of state.\n"
"The pressure is related to the rest mass density by p = rho * epsilon * "
"(gamma - 1), where p is the pressure, rho is the rest mass density, "
"epsilon is the specific internal energy, and gamma is the adiabatic "
"index.\n"
"The temperature T is defined as T=epsilon."}

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