SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
EquationsOfState::Enthalpy< LowDensityEoS > Class Template Reference

An equation of state given by parametrized enthalpy. More...

#include <Enthalpy.hpp>

Classes

struct  CosCoefficients
 
struct  MaximumDensity
 
struct  MinimumDensity
 
struct  PolynomialCoefficients
 
struct  ReferenceDensity
 
struct  SinCoefficients
 
struct  StitchedLowDensityEoS
 
struct  TransitionDeltaEpsilon
 
struct  TrigScaling
 

Public Types

using options = implementation defined
 

Public Member Functions

 Enthalpy (const Enthalpy &)=default
 
Enthalpyoperator= (const Enthalpy &)=default
 
 Enthalpy (Enthalpy &&)=default
 
Enthalpyoperator= (Enthalpy &&)=default
 
 Enthalpy (double reference_density, double max_density, double min_density, double trig_scale, const std::vector< double > &polynomial_coefficients, const std::vector< double > &sin_coefficients, const std::vector< double > &cos_coefficients, const LowDensityEoS &low_density_eos, const double transition_delta_epsilon)
 
std::unique_ptr< EquationOfState< true, 1 > > get_clone () const override
 
std::unique_ptr< EquationOfState< true, 3 > > promote_to_3d_eos () const override
 
std::unique_ptr< EquationOfState< true, 2 > > promote_to_2d_eos () const override
 
bool is_equal (const EquationOfState< true, 1 > &rhs) const override
 
bool operator== (const Enthalpy< LowDensityEoS > &rhs) const
 
bool operator!= (const Enthalpy< LowDensityEoS > &rhs) const
 
 WRAPPED_PUPable_decl_base_template (SINGLE_ARG(EquationOfState< true, 1 >), Enthalpy)
 
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.
 

Static Public Member Functions

static std::string name ()
 

Static Public Attributes

static constexpr size_t thermodynamic_dim = 1
 
static constexpr bool is_relativistic = true
 
static constexpr Options::String help
 

Detailed Description

template<typename LowDensityEoS>
class EquationsOfState::Enthalpy< LowDensityEoS >

An equation of state given by parametrized enthalpy.

This equation of state is determined as a function of x=ln(ρ/ρ0) where ρ is the rest mass density and ρ0 is the provided reference density. The pseudo-enthalpy h(p+rho+u)/rho is expanded as

(1)h(x)=iaixi+jbjsin(jkx)+cjcos(jkx)

This form allows for convenient calculation of thermodynamic quantities for a cold equation of state. For example

(2)h(x)=dedρ|x=log(ρ/ρ0)

where e is the total energy density. At the same time dx=dρ/ρ so ρ0exdx=dρ Therefore,

(3)e(x)e(x0)=x0xh(x)exdx

This can be computed analytically because

(4)aixii!exdx=jiai(1)ij(x)jj!+C

and

(5)bjsin(jkx)exdx=bjexsin(jkx)jkcos(jkx)j2k2+1

(6)cjcos(jkx)exdx=bjexcos(jkx)+jksin(jkx)j2k2+1

From this most other thermodynamic quantities can be computed analytically

The internal energy density

(7)ϵ(x)ρ(x)=e(x)ρ(x)

The pressure

(8)p(x)=ρ(x)h(x)e(x)

The derivative of the pressure with respect to the rest mass density

(9)χ(x)=dpdρ|x=x(ρ)=dhdx

Below the minimum density, a spectral parameterization is used.

Member Data Documentation

◆ help

template<typename LowDensityEoS >
constexpr Options::String EquationsOfState::Enthalpy< LowDensityEoS >::help
staticconstexpr
Initial value:
= {
"An EoS with a parametrized value h(log(rho/rho_0)) with h the specific "
"enthalpy and rho the baryon rest mass density. The enthalpy is "
"expanded as a sum of polynomial terms and trigonometric corrections. "
"let x = log(rho/rho_0) in"
"h(x) = \sum_i a_ix^i + \sum_j b_jsin(k * j * x) + c_jcos(k * j * x) "
"Note that rho(x)(1+epsilon(x)) = int_0^x e^x' h((x') dx' can be "
"computed "
"analytically, and therefore so can "
"P(x) = rho(x) * (h(x) - (1 + epsilon(x))) "}

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