Paper The following article is Free article

Explicit structure-preserving geometric particle-in-cell algorithm in curvilinear orthogonal coordinate systems and its applications to whole-device 6D kinetic simulations of tokamak physics

and

Published 22 April 2021 © 2021 Hefei Institutes of Physical Science, Chinese Academy of Sciences and IOP Publishing
, , Citation Jianyuan XIAO and Hong QIN 2021 Plasma Sci. Technol. 23 055102 DOI 10.1088/2058-6272/abf125

1009-0630/23/5/055102

Abstract

Explicit structure-preserving geometric particle-in-cell (PIC) algorithm in curvilinear orthogonal coordinate systems is developed. The work reported represents a further development of the structure-preserving geometric PIC algorithm achieving the goal of practical applications in magnetic fusion research. The algorithm is constructed by discretizing the field theory for the system of charged particles and electromagnetic field using Whitney forms, discrete exterior calculus, and explicit non-canonical symplectic integration. In addition to the truncated infinitely dimensional symplectic structure, the algorithm preserves exactly many important physical symmetries and conservation laws, such as local energy conservation, gauge symmetry and the corresponding local charge conservation. As a result, the algorithm possesses the long-term accuracy and fidelity required for first-principles-based simulations of the multiscale tokamak physics. The algorithm has been implemented in the SymPIC code, which is designed for high-efficiency massively-parallel PIC simulations in modern clusters. The code has been applied to carry out whole-device 6D kinetic simulation studies of tokamak physics. A self-consistent kinetic steady state for fusion plasma in the tokamak geometry is numerically found with a predominately diagonal and anisotropic pressure tensor. The state also admits a steady-state sub-sonic ion flow in the range of 10 km s−1, agreeing with experimental observations and analytical calculations Kinetic ballooning instability in the self-consistent kinetic steady state is simulated. It is shown that high-n ballooning modes have larger growth rates than low-n global modes, and in the nonlinear phase the modes saturate approximately in 5 ion transit times at the 2% level by the E × B flow generated by the instability. These results are consistent with early and recent electromagnetic gyrokinetic simulations.

Export citation and abstract BibTeX RIS

1. Introduction

Six dimensional (6D) particle-in-cell (PIC) simulation is a powerful tool for studying complex collective dynamics in plasmas [13]. However, as a first-principles-based numerical method, 6D PIC simulation has not been employed to study the dynamical behavior experimentally observed in magnetic fusion plasmas, mainly due to the multiscale nature of the physics involved. The technical difficulties are two-fold. Firstly, the span of space-time scales of magnetic fusion plasmas is enormous, and numerically resolving these space-time scales demands computation hardware that did not exist until very recently. Secondly, even if unlimited computing resource exists, the standard 6D PIC algorithms do not possess the long-term accuracy and fidelity required for first-principles-based simulations of magnetic fusion plasmas. For example, the most commonly used 6D PIC scheme is the Boris–Yee scheme, which solves the electromagnetic fields using the Yee-FDTD [4] method and advances particles' position and velocity by the Boris algorithm [5]. Even though both Yee-FDTD method [6] and the Boris algorithm [712] themselves do have good conservative properties, their combination in PIC methods does not [2, 3, 13]. Numerical errors thus accumulate coherently during simulations and long-term simulation results are not trustworthy.

Recent advances in super-computers [14] have made 6D PIC simulation of magnetic fusion plasmas possible in terms of hardware. On the other hand, much needed now is modern 6D PIC algorithms that can harness the rapidly increasing power of computation hardware. A family of such new 6D PIC algorithms [1525] has been developed recently. Relative to the conventional PIC methods, two unique properties characterize these new PIC algorithms: the space-time discretization is designed using modern geometric methods, such as discrete manifold and symplectic integration, and the algorithms preserve exactly many important physical symmetries and conservation laws in a discrete sense. For this reason, these algorithms are called structure-preserving geometric PIC algorithms. The long-term accuracy and fidelity of these algorithms have been studied and documented by different research groups [17, 22, 2635].

Discrete symplectic structure and symplectic integration are two of the main features of the structure-preserving geometric PIC algorithms. Up to now, the only explicit symplectic integrator for the non-canonical symplectic structure of the discrete or continuous Vlasov–Maxwell system is the splitting method developed in [19], which splits the dynamics symplectically into one-way decoupled Cartesian components. The requirement of the Cartesian coordinate system creates a hurdle for applications in magnetic fusion plasmas, for which cylindrical or toroidal coordinate systems are more convenient. Most simulation codes, such as GTC [36, 37], XGC [38, 39] and GEM [4042] adopted curvilinear coordinate systems. In the present study, we extend the structure-preserving geometric PIC algorithm to arbitrary curvilinear orthogonal coordinate systems, in particular, to the cylindrical coordinate system for applications in tokamak physics. We show that when a sufficient condition (40) is satisfied, which is the case for the cylindrical mesh, the structure-preserving PIC algorithm can be made explicitly solvable and high-order. For easy implementation and presentation, we first present the algorithm as a discrete field theory [4348] specified by a Lagrangian discretized in both space and time. It is then reformulated using a generalized version of the discrete Poisson bracket developed in [17] and an associated explicit symplectic splitting algorithm, which generalizes the original algorithm designed in [19] in the Cartesian coordinate system. In particular, the technique utilizing the one-way decoupling of dynamic components is generalized to arbitrary curvilinear orthogonal coordinate systems satisfying condition (40).

