SpECTRE
v2024.05.11
|
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 = tmpl::list< CentralDensity, hydro::OptionTags::InitialDataEquationOfState< true, 1 >, Coordinates > |
template<typename DataType > | |
using | tags = 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 > > > |
Public Types inherited from RelativisticEuler::AnalyticSolution< 3 > | |
using | tags = tmpl::push_back< typename gr::AnalyticSolution< Dim >::template tags< DataType >, hydro::Tags::RestMassDensity< DataType >, hydro::Tags::ElectronFraction< DataType >, hydro::Tags::SpecificInternalEnergy< DataType >, hydro::Tags::Temperature< DataType >, hydro::Tags::Pressure< DataType >, hydro::Tags::SpatialVelocity< DataType, Dim >, hydro::Tags::MagneticField< DataType, Dim >, hydro::Tags::DivergenceCleaningField< DataType >, hydro::Tags::LorentzFactor< DataType >, hydro::Tags::SpecificEnthalpy< DataType > > |
Public Member Functions | |
TovStar (const TovStar &) | |
TovStar & | operator= (const TovStar &) |
TovStar (TovStar &&)=default | |
TovStar & | operator= (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::TovSolution & | radial_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) |
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.
|
overridevirtual |
Implements evolution::initial_data::InitialData.
|
staticconstexpr |