SpECTRE
v2025.03.17
|
TOV solver based on Lindblom's method. More...
#include <Tov.hpp>
Public Member Functions | |
TovSolution (const EquationsOfState::EquationOfState< true, 1 > &equation_of_state, double central_mass_density, const TovCoordinates coordinate_system=TovCoordinates::Schwarzschild, double log_enthalpy_at_outer_radius=0.0, double absolute_tolerance=1.e-18, double relative_tolerance=1.0e-14) | |
TovSolution (const TovSolution &)=default | |
TovSolution & | operator= (const TovSolution &)=default |
TovSolution (TovSolution &&)=default | |
TovSolution & | operator= (TovSolution &&)=default |
TovCoordinates | coordinate_system () const |
The type of radial coordinate. More... | |
double | outer_radius () const |
The outer radius of the solution. More... | |
double | total_mass () const |
The total mass | |
double | injection_energy () const |
The injection energy | |
template<typename DataType > | |
DataType | mass_over_radius (const DataType &r) const |
The mass inside the given radius over the areal radius, | |
template<typename DataType > | |
DataType | log_specific_enthalpy (const DataType &r) const |
The log of the specific enthalpy at the given radius. More... | |
template<typename DataType > | |
DataType | conformal_factor (const DataType &r) const |
The conformal factor | |
const intrp::CubicSpline & | mass_over_radius_interpolant () const |
const intrp::CubicSpline & | log_specific_enthalpy_interpolant () const |
const intrp::CubicSpline & | conformal_factor_interpolant () const |
void | pup (PUP::er &p) |
TOV solver based on Lindblom's method.
Uses Lindblom's method of integrating the TOV equations from [128] .
Instead of integrating the interior mass
Note that Lindblom's paper labels the independent variable as
The ODEs are solved numerically when this class is constructed, and the quantities
where the lapse is
with the conserved injection_energy()
RelativisticEuler::Solutions::TovCoordinates::Isotropic
to the constructor, an additional ODE is integrated alongside the TOV equations to determine the conformal factor
where
In isotropic coordinates, the spatial metric is conformally flat:
When isotropic coordinates are selected, radii returned by member functions or taken as arguments are isotropic. An exception is mass_over_radius()
, which always returns the quantity mass_over_radius()
for details.
DataType RelativisticEuler::Solutions::TovSolution::conformal_factor | ( | const DataType & | r | ) | const |
The conformal factor
The conformal factor is computed only when the coordinate_system()
is RelativisticEuler::Solution::TovCoordinates::Isotropic
. Otherwise, it is an error to call this function.
r
should be non-negative and not greater than outer_radius()
|
inline |
The type of radial coordinate.
|
inline |
The injection energy
The injection energy of the TOV solution is
where
Therefore,
by evaluating the injection energy at the outer (areal) radius
throughout the star.
DataType RelativisticEuler::Solutions::TovSolution::log_specific_enthalpy | ( | const DataType & | r | ) | const |
The log of the specific enthalpy at the given radius.
r
should be non-negative and not greater than outer_radius()
DataType RelativisticEuler::Solutions::TovSolution::mass_over_radius | ( | const DataType & | r | ) | const |
The mass inside the given radius over the areal radius,
The argument to this function is the radius in the coordinate_system()
, i.e., areal (Schwarzschild) or isotropic radius. The denominator conformal_factor()
function to obtain the mass over the isotropic radius, or the mass alone. The reason for this choice is that we represent the solution internally as the mass over the areal radius, so this is the most numerically precise quantity from which other quantities can be derived.
r
should be non-negative and not greater than outer_radius()
.
|
inline |
The outer radius of the solution.
This is the outer radius in the specified coordinate_system()
, i.e., areal or isotropic.
log_specific_enthalpy
is equal to the value of log_enthalpy_at_outer_radius
that was given when constructing this TovSolution