Guiding-centre model¶
This page derives the four-dimensional canonical system that the symplectic integrators advance, its normalisation in the code, and the invariants and the trapping parameter reported in the outputs. Usage: Running SIMPLE.
Phase-space Lagrangian¶
A particle of mass \(m = n_d m_p\) and charge \(e = n_e e_0\)
(n_d, n_e) moves in a static field
\(\mathbf B = \nabla\times\mathbf A\) without electric field. In Gaussian
units and arbitrary spatial coordinates \(x^k\), the guiding-centre
phase-space Lagrangian to first order in \(\rho_L/L\) is (Littlejohn 1983)
with covariant components \(h_k = B_k/B\), gyrophase \(\gamma\) and magnetic moment \(\mu = m v_\perp^2/(2B)\). \(\gamma\) is cyclic, so \(\mu\) is constant; \(H\) has no explicit time dependence, so the energy is constant. Position and \(v_\parallel\) remain: four phase-space variables.
Canonical form¶
If the coordinates \((r,\vartheta,\varphi)\) satisfy \(A_r = h_r = 0\) (construction in Coordinates and field representation), the \(\dot r\) term of (1) vanishes and
so \((\vartheta,p_\vartheta)\) and \((\varphi,p_\varphi)\) are canonical pairs. The integrators carry
and evaluate the field at \((r,\vartheta,\varphi)\). Everything else is a function of \(z\):
get_val in src/field_can.f90 implements (3);
get_derivatives and get_derivatives2 add first and second
\(z\)-derivatives by the chain rule. Since \(r\) replaces
\(p_\vartheta\), Hamilton’s equations follow by the implicit-function
theorem at fixed \(p_\vartheta(z)\):
With \(\partial_{p_\varphi} H = v_\parallel/h_\varphi\) and
\(\partial_{p_\varphi} p_\vartheta = h_\vartheta/h_\varphi\) (normalised
units) the third equation becomes
\(\dot\varphi = (v_\parallel - h_\vartheta\,\partial_r H/\partial_r
p_\vartheta)/h_\varphi\), as coded in sympl_euler1_advance_angles and
gauss_canfield_residual. Albert, Kasilov and Kernbichler (2020, JCP)
introduced this non-canonical quadrature. It requires
\(\partial_r p_\vartheta \approx (e/c)\,\psi_\text{tor}'(r) \neq 0\),
which fails at the axis for \(r=\rho\); for \(r=s\) the polar
singularity at \(s=0\) remains (treatment in Integrators).
Normalisation¶
Inside the code all lengths are in cm, fields in G, and the reference speed is the birth speed
set in src/params.f90 (params_init). Time is the path length
\(\tau = v_0 t\). The public state of a marker is
\(z_\text{out} = (r,\vartheta,\varphi,v/v_0,\lambda)\).
The symplectic integrators use a second set of normalised quantities, marked by a bar, in which the Hamiltonian has the form \(\bar H = \bar v_\parallel^2/2 + J_\perp B\):
Quantity |
Definition |
In the code |
|---|---|---|
parallel velocity |
\(\bar v_\parallel = \sqrt2\,v_\parallel/v_0 = \sqrt2\,(v/v_0)\lambda\) |
|
perpendicular invariant |
\(J_\perp = 2\mu/(m v_0^2) = (v/v_0)^2(1-\lambda^2)/B\) |
|
Hamiltonian |
\(\bar H = 2H/(m v_0^2) = (v/v_0)^2\) |
|
gyroradius parameter |
\(\bar\rho_0 = \rho_0/\sqrt2\) |
|
canonical momenta |
\(\bar p_k = p_k/(m v_0/\sqrt2) = \bar v_\parallel h_k + A_k/\bar\rho_0\) |
|
time |
\(\bar t = \tau/\sqrt2\) |
|
With these definitions Hamilton’s equations keep their form,
\(d\bar q/d\bar t = \partial\bar H/\partial\bar p\), because
\(\partial H/\partial p = (v_0/\sqrt2)\,\partial\bar H/\partial\bar p\).
src/simple.f90 (encode_symplectic_state) is the single conversion
from \(z_\text{out}\) to \((r,\vartheta,\varphi,\bar p_\varphi)\);
the reverse map is
\(v/v_0 = \sqrt{\bar H} = \sqrt{J_\perp B + \bar v_\parallel^2/2}\) and
\(\lambda = \bar v_\parallel/(\sqrt2\,v/v_0)\). After a collision
update_momentum re-encodes the state in the same way (Collisions).
Invariants and trapping parameter¶
For each marker the outputs report, at the start point
(compute_pitch_angle_params in src/simple_main.f90),
where \(B_\text{min}\) and \(B_\text{max}\) are the extrema of
\(B\) on the start surface (get_bminmax). \(\kappa < 0\) is
equivalent to \(\lambda^2 > 1 - B/B_\text{max}\), i.e. a passing orbit;
\(\kappa = 0\) is the trapped-passing boundary and \(\kappa = 1\) a
deeply trapped particle at \(B_\text{min}\); contr_pp skips passing
markers by \(\kappa\). Without collisions \(\bar H\),
\(J_\perp\) and, in axisymmetry, \(\bar p_\varphi\) are invariants;
src/orbit_invariants.f90 converts between states and invariants.
References¶
R. G. Littlejohn, Variational principles of guiding centre motion, J. Plasma Phys. 29, 111 (1983), https://doi.org/10.1017/S002237780000060X
C. G. Albert, S. V. Kasilov, W. Kernbichler, Symplectic integration with non-canonical quadrature for guiding-center orbits in magnetic confinement devices, J. Comput. Phys. 403, 109065 (2020), https://doi.org/10.1016/j.jcp.2019.109065