|
SpECTRE
v2025.08.19
|
Poloidal magnetic field for GRMHD initial data. More...
#include <Poloidal.hpp>
Classes | |
| struct | Center |
| struct | CutoffPressure |
| struct | MaxDistanceFromCenter |
| struct | PressureExponent |
| struct | VectorPotentialAmplitude |
Public Types | |
| using | options = tmpl::list< PressureExponent, CutoffPressure, VectorPotentialAmplitude, Center, MaxDistanceFromCenter > |
Public Member Functions | |
| Poloidal (const Poloidal &)=default | |
| Poloidal & | operator= (const Poloidal &)=default |
| Poloidal (Poloidal &&)=default | |
| Poloidal & | operator= (Poloidal &&)=default |
| Poloidal (size_t pressure_exponent, double cutoff_pressure, double vector_potential_amplitude, std::array< double, 3 > center, double max_distance_from_center) | |
| auto | get_clone () const -> std::unique_ptr< InitialMagneticField > override |
| void | pup (PUP::er &p) override |
| void | variables (gsl::not_null< tnsr::I< DataVector, 3 > * > result, const tnsr::I< DataVector, 3 > &coords, const Scalar< DataVector > &pressure, const Scalar< DataVector > &sqrt_det_spatial_metric, const tnsr::i< DataVector, 3 > &deriv_pressure) const override |
Retrieve magnetic fields at (x) More... | |
| void | variables (gsl::not_null< tnsr::I< double, 3 > * > result, const tnsr::I< double, 3 > &coords, const Scalar< double > &pressure, const Scalar< double > &sqrt_det_spatial_metric, const tnsr::i< double, 3 > &deriv_pressure) const override |
Retrieve magnetic fields at (x) More... | |
| bool | is_equal (const InitialMagneticField &rhs) const override |
| virtual auto | get_clone () const -> std::unique_ptr< InitialMagneticField >=0 |
| virtual void | variables (gsl::not_null< tnsr::I< DataVector, 3 > * > result, const tnsr::I< DataVector, 3 > &coords, const Scalar< DataVector > &pressure, const Scalar< DataVector > &sqrt_det_spatial_metric, const tnsr::i< DataVector, 3 > &deriv_pressure) const =0 |
| virtual void | variables (gsl::not_null< tnsr::I< double, 3 > * > result, const tnsr::I< double, 3 > &coords, const Scalar< double > &pressure, const Scalar< double > &sqrt_det_spatial_metric, const tnsr::i< double, 3 > &deriv_pressure) const =0 |
| virtual bool | is_equal (const InitialMagneticField &rhs) const =0 |
Static Public Attributes | |
| static constexpr Options::String | help = {"Poloidal initial magnetic field"} |
Friends | |
| bool | operator== (const Poloidal &lhs, const Poloidal &rhs) |
| bool | operator!= (const Poloidal &lhs, const Poloidal &rhs) |
Poloidal magnetic field for GRMHD initial data.
The vector potential has the form
\begin{align*} A_{\phi} = A_b \varpi^2 \max(p-p_{\mathrm{cut}}, 0)^{n_s} , \end{align*}
where \(A_b\) controls the amplitude of the magnetic field, \(\varpi^2=x^2+y^2=r^2-z^2\) is the cylindrical radius, \(n_s\) controls the degree of differentiability, and \(p_{\mathrm{cut}}\) controls the pressure cutoff below which the magnetic field is zero.
In Cartesian coordinates the vector potential is:
\begin{align*} A_x & = -\frac{y}{\varpi^2}A_\phi = -y A_b\max(p-p_{\mathrm{cut}}, 0)^{n_s}, \\ A_y & = \frac{x}{\varpi^2}A_\phi = x A_b\max(p-p_{\mathrm{cut}}, 0)^{n_s}, \\ A_z & = 0, \end{align*}
On the region where the field is non-zero, the magnetic field is given by:
\begin{align*} B^x & = -\frac{A_b n_s}{\sqrt{\gamma}} (p-p_{\mathrm{cut}})^{n_s-1} x \partial_z p \\ B^x & = -\frac{A_b n_s}{\sqrt{\gamma}} (p-p_{\mathrm{cut}})^{n_s-1} y \partial_z p \\ B^z & = \frac{A_b}{\sqrt{\gamma}}\left[ 2(p-p_{\mathrm{cut}})^{n_s} + n_s (p-p_{\mathrm{cut}})^{n_s-1} (x \partial_x p + y \partial_y p) \right] \end{align*}
Taking the small- \(r\) limit gives the magnetic field at the origin:
\begin{align*} B^x&=0, \\ B^y&=0, \\ B^z&=\frac{A_b}{\sqrt{\gamma}} 2(p-p_{\mathrm{cut}})^{n_s}. \end{align*}
Note that the coordinates are relative to the Center passed in, so the field can be centered about any arbitrary point. The field is also zero outside of MaxDistanceFromCenter, so that compact support can be imposed if necessary.
variables function. This is so that multiple magnetic fields can be superposed. Each magnetic field configuration does a += to make this possible.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Retrieve magnetic fields at (x)
Implements grmhd::AnalyticData::InitialMagneticFields::InitialMagneticField.
|
overridevirtual |
Retrieve magnetic fields at (x)
Implements grmhd::AnalyticData::InitialMagneticFields::InitialMagneticField.