SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
RelativisticEuler::Solutions::TovStar Class Reference

A static spherically symmetric star. More...

#include <TovStar.hpp>

Classes

struct  CentralDensity
 The central density of the star. More...
struct  Coordinates
 Areal (Schwarzschild) or isotropic coordinates. More...

Public Types

using equation_of_state_type = EquationsOfState::EquationOfState<true, 1>
using options
template<typename DataType>
using tags
Public Types inherited from RelativisticEuler::AnalyticSolution< 3 >
using tags

Public Member Functions

 TovStar (const TovStar &)
TovStaroperator= (const TovStar &)
 TovStar (TovStar &&)=default
TovStaroperator= (TovStar &&)=default
 TovStar (double central_rest_mass_density, std::unique_ptr< EquationsOfState::EquationOfState< true, 1 > > equation_of_state, const RelativisticEuler::Solutions::TovCoordinates coordinate_system=RelativisticEuler::Solutions::TovCoordinates::Schwarzschild)
auto get_clone () const -> std::unique_ptr< evolution::initial_data::InitialData > override
template<typename DataType, typename... Tags>
tuples::TaggedTuple< Tags... > variables (const tnsr::I< DataType, 3 > &x, const double, tmpl::list< Tags... >) const
 Retrieve a collection of variables at (x, t)
void pup (PUP::er &) override
 NOLINTNEXTLINE(google-runtime-references)
const EquationsOfState::EquationOfState< true, 1 > & equation_of_state () const
const RelativisticEuler::Solutions::TovSolutionradial_solution () const
 The radial profile of the star.

Static Public Attributes

static constexpr size_t volume_dim = 3_st
static constexpr Options::String help
Static Public Attributes inherited from RelativisticEuler::AnalyticSolution< 3 >
static constexpr size_t volume_dim

Protected Member Functions

template<template< class, tov_detail::StarRegion > class VarsComputer, typename DataType, typename... Tags, typename... VarsComputerArgs>
tuples::TaggedTuple< Tags... > variables_impl (const tnsr::I< DataType, 3 > &x, tmpl::list< Tags... >, VarsComputerArgs &&... vars_computer_args) const

Friends

bool operator== (const TovStar &lhs, const TovStar &rhs)

Detailed Description

A static spherically symmetric star.

An analytic solution for a static, spherically-symmetric star found by solving the Tolman-Oppenheimer-Volkoff (TOV) equations. The equation of state is assumed to be that of a polytropic fluid.

If the spherically symmetric metric is written as

\[ds^2 = - e^{2 \Phi_t} dt^2 + e^{2 \Phi_r} dr^2 + e^{2 \Phi_\Omega} r^2 d\Omega^2 \]

where \(r = \delta_{mn} x^m x^n\) is the radial coordinate and \(\Phi_t\), \(\Phi_r\), and \(\Phi_\Omega\) are the metric potentials, then the lapse, shift, and spatial metric in Cartesian coordinates are

\begin{align*}\alpha &= e^{\Phi_t} \\ \beta^i &= 0 \\ \gamma_{ij} &= \delta_{ij} e^{2 \Phi_\Omega} + \delta_{im} \delta_{jn} \frac{x^m x^n}{r^2} \left( e^{2 \Phi_r} - e^{2 \Phi_\Omega} \right) \end{align*}

We solve the TOV equations with the method implemented in RelativisticEuler::Solutions::TovSolution. It provides the areal mass-over-radius \(m(r)/r\) and the log of the specific enthalpy \(\log{h}\). In areal (Schwarzschild) coordinates the spatial metric potentials are

\begin{align}e^{\Phi_r} &= \left(1 - \frac{2m}{r}\right)^{-1/2} \\ e^{\Phi_\Omega} &= 1 \end{align}

In isotropic coordinates the spatial metric potentials are

\begin{equation}e^{2\Phi_r} = e^{2\Phi_\Omega} = \psi^4 \text{,} \end{equation}

where \(\psi = \sqrt{r / \bar{r}}\) is the conformal factor, \(r\) is the areal (Schwarzschild) radius and \(\bar{r}\) is the isotropic radius. See RelativisticEuler::Solutions::TovSolution for details.

Warning
Isotropic coordinates should be used because the metric derivatives are smooth. Otherwise the grid will over-compensate with finite difference cells.

Member Typedef Documentation

◆ options

using RelativisticEuler::Solutions::TovStar::options
Initial value:
tmpl::list<CentralDensity,
The central density of the star.
Definition TovStar.hpp:332
Areal (Schwarzschild) or isotropic coordinates.
Definition TovStar.hpp:340
The equation of state of the fluid.
Definition Tags.hpp:30

◆ tags

template<typename DataType>
using RelativisticEuler::Solutions::TovStar::tags
Initial value:
tmpl::list_difference<
typename tov_detail::TovVariablesCache<DataType>::tags_list,
tmpl::list<
tov_detail::Tags::MassOverRadius<DataType>,
tov_detail::Tags::LogSpecificEnthalpy<DataType>,
tov_detail::Tags::ConformalFactor<DataType>,
tov_detail::Tags::DrConformalFactor<DataType>,
tov_detail::Tags::ArealRadius<DataType>,
tov_detail::Tags::DrArealRadius<DataType>,
tov_detail::Tags::DrPressure<DataType>,
tov_detail::Tags::MetricTimePotential<DataType>,
tov_detail::Tags::DrMetricTimePotential<DataType>,
tov_detail::Tags::MetricRadialPotential<DataType>,
tov_detail::Tags::DrMetricRadialPotential<DataType>,
tov_detail::Tags::MetricAngularPotential<DataType>,
tov_detail::Tags::DrMetricAngularPotential<DataType>>>

Member Function Documentation

◆ get_clone()

auto RelativisticEuler::Solutions::TovStar::get_clone ( ) const -> std::unique_ptr< evolution::initial_data::InitialData >
overridevirtual

Member Data Documentation

◆ help

Options::String RelativisticEuler::Solutions::TovStar::help
staticconstexpr
Initial value:
= {
"A static, spherically-symmetric star found by solving the \n"
"Tolman-Oppenheimer-Volkoff (TOV) equations, with a given central \n"
"density and equation of state."}

The documentation for this class was generated from the following file:
  • src/PointwiseFunctions/AnalyticSolutions/RelativisticEuler/TovStar.hpp