The algorithm has been implemented in the the SymPIC code and applied to carry out whole-device 6D kinetic PIC simulations of plasma physics in a small tokamak with similar machine parameters as the Alcator C-Mod [49, 50]. We numerically study two topics: self-consistent kinetic steady state in the tokamak geometry and kinetic ballooning instability in the edge. Simulation shows that when plasma reaches a self-consistent kinetic steady state, the pressure tensor is diagonal, anisotropic in 3D, but isotropic in the poloidal plane. A sub-sonic ion flow in the range of 10 km s−1 exists, which agrees with experimental observations [51, 52] and theoretical calculations [53, 54]. In the self-consistent kinetic steady state, it is found that large-n kinetic ballooning modes (KBMs) grow faster than low-n global modes, and the instability saturates nonlinearly at the 2% level by the E × B flow generated by the instability. These results qualitatively agree with previous simulations by electromagnetic gyrokinetic codes [5557].

Because the algorithm is based on first-principles of physics and constructed in general geometries, the whole-device 6D kinetic simulation capability developed is applicable to other fusion devices and concepts as well, including stellarators, field reserve configurations and inertial confinement. It is also worthwhile to mention that the structure-preserving geometric discretization technique developed for the 6D electromagnetic PIC simulations can be applied to other systems as well, including ideal two-fluid systems [58] and magnetohydrodynamics [5963]. Structure-preserving geometric algorithms have also been developed for the Schrdinger–Maxwell [64] system, the Klein–Gordon–Maxwell system [6568], and the Dirac–Maxwell system [69], which have important applications in high energy density physics. Another noteworthy development is the metriplectic PIC integrators for the Landau collision operator [70]. Recently, a field theory and a corresponding 6D structure-preserving geometric PIC algorithm were established for low-frequency electrostatic perturbations in magnetized plasmas with adiabatic electrons [25]. The long-term accuracy and fidelity of the algorithm enabled the simulation study of electrostatic drift wave turbulence and transport using a 6D PIC method with adiabatic electrons.

The paper is organized as follows. In section 2 we develop the explicit structure-preserving geometric PIC scheme in arbitrary orthogonal coordinate systems, and the algorithm in a cylindrical mesh is implemented in the SymPIC code. In section 3, the code is applied to carry out whole-device 6D kinetic PIC simulations of tokamak physics.

2. Explicit structure-preserving geometric PIC algorithm in curvilinear orthogonal coordinate systems

2.1. The basic principles of structure-preserving geometric PIC algorithm

The procedure of designing a structure-preserving geometric PIC algorithm starts from a field theory, or variational principle, for the system of charged particles and electromagnetic field. Instead of discretizing the corresponding Vlasov–Maxwell equations, the variational principle is discretized.

For spatial discretization of the electromagnetic field, discrete exterior calculus [71, 72] is adopted. As indicated by its name, a PIC algorithm contains two components not found in other simulation methods: charge and current deposition from particles to grid points, and field interpolation from grid points to particles. Note that these two components are independent from the field solver, e.g. the Yee-FDTD method, and the particle pusher, e.g. the Boris algorithm. In conventional PIC algorithms [13], the function of charge and current deposition and the function of field interpolation are implemented using intuitive techniques without fundamental guiding principles other than the consistency requirement. It was found [15, 24] that a systematic method to realize these two functions is to apply the Whitney interpolation (differential) forms [73] and their high-order generalizations [17] on the discrete Lagrangian.

The application of Whitney forms is a key technology for achieving the goal of preserving geometric structures and conservation laws. It stipulates from first principles how charge and current deposition and field interpolation should be performed [1525]. It also enabled the derivation of the discrete non-canonical symplectic structure and Poisson bracket for the charged particle-electromagnetic field system [17]. At the continuous limit when the size of the space-time grid approaches zero, the discrete non-canonical Poisson bracket reduces to the Morrison–Marsden–Weinstein (MMW) bracket for the Vlasov–Maxwell equations [7477, 26]. (The MMW bracket was also independently discovered by Iwinski and Turski [78].) To derive the discrete Poisson bracket, Whitney forms and their high-order generalizations are adopted for the purpose of geometric spatial discretization of the field Lagrangian density as an 1-form in the phase space of the charged particle-electromagnetic field system, whose exterior derivative automatically generates a discrete non-canonical symplectic structure and consequently a Poisson bracket. As a different approach, He et al [21] and Kraus et al [22] used the method of finite element exterior calculus to discretize the MMW bracket directly, and verified explicitly that the discretized bracket satisfies the Jacobi identity through lengthy calculations, in order for the discretized bracket to be a legitimate Poisson bracket. If one chooses to discretize the MMW bracket directly [32, 31], such verification is necessary because there are other discretizations of the MMW bracket which satisfy the numerical consistency requirement but not the Jacobi identity. On the other hand, the discrete Poisson bracket in [17] was not a discretization of the MMW bracket. It was derived from the spatially discretized 1-form using Whitney forms and is naturally endowed with a symplectic structure and Poisson bracket, and reduces to the MMW bracket in the continuous limit. The advantage of this discrete Poisson bracket in this respect demonstrates the power of Whitney forms in the design of structure-preserving geometric PIC algorithms.

