Symmetric Quadratic Field
ElectromagneticFields.SymmetricQuadratic — Module
Symmetric quadratic mangetic field in (x,y,z) coordinates with covariant components of the vector potential given by
\[A (x,y,z) = \frac{B_0}{4} \big( - y \, (2 + x^2 + y^2) , \, x \, (2 + x^2 + y^2) , \, 0 \big)^T\]
resulting in the magnetic field with covariant components
\[B(x,y,z) = B_0 \, \begin{pmatrix} 0 \\ 0 \\ 1 + x^2 + y^2 \\ \end{pmatrix}\]
Parameters: B₀
Constructing the Field
using CairoMakie
using ElectromagneticFields
equ = SymmetricQuadratic.init(1.0)Symmetric Quadratic Magnetic FieldPlotting
The two components of the vector potential and the $z$ component of the magnetic field, which grows quadratically with the distance from the axis:
plot_equilibrium(equ)Evaluating the Field
SymmetricQuadratic.@code(1.0)The field is axisymmetric, so $|B|$ depends on the radius alone:
axisymmetric = B(0.0, 0.3, 0.4, 0.0) ≈ B(0.0, 0.5, 0.0, 0.0)
axisymmetrictrue