SpECTRE  v2024.04.12
RelativisticEuler::Solutions::TovSolution Class Reference

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
 
TovSolutionoperator= (const TovSolution &)=default
 
 TovSolution (TovSolution &&)=default
 
TovSolutionoperator= (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 \(m(R)\), where \(R\) is the outer radius.
 
double injection_energy () const
 The injection energy \(\mathcal{E}=\alpha(r=R)=\sqrt{1-2M/R}\). More...
 
template<typename DataType >
DataType mass_over_radius (const DataType &r) const
 The mass inside the given radius over the areal radius, \(\frac{m(r)}{r}\). More...
 
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 \(\psi=\sqrt{r / \bar{r}}\). More...
 
const intrp::CubicSplinemass_over_radius_interpolant () const
 
const intrp::CubicSplinelog_specific_enthalpy_interpolant () const
 
const intrp::CubicSplineconformal_factor_interpolant () const
 
void pup (PUP::er &p)
 

Detailed Description

TOV solver based on Lindblom's method.

Uses Lindblom's method of integrating the TOV equations from [119] .

Instead of integrating the interior mass \(m(r)\) and pressure \(p(r)\), Lindblom introduces the variables \(u=r^2\) and \(v=m/r\). Then, the TOV equations are integrated with the log of the specific enthalpy as the independent variable, \(\ln(h)\), from the center of the star where \(h(r=0) = h_c\) to its surface \(h(r=R) = 1\). The ODEs being solved are Eq. (A2) and (A3) in [119] :

\begin{align} \frac{\mathrm{d}u}{\mathrm{d}\ln{h}} &= \frac{-2u (1 - 2v)}{4\pi u p + v} \\ \frac{\mathrm{d}v}{\mathrm{d}\ln{h}} &= -(1 - 2v) \frac{4\pi u \rho - v}{4\pi u p + v} \end{align}

Note that Lindblom's paper labels the independent variable as \(h\). However the \(h\) in Lindblom's paper is not the specific enthalpy but its logarithm, \(\ln(h)\).

The ODEs are solved numerically when this class is constructed, and the quantities \(m(r)/r\) and \(\ln(h)\) are interpolated and exposed as member functions. With these quantities the metric can be constructed as:

\begin{equation} \mathrm{d}s^2 = -\alpha^2 \mathrm{d}t^2 + (1 - 2m/r)^{-1} \mathrm{d}r^2 + r^2 \mathrm{d}\Omega^2 \end{equation}

where the lapse is

\begin{equation} \alpha(r < R) = \mathcal{E} / h = \alpha(r=R) / h \text{,} \end{equation}

with the conserved injection_energy() \(\mathcal{E}\), such that the lapse matches the exterior Schwarzschild solution:

\begin{equation} \alpha(r \geq R) = \sqrt{1 - \frac{2M}{r}} \end{equation}

Isotropic radial coordinate
This class also supports transforming to an isotropic radial coordinate. When you pass RelativisticEuler::Solutions::TovCoordinates::Isotropic to the constructor, an additional ODE is integrated alongside the TOV equations to determine the conformal factor

\begin{equation} \psi^2 = \frac{r}{\bar{r}} \end{equation}

where \(r\) is the areal (Schwarzschild) radius and \(\bar{r}\) is the isotropic radius. The additional ODE is:

\begin{equation} \frac{\mathrm{d}\ln(\psi)}{\mathrm{d}\ln{h}} = \frac{\sqrt{1 - 2v}}{1 + \sqrt{1 - 2v}} \frac{v}{4\pi u p + v} \end{equation}

In isotropic coordinates, the spatial metric is conformally flat:

\begin{equation} \mathrm{d}s^2 = -\alpha^2 \mathrm{d}t^2 + \psi^4 (\mathrm{d}\bar{r}^2 + \bar{r}^2 \mathrm{d}\Omega^2) \end{equation}

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 \(m / r\) because that is the quantity stored internally and hence most numerically precise. See mass_over_radius() for details.

Member Function Documentation

◆ conformal_factor()

template<typename DataType >
DataType RelativisticEuler::Solutions::TovSolution::conformal_factor ( const DataType &  r) const

The conformal factor \(\psi=\sqrt{r / \bar{r}}\).

The conformal factor is computed only when the coordinate_system() is RelativisticEuler::Solution::TovCoordinates::Isotropic. Otherwise, it is an error to call this function.

Note
r should be non-negative and not greater than outer_radius()

◆ coordinate_system()

TovCoordinates RelativisticEuler::Solutions::TovSolution::coordinate_system ( ) const
inline

The type of radial coordinate.

See also
RelativisticEuler::Solutions::TovCoordinates

◆ injection_energy()

double RelativisticEuler::Solutions::TovSolution::injection_energy ( ) const
inline

The injection energy \(\mathcal{E}=\alpha(r=R)=\sqrt{1-2M/R}\).

The injection energy of the TOV solution is

\begin{equation} \mathcal{E} = -h k^a u_a = h \alpha \text{,} \end{equation}

where \(\boldsymbol{k} = \partial_t\) is a Killing vector of the static solution, \(h\) is the specific enthalpy, \(u_a\) is the fluid four-velocity, and \(\alpha\) is the lapse (see, e.g., Eqs. (2.19) and (4.2) in [131]). Since the TOV solution is static, the injection energy is conserved not only along stream lines but throughout the star,

\begin{equation} \nabla_a \mathcal{E} = 0 \text{.} \end{equation}

Therefore,

\begin{equation} \mathcal{E} = \alpha(r=R) = \sqrt{1 - 2M/R} \end{equation}

by evaluating the injection energy at the outer (areal) radius \(R\), where \(h=1\) and where we match the lapse to the outer Schwarzschild solution. The conservation also implies

\begin{equation} \alpha = \mathcal{E} / h \end{equation}

throughout the star.

◆ log_specific_enthalpy()

template<typename DataType >
DataType RelativisticEuler::Solutions::TovSolution::log_specific_enthalpy ( const DataType &  r) const

The log of the specific enthalpy at the given radius.

Note
r should be non-negative and not greater than outer_radius()

◆ mass_over_radius()

template<typename DataType >
DataType RelativisticEuler::Solutions::TovSolution::mass_over_radius ( const DataType &  r) const

The mass inside the given radius over the areal radius, \(\frac{m(r)}{r}\).

The argument to this function is the radius in the coordinate_system(), i.e., areal (Schwarzschild) or isotropic radius. The denominator \(r\) in the return value is always the areal (Schwarzschild) radius. You can use the conformal factor \(\psi=\sqrt{r / \bar{r}}\) returned by the 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.

Note
r should be non-negative and not greater than outer_radius().

◆ outer_radius()

double RelativisticEuler::Solutions::TovSolution::outer_radius ( ) const
inline

The outer radius of the solution.

This is the outer radius in the specified coordinate_system(), i.e., areal or isotropic.

Note
This is the radius at which log_specific_enthalpy is equal to the value of log_enthalpy_at_outer_radius that was given when constructing this TovSolution

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