SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
EquationsOfState::PiecewisePolytropicFluid< IsRelativistic > Class Template Reference

Equation of state for a piecewise polytropic fluid. More...

#include <PiecewisePolytropicFluid.hpp>

Classes

struct  PiecewisePolytropicTransitionDensity
 The density demarcating the high and low density descriptions of the fluid. More...
struct  PolytropicConstantLow
 The constant \(K\) scaling the low density material \(p=K\rho^{\Gamma}\). More...
struct  PolytropicExponentHigh
 The exponent \(\Gamma\), scaling the high density material \(p=K\rho^{\Gamma}\). More...
struct  PolytropicExponentLow
 The exponent \(\Gamma\), scaling the low density material \(p=K\rho^{\Gamma}\). More...

Public Types

using options
Public Types inherited from EquationsOfState::EquationOfState< IsRelativistic, 1 >
using creatable_classes

Public Member Functions

 PiecewisePolytropicFluid (const PiecewisePolytropicFluid &)=default
PiecewisePolytropicFluidoperator= (const PiecewisePolytropicFluid &)=default
 PiecewisePolytropicFluid (PiecewisePolytropicFluid &&)=default
PiecewisePolytropicFluidoperator= (PiecewisePolytropicFluid &&)=default
 PiecewisePolytropicFluid (double transition_density, double polytropic_constant_lo, double polytropic_exponent_lo, double polytropic_exponent_hi)
std::unique_ptr< EquationOfState< IsRelativistic, 1 > > get_clone () const override
std::unique_ptr< EquationOfState< IsRelativistic, 3 > > promote_to_3d_eos () const override
 Create a 3D EOS from the 1D EOS.
std::unique_ptr< EquationOfState< IsRelativistic, 2 > > promote_to_2d_eos () const override
 Create a 2D EOS from the 1D EOS.
bool is_equal (const EquationOfState< IsRelativistic, 1 > &rhs) const override
bool operator== (const PiecewisePolytropicFluid< IsRelativistic > &rhs) const
bool operator!= (const PiecewisePolytropicFluid< IsRelativistic > &rhs) const
 WRAPPED_PUPable_decl_base_template (SINGLE_ARG(EquationOfState< IsRelativistic, 1 >), PiecewisePolytropicFluid)
double rest_mass_density_lower_bound () const override
 The lower bound of the rest mass density that is valid for this EOS.
double rest_mass_density_upper_bound () const override
 The upper bound of the rest mass density that is valid for this EOS.
double specific_enthalpy_lower_bound () const override
 The lower bound of the specific enthalpy that is valid for this EOS.
double specific_internal_energy_lower_bound () const override
 The lower bound of the specific internal energy that is valid for this EOS.
double specific_internal_energy_upper_bound () const override
 The upper bound of the specific internal energy that is valid for this EOS.
double baryon_mass () const override
 The vacuum baryon mass for this EoS.
Public Member Functions inherited from EquationsOfState::EquationOfState< IsRelativistic, 1 >
 EquationOfState (const EquationOfState &)=default
EquationOfStateoperator= (const EquationOfState &)=default
 EquationOfState (EquationOfState &&)=default
EquationOfStateoperator= (EquationOfState &&)=default
 EquationOfState (CkMigrateMessage *msg)
 WRAPPED_PUPable_abstract (EquationOfState)
bool is_barotropic () const
 Returns true if the EOS is barotropic.
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 (const Scalar< double > &) const =0
virtual Scalar< DataVectorpressure_from_density (const Scalar< DataVector > &) const =0
virtual Scalar< double > rest_mass_density_from_enthalpy (const Scalar< double > &) const =0
virtual Scalar< DataVectorrest_mass_density_from_enthalpy (const Scalar< DataVector > &) const =0
virtual Scalar< double > specific_internal_energy_from_density (const Scalar< double > &) const =0
virtual Scalar< DataVectorspecific_internal_energy_from_density (const Scalar< DataVector > &) const =0
virtual Scalar< double > temperature_from_density (const Scalar< double > &) const
virtual Scalar< DataVectortemperature_from_density (const Scalar< DataVector > &rest_mass_density) const
virtual Scalar< double > temperature_from_specific_internal_energy (const Scalar< double > &) const
virtual Scalar< DataVectortemperature_from_specific_internal_energy (const Scalar< DataVector > &specific_internal_energy) const
virtual Scalar< double > chi_from_density (const Scalar< double > &) const =0
virtual Scalar< DataVectorchi_from_density (const Scalar< DataVector > &) const =0
virtual Scalar< double > kappa_times_p_over_rho_squared_from_density (const Scalar< double > &) const =0
virtual Scalar< DataVectorkappa_times_p_over_rho_squared_from_density (const Scalar< DataVector > &) const =0
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 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.

