SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
grmhd::Solutions::AlfvenWave Class Reference

Circularly polarized Alfvén wave solution in Minkowski spacetime travelling along a background magnetic field. More...

#include <AlfvenWave.hpp>

Classes

struct  AdiabaticIndex
 The adiabatic index for the ideal fluid. More...
struct  BackgroundMagneticField
 The background static magnetic field vector. More...
struct  ElectronFraction
 The constant electron fraction throughout the fluid. More...
struct  Pressure
 The constant pressure throughout the fluid. More...
struct  RestMassDensity
 The constant rest mass density throughout the fluid. More...
struct  WaveMagneticField
 The sinusoidal magnetic field vector associated with the Alfvén wave, perpendicular to the background magnetic field vector. More...
struct  WaveNumber
 The wave number of the profile. More...

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

 AlfvenWave (const AlfvenWave &)=default
AlfvenWaveoperator= (const AlfvenWave &)=default
 AlfvenWave (AlfvenWave &&)=default
AlfvenWaveoperator= (AlfvenWave &&)=default
 AlfvenWave (double wavenumber, double pressure, double rest_mass_density, double electron_fraction, double adiabatic_index, const std::array< double, 3 > &background_magnetic_field, const std::array< double, 3 > &wave_magnetic_field)
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.
void pup (PUP::er &) override
const EquationsOfState::IdealFluid< true > & equation_of_state () const
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 hydro variable at (x, t)
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 hydro variable at (x, t)
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 hydro variable at (x, t)
template<typename DataType>
auto variables (const tnsr::I< DataType, 3 > &x, double, tmpl::list< hydro::Tags::Pressure< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::Pressure< DataType > >
 Retrieve hydro variable at (x, t)
template<typename DataType>
auto variables (const tnsr::I< DataType, 3 > &x, double, tmpl::list< hydro::Tags::SpatialVelocity< DataType, 3 > >) const -> tuples::TaggedTuple< hydro::Tags::SpatialVelocity< DataType, 3 > >
 Retrieve hydro variable at (x, t)
template<typename DataType>
auto variables (const tnsr::I< DataType, 3 > &x, double, tmpl::list< hydro::Tags::MagneticField< DataType, 3 > >) const -> tuples::TaggedTuple< hydro::Tags::MagneticField< DataType, 3 > >
 Retrieve hydro variable at (x, t)
template<typename DataType>
auto variables (const tnsr::I< DataType, 3 > &x, double, tmpl::list< hydro::Tags::DivergenceCleaningField< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::DivergenceCleaningField< DataType > >
 Retrieve hydro variable at (x, t)
template<typename DataType>
auto variables (const tnsr::I< DataType, 3 > &x, double, tmpl::list< hydro::Tags::LorentzFactor< DataType > >) const -> tuples::TaggedTuple< hydro::Tags::LorentzFactor< DataType > >
 Retrieve hydro variable at (x, t)
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 hydro variable at (x, t)
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 hydro variable at (x, t)
Public Member Functions inherited from hydro::TemperatureInitialization< AlfvenWave >
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 Member Functions

template<typename DataType>
DataType k_dot_x_minus_vt (const tnsr::I< DataType, 3 > &x, double t) const

Protected Attributes

double wavenumber_ = std::numeric_limits<double>::signaling_NaN()
double pressure_ = std::numeric_limits<double>::signaling_NaN()
double rest_mass_density_ = std::numeric_limits<double>::signaling_NaN()
double electron_fraction_ = std::numeric_limits<double>::signaling_NaN()
double adiabatic_index_ = std::numeric_limits<double>::signaling_NaN()
std::array< double, 3 > background_magnetic_field_
std::array< double, 3 > wave_magnetic_field_
EquationsOfState::IdealFluid< true > equation_of_state_ {}
tnsr::I< double, 3 > initial_unit_vector_along_background_magnetic_field_ {}
tnsr::I< double, 3 > initial_unit_vector_along_wave_magnetic_field_ {}
tnsr::I< double, 3 > initial_unit_vector_along_wave_electric_field_ {}
double magnitude_B0_ = std::numeric_limits<double>::signaling_NaN()
double magnitude_B1_ = std::numeric_limits<double>::signaling_NaN()
double magnitude_E_ = std::numeric_limits<double>::signaling_NaN()
double alfven_speed_ = std::numeric_limits<double>::signaling_NaN()
double fluid_speed_ = std::numeric_limits<double>::signaling_NaN()
gr::Solutions::Minkowski< 3 > background_spacetime_ {}

Friends

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

Detailed Description

Circularly polarized Alfvén wave solution in Minkowski spacetime travelling along a background magnetic field.

An analytic solution to the 3-D GRMHD system. The user specifies the wavenumber \(k\) of the Alfvén wave, the constant pressure throughout the fluid \(P\), the constant rest mass density throughout the fluid \(\rho_0\), the adiabatic index for the ideal fluid equation of state \(\gamma\), the magnetic field parallel to the wavevector \(\vec{B}_0\), and the transverse magnetic field vector \(\vec{B}_1\) at \(x=y=z=t=0\).

We define the auxiliary velocities:

\[v^2_{B0} = \frac{B_0^2}{\rho_0 h + B_0^2 + B_1^2}\]

\[v^2_{B1} = \frac{B_1^2}{\rho_0 h + B_0^2 + B_1^2}\]

The Alfvén wave phase speed that solves the GRMHD equations, even for finite amplitudes [52], is given by:

\[v_A^2 = \frac{2v^2_{B0}}{1 + \sqrt{1 - 4 v^2_{B0}v^2_{B1}}}\]

The amplitude of the fluid velocity is given by:

\[v_f^2 = \frac{2v^2_{B1}}{1 + \sqrt{1 - 4 v^2_{B0}v^2_{B1}}}\]

The electromagnetic field vectors define a set of basis vectors:

\begin{align*}\hat{b}_0 &= \vec{B_0}/B_0 \\ \hat{b}_1 &= \vec{B_1}/B_1 \\ \hat{e} &= \hat{b}_1 \times \hat{b}_0 \end{align*}

We also define the auxiliary variable for the phase \(\phi\):

\[\phi = k(\vec{x}\cdot\hat{b}_0 - v_A t)\]

In Cartesian coordinates \((x, y, z)\), and using dimensionless units, the primitive quantities at a given time \(t\) are then

\begin{align*}\rho(\vec{x},t) &= \rho_0 \\ \vec{v}(\vec{x},t) &= v_f(-\hat{b}_1\cos\phi +\hat{e}\sin\phi)\\ P(\vec{x},t) &= P, \\ \epsilon(\vec{x}, t) &= \frac{P}{(\gamma - 1)\rho_0}\\ \vec{B}(\vec{x},t) &= B_1(\hat{b}_1\cos\phi -\hat{e}\sin\phi) + \vec{B_0} \end{align*}

Note that the phase speed is not the characteristic Alfvén speed \(c_A\), which is the speed in the limiting case where the total magnetic field is parallel to the direction of propagation [52] :

\[c_A^2 = \frac{b^2}{\rho_0 h + b^2}\]

Where \(b^2\) is the invariant quantity \(B^2 - E^2\), given by:

\[b^2 = B_0^2 + B_1^2 - B_0^2 v_f^2\]

Member Typedef Documentation

◆ options

using grmhd::Solutions::AlfvenWave::options
Initial value:
The adiabatic index of the ideal fluid.
Definition BlastWave.hpp:120
The rest mass density of the fluid far from the black hole.
Definition BondiHoyleAccretion.hpp:100
The initial (constant) pressure of the fluid.
Definition KhInstability.hpp:138
The background static magnetic field vector.
Definition AlfvenWave.hpp:137
The sinusoidal magnetic field vector associated with the Alfvén wave, perpendicular to the background...
Definition AlfvenWave.hpp:147
The wave number of the profile.
Definition AlfvenWave.hpp:98

Member Function Documentation

◆ get_clone()

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

Member Data Documentation

◆ background_magnetic_field_

std::array<double, 3> grmhd::Solutions::AlfvenWave::background_magnetic_field_
protected

◆ help

Options::String grmhd::Solutions::AlfvenWave::help
staticconstexpr
Initial value:
= {
"Circularly polarized Alfven wave in Minkowski spacetime."}

◆ wave_magnetic_field_

std::array<double, 3> grmhd::Solutions::AlfvenWave::wave_magnetic_field_
protected

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