SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
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 = implementation defined
 
template<typename DataType >
using tags = implementation defined
 
- Public Types inherited from RelativisticEuler::AnalyticSolution< 3 >
using tags = implementation defined
 

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.
 
virtual auto get_clone () const -> std::unique_ptr< InitialData >=0
 

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

ds2=e2Φtdt2+e2Φrdr2+e2ΦΩr2dΩ2

where r=δmnxmxn is the radial coordinate and Φt, Φr, and ΦΩ are the metric potentials, then the lapse, shift, and spatial metric in Cartesian coordinates are

α=eΦtβi=0γij=δije2ΦΩ+δimδjnxmxnr2(e2Φre2ΦΩ)

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 logh. In areal (Schwarzschild) coordinates the spatial metric potentials are

(1)eΦr=(12mr)1/2(2)eΦΩ=1

In isotropic coordinates the spatial metric potentials are

(3)e2Φr=e2ΦΩ=ψ4,

where ψ=r/r¯ is the conformal factor, r is the areal (Schwarzschild) radius and 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 Function Documentation

◆ get_clone()

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

Member Data Documentation

◆ help

constexpr 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: