SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
VariableFixing::FixToAtmosphere< Dim >::KappaLimitingOptions Struct Reference

Options for limiting the temperature in the atmosphere by effectively limiting the polytropic constant, with a generalization for finite temperature equations of state. More...

#include <FixToAtmosphere.hpp>

Classes

struct  DensityLowerBound
 
struct  DensityUpperBound
 
struct  EplisonKappaMinus
 
struct  EpsilonKappaMax
 
struct  LimitAboveDensityUpperBound
 
struct  MinTemperature
 

Public Types

using options = implementation defined
 

Public Member Functions

void pup (PUP::er &p)
 
bool operator== (const KappaLimitingOptions &rhs) const
 
bool operator!= (const KappaLimitingOptions &rhs) const
 

Public Attributes

double density_lower_bound {std::numeric_limits<double>::signaling_NaN()}
 
double eplison_kappa_minus {std::numeric_limits<double>::signaling_NaN()}
 
double density_upper_bound {std::numeric_limits<double>::signaling_NaN()}
 
double epsilon_kappa_max {std::numeric_limits<double>::signaling_NaN()}
 
std::optional< double > min_temperature {std::nullopt}
 
bool limit_above_density_upper_bound {false}
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

template<size_t Dim>
struct VariableFixing::FixToAtmosphere< Dim >::KappaLimitingOptions

Options for limiting the temperature in the atmosphere by effectively limiting the polytropic constant, with a generalization for finite temperature equations of state.

The basic density limit is fine for a cold EOS, but when a finite temperature EOS is used the temperature needs to be controlled in the atmosphere. While the basic bound of T[Tmin,Tmax] is a necessary condition, it is often not sufficient for stability in the atmosphere. We define lower and upper bounds ρτ and ρτ+ for ρ where we apply different limiting behavior when ρ<ρτ, ρ[ρτ,ρτ+], and ρ>ρτ+.

When ρ<ρτ we set T=Tmin if |TTmin|<ϵκ|T|, otherwise we don't change T. SpEC uses ϵκ=103.

When ρ[ρτ,ρτ+] we apply a more complicated algorithm. We define

κmax=1+ϵκ,maxmin(ρρτρτ+ρτ,1)

where ϵκ,max0 (set to 0.01 in SpEC). With κmax computed we now limit the temperature. We define pmin=p(ρ,Tmin,Ye), p=p(ρ,T,Ye), and pκmax=pminκmax. We then need to find T such that p(ρ,T,Ye)=pκmax. We do this by finding the root of

f(T)=p(ρ,T,Ye)pκmax.

We bracket the temperature T[Tmin,T], where T is the unmodified temperature. We solve the equation using the TOMS748 algorithm to avoid the need for derivatives of the pressure with respect to the temperature. If TTmin<1013 we set T=12(T+Tmin) to avoid any root find.

When ρ>ρτ+ we optionally can apply the same procedure as in the previous case, but with κmax=1+ϵκ,max. This is not typically done.

Member Data Documentation

◆ help

template<size_t Dim>
constexpr Options::String VariableFixing::FixToAtmosphere< Dim >::KappaLimitingOptions::help
staticconstexpr
Initial value:
= {
"If set then we apply a limiting precodure on the temperature near the "
"atmosphere based on essentially limiting the polytropic constant in a "
"Gamma-law equation of state."}

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