SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Xcts::Solutions::ConstantDensityStar Class Reference

A constant density star in general relativity. More...

#include <ConstantDensityStar.hpp>

Classes

struct  Density
 
struct  Radius
 

Public Types

using options = implementation defined
 

Public Member Functions

 ConstantDensityStar (const ConstantDensityStar &)=default
 
ConstantDensityStaroperator= (const ConstantDensityStar &)=default
 
 ConstantDensityStar (ConstantDensityStar &&)=default
 
ConstantDensityStaroperator= (ConstantDensityStar &&)=default
 
std::unique_ptr< elliptic::analytic_data::AnalyticSolutionget_clone () const override
 
 ConstantDensityStar (double density, double radius, const Options::Context &context={})
 
double density () const
 
double radius () const
 
template<typename DataType , typename... Tags>
tuples::TaggedTuple< Tags... > variables (const tnsr::I< DataType, 3, Frame::Inertial > &x, tmpl::list< Tags... >) const
 Retrieve a collection of variables at coordinates x
 
void pup (PUP::er &p) override
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3, Frame::Inertial > &x, tmpl::list< Xcts::Tags::ConformalFactor< DataType > >) const -> tuples::TaggedTuple< Xcts::Tags::ConformalFactor< DataType > >
 Retrieve variable at coordinates x
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3, Frame::Inertial > &x, tmpl::list<::Tags::Initial< Xcts::Tags::ConformalFactor< DataType > > >) const -> tuples::TaggedTuple< ::Tags::Initial< Xcts::Tags::ConformalFactor< DataType > > >
 Retrieve variable at coordinates x
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3, Frame::Inertial > &x, tmpl::list<::Tags::Initial< ::Tags::deriv< Xcts::Tags::ConformalFactor< DataType >, tmpl::size_t< 3 >, Frame::Inertial > > >) const -> tuples::TaggedTuple< ::Tags::Initial<::Tags::deriv< Xcts::Tags::ConformalFactor< DataType >, tmpl::size_t< 3 >, Frame::Inertial > > >
 Retrieve variable at coordinates x
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3, Frame::Inertial > &x, tmpl::list<::Tags::FixedSource< Xcts::Tags::ConformalFactor< DataType > > >) const -> tuples::TaggedTuple< ::Tags::FixedSource< Xcts::Tags::ConformalFactor< DataType > > >
 Retrieve variable at coordinates x
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3, Frame::Inertial > &x, tmpl::list< gr::Tags::EnergyDensity< DataType > >) const -> tuples::TaggedTuple< gr::Tags::EnergyDensity< DataType > >
 Retrieve variable at coordinates x
 
virtual std::unique_ptr< AnalyticSolutionget_clone () const =0
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

A constant density star in general relativity.

Details

This solution describes a star with constant density ρ0 that extends to a (conformal) radius R. It solves the XCTS Hamiltonian constraint that reduces to the non-linear elliptic equation

Δ2ψ+2πρψ5=0

for the conformal factor ψ (see Xcts) under the following assumptions [16] :

  • Time-symmetry Kij=0
  • Conformal flatness γ¯=δ, so Δ is the flat-space Laplacian
  • Spherical symmetry

Imposing boundary conditions

ψr=0forr=0ψ1forr

and considering the energy density

ρ(rR)=ρ0andρ(r>R)=0

of the star the authors of [16] find the solution

ψ(rR)=Cuα(r)andψ(r>R)=βr+1

with C=(2πρ0/3)1/4, the Sobolev functions

uα(r)=αRr2+(αR)2

and real parameters α and β that are determined by the following relations:

ρ0R2=32πf2(α)withf(α)=α5(1+α2)3βR+1=Cuα(R)

This solution is described in detail in [16] , and also in Exercise 3.8 in [14] , since it exhibits the non-uniqueness properties that are typical for the XCTS system. In the simple case of the constant-density star the non-uniqueness is apparent from the function f(α), which has two solutions for any ρ0 smaller than a critical density

ρcrit=32πR252660.0320R2,

a unique solution for ρ0=ρcrit and no solutions above the critical density [16] . The authors identify the α<αcrit=5 and α>αcrit branches of solutions with the strong-field and weak-field regimes, respectively (see [16] for details). In this implementation we compute the weak-field solution by choosing the α>αcrit that corresponds to the density ρ0 of the star. Therefore, we supply initial data ψinit=1 so that a nonlinear iterative numerical solver will converge to the same weak-field solution.

Member Function Documentation

◆ get_clone()

std::unique_ptr< elliptic::analytic_data::AnalyticSolution > Xcts::Solutions::ConstantDensityStar::get_clone ( ) const
inlineoverridevirtual

Member Data Documentation

◆ help

constexpr Options::String Xcts::Solutions::ConstantDensityStar::help
staticconstexpr
Initial value:
{
"A constant density star in general relativity"}

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