SpECTRE  v2026.09.05
Loading...
Searching...
No Matches
NewtonianEuler::Solutions::LaneEmdenStar Class Reference

A static spherically symmetric star in Newtonian gravity. More...

#include <LaneEmdenStar.hpp>

Classes

struct  CentralMassDensity
 The central mass density of the star. More...
struct  PolytropicConstant
 The polytropic constant of the polytropic fluid. More...

Public Types

using equation_of_state_type = EquationsOfState::PolytropicFluid<false>
using options = tmpl::list<CentralMassDensity, PolytropicConstant>

Public Member Functions

 LaneEmdenStar (const LaneEmdenStar &)=default
LaneEmdenStar & operator= (const LaneEmdenStar &)=default
 LaneEmdenStar (LaneEmdenStar &&)=default
LaneEmdenStar & operator= (LaneEmdenStar &&)=default
auto get_clone () const -> std::unique_ptr< evolution::initial_data::InitialData > override
 LaneEmdenStar (double central_mass_density, double polytropic_constant)
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)
template<typename DataType>
tnsr::I< DataType, 3 > gravitational_field (const tnsr::I< DataType, 3 > &x) const
 Compute the gravitational field for the corresponding source term, LaneEmdenGravitationalField.
const EquationsOfState::PolytropicFluid< false > & equation_of_state () const
void pup (PUP::er &) override
Public Member Functions inherited from evolution::initial_data::InitialData
virtual const InitialData & unwrap () const
 Unwrap wrapper types (e.g. WithNoise, which wraps analytic initial data and adds random noise) to reach the underlying analytic solution or data.

Static Public Attributes

static constexpr Options::String help

Friends

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

Detailed Description

A static spherically symmetric star in Newtonian gravity.

The solution for a static, spherically-symmetric star in 3 dimensions, found by solving the Lane-Emden equation [41] [189] . The Lane-Emden equation has closed-form solutions for certain equations of state; this class implements the solution for a polytropic fluid with polytropic exponent \(\Gamma=2\) (i.e., with polytropic index \(n=1\)). The solution is returned in units where \(G=1\), with \(G\) the gravitational constant.

The radius and mass of the star are determined by the polytropic constant \(\kappa\) and central density \(\rho_c\). The radius is \(R = \pi \alpha\), and the mass is \(M = 4 \pi^2 \alpha^3 \rho_c\), where \(\alpha = \sqrt{\kappa / (2 \pi)}\) and \(G=1\).

Member Function Documentation

◆ get_clone()

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

◆ gravitational_field()

template<typename DataType>
tnsr::I< DataType, 3 > NewtonianEuler::Solutions::LaneEmdenStar::gravitational_field ( const tnsr::I< DataType, 3 > & x) const

Compute the gravitational field for the corresponding source term, LaneEmdenGravitationalField.

The result is the vector-field giving the acceleration due to gravity that is felt by a test particle.

Member Data Documentation

◆ help

Options::String NewtonianEuler::Solutions::LaneEmdenStar::help
staticconstexpr
Initial value:
= {
"A static, spherically-symmetric star in Newtonian gravity, found by\n"
"solving the Lane-Emden equations, with a given central density and\n"
"polytropic fluid. The fluid has polytropic index 1, but the polytropic\n"
"constant is specifiable"}

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