To numerically integrate a Hamiltonian or Poisson system for the purpose of studying multiscale physics, symplectic integrators are necessities. Without an effective symplectic integrator, a symplectic or Poisson structure is not beneficial in terms of providing a better algorithm with long-term accuracy and fidelity. However, essentially all known symplectic integrators are designed for canonical Hamiltonian systems [4347, 7998] except for recent investigations on non-canonical symplectic integrators [99112] for charged particle dynamics in a given electromagnetic field. Generic symplectic integrators for non-canonical symplectic systems are not known to exist. Fortunately, a high-order explicit symplectic integrator for the MMW bracket was discovered [19] using a splitting technique in the Cartesian coordinate system. The validity of this explicit non-canonical symplectic splitting method is built upon the serendipitous one-way decoupling of the dynamic components of the particle-field system in the Cartesian coordinate system. It is immediately realized [17] that this explicit non-canonical symplectic splitting applies to the discrete non-canonical Poisson bracket without modification for the charged particle-electromagnetic field system. This method was also adopted in [21, 22] to integrate the discretized MMW bracket using finite element exterior calculus. See also [113, 114] for early effort for developing symplectic splitting method for the Vlasov–Maxwell system. It was recently proven [24] that the discrete non-canonical Poisson bracket [17] and the explicit non-canonical symplectic splitting algorithm [19] can be equivalently formulated as a discrete field theory [48] using a Lagrangian discretized in both space and time.

The geometric discretization of the field theory for the system of charged particles and electromagnetic field using Whitney forms [73, 15, 17], discrete exterior calculus [71, 72], and explicit non-canonical symplectic integration [19, 17] results in a PIC algorithm preserving many important physical symmetries and conservation laws. In addition to the truncated infinitely dimensional symplectic structure, the algorithms preserves exactly the local conservation laws for charge [15, 24] and energy [23]. It was shown that the discrete local charge conservation law is a natural consequence of the discrete gauge symmetry admitted by the system [15, 24, 115]. The correspondence between discrete space-time translation symmetry [116, 117] and discrete local energy-momentum conservation law has also been established for the Maxwell system [118].

As mentioned in section 1, the goal of this section is to extend the explicit structure-preserving geometric PIC algorithm, especially the discrete non-canonical Poisson bracket [17] and the explicit non-canonical symplectic splitting algorithm [19], from the Cartesian coordinate systems to curvilinear orthogonal coordinate systems that are suitable for the tokamak geometry.

2.2. Field theory of the particle-field system in curvilinear orthogonal coordinate systems

We start from the action integral of the system of charged particles and electromagnetic field. In a curvilinear orthogonal coordinate system $\left({x}_{1},{x}_{2},{x}_{3}\right)$ with line element

Equation (1)

the action integral of the system is

Equation (2)

where x = [x1, x2, x3] and ${\rm{d}}V=| {h}_{1}\left({\bf{x}}\right){h}_{2}\left({\bf{x}}\right){h}_{3}\left({\bf{x}}\right)| {\rm{d}}{x}_{1}{\rm{d}}{x}_{2}{\rm{d}}{x}_{3}$. In this coordinate system, the position and velocity of the pth particle of species s are ${{\bf{x}}}_{{sp}}=[{x}_{{{sp}}_{1}},{x}_{{{sp}}_{2}},{x}_{{{sp}}_{3}}]$ and ${{\bf{v}}}_{{sp}}=[{\dot{x}}_{{{sp}}_{1}}{h}_{1}\left({{\bf{x}}}_{{sp}}\right),{\dot{x}}_{{{sp}}_{2}}{h}_{2}\left({{\bf{x}}}_{{sp}}\right),{\dot{x}}_{{{sp}}_{3}}{h}_{3}\left({{\bf{x}}}_{{sp}}\right)]$. Lsp is the free Lagrangian for the pth particle of species s. For the non-relativistic case Lsp = ms vsp 2/2, and for the relativistic case ${L}_{{sp}}=-{m}_{s}\sqrt{1-| {{\bf{v}}}_{{sp}}{| }^{2}}$. Here, we set both permittivity epsilon0 and permeability μ0 in the vacuum to 1 to simplify the notation. The evolution of this system is governed by the variational principle,

Equation (3)

Equation (4)

Equation (5)

It can be verified that equations (3) and (4) are the Maxwell equations, and equation (5) is Newton's equation for the pth particle of species s.

2.3. Construction of the algorithm as a discrete field theory

According to the general principle of structure-preserving geometric algorithm, the first step is to discretize the field theory [15, 17, 24, 25]. For the electromagnetic field, we use the technique of Whitney forms and discrete manifold [73, 71]. For example, in a tetrahedron mesh the magnetic field B as a 2-form field can be discretized on a 2-simplex σ2 (a side of a 3D tetrahedron mesh) as ${\int }_{{\sigma }_{2}}{\bf{B}}\cdot {\rm{d}}{\bf{S}}$, where S is the unit normal vector of σ2. Note that σ2 is a common side of two tetrahedron cells. In a mesh constructed using a curvilinear orthogonal coordinate system, which will be referred to as a Curvilinear Orthogonal Mesh (COM), such discretization can be also performed. Let

Equation (6)

Equation (7)

Equation (8)

Equation (9)

where $\left({x}_{J,l}^{4}\right)$ denotes $\left(i{\rm{\Delta }}{x}_{1},j{\rm{\Delta }}{x}_{2},k{\rm{\Delta }}{x}_{3},l{\rm{\Delta }}t\right)$, ϕi,j,k,l , Ai,j,k,l , Bi,j,k,l and ρi,j,k,l are discrete 0-, 1-, 2- and 3-forms, respectively. In this discretization, the discrete gradient, curl and divergence operators can simply be finite difference operators. In the present study, the following difference operators are adopted,

Equation (10)

Equation (11)

Equation (12)

To discretize the particle-field interaction while preserving geometric structures and symmetries, Whitney interpolating forms [73] and their high-order generalizations [17] are used. Akin to previous results on Whitney interpolating forms in a cubic mesh [17], interpolating forms ${W}_{{\rm{O}}{\sigma }_{0}J}\left({\bf{x}}\right),{W}_{{\rm{O}}{\sigma }_{1}J}\left({\bf{x}}\right),{W}_{{\rm{O}}{\sigma }_{2}J}\left({\bf{x}}\right)$ and ${W}_{{\rm{O}}{\sigma }_{3}J}\left({\bf{x}}\right)$ for 0-, 1-, 2- and 3-forms can be constructed on a COM as follows,

