- The paper introduces FIRM3D, a framework that efficiently simulates energetic ion guiding center dynamics in complex 3D stellarator fields.
- It employs hybrid integration methods, including adaptive Dormand-Prince and symplectic Euler, to ensure accurate conservation of energy and momentum.
- The framework achieves significant computational speed-up with GPU acceleration and parallel processing, validated through cross-code comparisons and orbit diagnostics.
FIRM3D: A Computational Framework for Energetic Particle Dynamics in 3D Stellarator Fields
Introduction
The modeling of energetic particle (EP) dynamics is integral to the understanding and design of magnetic confinement fusion experiments, particularly as device configurations grow in complexity and approach operational regimes relevant for reactor applications. The "FIRM3D: Fast ion reduced models in 3D" framework (2605.16734) proposes a modular and computationally efficient approach for 3D simulation of guiding center dynamics for energetic ions in externally imposed magnetic and fluctuating MHD fields, targeted explicitly at the needs of the stellarator and broader fusion community. The software advances existing computational capabilities, enabling integrated studies of EP confinement, transport, and loss mechanisms driven by both equilibrium and perturbative fields.
Framework Overview and Computational Capabilities
FIRM3D is a hybrid Python/C++/CUDA software package, providing interfaces with established MHD equilibrium and wave stability codes, namely BOOZ_XFORM, AE3D, and FAR3D. The equilibrium field is specified via Fourier harmonics on a radial grid as generated by BOOZ_XFORM; FIRM3D employs high-order Lagrange interpolation in C++ to access the magnetic field values efficiently throughout the plasma volume. MHD perturbations, specifically those relevant to Alfvénic eigenmodes, can be superimposed via harmonics consistent with the underlying coordinate system.
The framework supports multiple orbit integration methods, including an adaptive Dormand-Prince 5th order Runge-Kutta routine (Boost ODEINT, custom variant), as well as a symplectic explicit-implicit Euler integrator tailored for the non-canonical guiding center Lagrangian. The core orbit integration and interpolation routines are implemented in C++, with MPI and OpenMP parallelization to accelerate computation, and a CUDA backend for GPU-accelerated trajectory tracing—critical for large-scale Monte Carlo studies of EP populations.
FIRM3D’s diagnostic suite encompasses Poincaré mapping, orbit classification (banana, ripple, transition, etc.), weighted Birkhoff averaging for integrability diagnostics, and computation of effective transport metrics. Monte Carlo particle ensembles can be initialized from arbitrary distribution functions or specified constants of motion.
Verification, Conservation, and Benchmarking
Rigorous verification is provided for energy and canonical momentum conservation in time-independent and quasisymmetric fields, respectively. The symplectic integrator demonstrates no net secular energy drift, in contrast to the Dormand-Prince variant which exhibits slow, but monotonic, drift over long integrations. For canonical momentum in strongly quasisymmetric fields, FIRM3D converges to a relative error of 10−8 at high resolution and tight tolerance.
Cross-code validation with the SIMPLE symplectic integration code yields pointwise trajectory agreement (7.8×10−3 error in the flux coordinate s) and indistinguishable loss fraction statistics for large ensembles over 10−2 s integration, confirming physical and numerical consistency.
Computational Efficiency and Scaling
FIRM3D scales efficiently across modern CPU and GPU resources. For large ensembles (e.g., N>103), GPU execution provides an order of magnitude performance improvement over a 128-thread CPU node, with the principal bottlenecks being move/copy operations of trajectory data and CUDA kernel launch latency for small problem sizes. The framework supports trivially parallel Monte Carlo sampling, making it well-suited for extensive EP loss and transport analyses in computationally intensive reactor-scale device models.
Application Examples and Numerical Results
In production-mode applications, FIRM3D has been used to track 5×105 alpha particles in a QA equilibrium over 10−2 s, achieving comprehensive loss statistics and classifying orbit typologies. Of the lost particles, the majority were banana-class or rapidly exiting particles, with a substantial fraction displaying threshold-level non-integrability (∼29% banana, 66% prompt exit). The normalized variance of the parallel adiabatic invariant and convection/diffusion metrics quantify the impact of field non-integrability and identify chaotic transport as the dominant loss mechanism.
Weighted Birkhoff averages applied to particle trajectories under AE perturbations serve as a reliable marker for distinguishing regular vs. chaotic motion, consistent with established theoretical predictions on Alfvénic EP transport [Duignan & Meiss, 2023; Knyazev et al., 2026]. The code has been instrumental in alpha confinement studies for next-stage stellarator reactors [Linden et al., 2026] and fast-ion transport in the presence of modeled AE activity [Paul et al., 2023].
Implications and Future Directions
FIRM3D represents a versatile and extensible toolkit for advancing the fidelity of EP modeling in 3D fusion magnetic fields. Its tight coupling with established stellarator optimization and analysis codes (SIMSOPT, BOOZ_XFORM), combined with open-source accessibility and GPU acceleration, positions it as a practical choice for both routine and cutting-edge physics studies.
The main theoretical implication is the enhanced ability to probe the delicate relationship between field quasisymmetry, trajectory integrability, and the role of MHD-driven perturbations in energetic particle transport—factors which are critical for the viability of advanced stellarator reactor designs. Practically, FIRM3D facilitates research into machine-specific EP loss channels, optimization of confinement properties, and rapid evaluation of proposed equilibria’s EP stability.
Future enhancements could involve further extension of the theoretical model (e.g., inclusion of collisional effects, self-consistent field coupling), tighter integration with detailed wave-particle interaction solvers, and adaptation for exascale computing platforms. There is clear scope for deployment in the design evaluation loop of commercial and next-generation stellarator reactors, as well as supporting advanced diagnostic interpretation in experimental campaigns.
Conclusion
FIRM3D offers a robust open-source solution for 3D kinetic modeling of energetic ions in complex magnetic geometries, with verified conservation properties, validated cross-code performance, and orders-of-magnitude computational acceleration on GPU architectures. Its diagnostics directly inform studies on the confinement and loss of fast ions, and its adoption is poised to support both theoretical investigations and engineering design of future fusion devices, particularly where stellarator-specific EP physics is pivotal (2605.16734).