SpECTRE  v2025.04.21
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
EquationsOfState::Spectral Class Reference

A spectral equation of state. More...

#include <Spectral.hpp>

Classes

struct  Coefficients
 
struct  ReferenceDensity
 
struct  ReferencePressure
 
struct  UpperDensity
 

Public Types

using options = implementation defined
 

Public Member Functions

 Spectral (const Spectral &)=default
 
Spectraloperator= (const Spectral &)=default
 
 Spectral (Spectral &&)=default
 
Spectraloperator= (Spectral &&)=default
 
 Spectral (double reference_density, double reference_pressure, std::vector< double > coefficients, double upper_density)
 
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 operator== (const Spectral &rhs) const
 
bool operator!= (const Spectral &rhs) const
 
bool is_equal (const EquationOfState< true, 1 > &rhs) const override
 
 WRAPPED_PUPable_decl_base_template (SINGLE_ARG(EquationOfState< true, 1 >), Spectral)
 
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 Attributes

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

Detailed Description

A spectral equation of state.

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 adiabatic index Γ(x) is defined such that

(1)dlnpdx=Γ(x)=n=0Nγnxn

for the set of spectral coefficinets γn when 0<x<xu=ln(ρu/ρ0), where ρu is the provided upper density.

For x<0, Γ(x)=γ0.

For x>xu, Γ(x)=Γ(xu)

Member Data Documentation

◆ help

constexpr Options::String EquationsOfState::Spectral::help
staticconstexpr
Initial value:
= {
"A spectral equation of state. Defining x = log(rho/rho_0), Gamma(x) = "
"Sum_i gamma_i x^i, then the pressure is determined from d(log P)/dx = "
"Gamma(x) for x > 0. For x < 0 the EOS is a polytrope with "
"Gamma(x)=Gamma(0). For x > x_u = log(rho_u/rho_0), Gamma(x) = "
"Gamma(x_u).\n"
"To get smooth equations of state, it is recommended that the second "
"and third supplied coefficient should be 0. It is up to the user to "
"choose coefficients that are physically reasonable, e.g. that "
"satisfy causality."}

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