Equation (13)

Equation (14)

Equation (15)

Equation (16)

where ${W}_{\sigma {iJ}}\left({\bf{x}}\right),0\leqslant i\leqslant 3$ are the interpolating forms in a cubic mesh defined in [17] and the quotient (product) of vectors means component-wise quotient (product), i.e.

Equation (17)

With these operators and interpolating forms, we discretize the action integral as

Equation (18)

where l is the index for the temporal grid, J and K are the index vectors for the spatial grid, i.e., J = i, j, k and K = i', j', k', and

Equation (19)

Equation (20)

Equation (21)

Equation (22)

Equation (23)

Equation (24)

Equation (25)

Equation (26)

Equation (27)

Finally, the time advance rule is given by the variation of the action integral with respect to the discrete fields,

Equation (28)

Equation (29)

Equation (30)

From equation (28), the variation with respect to xsp,l leads to

Equation (31)

where

Equation (32)

Equation (33)

Equation (34)

Equation (35)

Equation (36)

To reduce simulation noise, we use 2nd-order Whitney forms for field interpolation. The concept of 2nd-order Whitney forms and their constructions were systematically developed in [17]. In general, only piece-wise polynomials are used to construct high-order Whitney forms, and it is straightforward to calculate integrals along particles' trajectories. These integrals can be calculated explicitly even with more complex Whitney interpolating forms, because these interpolating forms contain derivatives that are easy to integrate.

From equation (29), the discrete Ampere's law is

where

Equation (37)

and the integral path Csp,l,l+1 is defined as a zigzag path from xsp,l to xsp,l+1, i.e.

Equation (38)

Using the definition of BK,l , i.e. equation (36), we can obtain its discrete time evolution,

Equation (39)

which is the discrete version of Faraday's law.

Generally the above scheme is implicit. However, if particles are non-relativistic and the line element vector h of a curvilinear orthogonal coordinate system satisfies the following condition

Equation (40)

then high-order explicit schemes exist in the COM constructed using this coordinate system. The cylindrical coordinate is such a case. In section 2.5 we derive the 2nd-order explicit scheme for the non-relativistic Vlasov–Maxwell system in the cylindrical mesh.

2.4. Poisson bracket and its splitting algorithm in a COM

For the structure-preserving geometric PIC algorithm presented in section 2.3, there exists a corresponding discrete Poisson bracket. When particles are non-relativistic and condition (40) is satisfied, an associate splitting algorithm, which is explicit and symplectic, can be constructed. The algorithm is similar to and generalizes the explicit non-canonical symplectic splitting algorithm in the Cartesian coordinate system designed in [19]. Since the algorithm formulated in section 2.3 is independent from these constructions, we only list the results here without detailed derivations.

In a COM built on a curvilinear orthogonal coordinate system, we can choose to discretize the space only using the same method described above to obtain

Equation (41)

where the temporal gauge (ϕ = 0) has been adopted. Following the procedure in [17], a non-canonical symplectic structure can be constructed from this Lagrangian, and the associated discrete Poisson bracket is

Equation (42)

where $\mathrm{diag}\left({\bf{v}}\right)$ means the diagonal matrix

and the corresponding Hamiltonian is

Equation (43)

Here particles are assumed to be non-relativistic and EJ , BK are spatially discretized electromagnetic fields defined as

Equation (44)

Equation (45)

The Poisson bracket given by equation (42) generalizes the previous Cartesian version [17] to arbitrary COMs. It automatically satisfies the Jacobi identity because it is derived from a Lagrangian 1-form. See [17] for detailed geometric constructions.

The dynamics equation, i.e. the Hamiltonian equation, is

Equation (46)

where

Equation (47)

To build an explicit symplectic algorithm, we adopt the splitting method [19]. The Hamiltonian Hsd is divided into 5 parts,

Equation (48)

Equation (49)

Equation (50)

Equation (51)

Each part defines a sub-system with the same Poisson bracket (42). It turns out that when condition (40) is satisfied the exact solution of each subsystem can be written down in a closed form, and explicit high-order symplectic algorithms for the entire system can be constructed by compositions using the exact solutions of the sub-systems. For HE and HB , the corresponding Hamiltonian equations are

Equation (52)

Equation (53)

i.e.

Equation (54)

and

Equation (55)

Their analytical solutions are

Equation (56)

Equation (57)

For H1, the dynamic equation is $\dot{F}=\{F,{H}_{1}\}$, or more specifically,

Equation (58)

Because the equation for x1,sp contains both ${\dot{x}}_{1,{sp}}$ and ${\ddot{x}}_{1,{sp}}$ explicitly, equation (58) is difficult to solve in general. However, when $\partial {h}_{1}\left({\bf{x}}\right)/\partial {x}_{1}=0$, i.e.

Equation (59)

the dynamics equation for particles in equation (58) reduces to

Equation (60)

In this case, equation (58) admits an analytical solution,

Equation (61)

Similarly, analytical solutions Θ23) for H2 (H3) can be also derived when $\partial {h}_{2}\left({\bf{x}}\right)/\partial {x}_{2}=\partial {h}_{3}\left({\bf{x}}\right)/\partial {x}_{3}=0$. Finally, we can compose these analytical solutions to obtain explicit symplectic integration algorithms for the entire system. For example, a first order scheme can be constructed as

Equation (62)

and a 2nd-order symmetric scheme is

