TRIMEG-GKX: an electromagnetic gyrokinetic particle code with a Piecewise Field-Aligned Finite Element Method for Micro- and Macro-Instability Studies in Tokamak Core Plasmas

Zhixin Lu, Guo Meng, Roman Hatzky, Philipp Lauber, Matthias Hoelzl · 2025

Read TRIMEG-GKX: an electromagnetic gyrokinetic particle code with a Piecewise Field-Aligned Finite Element Method for Micro- and Macro-Instability Studies in Tokamak Core Plasmas by Zhixin Lu, Guo Meng, Roman Hatzky, Philipp Lauber, Matthias Hoelzl (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-21837.txt.

Introduction

Zhixin Lu and colleagues describe a simulation code for the turbulent plasma inside tokamak fusion reactors, built around several unusual design choices. The code advances charged particles under the gyrokinetic equations, including electromagnetic effects, several particle species, and the shear Alfven waves that energetic particles excite. Writing in twenty twenty-five, the authors highlight its object-oriented structure, a filter-free treatment, and a high-order finite element method whose pieces follow the magnetic field. A mixed-variable pullback scheme enables the electromagnetic physics, and parallel work is shared by particle splitting and whole-domain cloning across machines.

Demonstrations cover three instability types: an energetic-particle-driven Alfven mode, the ion temperature gradient mode, and the kinetic ballooning mode. Both simplified and experimentally reconstructed equilibria from three European tokamaks ran well. A successor code for edge physics is planned on the same numerical base.

Catalog record

CREATORZhixin Lu, Guo Meng, Roman Hatzky, Philipp Lauber, Matthias Hoelzl
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE69 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-21837

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

TRIMEG-GKX: an electromagnetic gyrokinetic particle code with a Piecewise Field-Aligned Finite Element Method for Micro- and Macro-Instability Studies in Tokamak Core Plasmas Zhixin Lu, Guo Meng, Roman Hatzky, Philipp Lauber, Matthias Hoelzl Abstract The features of the TRIMEG-GKX code are described with emphasis on the exploration using novel/different schemes compared to other gyrokinetic codes, particularly the use of object-oriented programming, filter/buffer-free treatment, and a high-order piecewise field-aligned finite element method. The TRIMEG-GKX code solves the electromagnetic gyrokinetic equation using the particle-in-cell scheme, taking into account multi-species effects and shear Alfvén physics. The mixed-variable/pullback scheme has been implemented to enable electromagnetic studies. This code is parallelized using particle decomposition and domain cloning among computing nodes, replacing traditional domain decomposition techniques. The applications to study the micro- and macro-instabilities are demonstrated, including the energetic-particle-driven Alfvén eigenmode, ion temperature gradient mode, and kinetic ballooning mode. Good performance is achieved in both ad hoc and experimentally reconstructed equilibria, such as those of the ASDEX Upgrade (AUG), Tokamak à configuration variable (TCV), and the Joint European Torus (JET). Future studies of edge physics using the high-order C 1 C^{1} finite element method for triangular meshes in the TRIMEG-C1 code will be built upon the same numerical methods. Journal: Computer Physics Communications 1 Introduction Since the early development of the gyrokinetic simulation model [ 1 ] , important nonlinear physics phenomena have been identified in the past decades, such as the generation of the zonal flows [ 2 ] and the turbulence impact on the edge heat fluxes to the divertors [ 3 ] . To enhance the capability of the modern gyrokinetic particle codes, various advanced numerical and physical schemes have been developed, such as the noise reduction scheme [ 4 ] and different electromagnetic schemes such as the iterative p_{\|} scheme [ 5 ] , the mixed variable/pullback scheme [ 6 ] , the implicit scheme [ 7 , 8 ] , the GK-E&B model and its implementation [ 9 , 10 ] and the conservative scheme [ 11 ] . Advanced computational schemes and comprehensive physics models are key ingredients in modern gyrokinetic codes for successful prediction and interpretation of experimental results and underlying physics [ 12 , 13 , 14 ] . New frameworks and methods have also been developed for high-fidelity particle simulations using the geometric particle-in-cell method [ 15 , 16 ] . The gyrokinetic codes TRIMEG-GKX based on structured meshes [ 7 , 17 , 18 , 19 ] and TRIMEG-C0/C1 based on triangular unstructured meshes [ 20 , 21 , 22 ] have been developed to explore various new methods for physics studies. Since the early development using the unstructured meshes [ 20 ] , physics models and numerical scheme, such as the implicit scheme [ 7 ] , the full- f mixed-variable/pullback scheme [ 17 ] , and the piecewise field-aligned finite element method [ 18 ] , have been developed, demonstrating the capability of the various physics and numerical methods in gyrokinetic studies. Specifically, it is shown that using a high-order finite element method, the capability of the gyrokinetic code can be enhanced to capture the features of the instabilities using a lower grid resolution [ 22 ] . In this work, the recent development of the TRIMEG-GKX code (referred to as GKX in the following) is demonstrated. Compared with other gyrokinetic particle codes, the features of the GKX code are as follows: 1. Object-oriented programming principles are adopted, enabling the inclusion of multiple particle species and different physics models, such as the electrostatic or electromagnetic gyrokinetic models. 2. The piecewise field-aligned finite element method (PFAFEM) is used with the cubic B-splines applied in the radial, poloidal, and toroidal directions. 3. The utilization of the Fourier filter is minimized, especially in the 3D electromagnetic model. Instead, a rigorous treatment of the strong form in the gyrocenter equation of motion is adopted. 4. The cache performance is optimized for particle pushers differently than the sorting scheme frequently used by other gyrokinetic particle codes. 5. The particle decomposition is adopted but the domain decomposition is replaced by the domain cloning among computing nodes due to the following reasons: (1) Shared memory is utilized through the MPI-3 standard, reducing total memory consumption on each computing node; (2) PFAFEM is applied, allowing to reduce the number of grid points for the 3D grid in one dimension by approximately one order of magnitude; (3) Cubic B-splines are adopted and thus four basis functions in the toroidal direction are involved. The remainder of this article is organized as follows. Section 2 presents the models and equations implemented in the GKX code. Section 3 describes the numerical schemes. In Section 4 , simulation results are shown for various cases, including ad hoc equilibria and realistic experimental configurations. Finally, conclusions and perspectives for future work are discussed in Section 5 . 2 Models and equations The physics model employed in this work is closely related to the early work on the pullback scheme [ 23 ] and our previous development of the mixed full f - \delta f scheme [ 17 ] , as well as the references therein [ 4 , 6 , 12 ] . The focus of this article is on the traditional \delta f model. 2.1 Physics equations using mixed variables The mixed variable is defined as follows. The parallel component \delta A_{\|} of the perturbed magnetic potential is decomposed into a symplectic part and a Hamiltonian part [ 23 ] , \delta A_{\|}=\delta A_{\|}^{\rm{s}}+\delta A_{\|}^{\rm{h}}\;\;, (1) where the symplectic part \delta A_{\|}^{\rm{s}} is chosen to satisfy ideal Ohm’s law involving the electrostatic scalar potential \delta\Phi as follows, \partial_{t}\delta A_{\|}^{\rm{s}}+\partial_{\|}\delta\Phi=0\;\;, (2) where the parallel derivative is defined as \partial_{\|}=\boldsymbol{b}\cdot\nabla , \boldsymbol{b}=\boldsymbol{B}/B , \boldsymbol{B} is the equilibrium magnetic field. The shifted parallel velocity coordinate of the gyrocenter u_{\|} is defined as u_{\|}=v_{\|}+\frac{q_{s}}{m_{s}}\langle\delta A_{\|}^{\rm{h}}\rangle\;\;, (3) where v_{\|} is the parallel velocity, q_{s} and m_{s} are the charge and mass of species s , respectively, the subscript “ s ” represents the different particle species, and \langle\ldots\rangle indicates the gyro average. The gyrocenter equations of motion are consistent with previous work [ 6 , 4 , 12 , 24 , 13 ] , \displaystyle\dot{\boldsymbol{R}}_{0} \displaystyle= \displaystyle u_{\|}{\boldsymbol{b}}^{*}_{0}+\frac{m\mu}{qB^{*}_{\|}}{\boldsymbol{b}}\times\nabla B\;\;, (4) \displaystyle\dot{u}_{\|,0} \displaystyle= \displaystyle-\mu{\boldsymbol{b}}^{*}_{0}\cdot\nabla B\;\;, (5) \displaystyle\delta\dot{\boldsymbol{R}} \displaystyle= \displaystyle\frac{{\boldsymbol{b}}}{B^{*}_{\|}}\times\nabla\langle\delta\Phi-u_{\|}\delta A_{\|}\rangle-\frac{q_{s}}{m_{s}}\langle\delta A^{\rm h}_{\|}\rangle{\boldsymbol{b}}^{*}\;\;, (6) \displaystyle\delta\dot{u}_{\|} \displaystyle= \displaystyle-\frac{q_{s}}{m_{s}}\left({\boldsymbol{b}}^{*}\cdot\nabla\langle\delta\Phi-u_{\|}\delta A^{\rm{h}}_{\|}\rangle+\partial_{t}\langle\delta A_{\|}^{\rm{s}}\rangle\right) (7) \displaystyle-\frac{\mu}{B^{*}_{\|}}{\boldsymbol{b}}\times\nabla B\cdot\nabla\langle\delta A_{\|}^{\rm{s}}\rangle\;\;, where the magnetic moment \mu=v_{\perp}^{2}/(2B) , {\boldsymbol{b}}^{*}={\boldsymbol{b}}_{0}^{*}+\nabla\langle\delta A_{\|}^{\rm s}\rangle\times{\boldsymbol{b}}/B_{\|}^{*} , \langle\ldots\rangle denotes the gyro average, {\boldsymbol{b}}^{*}_{0}={\boldsymbol{b}}+(m_{s}/q_{s})u_{\|}\nabla\times{\boldsymbol{b}}/B_{\|}^{*} , {\boldsymbol{b}}={\boldsymbol{B}}/B , B_{\|}^{*}=B+(m_{s}/q_{s})u_{\|}{\boldsymbol{b}}\cdot(\nabla\times{\boldsymbol{b}}) . Note that in our previous work [ 17 ] , v_{\|} is adopted on the right-hand side, and the term -(q_{s}/m_{s})\langle\delta A_{\|}^{\rm{h}}\rangle{\boldsymbol{b}}^{*} in \dot{\boldsymbol{R}} is thus taken into account in \dot{\boldsymbol{R}}_{0} . The expression of the gyrocenter equation of motion in (r,\phi,\theta) coordinates is listed in A . 2.2 Field equations The linearized quasi-neutrality equation in the long-wavelength approximation is as follows, -\nabla\cdot\left(\sum_{s}\frac{q_{s}n_{0s}}{B\omega_{{\rm c}s}}\nabla_{\perp}\delta\Phi\right)=\sum_{s}q_{s}\delta n_{s,v}\;\;, (8) where the gyrocenter density \delta n_{s,v} is calculated using \delta f_{s}({\boldsymbol{R}},v_{\|},\mu) (indicated as \delta f_{s,v} ), namely, \delta n_{s,v}({\boldsymbol{x}})=\int{\rm d}^{6}z\delta f_{s,v}\delta(\boldsymbol{R}+\boldsymbol{\rho}-\boldsymbol{x}) . Here, \boldsymbol{x} and \boldsymbol{R} denote the particle and gyrocenter coordinates, respectively, and \boldsymbol{\rho} represents the Larmor radius. In Eq. ( 8 ), \omega_{{\rm c}s} is the cyclotron frequency of species s , and in

Read the complete text