Constructing Field Aligned Coordinate Systems for Gyrokinetic Simulations of Tokamaks in X-point Geometries
Akash Shukla \aff 1 \corresp, A. Hakim \aff 2, J. Juno \aff 2, G. W. Hammett \aff 2, M. Francisquez \aff 2 · 2025
Read Constructing Field Aligned Coordinate Systems for Gyrokinetic Simulations of Tokamaks in X-point Geometries by Akash Shukla \aff 1 \corresp, A. Hakim \aff 2, J. Juno \aff 2, G. W. Hammett \aff 2, M. Francisquez \aff 2 (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-2510-21676.txt.
Introduction
Akash Shukla and four co-authors remove a coordinate headache from simulations of tokamaks, the magnetic bottles built to hold fusion plasma. Plasma structures stretch along magnetic field lines. Codes therefore prefer coordinates aligned with the field. At the X-point, though, the sideways field vanishes. The hot core also meets the exhaust region there. Aligned coordinates blow up at that spot.
Their algorithm computes the needed geometric quantities for a standard field-aligned system while stepping around the singularity. It enables two-dimensional axisymmetric simulations that cover core and scrape-off layer together in X-point geometry. A demonstration run uses the design of the Spherical Tokamak for Energy Production. It shows the method working in a realistic device layout. That clears a practical obstacle for whole-device fusion modeling.
Catalog record
| CREATOR | Akash Shukla \aff 1 \corresp, A. Hakim \aff 2, J. Juno \aff 2, G. W. Hammett \aff 2, M. Francisquez \aff 2 |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 60 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2510-21676
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Constructing Field Aligned Coordinate Systems for Gyrokinetic Simulations of Tokamaks in X-point Geometries Akash Shukla \aff 1 \corresp, A. Hakim \aff 2, J. Juno \aff 2, G. W. Hammett \aff 2, M. Francisquez \aff 2 Abstract Structures in tokamak plasmas are elongated along the direction of the magnetic field and short in the directions perpendicular to the magnetic field. Many tokamak simulation codes take advantage of this by using a field aligned coordinate system. However, field aligned coordinate systems have a coordinate singularity at magnetic X-points where the poloidal magnetic field vanishes, which makes it difficult to use field aligned coordinate systems when simulating the core and scrape-off layer (SOL) simultaneously. Here we present an algorithm for computing geometric quantities in a standard field aligned coordinate system that avoids the singularity and allows one to conduct 2D axisymmetric simulations in X-point geometries. We demonstrate the efficacy of this algorithm with an example simulation of the Spherical Tokamak for Energy Production (STEP). 1 Introduction Structures in tokamak plasmas are anisotropic: they are elongated along the field line but short perpendicular to it. Many tokamak simulation codes, especially core codes such as GS2 ( Dorland et al. 2000 ; Barnes et al. 2024 ) , GENE ( Jenko et al. 2000 ; Görler et al. 2011 ) and GYRO ( Candy & Belli 2010 ; Candy 2009 ) , take advantage of this by using a field aligned coordinate system; the field aligned coordinate system allows for coarse resolution along the field line reducing computational expense ( Beer et al. 1995 ) . However, field aligned coordinate systems have a coordinate singularity at magnetic X-points where the poloidal magnetic field vanishes, so using field-aligned coordinate systems in edge codes which simulate the core and scrape-off layer (SOL) simultaneously is more difficult ( Stegmeir et al. 2016 ; Leddy et al. 2017 ) . There have been a variety of approaches to handling the coordinate singularity at the X-point. BOUT++ handles it by using multiple blocks, each with a field aligned coordinate system, and avoiding the calculation of geometric quantities at the X-point. COGENT uses multiple blocks each with a coordinate system that is flux aligned except near the X-point where they overlap. A high order interpolation scheme is used to transfer information between the overlapping regions of each block ( McCorquodale et al. 2015 ; Dorf et al. 2016 ) . Other edge gyrokinetic codes such as GENE-X ( Michels et al. 2021 ) have abandoned field and flux aligned coordinates in favor of the Flux-Coordinate-Independent (FCI) approach because of the difficulty of dealing with the singularity at the X-point. The FCI approach breaks the simulation domain into a series of poloidal planes which do not have a field aligned coordinate system and employs a field-line following discretization of the parallel derivative operator to minimize the number of poloidal planes needed. Interpolation within the poloidal plane is required to compute the parallel derivatives ( Hariri & Ottaviani 2013 ; Stegmeir et al. 2016 ; Stegmeir et al. 2018 ) . Here we present an algorithm for computing geometric quantities in a standard field aligned coordinate system that avoids the singularity at the X-point. We employ a multi-block approach where each block conforms to the separatrix leaving no gap around the X-point. Our numerical scheme allows us to avoid calculation of any geometric quantities or fluxes at the X-point while still having block corners at the X-point. We implement and test this algorithm in the gyrokinetic model in the Gkeyll simulation framework ( Francisquez et al. 2025 ; Shukla et al. 2025 ; Mandell et al. 2020 ; Hakim et al. 2019 ) . The rest of the paper is organized as follows: in section 2 we give background on the Clebsch representation of magnetic fields and field aligned coordinates, in section 3 we present the equations of our gyrokinetic model in a field aligned coordinate system, in section 4 we detail the coordinate system we employ, in section 5 we show how the spatial discretization of our algorithm avoids the cooordinate singularity at the X-point, and in section 6 we describe how we generate simulation grids and calculate geometric quantities and also show example grids. Finally, in section 7 , we show an example 2D axisymmetric gyrokinetic simulation of STEP ( Karhunen et al. 2024 ) using this method. In Appendix A we describe geometric consistency requirements of numerical schemes to solve the advection equation, including for the multi-block case. The same consistency conditions are also required for the gyrokinetic equations which is an advection equation in phase-space. 2 Coordinate Systems for Magnetized Plasma Simulations As is well known, in certain situations (described below), we can write the magnetic field in the Clebsch representation ( Dhaeseleer et al. 1991 ) \displaystyle\mathbf{B}=C(\mathbf{x})\nabla\psi\times\nabla\alpha (1) where, C(\mathbf{x}) \psi(\mathbf{x}) and \alpha(\mathbf{x}) are scalar functions of the position vector \mathbf{x} . The divergence constraint \nabla\cdot\mathbf{B}=0 requires \displaystyle\nabla\cdot\mathbf{B}=\frac{1}{C}\mathbf{B}\cdot\nabla C=0. (2) However, not all magnetic field configurations can be described by the Clebsch representation: the field-lines of Clebsch-representable magnetic fields are integrable and hence enforce some stringent constraints on the type of fields that can be described in this way 1 1 1 A generalized Clebsch representation of the form \mathbf{B}=\nabla\psi_{1}\times\nabla\alpha_{1}+\nabla\psi_{2}\times\nabla\alpha_{2} allows representing arbitrary magnetic fields, including ones in which the field-lines are not integrable. However, these are not useful to construct coordinate systems. . Thankfully, for tokamaks, where the fields are axisymmetric, or in regions of stellarators with nested flux surfaces, such representations can be found. Hence, in this paper we will restrict ourselves to such magnetic configurations. The importance of the Clebsch representation (when it exists) is that the two vectors \nabla\psi and \nabla\alpha can be used as the dual basis vectors (contravariant basis) of a field-line following coordinate system. To understand what this means and establish notation for rest of the paper consider an arbitrary coordinate transform given by the invertible map \displaystyle\mathbf{x}=\mathbf{x}(z^{1},z^{2},z^{3}) (3) where (z^{1},z^{2},z^{3}) are computational coordinates. This maps a rectangular region in \mathbb{R}^{3} to a (generally non-rectangular) region of physical space. Once this mapping is known then we can compute the tangent vectors \displaystyle\mathbf{e}_{i}=\frac{\partial\mathbf{x}}{\partial z^{i}} (4) and the dual vectors \mathbf{e}^{i} defined implicitly by the relation \displaystyle\mathbf{e}^{i}\cdot\mathbf{e}_{j}=\delta^{{{i}\mathchoice{\makebox[3.71356pt][c]{$\displaystyle$}}{\makebox[3.71356pt][c]{$\textstyle$}}{\makebox[2.29834pt][c]{$\scriptstyle$}}{\makebox[1.64166pt][c]{$\scriptscriptstyle$}}}}_{{\mathchoice{\makebox[2.82928pt][c]{$\displaystyle$}}{\makebox[2.82928pt][c]{$\textstyle$}}{\makebox[1.68811pt][c]{$\scriptstyle$}}{\makebox[1.2058pt][c]{$\scriptscriptstyle$}}{j}}}. (5) If the inverse mapping z^{i}=z^{i}(\mathbf{x}) is known, then we can show that \mathbf{e}^{i}=\nabla z^{i} . At each point \mathbf{x} either the tangents or duals form a linearly independent set of vectors and hence can be used to represent vector and tensor quantities at that point. For example, a vector \mathbf{a} can be written as \displaystyle\mathbf{a}=a^{i}\mathbf{e}_{i}=a_{i}\mathbf{e}^{i} (6) where a^{i}=\mathbf{a}\cdot\mathbf{e}^{i} , a_{i}=\mathbf{a}\cdot\mathbf{e}_{i} and we have assumed the summation convention over repeated indices. Once the tangent and dual vectors are determined we can compute the covariant and contravariant components of the metric tensor as \displaystyle g_{ij} \displaystyle=\mathbf{e}_{i}\cdot\mathbf{e}_{j} (7) \displaystyle g^{ij} \displaystyle=\mathbf{e}^{i}\cdot\mathbf{e}^{j}. (8) Defining the Jacobian (volume element) of the transform J_{c}=\mathbf{e}_{1}\cdot(\mathbf{e}_{2}\times\mathbf{e}_{3}) we can easily derive the explicit expressions for the duals: \displaystyle\mathbf{e}^{1} \displaystyle=\frac{1}{J_{c}}\mathbf{e}_{2}\times\mathbf{e}_{3} (9) \displaystyle\mathbf{e}^{2} \displaystyle=\frac{1}{J_{c}}\mathbf{e}_{3}\times\mathbf{e}_{1} (10) \displaystyle\mathbf{e}^{3} \displaystyle=\frac{1}{J_{c}}\mathbf{e}_{1}\times\mathbf{e}_{2}. (11) From this we also see that J_{c}^{-1}=\mathbf{e}^{1}\cdot(\mathbf{e}^{2}\times\mathbf{e}^{3})=\nabla z^{1}\cdot(\nabla z^{2}\times\nabla z^{3}) . We assume that the basis are arranged such that J_{c}>0 . As we need the mapping to be invertible we must ensure that J_{c}(\mathbf{x}) does not vanish