Equation (63)

An algorithm with order 2(l + 1) can be constructed in the following way,

Equation (64)

Equation (65)

Equation (66)

2.5. High-order explicit structure-preserving geometric PIC algorithm in a cylindrical mesh

Magnetic fusion plasmas are often confined in the toroidal geometry, for which the cylindrical coordinate system is convenient. We now present the high-order explicit structure-preserving geometric PIC algorithm in a cylindrical mesh. In this coordinate system, the line element is

Equation (67)

where R0 is a fixed radial length, r + R0 is the radius in the standard cylindrical coordinate system, and R0 ξ is the polar angle coordinate normalized by 1/R0. For typical applications in tokamak physics, R0 is the major radius and ξ is called toroidal angle. To simplify the notation, we also refer to (r, R0 ξ, z) as (x, y, z).

For non-relativistic particles in the cylindrical mesh, if the discrete velocity in equation (22) is changed to

Equation (68)

then the 1st-order scheme given by equation (28) will be explicit. To construct an explicit 2nd-order scheme, the 2nd-order action integral can be chosen as

Equation (69)

where

Taking the following discrete variation yields discrete time-advance rules,

Equation (70)

Equation (71)

Equation (72)

Equation (73)

The explicit expressions for these time-advance are listed in appendix B. Higher-order discrete action integral for building explicit schemes can be also derived using a similar technique, or using the splitting method described in section 2.4.

In addition, we have also implemented the 1st-order relativistic charge-conserving geometric PIC in the cylindrical mesh. However the particle pusher in the relativistic scheme is implicit, and it is about 4 times slower than the explicit scheme. When studying relativistic effects, the implicit relativistic algorithm can be applied without significantly increasing the computational cost.

3. Whole-device 6D kinetic simulations of tokamak physics

The high-order explicit structure-preserving geometric PIC algorithm in a cylindrical mesh described in section 2.5 has been implemented in the SymPIC code, designed for high-efficiency massively-parallel PIC simulations in modern clusters. The OpenMP-MPI version of SymPIC is available at https://github.com/JianyuanXiao/SymPIC/. The algorithm and code have been used to carry out the first-ever whole-device 6D kinetic simulations of tokamak physics. In this section, we report simulation results using machine parameters similar to those of the Alcator C-Mod tokamak [49, 50]. Two physics problems are studied, the self-consistent kinetic steady state and KBM instabilities in the self-consistent kinetic steady state.

3.1. Axisymmetric self-consistent kinetic steady state in a tokamak

Kinetic equilibrium is the starting point for analytical and numerical studies of kinetic instabilities and associated transport phenomena. Because no self-consistent kinetic equilibrium is known in the tokamak geometry, most previous studies adopted non-self-consistent distributions as assumed kinetic equilibria, especially for simulations based on the δ f-method. Here, we numerically obtain an axisymmetric self-consistent kinetic steady state for a small tokamak using parameters similar to those of the Alcator C-Mod tokamak [49, 50]. The machine parameters are tabulated in table 1. The device is numerically constructed with poloidal field (PF) coils displayed in figure 1(a).

Figure 1.

Figure 1. Poloidal field locations (a) and initial density profile for electrons (b).

Standard image High-resolution image

Table 1. Machine parameters of the simulated tokamak. This set of parameters is similar to those of the Alcator C-Mod tokamak.

Major radius R0 Minor radius a Plasma current Ip Edge safe factor q95 Toroidal magnetic field at R0 (B0)
0.69 m0.21 m0.54 MAAbout 3.54.2 T

At the beginning of the simulation, non-equilibrium distributions for deuterium ions and electrons are loaded into the device. The initial density profile in the poloidal plane is shown in figure 1(b). The 2D profiles of the external field and initial velocity and temperature profiles for both species are plotted in figure 2. Simulation parameters are chosen as

Detailed calculation of the external magnetic field, initial particle distributions, and boundary setup are outlined in appendix A. Simulations show that the system reaches a steady state after 1.6 × 107 time-steps. At this time, the amplitude of magnetic perturbation at the middle plane of the edge (x = 0.48 m and z = 0.41 m) is smaller than B0/200, and the oscillation of position of plasma core is very small. Therefore, we can treat this state as a steady state. One such calculation requires about 1.3 × 105 core-hours on the Tianhe 3 prototype cluster. Profiles of flow velocities, densities, temperatures of electrons and ions as well as electromagnetic field at the steady state are shown in figures 36.

Figure 2.

Figure 2. Tokamak external magnetic field and initial profiles of flow velocities in the ey direction and temperatures.

Standard image High-resolution image
Figure 3.

Figure 3. Flow velocity distributions for electrons and ions at the steady state.

Standard image High-resolution image
Figure 4.

Figure 4. Density and temperature profiles of electrons and ions at the steady state.

Standard image High-resolution image
Figure 5.

Figure 5. Electromagnetic field profiles at the steady state.

Standard image High-resolution image
Figure 6.

Figure 6. Current profiles at the steady state.

Standard image High-resolution image

From figure 3, the flow velocity of ions at the steady state is in the range of 10 km s−1, which is consistent with experimental observations [51, 52] and theoretical calculations [53, 54]. This ion flow is much slower than the thermal velocity of ions and thus is negligible in the force balance for the steady state, which can be written as

Equation (74)

Here, p is the pressure tensor. Equation (74) is obtained by the familiar procedure of taking the second moment of the Vlasov equation, subtracting the flow velocity and summing over species. From the simulation data, the pij component of the pressure tensor is calculated as

Equation (75)

Equation (76)

