SpECTRE  v2024.04.12
grmhd::AnalyticData::CcsnCollapse Class Reference

Evolve a stellar collapse (progenitor) profile through collapse. More...

#include <CcsnCollapse.hpp>

Classes

struct  AdiabaticIndex
 Adiabatic index of the system at readin. More...
 
struct  CentralAngularVelocity
 Central angular velocity artificially assigned at readin. More...
 
struct  DifferentialRotationParameter
 Differential rotation parameter for artificially assigned rotation profile. More...
 
struct  MaxDensityRatioForLinearInterpolation
 Maximum density ratio for linear interpolation. More...
 
struct  PolytropicConstant
 The polytropic constant of the fluid. More...
 
struct  ProgenitorFilename
 The massive star progenitor data file. More...
 

Public Types

using equation_of_state_type = EquationsOfState::PolytropicFluid< true >
 
using options = tmpl::list< ProgenitorFilename, PolytropicConstant, AdiabaticIndex, CentralAngularVelocity, DifferentialRotationParameter, MaxDensityRatioForLinearInterpolation >
 
- Public Types inherited from grmhd::AnalyticDataBase
template<typename DataType >
using tags = tmpl::push_back< typename gr::AnalyticSolution< 3 >::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, 3 >, hydro::Tags::MagneticField< DataType, 3 >, hydro::Tags::DivergenceCleaningField< DataType >, hydro::Tags::LorentzFactor< DataType >, hydro::Tags::SpecificEnthalpy< DataType > >
 

Public Member Functions

 CcsnCollapse (const CcsnCollapse &)=default
 
CcsnCollapseoperator= (const CcsnCollapse &)=default
 
 CcsnCollapse (CcsnCollapse &&)=default
 
CcsnCollapseoperator= (CcsnCollapse &&)=default
 
 CcsnCollapse (std::string progenitor_filename, double polytropic_constant, double adiabatic_index, double central_angular_velocity, double diff_rot_parameter, double max_dens_ratio_interp)
 
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, tmpl::list< Tags... >) const
 Retrieve a collection of variables at (x)
 
void pup (PUP::er &p) override
 
const EquationsOfState::PolytropicFluid< true > & equation_of_state () const
 
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::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::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::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< 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< 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< 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 > >
 
template<typename DataType >
auto variables (const 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 (const 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 (const 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 > > >
 
virtual auto get_clone () const -> std::unique_ptr< InitialData >=0
 
- Public Member Functions inherited from hydro::TemperatureInitialization< CcsnCollapse >
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 Public Attributes inherited from grmhd::AnalyticDataBase
static constexpr size_t volume_dim = 3_st
 

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 &metric_potential) const
 
template<typename DataType >
tnsr::I< DataType, 3, Frame::Inertialshift (const DataType &radius) const
 
template<typename DataType >
tnsr::ii< DataType, 3, Frame::Inertialspatial_metric (const DataType &chi, const DataType &cos_theta, const DataType &sin_theta, const DataType &phi) const
 
template<typename DataType >
tnsr::II< DataType, 3, Frame::Inertialinverse_spatial_metric (const DataType &chi, const DataType &cos_theta, const DataType &sin_theta, const DataType &phi) const
 
template<typename DataType >
Scalar< DataType > sqrt_det_spatial_metric (const DataType &chi) const
 
template<typename DataType >
auto make_metric_data (size_t num_points) const -> typename IntermediateVariables< DataType >::MetricData
 

Protected Attributes

std::string progenitor_filename_ {}
 
detail::ProgenitorProfile prog_data_ {}
 
double polytropic_constant_ = std::numeric_limits<double>::signaling_NaN()
 
double polytropic_exponent_ = std::numeric_limits<double>::signaling_NaN()
 
EquationsOfState::PolytropicFluid< true > equation_of_state_ {}
 
double central_angular_velocity_
 
double inv_diff_rot_parameter_ = std::numeric_limits<double>::signaling_NaN()
 

Friends

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

Detailed Description

Evolve a stellar collapse (progenitor) profile through collapse.

Read the 1D core-collapse supernova (CCSN) profile from file, assuming the following format of the data:

  • 1st row - number of radial points in data set, followed by 6 columns of 0s
  • Subsequent rows contain these column headers:
    • radius, rest mass density, specific internal energy, radial velocity, electron fraction, \(X\), \(\Phi\).

These columns assume a metric of the form \(ds^2 = -e^{2\Phi} dt^2 + X^2 dr^2 + r^2 d\theta^2 + r^2 \sin^2\theta d\phi^2\), following [139].

Units: The input file is assumed to be in cgs units and will be converted to dimensionless units upon readin, setting \(c = G = M_\odot = 1\).

Rotation: Once the stationary progenitor is constructed, an artificial rotation profile can be assigned to the matter. It takes the form \(\Omega(r) = \Omega_0/(1 + (r_\perp/A)^2)\), where \(\Omega_0\) is the central rotation rate, \(r_\perp\) is the distance from the rotation axis, and \(A\) is the differential rotation parameter. Large values of \(A\) correspond to more solid-body rotation. Small values correspond to stronger differential rotation. The axis of rotation is assumed to be the z axis.

Member Function Documentation

◆ get_clone()

auto grmhd::AnalyticData::CcsnCollapse::get_clone ( ) const -> std::unique_ptr< evolution::initial_data::InitialData >
overridevirtual

Member Data Documentation

◆ central_angular_velocity_

double grmhd::AnalyticData::CcsnCollapse::central_angular_velocity_
protected

◆ help

constexpr Options::String grmhd::AnalyticData::CcsnCollapse::help
staticconstexpr
Initial value:
= {
"Core collapse supernova initial data, read in from a profile containing"
" hydrodynamic primitives and metric variables. The data "
"are read in from disk."}

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