Static Public Attributes

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

Detailed Description

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

Equation of state for a piecewise polytropic fluid.

A piecewise polytropic equation of state \(p=K_i\rho^{\Gamma_i}\) where \(K_i\) is the polytropic constant and \(\Gamma_i\) is the polytropic exponent. Here the subscript \(i\) indicates two pairs of constants and exponents which characterize ‘the stiffness’ of the matter at low and high densities. For a given density, the polytropic exponent is related to the polytropic index \(N_p\) by \(N_p=1/(\Gamma-1)\). For posterity, this two piece polytrope has been used in toy models of CCSNe (e.g., [62] ) and could be extended to a general "M" number of parts for simplified equations of state for neutron stars (e.g., [157] ). For a reference to a general piecewise polytrope, see Section 2.4.7 of [179].

Member Typedef Documentation

◆ options

template<bool IsRelativistic>
using EquationsOfState::PiecewisePolytropicFluid< IsRelativistic >::options
Initial value:
The density demarcating the high and low density descriptions of the fluid.
Definition PiecewisePolytropicFluid.hpp:52
The constant scaling the low density material .
Definition PiecewisePolytropicFluid.hpp:66
The exponent , scaling the high density material .
Definition PiecewisePolytropicFluid.hpp:86
The exponent , scaling the low density material .
Definition PiecewisePolytropicFluid.hpp:76

Member Function Documentation

◆ baryon_mass()

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

The vacuum baryon mass for this EoS.

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

◆ get_clone()

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

◆ is_equal()

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

◆ promote_to_2d_eos()

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

Create a 2D EOS from the 1D EOS.

Implements EquationsOfState::EquationOfState< IsRelativistic, 1 >.

◆ promote_to_3d_eos()

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

Create a 3D EOS from the 1D EOS.

Implements EquationsOfState::EquationOfState< IsRelativistic, 1 >.

◆ rest_mass_density_lower_bound()

template<bool IsRelativistic>
double EquationsOfState::PiecewisePolytropicFluid< 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, 1 >.

◆ rest_mass_density_upper_bound()

template<bool IsRelativistic>
double EquationsOfState::PiecewisePolytropicFluid< IsRelativistic >::rest_mass_density_upper_bound ( ) const
overridevirtual

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

Implements EquationsOfState::EquationOfState< IsRelativistic, 1 >.

◆ specific_enthalpy_lower_bound()

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

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

Implements EquationsOfState::EquationOfState< IsRelativistic, 1 >.

◆ specific_internal_energy_lower_bound()

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

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

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

◆ specific_internal_energy_upper_bound()

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

The upper bound of the specific internal energy that is valid for this EOS.

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

Member Data Documentation

◆ help

template<bool IsRelativistic>
Options::String EquationsOfState::PiecewisePolytropicFluid< IsRelativistic >::help
staticconstexpr
Initial value:
= {
"A piecewise polytropic fluid equation of state.\n"
"The pressure is related to the rest mass density by p = K_i rho ^ "
"Gamma_i, "
"where p is the pressure, rho is the rest mass density, K_i is the "
"polytropic constant either describing the low or high density material, "
"and Gamma_i is the polytropic exponent for the low or high density "
"material. The polytropic index N_i is defined as Gamma_i = 1 + 1 / N_i."
" The subscript `i' refers to different pairs of Gamma and K that can"
" describe either low or high density material."}

The documentation for this class was generated from the following file:
  • src/PointwiseFunctions/Hydro/EquationsOfState/PiecewisePolytropicFluid.hpp