Theory

For a full operator-level derivation tied to the implemented code paths (normalization, Hermite-Laguerre projection, field equations, and growth-rate diagnostics), see Linear Model And Derivations. For the explicit implemented operator set, collisions, hypercollisions, nonlinear brackets, and parameter-to-source mapping, see Operators And Terms.

Gyrokinetic ordering

SPECTRAX-GK targets the low-frequency, strongly magnetized regime where the characteristic fluctuation frequency is small compared to the ion cyclotron frequency. In this limit, the phase-space dynamics can be reduced to a five-dimensional gyrokinetic system for the non-adiabatic part of the distribution function. Classic derivations of the gyrokinetic equation can be found in Frieman & Chen (1982) and Antonsen & Lane (1980). [FC82] [AL80]

Flux-tube model

We employ a field-aligned, local flux-tube model in which the perpendicular spatial dependence is represented spectrally and the parallel coordinate is resolved along a field line. This approximation underlies the Cyclone base case benchmark commonly used in gyrokinetic validation studies. [Dimits00]

The default boundary condition is a linked (twist-and-shift) flux tube, so the parallel derivative couples Fourier modes across adjacent \(k_x\) indices. For non-twisting flux tubes (NTFT), SPECTRAX-GK employs an m0 and deltaKx formulation compatible with GX, which modifies the effective \(k_\perp\) and drift terms using the same twist factor and linking indices.

Hermite-Laguerre velocity space

The perturbed distribution is expanded in a Hermite (parallel velocity) and Laguerre (magnetic moment) basis. For a single species, the expansion is

\[g(\mathbf{k}, \theta, v_\parallel, \mu) = \sum_{\ell=0}^{N_\ell-1} \sum_{m=0}^{N_m-1} G_{\ell m}(\mathbf{k}, \theta) L_\ell(b) H_m(v_\parallel),\]

with the gyroaverage factor

\[J_\ell(b) = e^{-b/2} L_\ell(b),\]

where \(b = k_\perp^2 \rho^2\). This Laguerre-Hermite formulation is detailed by Mandell, Dorland & Landreman (2017). [MDL17]

Field solve and gyrokinetic variable

SPECTRAX-GK supports electrostatic and electromagnetic linear closures. For electrostatic runs, quasineutrality is solved in Fourier space for \(\phi\), with an optional adiabatic response controlled by \(\tau_e = T_i/T_e\):

\[\left(\tau_e + \sum_s \frac{Z_s^2 n_s}{T_s}\left[1-\sum_{\ell} J_{\ell}^2\right]\right) \phi = \sum_s Z_s n_s \sum_{\ell} J_{\ell} G_{\ell, m=0}.\]

Electromagnetic runs solve the coupled quasineutrality/perpendicular-Ampere system for \((\phi, B_\parallel)\) and then obtain \(A_\parallel\) from parallel Ampere’s law. The gyrokinetic variable is

\[H_{\ell m} = G_{\ell m} + \frac{Z_s}{T_s}\,J_\ell \phi \, \delta_{m0} - \frac{Z_s v_{th,s}}{T_s}\,J_\ell A_\parallel \, \delta_{m1} + J_{\ell}^{B}\,B_\parallel \, \delta_{m0},\]

with \(J_{\ell}^{B} = J_{\ell} + J_{\ell-1}\). These relations match the Laguerre-Hermite pseudo-spectral form used in the gyrokinetic literature.

Linear gyrokinetic operator

In the linear model, the Hermite-Laguerre moments evolve according to a drift/mirror operator,

\[\frac{\partial G_{\ell m}}{\partial t} + v_{\mathrm{th}}\,\mathcal{L}_m[H] + v_{\mathrm{th}}\,b^\prime(\theta)\,\mathcal{M}_{\ell m}[H] = -i Z/T\,\bigl(c_v \mathcal{C}_m[H] + g_b \mathcal{G}_\ell[H]\bigr) + i k_y \phi \,\mathcal{D}_{\ell m},\]

where \(\mathcal{L}_m\) is the Hermite streaming ladder and \(b^\prime(\theta)\) is the parallel magnetic field gradient used in the mirror force. The curvature (cv) and grad-\(B\) (gb) drift couplings are encoded in \(\mathcal{C}_m\) and \(\mathcal{G}_\ell\). Explicitly,

\[\mathcal{C}_m[H] = \sqrt{(m+1)(m+2)} H_{\ell, m+2} + (2m+1) H_{\ell m} + \sqrt{m(m-1)} H_{\ell, m-2},\]
\[\mathcal{G}_\ell[H] = (\ell+1) H_{\ell+1, m} + (2\ell+1) H_{\ell m} + \ell H_{\ell-1, m},\]
\[\mathcal{M}_{\ell m}[H] = -\sqrt{m+1}\,(\ell+1) H_{\ell, m+1} -\sqrt{m+1}\,\ell H_{\ell-1, m+1} +\sqrt{m}\,\ell H_{\ell, m-1} +\sqrt{m}\,(\ell+1) H_{\ell+1, m-1}.\]

The diamagnetic drive term \(\mathcal{D}_{\ell m}\) follows a Laguerre formulation with explicit \(R/L_n\) and \(R/L_T\) dependence, including a separate coupling in \(m=2\) for temperature-gradient drive.

Field-aligned streaming representation

To maintain compatibility with audited reference benchmarks, SPECTRAX-GK supports applying the parallel derivative to a gyrokinetic variable that includes the explicit field terms but omits the full \(H_{\ell m}\) correction at m>1. This is achieved by defining

\[\tilde{G}_{\ell m} = G_{\ell m} + \frac{Z_s}{T_s} J_\ell \phi\,\delta_{m0} - \frac{Z_s v_{th}}{T_s} J_\ell A_\parallel\,\delta_{m1} + J_\ell^B B_\parallel\,\delta_{m0},\]

and then applying the parallel derivative to \(\tilde{G}\) before the Hermite ladder. This matches the ordering in GX’s grad_parallel_linked implementation and preserves the validated linked-boundary operator contract used by the imported-geometry and benchmark lanes.

Nonlinear E×B and flutter terms

The nonlinear gyrokinetic equation adds the \(E\times B\) bracket and the electromagnetic flutter coupling. In SPECTRAX-GK the nonlinear contribution is

\[\left(\frac{\partial g}{\partial t}\right)_\mathrm{NL} = -\left\{ \langle \chi \rangle, g \right\} - v_{th}\,\left(\sqrt{m+1}\,\{\langle A_\parallel \rangle, g\}_{m+1} + \sqrt{m}\,\{\langle A_\parallel \rangle, g\}_{m-1}\right),\]

with the Poisson bracket

\[\{g, \chi\} = \frac{\partial g}{\partial x}\frac{\partial \chi}{\partial y} - \frac{\partial g}{\partial y}\frac{\partial \chi}{\partial x}.\]

The gyrokinetic potential includes the perpendicular magnetic perturbation through

\[\chi = J_\ell \phi + J_\ell^B B_\parallel,\]

so the nonlinear operator naturally splits into \(E\times B\), \(B_\parallel\), and flutter contributions. The implementation in spectraxgk.terms.nonlinear supports standard gyrokinetic normalization: gradients are computed with FFTs in \(x,y\), the bracket is evaluated in real space, and the result is filtered by the de-alias mask before returning to spectral space.