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

Analytic initial data for a magnetic rotor. More...

#include <MagneticRotor.hpp>

Classes

struct  AdiabaticIndex
 The adiabatic index of the ideal fluid. More...
 
struct  AngularVelocity
 Angular velocity inside the rotor. More...
 
struct  BackgroundDensity
 Density outside the rotor. More...
 
struct  MagneticField
 The x,y,z components of the uniform magnetic field threading the matter. More...
 
struct  Pressure
 Uniform pressure inside and outside the rotor. More...
 
struct  RotorDensity
 Density inside the rotor. More...
 
struct  RotorRadius
 Radius of the rotor. More...
 

Public Types

using equation_of_state_type = EquationsOfState::IdealFluid< true >
 
using options = tmpl::list< RotorRadius, RotorDensity, BackgroundDensity, Pressure, AngularVelocity, MagneticField, AdiabaticIndex >
 
- 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

 MagneticRotor (const MagneticRotor &)=default
 
MagneticRotoroperator= (const MagneticRotor &)=default
 
 MagneticRotor (MagneticRotor &&)=default
 
MagneticRotoroperator= (MagneticRotor &&)=default
 
 MagneticRotor (double rotor_radius, double rotor_density, double background_density, double pressure, double angular_velocity, const std::array< double, 3 > &magnetic_field, double adiabatic_index, const Options::Context &context={})
 
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, tmpl::list< Tag1, Tag2, Tags... >) const
 Retrieve a collection of hydrodynamic variables at position x.
 
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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, tmpl::list< hydro::Tags::Temperature< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::Temperature< DataType > >
 Retrieve the GRMHD variables at a given position.
 
virtual auto get_clone () const -> std::unique_ptr< InitialData >=0
 
- Public Member Functions inherited from hydro::TemperatureInitialization< MagneticRotor >
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
 

Friends

bool operator== (const MagneticRotor &lhs, const MagneticRotor &rhs)
 
bool operator!= (const MagneticRotor &lhs, const MagneticRotor &rhs)
 

Detailed Description

Analytic initial data for a magnetic rotor.

This is a test first described in [8] for classical MHD and later generalised to relativistic MHD in [47]

This effectively 2D test initially consists of an infinitely long cylinder of radius RotorRadius rotating about the z-axis with the given AngularVelocity. The rest mass density of the fluid inside the rotor, RotorDensity, is higher than the BackgroundDensity outside of the rotor. The fluid is at a constant Pressure. The rotor is embedded in a constant MagneticField (usually taken to be along the x-axis). The fluid is an ideal fluid with the given AdiabaticIndex. Evolving the initial data, magnetic braking will slow down the rotor, while dragging the magnetic field lines.

The standard test setup is done on a unit cube \([-0.5,0.5]^3\) with the following values given for the options:

Note that [192] uses different parameters,

The magnetic field in the disk should rotate by about 90 degrees by t = 0.4.

Member Function Documentation

◆ get_clone()

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

Member Data Documentation

◆ help

constexpr Options::String grmhd::AnalyticData::MagneticRotor::help
staticconstexpr
Initial value:
= {
"Magnetic rotor analytic initial data."}

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