SpECTRE  v2026.09.05
Loading...
Searching...
No Matches
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  LeftElectronFraction
struct  LeftMagneticField
struct  LeftPressure
struct  LeftRestMassDensity
struct  LeftSpatialVelocity
struct  RightElectronFraction
struct  RightMagneticField
struct  RightPressure
struct  RightRestMassDensity
struct  RightSpatialVelocity
struct  ShockSpeed

Public Types

using equation_of_state_type = EquationsOfState::IdealFluid<true>
using options
Public Types inherited from grmhd::AnalyticSolution
template<typename DataType>
using tags

Public Member Functions

 KomissarovShock (const KomissarovShock &)=default
KomissarovShock & operator= (const KomissarovShock &)=default
 KomissarovShock (KomissarovShock &&)=default
KomissarovShock & operator= (KomissarovShock &&)=default
 KomissarovShock (double adiabatic_index, double left_rest_mass_density, double right_rest_mass_density, double left_electron_fraction, double right_electron_fraction, 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)
auto get_clone () const -> std::unique_ptr< evolution::initial_data::InitialData > override
template<typename DataType, typename Tag1, typename Tag2, typename... Tags>
tuples::TaggedTuple< Tag1, Tag2, Tags... > variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< Tag1, Tag2, Tags... >) const
 Retrieve a collection of hydro variables at (x, t)
template<typename DataType, typename Tag, Requires< tmpl::list_contains_v< gr::analytic_solution_tags< 3, DataType >, Tag > > = nullptr>
tuples::TaggedTuple< Tag > variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< Tag >) const
 Retrieve the metric variables.
const EquationsOfState::IdealFluid< true > & equation_of_state () const
void pup (PUP::er &) override
template<typename DataType>
auto variables (const tnsr::I< DataType, 3 > &x, double t, tmpl::list< hydro::Tags::RestMassDensity< DataType > >) const -> 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::ElectronFraction< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::ElectronFraction< 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 -> 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 -> 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 -> 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 -> 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 -> 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 -> 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 -> tuples::TaggedTuple< hydro::Tags::SpecificEnthalpy< 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::Temperature< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::Temperature< DataType > >
 Retrieve the GRMHD variables at a given position.
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.
Public Member Functions inherited from hydro::TemperatureInitialization< KomissarovShock >
auto variables (const tnsr::I< DataType, Dim > &x, 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::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_electron_fraction_ = std::numeric_limits<double>::signaling_NaN()
double right_electron_fraction_
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)
bool operator!= (const KomissarovShock &lhs, const KomissarovShock &rhs)

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 [121].

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 Typedef Documentation

◆ options

Member Function Documentation

◆ get_clone()

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

Member Data Documentation

◆ help

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_electron_fraction_

double grmhd::Solutions::KomissarovShock::right_electron_fraction_
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

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