SPECTRAX-GK

SPECTRAX-GK is a JAX-native gyrokinetic solver using Hermite-Laguerre velocity space, Fourier perpendicular coordinates, and field-aligned flux-tube geometry.

Install with pip install spectraxgk and run spectraxgk in a terminal to launch the default linear Cyclone demo. The same executable also accepts checked-in TOMLs directly and can plot saved runtime outputs with spectraxgk --plot <artifact>.

Documentation map

The documentation is organized so that the core physics, equations, numerical methods, and model-specific paths are easy to locate:

  • Theory summarizes the gyrokinetic ordering, field equations, and flux-tube assumptions.

  • Linear Model And Derivations gives the operator-level derivation tied directly to the implemented linear equations and diagnostics.

  • Operators And Terms lists every implemented term, collision model, hyperdiffusion/hypercollision control, and the runtime parameters that select them.

  • Numerics documents discretization, time integration, FFT brackets, solver contracts, and JAX parallelization.

  • Geometry and Input Files and Executable cover the supported model paths (analytic s-alpha, Miller, VMEC/imported geometry, slab) together with the TOML schema used by the executable and Python drivers.

For a first technical read, start with Theory, then move to Operators And Terms and Numerics. That path gives the governing equations, the term-by-term implementation contract, and the numerical approximations in the same order they appear in the code.

Contents