SpECTRE  2021.08.02
grmhd::Solutions::KomissarovShock Class Reference

A one-dimensional shock solution for an ideal fluid in Minkowski spacetime. More...

#include <KomissarovShock.hpp>

Classes

struct  AdiabaticIndex
 
struct  LeftMagneticField
 
struct  LeftPressure
 
struct  LeftRestMassDensity
 
struct  LeftSpatialVelocity
 
struct  RightMagneticField
 
struct  RightPressure
 
struct  RightRestMassDensity
 
struct  RightSpatialVelocity
 
struct  ShockSpeed
 

Public Types

using equation_of_state_type = EquationsOfState::IdealFluid< true >
 
using options = tmpl::list< AdiabaticIndex, LeftRestMassDensity, RightRestMassDensity, LeftPressure, RightPressure, LeftSpatialVelocity, RightSpatialVelocity, LeftMagneticField, RightMagneticField, ShockSpeed >
 
- Public Types inherited from grmhd::AnalyticSolution
template<typename DataType >
using tags = tmpl::push_back< typename gr::AnalyticSolution< 3 >::template tags< DataType >, hydro::Tags::RestMassDensity< DataType >, hydro::Tags::SpecificInternalEnergy< 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

 KomissarovShock (const KomissarovShock &)=delete
 
KomissarovShockoperator= (const KomissarovShock &)=delete
 
 KomissarovShock (KomissarovShock &&) noexcept=default
 
KomissarovShockoperator= (KomissarovShock &&) noexcept=default
 
 KomissarovShock (double adiabatic_index, double left_rest_mass_density, double right_rest_mass_density, double left_pressure, double right_pressure, const std::array< double, 3 > &left_spatial_velocity, const std::array< double, 3 > &right_spatial_velocity, const std::array< double, 3 > &left_magnetic_field, const std::array< double, 3 > &right_magnetic_field, double shock_speed) noexcept
 
 KomissarovShock (CkMigrateMessage *) noexcept
 
template<typename DataType , typename... Tags>
tuples::TaggedTuple< Tags... > variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< Tags... >) const noexcept
 Retrieve a collection of hydrodynamic variables at position x.
 
template<typename DataType , typename Tag >
tuples::TaggedTuple< Tag > variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< Tag >) const noexcept
 Retrieve the metric variables.
 
const EquationsOfState::IdealFluid< true > & equation_of_state () const noexcept
 
void pup (PUP::er &) noexcept
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< hydro::Tags::RestMassDensity< DataType > >) const noexcept -> tuples::TaggedTuple< hydro::Tags::RestMassDensity< DataType > >
 Retrieve the GRMHD variables at a given position.
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< hydro::Tags::SpecificInternalEnergy< DataType > >) const noexcept -> tuples::TaggedTuple< hydro::Tags::SpecificInternalEnergy< DataType > >
 Retrieve the GRMHD variables at a given position.
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< hydro::Tags::Pressure< DataType > >) const noexcept -> tuples::TaggedTuple< hydro::Tags::Pressure< DataType > >
 Retrieve the GRMHD variables at a given position.
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< hydro::Tags::SpatialVelocity< DataType, 3 > >) const noexcept -> tuples::TaggedTuple< hydro::Tags::SpatialVelocity< DataType, 3 > >
 Retrieve the GRMHD variables at a given position.
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< hydro::Tags::MagneticField< DataType, 3 > >) const noexcept -> tuples::TaggedTuple< hydro::Tags::MagneticField< DataType, 3 > >
 Retrieve the GRMHD variables at a given position.
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< hydro::Tags::DivergenceCleaningField< DataType > >) const noexcept -> tuples::TaggedTuple< hydro::Tags::DivergenceCleaningField< DataType > >
 Retrieve the GRMHD variables at a given position.
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< hydro::Tags::LorentzFactor< DataType > >) const noexcept -> tuples::TaggedTuple< hydro::Tags::LorentzFactor< DataType > >
 Retrieve the GRMHD variables at a given position.
 
template<typename DataType >
auto variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< hydro::Tags::SpecificEnthalpy< DataType > >) const noexcept -> tuples::TaggedTuple< hydro::Tags::SpecificEnthalpy< DataType > >
 Retrieve the GRMHD variables at a given position.
 

Static Public Attributes

static constexpr Options::String help
 
- Static Public Attributes inherited from grmhd::AnalyticSolution
static constexpr size_t volume_dim = 3_st
 

Protected Attributes

EquationsOfState::IdealFluid< true > equation_of_state_ {}
 
gr::Solutions::Minkowski< 3 > background_spacetime_ {}
 
double adiabatic_index_ = std::numeric_limits<double>::signaling_NaN()
 
double left_rest_mass_density_ = std::numeric_limits<double>::signaling_NaN()
 
double right_rest_mass_density_
 
double left_pressure_ = std::numeric_limits<double>::signaling_NaN()
 
double right_pressure_ = std::numeric_limits<double>::signaling_NaN()
 
std::array< double, 3 > left_spatial_velocity_
 
std::array< double, 3 > right_spatial_velocity_
 
std::array< double, 3 > left_magnetic_field_
 
std::array< double, 3 > right_magnetic_field_
 
double shock_speed_ = std::numeric_limits<double>::signaling_NaN()
 

Friends

bool operator== (const KomissarovShock &lhs, const KomissarovShock &rhs) noexcept
 
bool operator!= (const KomissarovShock &lhs, const KomissarovShock &rhs) noexcept
 

Detailed Description

A one-dimensional shock solution for an ideal fluid in Minkowski spacetime.

This solution consists of a left state for \(x<0\) and a right state for \(x\ge 0\), each with constant fluid variables. The interface between these states moves with the shock speed \(\mu\) as described in [65].

Note
We do not currently support 1D RMHD, so this class provides a 3D solution with \(x\)-dependence only. Therefore the computational domain can be represented by a single element with periodic boundary conditions in the \(y\) and \(z\) directions.

Member Data Documentation

◆ help

constexpr Options::String grmhd::Solutions::KomissarovShock::help
staticconstexpr
Initial value:
= {
"Analytic initial data for a Komissarov shock test. The fluid variables "
"are set homogeneously on either half of the domain left and right of "
"x=0."}

◆ left_magnetic_field_

std::array<double, 3> grmhd::Solutions::KomissarovShock::left_magnetic_field_
protected

◆ left_spatial_velocity_

std::array<double, 3> grmhd::Solutions::KomissarovShock::left_spatial_velocity_
protected

◆ right_magnetic_field_

std::array<double, 3> grmhd::Solutions::KomissarovShock::right_magnetic_field_
protected

◆ right_rest_mass_density_

double grmhd::Solutions::KomissarovShock::right_rest_mass_density_
protected

◆ right_spatial_velocity_

std::array<double, 3> grmhd::Solutions::KomissarovShock::right_spatial_velocity_
protected