where ${\sum }_{{{\bf{x}}}_{{sp}}\in \mathrm{grid}J}$ means that the summary is over all particles satisfying iΔx < xsp ≤ (i + 1)Δx, jΔy < ysp ≤ (j + 1)Δy and kΔz < zsp ≤ (k + 1)Δz. The profile of pressure tensor at the steady state at z = 0.41 m is shown in figure 7. Clearly, the pressure tensor is predominately diagonal and anisotropic with pyy > pxx pzz . Note that the pressure is almost isotropic in the poloidal plane, which indicates that it is valid to adopt the ideal magnetohydrodynamics (MHD) model with a scalar pressure for force balance in the 2D tokamak equilibrium. However, for 3D physics, the effect of pressure anisotropy needs to be considered. Since the steady state is 2D in space for the present case, the force balance equation reduces to

Equation (77)

Equation (78)

To verify the force balance of the steady state, the four terms in equations (77) and (78) are plotted in figure 8. For comparison, the components of ∂pyy /∂x and ∂pyy /∂z are also plotted. Figure 8 shows that the force balance is approximately satisfied for the numerically obtained steady state, which can be viewed as a self-consistent kinetic steady state.

Figure 7.

Figure 7. Pressure tensor profile at z = 0.41 m.

Standard image High-resolution image
Figure 8.

Figure 8. Pressure gradient ∇ · p and Lorentz force j × B in the ex (a) and ez (b) directions.

Standard image High-resolution image

To verify the energy conservation in the simulation, we have recorded the time-history of the total energy in figure 9. The total energy drops a little, because some particles outside the last closed magnetic surface hit the simulation boundary, and these particles are removed from the simulation.

Figure 9.

Figure 9. Evolution of total energy.

Standard image High-resolution image

Before reaching the kinetic steady state, the plasma oscillates in the poloidal plane. It is expected that this oscillation can be described as an MHD process whose characteristic velocity is the Alfvn velocity ${v}_{{\rm{A}}}={B}_{0}/\sqrt{{\mu }_{0}{n}_{{\rm{i}}}{m}_{{\rm{i}}}}$. To observe this oscillation, we plot in figure 10 the evolution of the magnetic field at x = 600Δx and z = 512Δx. From the parameters of the simulation, the characteristic frequency of the oscillation is

Equation (79)

which agrees with the frequency of the Bx oscillation in figure 10.

Figure 10.

Figure 10. Evolution of Bx (600Δx, 0, 512Δx).

Standard image High-resolution image

3.2. KBM in tokamak

KBM [119], characterized by both electromagnetic perturbations of the MHD type and nontrivial kinetic effects, plays an important role in tokamak edge physics. Traditionally, it has been simulated using electromagnetic gyrokinetic codes such as the Kin-2DEM [55, 56], LIGKA [120], GTC [37, 57] and GEM [42]. However, for edge plasmas, the gyrokinetic ordering [56, 121124] may become invalid under certain parameter regimes for modern tokamaks. For instance, the characteristic length in the edge of the H-mode plasma simulated by Wan et al [133, 134] can be as short as about 5 times of the gyroradius of thermal ions, and in this situation, the gyrokinetic density calculation may be inaccurate. We have applied SymPIC code developed to carry out the first whole-device 6D kinetic simulations of the KBM in a tokamak geometry.

The machine parameters are the same as in section 3.1. To trigger the KBM instability, we increase the plasma density to n0 = 1 × 1020 m−3, and the rest of parameters are

Here rm is the mass ratio between the deuterium and electron, cn is the speed of light in the simulation and rc is the ratio between cn and the real speed of light in the vacuum c. For real plasmas, rm ≈ 3672 and rc = 1. Limited by available computation power, we reduce rm and rc in some of the simulations. Such an approximation is valid because the low frequency ion motion is relatively independent from the mass of electron and the speed of light, as long as rm ≫ 1 and ${\left(c{r}_{{\rm{c}}}/{v}_{{\rm{A}}}\right)}^{2}\gg 1.$ In the present work, we take rm = 100 and rc = 0.16 to obtain long-term simulation results. Short-term results for rm = 300, rc = 0.5 and rm = 3672, rc = 1 (in this case Δt = 0.1Δx/c) are also obtained for comparison. The simulation domain is a 192 × 64 × 256 mesh, where perfect electric conductor is assumed at the boundaries in the x- and z-directions, and the periodic boundary is selected in y direction.

Because of the steep pressure gradient in the edge of the plasma, the threshold βcrit for ballooning mode instability is low. An estimated scaling for βcrit is [135]

where $\hat{s}$ is the magnetic shear and Lp is the pressure scaling length. For our simulated plasma, βcrit ∼ 1 × 10−3 and β ≈ 3 × 10−3. We except to observe unstable KBM.

To obtain a self-consistent kinetic steady state, we first perform a simulation as described in section 3.1 and obtain the 2D kinetic steady state. The profiles of temperature, safety factor, number density, pressure, toroidal current and bulk velocity of this steady state at z = 0.41 m are shown in figure 11.

Figure 11.

Figure 11. Profiles of the kinetic steady state at z = 0.41 m.

Standard image High-resolution image

