SpECTRE  v2024.05.11
NewtonianEuler::Sources::LaneEmdenGravitationalField Class Reference

Source giving the acceleration due to gravity in the spherical, Newtonian Lane-Emden star solution. More...

#include <LaneEmdenGravitationalField.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 options = tmpl::list< CentralMassDensity, PolytropicConstant >
 

Public Member Functions

 LaneEmdenGravitationalField (double central_mass_density, double polytropic_constant)
 
 LaneEmdenGravitationalField (const LaneEmdenGravitationalField &)=default
 
LaneEmdenGravitationalFieldoperator= (const LaneEmdenGravitationalField &)=default
 
 LaneEmdenGravitationalField (LaneEmdenGravitationalField &&)=default
 
LaneEmdenGravitationalFieldoperator= (LaneEmdenGravitationalField &&)=default
 
void pup (PUP::er &p) override
 
auto get_clone () const -> std::unique_ptr< Source > override
 
void operator() (gsl::not_null< Scalar< DataVector > * > source_mass_density_cons, gsl::not_null< tnsr::I< DataVector, 3 > * > source_momentum_density, gsl::not_null< Scalar< DataVector > * > source_energy_density, const Scalar< DataVector > &mass_density_cons, const tnsr::I< DataVector, 3 > &momentum_density, const Scalar< DataVector > &energy_density, const tnsr::I< DataVector, 3 > &velocity, const Scalar< DataVector > &pressure, const Scalar< DataVector > &specific_internal_energy, const EquationsOfState::EquationOfState< false, 2 > &eos, const tnsr::I< DataVector, 3 > &coords, double time) const override
 
- Public Member Functions inherited from NewtonianEuler::Sources::Source< 3 >
virtual auto get_clone () const -> std::unique_ptr< Source >=0
 
virtual void operator() (gsl::not_null< Scalar< DataVector > * > source_mass_density_cons, gsl::not_null< tnsr::I< DataVector, Dim > * > source_momentum_density, gsl::not_null< Scalar< DataVector > * > source_energy_density, const Scalar< DataVector > &mass_density_cons, const tnsr::I< DataVector, Dim > &momentum_density, const Scalar< DataVector > &energy_density, const tnsr::I< DataVector, Dim > &velocity, const Scalar< DataVector > &pressure, const Scalar< DataVector > &specific_internal_energy, const EquationsOfState::EquationOfState< false, 2 > &eos, const tnsr::I< DataVector, Dim > &coords, double time) const=0
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

Source giving the acceleration due to gravity in the spherical, Newtonian Lane-Emden star solution.

The gravitational field \(g^i\) enters the NewtonianEuler system as source terms for the conserved momentum and energy:

\begin{align*} \partial_t S^i + \partial_j F^{j}(S^i) &= S(S^i) = \rho g^i \partial_t e + \partial_j F^{j}(e) &= S(e) = S_i g^i, \end{align*}

where \(S^i\) is the conserved momentum density, \(e\) is the conserved energy, \(F^{j}(u)\) is the flux of the conserved quantity \(u\), and \(\rho\) is the fluid mass density.

Note
This source is specialized to the Lane-Emden solution because it queries a LaneEmdenStar analytic solution for the gravitational field that generates the fluid acceleration. This source does not integrate the fluid density to compute a self-consistent gravitational field (i.e., as if one were solving a coupled Euler + Poisson system).

Member Function Documentation

◆ get_clone()

auto NewtonianEuler::Sources::LaneEmdenGravitationalField::get_clone ( ) const -> std::unique_ptr< Source >
overridevirtual

Member Data Documentation

◆ help

constexpr Options::String NewtonianEuler::Sources::LaneEmdenGravitationalField::help
staticconstexpr
Initial value:
= {
"The gravitational field corresponding to a static, "
"spherically-symmetric star in Newtonian gravity, found by "
"solving the Lane-Emden equations, with a given central density and "
"polytropic fluid. The fluid has polytropic index 1, but the polytropic "
"constant is specifiable"}

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