Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shamphys::EOS_Barotropic< T > Struct Template Reference

Barotropic equation of state, isothermal at low density and adiabatic at high density (e.g. the optically thin to optically thick transition in protostellar collapse). More...

#include <shamphys/include/shamphys/eos.hpp>

Static Public Member Functions

static constexpr T adiab_ratio (T rho, T rho0, T gamma0)
 \( (\rho/\rho_0)^{\gamma_0 - 1} \), ratio of the adiabatic to isothermal pressure
static constexpr T pressure (T cs0, T rho0, T gamma0, T rho)
static constexpr T soundspeed (T cs0, T rho0, T gamma0, T rho)

Detailed Description

template<class T>
struct shamphys::EOS_Barotropic< T >

Barotropic equation of state, isothermal at low density and adiabatic at high density (e.g. the optically thin to optically thick transition in protostellar collapse).

Pressure: \( P = c_{s,0}^2 \rho \left[1 + \left(\frac{\rho}{\rho_0}\right)^{\gamma_0-1} \right] \)

Sound speed: \( c_s = \sqrt{\frac{dP}{d\rho}} = c_{s,0} \sqrt{1 + \gamma_0 \left(\frac{\rho}{\rho_0}\right)^{\gamma_0-1}} \)

For \( \gamma_0 = 5/3 \) this is the equation of state of e.g. Commercon et al (2008), eq. 3. The same form is used by shammath::FluidStateBarotropic.

Definition at line 89 of file eos.hpp.

Member Function Documentation

◆ adiab_ratio()

template<class T>
constexpr T shamphys::EOS_Barotropic< T >::adiab_ratio ( T rho,
T rho0,
T gamma0 )
inlinestaticconstexpr

\( (\rho/\rho_0)^{\gamma_0 - 1} \), ratio of the adiabatic to isothermal pressure

Definition at line 92 of file eos.hpp.

◆ pressure()

template<class T>
constexpr T shamphys::EOS_Barotropic< T >::pressure ( T cs0,
T rho0,
T gamma0,
T rho )
inlinestaticconstexpr

Definition at line 96 of file eos.hpp.

◆ soundspeed()

template<class T>
constexpr T shamphys::EOS_Barotropic< T >::soundspeed ( T cs0,
T rho0,
T gamma0,
T rho )
inlinestaticconstexpr

Definition at line 100 of file eos.hpp.


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