A random perturbation is then added in as the initial condition of the 6D simulation. The total simulation time is ${t}_{{\rm{a}}}=1.5\times {10}^{6}{\rm{\Delta }}t\approx 10000{\omega }_{{\rm{c}},{\rm{i}}}^{-1}\approx 5\times {10}^{-5}$ s. For one such simulation it takes about 3 × 105 core-hours on the Tianhe 3 prototype cluster. The resulting mode structures of ion density for toroidal mode number n = 1, 2, 3, 6, 10, 14, 18 are shown in figures 12, 13 and 14 for t ωc,i = 637, 1241 and 9693. It is clear that the unstable modes are triggered at the edge of the plasma, and the ballooning structure can be observed for modes with large n. The growth rate as a function of n is plotted in figure 15. For comparison, the grow rate obtained using rc = 0.5, rm = 300 and rc = 1, rm = 3672 are also plotted. It is clear that the growth rate has little correlation with the reduction of rc and rm. Figure 15 shows that the growth rate increases with n, consistent with the early gyrokinetic simulation results obtained using the Kin-2DEM eigenvalue code [55, 56]. Because the number of grids in the toroidal direction is 64 and the width of interpolating function is 4 times the grid size, the results for modes with n > 16 may not be accurate. The results displayed here are thus preliminary. In the next step, we plan to perform a larger scale simulation with more realistic 2D equilibria to obtain improved accuracy.

Figure 12.

Figure 12. Mode structures of the electron density at t = 637/ωc,i = 2.85a/vt,i.

Standard image High-resolution image
Figure 13.

Figure 13. Mode structures of the electron density at t = 1241/ωc,i = 5.55a/vt,i.

Standard image High-resolution image
Figure 14.

Figure 14. Mode structure of the electron density at t = 9693/ωc,i = 43.35a/vt,i.

Standard image High-resolution image
Figure 15.

Figure 15. Growth rate as a function of toroidal mode number for different values of rc and rm.

Standard image High-resolution image

The time-history of the mode amplitude is shown in figure 16. The unstable mode saturates approximately at t ≈ 5a/vt,i, and the saturation level is in the range of 2%. Recent nonlinear gyrokinetic simulation [57] suggested that the instability is saturated by the E × B zonal flow generated by the instability. To verify this mechanism in our 6D fully kinetic simulation, the toroidally averaged E, E × B velocity and the measured phase velocity of the n = 12 mode at z = 128Δx and t = 8a/vt,i are compared in figure 17. The E × B velocity at the edge correlates strongly with the phase velocity of the perturbation in terms of amplitude and profile. As a result, the E × B flow for the background plasma generated by instability interacts coherently with the mode structure, significantly modifies the space-time structure of the perturbation relative to the background plasma and reduces the drive of the instability. For this case simulated, the nonlinear saturation mechanism agrees qualitatively with the nonlinear gyrokinetic simulation [57].

Figure 16.

Figure 16. Time-history of ion densities for different toroidal mode number n.

Standard image High-resolution image
Figure 17.

Figure 17. The toroidal averaged electric field in ex direction (a). The E × B velocity vE×B and measured phase velocity vD for the n = 12 mode in the ez direction at z = 128Δx and t = 8a/vt,i (b).

Standard image High-resolution image

4. Conclusions

Even though 6D kinetic PIC method is a classical simulation tool for plasma physics, up to now it has not been applied to numerical studies of tokamak physics in spite of continuous improvement [2730, 3335, 136160]. In the present study, we have developed an explicit structure-preserving geometric PIC algorithm in COMs, in particular the cylindrical mesh, and apply it to carry out whole-device 6D kinetic simulation studies of tokamak physics. The work reported represents a further development of the structure-preserving geometric PIC algorithm [1525], achieving the goal of practical applications in magnetic fusion research.

Along with its predecessors [1525], the algorithm extends the symplectic integration method for finite dimensional canonical Hamiltonian systems developed since the 1980s [4347, 7998], and preserves an infinite dimensional non-canonical symplectic structure of the particle-field systems. In addition, other important geometric structures and conservation laws, such as the gauge symmetry, the local charge conservation law [15, 24, 115] and the local energy conservation law [23], are preserved exactly as well. These preserved structures and conservation laws improve the accuracy and fidelity of large-scale long-term simulations on modern computing hardware [14].

Through the whole-device 6D kinetic simulation, we numerically obtained a self-consistent kinetic steady state for fusion plasma in the tokamak geometry. It was found that the pressure tensor of the self-consistent kinetic steady state is diagonal, anisotropic in 3D, but isotropic in the poloidal plane. The steady state also includes a steady-state sub-sonic ion flow in the range of 10 km s−1, which agrees with previous experimental observations [51, 52] and theoretical calculations [53, 54]. Kinetic ballooning instability in the self-consistent kinetic steady state was successfully simulated. In the linear phase, it was found that high-n ballooning modes have larger growth rates than low-n global modes. In the nonlinear phase, the modes saturate approximately in 5 ion transit times at the 2% level by the E × B flow generated by the instability. These results qualitatively agrees with early [55, 56] and recent [57] simulations by electromagnetic gyrokinetic codes. In addition, compared with conventional gyrokinetic and reduced Braginskii [161163] fluid simulation methods, more physical effects, such as fully kinetic dynamics and the self-consistent radial electric field, are naturally included in the present method. These effects can be crucial for edge plasmas and will be investigated in the next step.

It worth mentioning that in the present work we can not directly control the 2D kinetic steady state because it is numerically evolved from a given initial condition. In the future, we plan to solve this problem by adopting MHD equilibrium solutions as the initial conditions. Because a MHD equilibrium should be at least close to a lowest order kinetic steady state, it is expected that a kinetic steady state can be obtained by a short time evolution.

The present work can be also extended to describe more complex physical processes in tokamak plasmas. For example, we can add energetic particles to investigate their interactions with the background plasma. An antenna can be also modeled as a current source to study the wave heating and current drive [33]. To simulate collision related physics, we can include Monte-Carlo Collision [164] processes. It should be noted that due to the lack of marker particles in PIC simulations, the numerical collision frequency is usually larger than the real collision frequency of the plasma. More investigations are needed to determine the proper method to simulate collisions in the present scheme. Adding more physical effects to the geometric structure preserving PIC simulation framework will help us to better understand the tokamak physics. These topics will be addressed in the future study.

