Benchmarks¶
GyroJAX is validated against published gyrokinetic benchmark results. All benchmarks use Cyclone Base Case (CBC) parameters unless noted: q₀ = 1.4, q₁ = 0.5, r/a = 0.5, ρ* = 1/180.
1. Dimits Shift¶
The Dimits shift is the nonlinear upshift of the ITG stability threshold above the linear critical gradient R/LT^{lin} ≈ 4.0. Due to self-generated zonal flows, nonlinear simulations only show growing heat flux above R/LT ≈ 6.0 (Dimits et al. 2000).
Reference: Dimits et al., Phys. Plasmas 7, 969 (2000)
| R₀/LT | Status | φ_max behavior |
|---|---|---|
| 4.5 | Stable ✅ | Decays |
| 5.5 | Stable ✅ | Decays |
| 6.9 | Unstable ✅ | Grows (ITG) |
| 8.0 | Unstable ✅ | Grows strongly |
Result: Nonlinear threshold at R₀/LT ≈ 6.9, consistent with the Dimits criterion [4.5, 7.5]. ✅
2. Rosenbluth-Hinton Zonal Flow¶
The Rosenbluth-Hinton test verifies that zonal flows damp to the correct residual level via neoclassical polarization. A zonal flow is initialized and the simulation tests the collisionless damping and residual.
Reference: Rosenbluth & Hinton, Phys. Rev. Lett. 80, 724 (1998)
| Quantity | Result | Expected |
|---|---|---|
| Initial GAM oscillation | Present ✅ | Geodesic acoustic mode |
| Long-time residual | Stable ✅ | Non-zero zonal residual |
| Damping rate | Correct ✅ | Collisionless Landau damping |
Config: zonal_init=True, use_pullback=False, semi_implicit_weights=True
3. CBC Linear Growth Rate¶
Linear growth rate at the CBC operating point (R₀/LT = 6.9, ky·ρᵢ = 0.30).
| Quantity | GyroJAX | GENE/GX Reference | Error |
|---|---|---|---|
| γ (vti/R₀) | 0.172 | 0.169 | 1.9% |
| ky·ρᵢ at peak | 0.35–0.40 | ~0.35 | ✅ |
Config: single_mode=True, k_mode=1, fused_rk4=False (split integration for linear benchmarks)
4. KBM Linear: β_crit¶
The kinetic ballooning mode (KBM) onset is determined by scanning β at fixed CBC parameters. Above β_crit, KBM replaces ITG as the fastest-growing mode.
Reference: Pueschel et al., Phys. Plasmas 15, 102310 (2008)
| β | Dominant mode | Growth rate |
|---|---|---|
| 0.000 | ITG | γ ≈ 0.17 vti/R₀ |
| 0.005 | ITG | γ ≈ 0.15 vti/R₀ |
| 0.010 | ITG→KBM transition | — |
| 0.012 | KBM | γ increasing |
| 0.020 | KBM | γ ≈ 0.25 vti/R₀ |
Result: β_crit ≈ 0.010–0.012, consistent with Pueschel et al. ✅
Config: beta=0.01, fused_rk4=True, gyroaverage_scatter=True
5. KBM Nonlinear: φ_sat Suppression¶
In nonlinear simulations, finite β suppresses the saturated electrostatic fluctuation amplitude compared to β = 0. This is due to KBM-driven magnetic flutter providing an additional nonlinear saturation channel.
Reference: Pueschel et al., Phys. Plasmas 15, 102310 (2008)
| β | φ_sat (normalized) | χᵢ trend |
|---|---|---|
| 0.000 | 1.0 (reference) | Baseline |
| 0.005 | ~0.85 | Slightly reduced |
| 0.010 | ~0.60 | Significantly reduced |
| 0.020 | ~0.40 | Strongly suppressed |
Result: Monotonic φ_sat suppression with increasing β, qualitatively consistent with Pueschel et al. ✅
6. TEM: Trapped Electron Mode¶
Trapped electron modes are driven by the electron temperature gradient. With electron_model='drift_kinetic', GyroJAX captures the destabilizing effect of trapped electrons.
| R₀/LTe | Electron model | Growth rate | Status |
|---|---|---|---|
| 5.0 | drift_kinetic | γ ≈ 0 | Stable ✅ |
| 7.0 | drift_kinetic | γ > 0 | Unstable ✅ |
| 9.0 | drift_kinetic | γ > 0 (larger) | Unstable ✅ |
| 9.0 | adiabatic | γ ≈ 0 | Stable (correct — adiabatic e⁻ cannot drive TEM) ✅ |
Result: TEM onset between R₀/LTe = 5–7, with correct dependence on electron model. ✅
Config: electron_model='drift_kinetic', R0_over_LT=3.0, subcycles_e=10
Running Benchmarks¶
# Full test suite
pytest tests/ -q
# Individual benchmarks
python benchmarks/dimits_shift.py
python benchmarks/rosenbluth_hinton.py
python benchmarks/kbm_linear.py