SpECTRE
v2025.03.17
|
A solution obtained by reading in rotating neutron star initial data from the RotNS code based on [43] and [44]. More...
#include <RotatingStar.hpp>
Classes | |
struct | PolytropicConstant |
The polytropic constant of the fluid. More... | |
struct | RotNsFilename |
The path to the RotNS data file. More... | |
Public Types | |
using | options = implementation defined |
![]() | |
using | tags = implementation defined |
Public Member Functions | |
RotatingStar (const RotatingStar &) | |
RotatingStar & | operator= (const RotatingStar &) |
RotatingStar (RotatingStar &&)=default | |
RotatingStar & | operator= (RotatingStar &&)=default |
RotatingStar (std::string rot_ns_filename, std::unique_ptr< EquationsOfState::EquationOfState< true, 1 > > equation_of_state) | |
RotatingStar (std::string rot_ns_filename, double polytropic_constant) | |
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 &p) override |
const EquationsOfState::EquationOfState< true, 1 > & | equation_of_state () const |
double | equatorial_radius () const |
virtual auto | get_clone () const -> std::unique_ptr< InitialData >=0 |
![]() | |
auto | variables (const tnsr::I< DataType, Dim > &x, tmpl::list< hydro::Tags::Temperature< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::Temperature< DataType > > |
auto | variables (const tnsr::I< DataType, Dim > &x, const double t, tmpl::list< hydro::Tags::Temperature< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::Temperature< DataType > > |
auto | variables (ExtraVars &extra_variables, const tnsr::I< DataType, Dim > &x, Args &... extra_args, tmpl::list< hydro::Tags::Temperature< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::Temperature< DataType > > |
Static Public Attributes | |
static constexpr Options::String | help |
![]() | |
static constexpr size_t | volume_dim |
Protected Types | |
template<typename DataType > | |
using | DerivLapse = ::Tags::deriv< gr::Tags::Lapse< DataType >, tmpl::size_t< 3 >, Frame::Inertial > |
template<typename DataType > | |
using | DerivShift = ::Tags::deriv< gr::Tags::Shift< DataType, 3 >, tmpl::size_t< 3 >, Frame::Inertial > |
template<typename DataType > | |
using | DerivSpatialMetric = ::Tags::deriv< gr::Tags::SpatialMetric< DataType, 3 >, tmpl::size_t< 3 >, Frame::Inertial > |
Protected Member Functions | |
template<typename DataType > | |
void | interpolate_vars_if_necessary (gsl::not_null< IntermediateVariables< DataType > * > vars) const |
template<typename DataType > | |
void | interpolate_deriv_vars_if_necessary (gsl::not_null< IntermediateVariables< DataType > * > vars) const |
template<typename DataType > | |
Scalar< DataType > | lapse (const DataType &gamma, const DataType &rho) const |
template<typename DataType > | |
tnsr::I< DataType, 3, Frame::Inertial > | shift (const DataType &omega, const DataType &phi, const DataType &radius, const DataType &sin_theta) const |
template<typename DataType > | |
tnsr::ii< DataType, 3, Frame::Inertial > | spatial_metric (const DataType &gamma, const DataType &rho, const DataType &alpha, const DataType &phi) const |
template<typename DataType > | |
tnsr::II< DataType, 3, Frame::Inertial > | inverse_spatial_metric (const DataType &gamma, const DataType &rho, const DataType &alpha, const DataType &phi) const |
template<typename DataType > | |
Scalar< DataType > | sqrt_det_spatial_metric (const DataType &gamma, const DataType &rho, const DataType &alpha) const |
template<typename DataType > | |
auto | make_metric_data (size_t num_points) const -> typename IntermediateVariables< DataType >::MetricData |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< hydro::Tags::RestMassDensity< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::RestMassDensity< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< hydro::Tags::ElectronFraction< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::ElectronFraction< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< hydro::Tags::SpecificEnthalpy< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::SpecificEnthalpy< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< hydro::Tags::Temperature< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::Temperature< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< hydro::Tags::Pressure< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::Pressure< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< hydro::Tags::SpecificInternalEnergy< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::SpecificInternalEnergy< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< hydro::Tags::SpatialVelocity< DataType, 3 > >) const -> tuples::TaggedTuple< hydro::Tags::SpatialVelocity< DataType, 3 > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< hydro::Tags::LorentzFactor< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::LorentzFactor< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< hydro::Tags::MagneticField< DataType, 3 > >) const -> tuples::TaggedTuple< hydro::Tags::MagneticField< DataType, 3 > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< hydro::Tags::DivergenceCleaningField< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::DivergenceCleaningField< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< gr::Tags::Lapse< DataType > >) const -> tuples::TaggedTuple< gr::Tags::Lapse< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< gr::Tags::Shift< DataType, 3 > >) const -> tuples::TaggedTuple< gr::Tags::Shift< DataType, 3 > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< gr::Tags::SpatialMetric< DataType, 3 > >) const -> tuples::TaggedTuple< gr::Tags::SpatialMetric< DataType, 3 > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< gr::Tags::SqrtDetSpatialMetric< DataType > >) const -> tuples::TaggedTuple< gr::Tags::SqrtDetSpatialMetric< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< gr::Tags::InverseSpatialMetric< DataType, 3 > >) const -> tuples::TaggedTuple< gr::Tags::InverseSpatialMetric< DataType, 3 > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list<::Tags::dt< gr::Tags::Lapse< DataType > > >) const -> tuples::TaggedTuple<::Tags::dt< gr::Tags::Lapse< DataType > > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< DerivLapse< DataType > >) const -> tuples::TaggedTuple< DerivLapse< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list<::Tags::dt< gr::Tags::Shift< DataType, 3 > > >) const -> tuples::TaggedTuple<::Tags::dt< gr::Tags::Shift< DataType, 3 > > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< DerivShift< DataType > >) const -> tuples::TaggedTuple< DerivShift< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list<::Tags::dt< gr::Tags::SpatialMetric< DataType, 3 > > >) const -> tuples::TaggedTuple<::Tags::dt< gr::Tags::SpatialMetric< DataType, 3 > > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< DerivSpatialMetric< DataType > >) const -> tuples::TaggedTuple< DerivSpatialMetric< DataType > > |
template<typename DataType > | |
auto | variables (gsl::not_null< IntermediateVariables< DataType > * > vars, const tnsr::I< DataType, 3 > &x, tmpl::list< gr::Tags::ExtrinsicCurvature< DataType, 3 > >) const -> tuples::TaggedTuple< gr::Tags::ExtrinsicCurvature< DataType, 3 > > |
Protected Attributes | |
std::string | rot_ns_filename_ {} |
detail::CstSolution | cst_solution_ {} |
double | polytropic_constant_ = std::numeric_limits<double>::signaling_NaN() |
double | polytropic_exponent_ = std::numeric_limits<double>::signaling_NaN() |
bool | is_polytrope_ {} |
std::unique_ptr< EquationsOfState::EquationOfState< true, 1 > > | equation_of_state_ |
Static Protected Attributes | |
static constexpr double | atmosphere_floor_ = 1.e-50 |
Friends | |
bool | operator== (const RotatingStar &lhs, const RotatingStar &rhs) |
A solution obtained by reading in rotating neutron star initial data from the RotNS code based on [43] and [44].
The code that generates the initial data is part of a private SXS repository called RotNS
.
The metric in spherical coordinates is given by [43]
We use rotation about the
We can transform from spherical to Cartesian coordinates using
and
We denote the lapse as
The shift is
so
The spatial metric is
and its determinant is
At
The 4-velocity in spherical coordinates is given by
where
Transforming to Cartesian coordinates we have
The Lorentz factor is given by
Using
we get
Lowering with the spatial metric we get
This is consistent with the Lorentz factor read off from
1e-2
) tilde_s
time derivative only vanishes to roughly 1e-8
rather than machine precision. Computing the Cartesian derivatives from analytic differentiation of the radial and angular polynomial fits might improve the situation but is a decent about of work to implement.
|
overridevirtual |
Implements evolution::initial_data::InitialData.
|
staticconstexpr |