SpECTRE  2021.08.02
gr::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, double log_enthalpy_at_outer_radius=0.0, double absolute_tolerance=1.0e-14, double relative_tolerance=1.0e-14)
 
 TovSolution (const TovSolution &)=delete
 
TovSolution & operator= (const TovSolution &)=delete
 
 TovSolution (TovSolution &&) noexcept=default
 
TovSolution & operator= (TovSolution &&) noexcept=default
 
double outer_radius () const noexcept
 The outer radius of the solution. More...
 
double mass_over_radius (double r) const noexcept
 The mass inside the given radius over the radius \(\frac{m(r)}{r}\). More...
 
double mass (double r) const noexcept
 The mass inside the given radius \(m(r)\). More...
 
double log_specific_enthalpy (double r) const noexcept
 The log of the specific enthalpy at the given radius. More...
 
template<typename DataType >
RelativisticEuler::Solutions::TovStar< TovSolution >::RadialVariables< DataType > radial_variables (const EquationsOfState::EquationOfState< true, 1 > &equation_of_state, const tnsr::I< DataType, 3 > &x) const noexcept
 The radial variables from which the hydrodynamic quantities and spacetime metric can be computed. More...
 
void pup (PUP::er &p) noexcept
 

Detailed Description

TOV solver based on Lindblom's method.

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

Instead of integrating \(m(r)\) and \(p(r)\) ( \(r\)=radius, \(m\)=mass, \(p\)=pressure) Lindblom introduces the variables \(u\) and \(v\), with \(u=r^{2}\) and \(v=m/r\). The integration is then done with the log of the specific enthalpy ( \(\mathrm{log}(h)\)) as the independent variable.

Lindblom's paper simply labels the independent variable as \(h\). The \(h\) in Lindblom's paper is NOT the specific enthalpy. Rather, Lindblom's \(h\) is in fact \(\mathrm{log}(h)\).

Member Function Documentation

◆ log_specific_enthalpy()

double gr::Solutions::TovSolution::log_specific_enthalpy ( double  r) const
noexcept

The log of the specific enthalpy at the given radius.

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

◆ mass()

double gr::Solutions::TovSolution::mass ( double  r) const
noexcept

The mass inside the given radius \(m(r)\).

Warning
When computing \(\frac{m(r)}{r}\), use the mass_over_radius function instead for greater accuracy.
Note
r should be non-negative and not greater than outer_radius()

◆ mass_over_radius()

double gr::Solutions::TovSolution::mass_over_radius ( double  r) const
noexcept

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

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

◆ outer_radius()

double gr::Solutions::TovSolution::outer_radius ( ) const
noexcept

The outer radius of the solution.

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

◆ radial_variables()

template<typename DataType >
RelativisticEuler::Solutions::TovStar< TovSolution >::RadialVariables< DataType > gr::Solutions::TovSolution::radial_variables ( const EquationsOfState::EquationOfState< true, 1 > &  equation_of_state,
const tnsr::I< DataType, 3 > &  x 
) const
noexcept

The radial variables from which the hydrodynamic quantities and spacetime metric can be computed.

For radii greater than the outer_radius(), this returns the appropriate vacuum spacetime.

Note
This solution of the TOV equations is a function of areal radius.