|
SpECTRE
v2026.04.01
|
Equation of state for a polytropic fluid. More...
#include <PolytropicFluid.hpp>
Classes | |
| struct | PolytropicConstant |
| struct | PolytropicExponent |
Public Types | |
| using | options = tmpl::list<PolytropicConstant, PolytropicExponent> |
| Public Types inherited from EquationsOfState::EquationOfState< IsRelativistic, 1 > | |
| using | creatable_classes |
Public Member Functions | |
| PolytropicFluid (const PolytropicFluid &)=default | |
| PolytropicFluid & | operator= (const PolytropicFluid &)=default |
| PolytropicFluid (PolytropicFluid &&)=default | |
| PolytropicFluid & | operator= (PolytropicFluid &&)=default |
| PolytropicFluid (double polytropic_constant, double polytropic_exponent) | |
| std::unique_ptr< EquationOfState< IsRelativistic, 1 > > | get_clone () const override |
| std::unique_ptr< EquationOfState< IsRelativistic, 3 > > | promote_to_3d_eos () const override |
| Create a 3D EOS from the 1D EOS. | |
| std::unique_ptr< EquationOfState< IsRelativistic, 2 > > | promote_to_2d_eos () const override |
| Create a 2D EOS from the 1D EOS. | |
| bool | is_equal (const EquationOfState< IsRelativistic, 1 > &rhs) const override |
| bool | operator== (const PolytropicFluid< IsRelativistic > &rhs) const |
| bool | operator!= (const PolytropicFluid< IsRelativistic > &rhs) const |
| WRAPPED_PUPable_decl_base_template (SINGLE_ARG(EquationOfState< IsRelativistic, 1 >), PolytropicFluid) | |
| 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. | |
| Public Member Functions inherited from EquationsOfState::EquationOfState< IsRelativistic, 1 > | |
| EquationOfState (const EquationOfState &)=default | |
| EquationOfState & | operator= (const EquationOfState &)=default |
| EquationOfState (EquationOfState &&)=default | |
| EquationOfState & | operator= (EquationOfState &&)=default |
| EquationOfState (CkMigrateMessage *msg) | |
| WRAPPED_PUPable_abstract (EquationOfState) | |
| bool | is_barotropic () const |
| Returns true if the EOS is barotropic. | |
| virtual Scalar< double > | equilibrium_electron_fraction_from_density_temperature (const Scalar< double > &rest_mass_density, const Scalar< double > &) const |
| virtual Scalar< DataVector > | equilibrium_electron_fraction_from_density_temperature (const Scalar< DataVector > &rest_mass_density, const Scalar< DataVector > &) const |
| virtual Scalar< double > | pressure_from_density (const Scalar< double > &) const =0 |
| virtual Scalar< DataVector > | pressure_from_density (const Scalar< DataVector > &) const =0 |
| virtual Scalar< double > | rest_mass_density_from_enthalpy (const Scalar< double > &) const =0 |
| virtual Scalar< DataVector > | rest_mass_density_from_enthalpy (const Scalar< DataVector > &) const =0 |
| virtual Scalar< double > | specific_internal_energy_from_density (const Scalar< double > &) const =0 |
| virtual Scalar< DataVector > | specific_internal_energy_from_density (const Scalar< DataVector > &) const =0 |
| virtual Scalar< double > | temperature_from_density (const Scalar< double > &) const |
| virtual Scalar< DataVector > | temperature_from_density (const Scalar< DataVector > &rest_mass_density) const |
| virtual Scalar< double > | temperature_from_specific_internal_energy (const Scalar< double > &) const |
| virtual Scalar< DataVector > | temperature_from_specific_internal_energy (const Scalar< DataVector > &specific_internal_energy) const |
| virtual Scalar< double > | chi_from_density (const Scalar< double > &) const =0 |
| virtual Scalar< DataVector > | chi_from_density (const Scalar< DataVector > &) const =0 |
| virtual Scalar< double > | kappa_times_p_over_rho_squared_from_density (const Scalar< double > &) const =0 |
| virtual Scalar< DataVector > | kappa_times_p_over_rho_squared_from_density (const Scalar< DataVector > &) const =0 |
| virtual double | electron_fraction_lower_bound () const |
| The lower bound of the electron fraction that is valid for this EOS. | |
| virtual double | electron_fraction_upper_bound () const |
| The upper bound of the electron fraction that is valid for this EOS. | |
| virtual double | temperature_lower_bound () const |
| The lower bound of the temperature that is valid for this EOS. | |
| virtual double | temperature_upper_bound () const |
| The upper bound of the temperature that is valid for this EOS. | |
Static Public Attributes | |
| static constexpr size_t | thermodynamic_dim = 1 |
| static constexpr bool | is_relativistic = IsRelativistic |
| static constexpr Options::String | help |
| Static Public Attributes inherited from EquationsOfState::EquationOfState< IsRelativistic, 1 > | |
| static constexpr bool | is_relativistic = IsRelativistic |
| static constexpr size_t | thermodynamic_dim = 1 |
Equation of state for a polytropic fluid.
A polytropic equation of state \(p=K\rho^{\Gamma}\) where \(K\) is the polytropic constant and \(\Gamma\) is the polytropic exponent. The polytropic exponent is related to the polytropic index \(N_p\) by \(N_p=1/(\Gamma-1)\).
We also have
\begin{align}\epsilon&=\frac{K\rho^{\Gamma-1}}{\Gamma-1}\\ h&=1+\epsilon+\frac{p}{\rho}=1+\frac{K\Gamma}{\Gamma-1}\rho^{\Gamma-1} \\ T&=0 \\ c_s^2&=\frac{\Gamma p}{\rho h} =\frac{\Gamma(\Gamma-1)p}{\rho(\Gamma-1)+\Gamma p} =\left(\frac{1}{\Gamma K\rho^{\Gamma-1}}+\frac{1}{\Gamma-1}\right)^{-1} \end{align}
|
inlineoverridevirtual |
The vacuum baryon mass for this EoS.
Reimplemented from EquationsOfState::EquationOfState< IsRelativistic, 1 >.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Create a 2D EOS from the 1D EOS.
Implements EquationsOfState::EquationOfState< IsRelativistic, 1 >.
|
overridevirtual |
Create a 3D EOS from the 1D EOS.
Implements EquationsOfState::EquationOfState< IsRelativistic, 1 >.
|
inlineoverridevirtual |
The lower bound of the rest mass density that is valid for this EOS.
Implements EquationsOfState::EquationOfState< IsRelativistic, 1 >.
|
overridevirtual |
The upper bound of the rest mass density that is valid for this EOS.
Implements EquationsOfState::EquationOfState< IsRelativistic, 1 >.
|
inlineoverridevirtual |
The lower bound of the specific enthalpy that is valid for this EOS.
Implements EquationsOfState::EquationOfState< IsRelativistic, 1 >.
|
inlineoverridevirtual |
The lower bound of the specific internal energy that is valid for this EOS.
Reimplemented from EquationsOfState::EquationOfState< IsRelativistic, 1 >.
|
overridevirtual |
The upper bound of the specific internal energy that is valid for this EOS.
Reimplemented from EquationsOfState::EquationOfState< IsRelativistic, 1 >.
|
staticconstexpr |