Acknowledgments

J Xiao was supported by the the National MCF Energy R&D Program (No. 2018YFE0304100), National Key Research and Development Program (Nos. 2016YFA0400600, 2016YFA0400601 and 2016YFA0400602), and National Natural Science Foundation of China (Nos. 11905220 and 11805273). J Xiao developed the algorithm and the SymPIC code and carried out the simulation on Tianhe 3 prototype at the National Supercomputer Center in Tianjin and Sunway Taihulight in the National Supercomputer Center in Wuxi. H Qin was supported by the U.S. Department of Energy (DE-AC02-09CH11466). H Qin contributed to the physical study of the self-consistent kinetic equilibrium and the KBMs.

Appendix A.: External magnetic field of the tokamak, initial particle loading, and the boundary setup

In this appendix we describe the setup of external magnetic field of the tokamak, initial particle loading, and the boundary setup for the simulation study. The normalization of quantities are listed in table A1.

Table A1. Normalization for quantities.

Physical quantitySymbolUnit
Length x, r,...Δx
Velocity v cn
Mass mi me
Time t Δx/cn

The magnetic field is divided into three parts,

Equation (A1)

where B0,e is the external magnetic fields generated by poloidal coils, B0,t is the magnetic field generated by toloidal coils, i.e.

Equation (A2)

and they do not evolve with time. B0,p is the magnetic field generated by the plasma current. The current j and the vector potential A are related by

Equation (A3)

Initially, the current is in the y-direction and depends only on x and z. In the adopted cylindrical coordinate (x, y, z) the line element is

Equation (A4)

and equation (A3) becomes

Equation (A5)

Equation (A6)

where

When ${j}_{y}\left(x,z\right)={I}_{0}\delta \left(x-{x}_{0}\right)\delta \left(z-{z}_{0}\right)$, which represents a coil current at (x0, z0), equation (A6) can be solved using spherical harmonic expansion. However the convergence of the series is slow when ${r}_{{\rm{g}}}=\sqrt{{\left(x+{r}_{0}\right)}^{2}+{(z-{z}_{0})}^{2}}$ approaches x0 + R0, the radius of the coil. We note that the second term in the left-hand-side of equation (A6) is negligible when ${R}_{0}+x\gg {B}_{z}/\left(\partial {B}_{z}/\partial x\right)$. In this case, equation (A6) simplifies to

Equation (A7)

which is a standard 2D Poisson equation. Its solution for the coil current at (x0, z0) with I0 = 1 is

Equation (A8)

Here, dimensionless variables have been used to simplify the notation. The total external vector potential generated by poloidal field coils is

Equation (A9)

where the locations of poloidal field coils are displayed in table A2.

Table A2. Locations of tokamak poloidal field coils.

Coil number i x(m) z(m)Coil number i x(m) z(m)
1−0.050.489670.48−0.1904
2−0.050.329680.481.0096
3−0.050.649690.620.0156
4−0.050.1696100.620.8036
5−0.050.8096110.081.0096
6−0.050.0096120.08−0.1904

For B0,p and the corresponding plasma current j0, we first construct a vector potential Ay,0,p and then use this potential to obtain B0,p and j0. The constructed Ay,0,p is

where $r=\sqrt{{\left(x-{x}_{\mathrm{mid}}\right)}^{2}+{\left(z-{z}_{\mathrm{mid}}\right)}^{2}}$, xmid = Nx /2 and zmid = Nz /2 are coordinates of the center of simulation domain, q0 is the safety factor in the core of the plasma, rl = 0.454a = 0.1 m and rr = 0.667a = 0.147 m are two parameters that determine the current density distribution. The discrete magnetic fields are obtained by

Equation (A10)

and the discrete current density is obtained from

Equation (A11)

The final plasma current is chosen as

Equation (A12)

Density and temperature are calculated from ${A}_{y,0}^{{\rm{o}}}={A}_{y,0,{\rm{e}}}^{{\rm{o}}}+{A}_{y,0,{\rm{p}}}^{{\rm{o}}}$. We introduce a reference function gr defined as

Equation (A13)

where

Equation (A14)

Equation (A15)

The initial density and temperature for electrons and ions are

Equation (A16)

Equation (A17)

In this work, ions are all deuterium ions, and the initial velocity distribution for each specie is Maxwellian with a flow velocity, i.e.

Equation (A18)

where

Equation (A19)

The boundaries of the simulations are configured as follows. The boundaries at x = 0, x = Nx Δx, z = 0, and z = Nz Δz are chosen to be perfect electric conductors for the electromagnetic fields. For particles, we introduce a thin slow-down layer,

If a particle is inside Lp at a time-step, its velocity vp will be reduced to 0.98vp at the end of this time-step, and the particle will be removed when vp is smaller than 1 × 10−5 c. Periodic boundaries for both particles and electromagnetic fields are adopted in the y-direction. The plasma is confined inside the last closed flux surface mostly, and the shape of plasma is not directly related to the simulation boundaries.

Appendix B.: Explicit 2nd-order structure-preserving geometric PIC algorithm in the cylindrical mesh

In this appendix, we list the detailed update rule for the 2nd-order structure-preserving geometric PIC algorithm in the cylindrical mesh introduced in section 2.5. It updates previous particle locations and discrete electromagnetic fields {xsp,2l−2, xsp,2l−1, EJ,l , BK,l } to the current ones {xsp,2l , xsp,2l+1, EJ,l+1, BK,l+1},

where

Please wait… references are loading.