SpECTRE  v2024.04.12
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 = tmpl::list< ReferenceDensity, MaximumDensity, MinimumDensity, TrigScaling, PolynomialCoefficients, SinCoefficients, CosCoefficients, StitchedLowDensityEoS, TransitionDeltaEpsilon >
 

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_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\).
 
double specific_internal_energy_upper_bound (const double) const override
 The upper bound of the specific internal energy that is valid for this EOS at the given rest mass density \(\rho\).
 
double specific_enthalpy_lower_bound () const override
 The lower bound of the specific enthalpy 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(\rho/\rho_0)\) where \(\rho\) is the rest mass density and \(\rho_0\) is the provided reference density. The pseudo-enthalpy \(h \equiv (p + rho + u)/rho\) is expanded as

\begin{equation} h(x) = \sum_i a_i x^i + \sum_j b_j \sin(jkx) + c_j \cos(jkx) \end{equation}

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

\begin{equation} h(x) = \frac{d e} {d \rho} |_{x = \log(\rho/\rho_0)} \end{equation}

where \(e\) is the total energy density. At the same time \( dx = d\rho/\rho \) so \( \rho_0 e^x dx = d \rho \) Therefore,

\begin{equation} e(x) - e(x_0) = \int_{x_0}^x h(x') e^{x'} dx ' \end{equation}

This can be computed analytically because

\begin{equation} \int a_i \frac{x^i}{i!} e^{x} dx = \sum_{j \leq i} a_i (-1)^{i-j} \frac{(x)^{j}}{j!} + C \end{equation}

and

\begin{equation} \int b_j \sin(j k x) e^x dx = b_j e^x \frac{\sin(jkx) - j k \cos(jkx)}{j^2 k^2 + 1} \end{equation}

\begin{equation} \int c_j \cos(j k x) e^x dx = b_j e^x \frac{\cos(jkx) + j k \sin(jkx)}{j^2 k^2 + 1} \end{equation}

From this most other thermodynamic quantities can be computed analytically

The internal energy density

\begin{equation} \epsilon(x)\rho(x) = e(x) - \rho(x) \end{equation}

The pressure

\begin{equation} p(x) = \rho(x) h(x) - e(x) \end{equation}

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

\begin{equation} \chi(x) = \frac{dp}{d\rho} |_{x = x(\rho)} = \frac{dh}{dx} \end{equation}

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: