Linear Model And Derivations
This page records the linear model that GKX benchmarks. The nonlinear solver adds the \(E\times B\) and flutter brackets to the same operator.
Scope
The linear benchmark rows of the evidence ledger (tools/evidence_ledger.toml)
cover:
KAW: slab kinetic Alfven wave against the analytic dispersion relation
ETG: kinetic electrons with Boltzmann ions, electrostatic
W7-X and HSX: ITG on VMEC-derived stellarator geometry
Cyclone base case (adiabatic electrons), in s-alpha and in Miller geometry
KBM: kinetic ions and electrons, \(A_\parallel\) on and \(B_\parallel\) off
Each row is scanned in \(k_y\). Its status (passing or provisional), measured mismatch, reference and velocity-space regularization are listed in Validation, which is generated from the ledger.
Normalized equation
For species \(s\), we evolve Laguerre-Hermite moments \(G^{(s)}_{\ell m}(k_x, k_y, z, t)\) in a flux tube:
where:
\(\mathcal{S}\) is parallel streaming (Hermite ladder)
\(\mathcal{M}\) is mirror coupling (\(b'(z)\) geometry factor)
\(\mathcal{C}\) and \(\mathcal{G}\) are curvature and grad-\(B\) drifts
\(\mathcal{D}\) is diamagnetic drive from \(a/L_n, a/L_T\)
\(\mathcal{K}\) contains collisions/hypercollisions/end damping
The field-coupled variable is
with \(J_\ell^B = J_\ell + J_{\ell-1}\).
Hermite-Laguerre projection
The reduced distribution is expanded as
with orthogonality
This gives sparse couplings:
streaming: \(m \leftrightarrow m\pm1\)
curvature: \(m \leftrightarrow m, m\pm2\)
grad-\(B\): \(\ell \leftrightarrow \ell, \ell\pm1\)
mirror: mixed \((\ell\pm1, m\pm1)\) stencil
These sparsity patterns are implemented as fused tensor kernels in the RHS.
Gyroaverage and \(k_\perp\)
GKX uses the Laguerre gyroaverage
For s-alpha geometry, the metric coefficients \(gds2, gds21, gds22\) define
including linked/NTFT corrections when enabled.
Field equations
Electrostatic limit:
Electromagnetic linear closure:
coupled solve for \((\phi, B_\parallel)\) from quasineutrality and perpendicular Ampere
\(A_\parallel\) from parallel Ampere
The KBM benchmark runs with \(A_\parallel\) on and \(B_\parallel\) off, because its reference omits \(\delta B_\parallel\).
Growth-rate/frequency extraction
Time-integrated runs extract the growth rate and frequency two ways:
Log-linear fit on complex mode signal \(s(t)\):
\[s(t) \approx s_0 e^{(\gamma - i\omega)t} \Rightarrow \log |s| = \gamma t + c,\quad \arg s = -\omega t + c_\phi.\]Instantaneous ratio diagnostic (for consistency checks):
\[r_n = \frac{s_{n+1}}{s_n}, \quad \gamma_n = \frac{\log |r_n|}{\Delta t}, \quad \omega_n = -\frac{\arg(r_n)}{\Delta t}.\]
Windows are selected from intervals with sustained log-linear behavior and
finite amplitude support
(gkx.diagnostics.growth_rates.fit_growth_rate_auto()). The eigensolver
path returns the eigenvalue directly and certifies it by its residual; see
Methods and Decisions.
Numerical realization
perpendicular Fourier representation in \((k_x, k_y)\)
field-aligned \(z\) grid with linked boundary support
JAX-fused RHS with cache-backed geometry/gyroaverage tensors
explicit
rk2/rk4time stepping, at a fixed step or under the CFL controller (gkx.config.TimeConfig)the matrix-free
adaptiveKrylov eigensolver, thegkx.solvers_linear_krylov.KrylovConfigdefault, with shift-invert selectable
Benchmark contract
For all linear benchmark plots/tables:
report \(\gamma,\omega\) with explicit normalization
publish mismatch tables by scan coordinate (\(k_y\) or \(\beta_{ref}\))
include per-case parameter tables (geometry, gradients, species, toggles, grid, resolution)
give every published number a ledger row, so it appears in Validation