High-order Discretization of a Gyrokinetic Vlasov Model in Edge Plasma Geometry

We present a high-order spatial discretization of a continuum gyrokinetic Vlasov model in axisymmetric tokamak edge plasma geometries. Such models describe the phase space advection of plasma species distribution functions in the absence of collisions. The gyrokinetic model is posed in a four-dimensional phase space, upon which a grid is imposed when discretized. To mitigate the computational cost associated with high-dimensional grids, we employ a high-order discretization to reduce the grid size needed to achieve a given level of accuracy relative to lower-order methods. Strong anisotropy induced by the magnetic field motivates the use of mapped coordinate grids aligned with magnetic flux surfaces. The natural partitioning of the edge geometry by the separatrix between the closed and open field line regions leads to the consideration of multiple mapped blocks, in what is known as a mapped multiblock (MMB) approach. We describe the specialization of a more general formalism that we have developed for the construction of high-order, finite-volume discretizations on MMB grids, yielding the accurate evaluation of the gyrokinetic Vlasov operator, the metric factors resulting from the MMB coordinate mappings, and the interaction of blocks at adjacent boundaries. Our conservative formulation of the gyrokinetic Vlasov model incorporates the fact that the phase space velocity has zero divergence, which must be preserved discretely to avoid truncation error accumulation. We describe an approach for the discrete evaluation of the gyrokinetic phase space velocity that preserves the divergence-free property to machine precision.

Authors

• 2 publications
• 2 publications
• 2 publications
• 2 publications
• 2 publications
• 1 publication
• Economically High-Order Unstructured-Grid Methods: Clarification and Efficient FSR Schemes

In this paper, we clarify reconstruction-based discretization schemes fo...
12/15/2020 ∙ by Hiroaki Nishikawa, et al. ∙ 0

• A high-order weighted finite difference scheme with a multi-state approximate Riemann solver for divergence-free magnetohydrodynamic simulations

We design a conservative finite difference scheme for ideal magnetohydro...
03/12/2019 ∙ by Takashi Minoshima, et al. ∙ 0

• Adaptive two- and three-dimensional multiresolution computations of resistive magnetohydrodynamics

Fully adaptive computations of the resistive magnetohydrodynamic (MHD) e...
02/23/2021 ∙ by Anna Karina Fontes Gomes, et al. ∙ 0

• Energy conservative SBP discretizations of the acoustic wave equation in covariant form on staggered curvilinear grids

We develop a numerical method for solving the acoustic wave equation in ...
07/02/2019 ∙ by Ossian O'Reilly, et al. ∙ 0

• Γ-convergence for high order phase field fracture: continuum and isogeometric formulations

We consider second order phase field functionals, in the continuum setti...
07/23/2019 ∙ by Matteo Negri, et al. ∙ 0

• A local velocity grid conservative semi-Lagrangian schemes for BGK model

Most numerical schemes proposed for solving BGK models for rarefied gas ...
07/19/2021 ∙ by Sebastiano Boscarino, et al. ∙ 0

• High order time integrators for the simulation of charged particle motion in magnetic quadrupoles

Magnetic quadrupoles are essential components of particle accelerators l...
02/22/2018 ∙ by Abele Simona, et al. ∙ 0

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

The ability to model computationally the behavior of magnetically confined plasma in the edge region of a tokamak fusion reactor is a key component in the development of a predictive simulation capability for the entire device. As shown schematically in Figure 1, the edge region spans both sides of the magnetic separatrix, encompassing part of the core region, part or all of the region between the plasma and the reactor wall, and the divertor plates. In addition to geometric complexity, an important feature that distinguishes the edge from the core is the development of a region of steep gradients in the density and temperature profiles called the pedestal (Figure 2), the height of which determines the quality of plasma confinement, and hence fusion gain. A kinetic plasma model is needed in this region, because the radial width of the pedestal observed in experiments is comparable to the radial width of individual particle orbits (leading to large distortions of the local distribution functions from a Maxwellian), while the mean free path can be comparable to the scale length for temperature variations along the magnetic field (violating the assumptions underlying a collisional fluid model).

Because of the large number of independent variables in a fully kinetic model, as well as the fast time scale represented by the ion gyrofrequency, gyrokinetic models have been developed that remove the fast gyromotion asymptotically and thereby facilitate numerical treatments. Continuum models consist of a Vlasov operator describing the evolution of plasma species distribution functions in a particular coordinate system combined with some variant of Maxwell’s equations and collision terms. Codes such as GENE[21, 22], GS2[15, 26] and GYRO[4, 6, 5] have been successfully employed to model core plasmas for many years. In addition to requiring simpler geometries, these codes exploit the fact that in the core, distribution functions are typically small perturbations about a known Maxwellian distribution , providing a simpler, and even sometimes linear, model. To model the edge plasma all the way to the reactor walls, a method to solve nonlinear gyrokinetic models for the entire distribution function (so-called full-) in edge-relevant geometries is needed.

In this paper, we describe an approach for the discretization of a continuum full-, gyrokinetic Vlasov system in axisymmetric edge geometries. The system is treated as a conservation law describing the advection of plasma species distribution functions in a four dimensional phase space (2 configuration space and 2 velocity space coordinates). A (mostly) flux-surface-aligned, mapped-multiblock (MMB) coordinate system (Figure 3) is used to accommodate strong anisotropy in the direction of magnetic field lines, similar to fluid edge codes such as UEDGE [31, 30, 29] and SOLPS-ITER [34]. We formulate a high-order spatial discretization to reduce the phase space grid size needed for a specific level of accuracy relative to a lower-order approximation, as well as to reduce numerical dissipation in long-time integrations. In particular, we employ a semi-discretization based on a general formalism [7, 27] for the creation of arbitrarily high-order finite-volume spatial discretizations in mapped coordinates. This formalism is summarized in Sections 3.1 and 3.3. A unique feature of the edge geometry application is that a key requirement of the formalism, namely, that the block mappings are smooth up to and some distance beyond block boundaries, cannot be satisfied by a completely flux-surface-aligned mapping due to the singularity of the metric factors at the X point, where the magnetic separatrix intersects itself and the poloidal field component vanishes. As discussed in Section 4, some dealignment is therefore necessary in a neighborhood of the X point to enable high-order differentiation there.

Since the phase space velocity in gyrokinetic models is developed via Hamiltonian equations of motion, the zero velocity divergence implied by the area-preserving property of such dynamical systems is an important constraint that must be maintained during discretization to avoid the accumulation of truncation error in long-time integrations. For the gyrokinetic model [19] addressed here and presented in Section 2, we demonstrate in Section 3.2

how the divergence-free property can be satisfied to machine precision in the context of our high-order, MMB, finite-volume discretization. Specifically, in calculating the phase space cell averages of the gyrokinetic flux divergence, the velocity enters through integrals of the normal components over the cell faces, which in turn are used to compute flux normals via a high-order product formula. By exploiting the fact that the phase space velocity can be written as a sum of vectors including a certain skew-symmetric, second-order tensor divergence, Stokes’ theorem can be invoked to reduce the cell face velocity integrals to face boundary integrals that telescopically sum to zero in the cell-averaged finite volume divergence calculation. Additional benefits accrue from the fact that the face boundary integrals corresponding to three of the four velocity terms (

i.e., parallel streaming, curvature and drifts) are computed exactly, and no metric factors appear.

The algorithms described herein provide the foundation of the COGENT (COntinuum Gyrokinetic Edge New Technology) code, which we have been developing for the solution of continuum gyrokinetic models in multiblock geometries, including those describing the tokamak edge. An overview of COGENT is the topic of Section 5, and in Section 6, we utilize COGENT to demonstrate the accuracy of the spatial discretization described in the preceding sections. The efficient discretization of the gyrokinetic Vlasov operator is necessary but not sufficient for the complete simulation of the edge plasma problem. Given its fundamental importance, however, we have limited the scope of this paper to only that part. As described in Section 5, COGENT includes a number of the other components (e.g., collision operators, self-consistent electrostatic fields and high-order semi-explicit time integration methods) needed to address edge-relevant problems, which have been used in several verification studies [16, 11, 13, 9, 14, 12, 17]. To our knowledge, COGENT’s ability to solve a continuum gyrokinetic model in edge geometries spanning both sides of the magnetic separatrix is unique.

2 The gyrokinetic Vlasov system

We target a reduced version of the full- gyrokinetic model of [19]:

 ∂(B∗∥f)∂t+∇\mbR⋅(˙\mbRB∗∥f)+∂∂v∥(˙v∥B∗∥f)=0, (1)

where

 ˙\mbR = ˙\mbR(\mbR,v∥,μ,t)=v∥B∗∥\mbB∗+ρLZB∗∥\mbb×\mbG, (2a) ˙v∥ = ˙v∥(\mbR,v∥,μ,t)=−1mB∗∥\mbB∗⋅\mbG, (2b)

and

 \mbB∗ = \mbB∗(\mbR,v∥)=\mbB+ρLmv∥Z∇\mbR×\mbb, (3a) B∗∥ = B∗∥(\mbR,v∥)=\mbb⋅\mbB∗, (3b) \mbG = \mbG(\mbR,μ,t)=Z∇\mbRΦ+μ2∇\mbRB. (3c)

The unknown quantity is the plasma species distribution function in gyrocenter phase space coordinates , which are described further below and whose equations of motion are given by (2)-(3). and are the magnitude and direction of the magnetic field , respectively. and are the species charge state and mass, respectively. is the electric potential. For our present purposes, we assume the long wavelength limit in which the Larmor radius is much smaller than the characteristic length scales for electrostatic potential variations. We utilize a particular normalization described in Appendix 9.1 that nondimensionalizes all quantities, including the Larmor number, , defined in Table 5.

Gyrocenter coordinates play a key role in gyrokinetic models in two important ways. First, they reduce what would otherwise be a six-dimensional phase space to five dimensions: is the three-dimensional configuration space coordinate,

is the velocity space component along field lines, and the magnetic moment

is related to the velocity perpendicular to field lines. Through the use of asymptotic orderings, gyrocenter coordinates are specifically constructed so as to make the distribution function symmetric with respect to gyrophase. The latter component, which would have been the third velocity component, can then be ignored. The magnetic moment , an adiabatic invariant, is assumed to be constant in the development of gyrokinetic theories, which is why no evolution equation appears for it. The second benefit of gyrocenter coordinates is that the gyrofrequency is eliminated, which would otherwise represent a fast time scale that would need to be resolved.

The gyrokinetic phase space velocity (2) models strong flow along magnetic field lines, represented by the quantity, together with curvature, and drift terms containing the factor, which is assumed small in the gyrokinetic asymptotic ordering. For typical tokamak parameters, the difference in the magnitude of the streaming and drift terms can be a few orders of magnitude. The resulting strong anisotropy resulting from the disparity in parallel and perpendicular quantities has many implications in the development of numerical algorithms. Because gyrocenter coordinates are developed as a Hamiltonian dynamical system, the velocity (2) satisfies the area preserving property

 ∇\mbR⋅(B∗∥˙\mbR)+∂∂v∥(B∗∥˙v∥)=0, (4)

where is the Jacobian of the mapping between lab frame and gyrocenter coordinates. The analytic verification of (4) is contained in Appendix 9.2. As noted in [19], the gyrokinetic Vlasov equation can therefore be expressed in either convective or conservative form. We choose the latter with the objective of achieving a correspondingly conservative numerical discretization. The potential in (3c) is evaluated by solving some form of Maxwell’s equations. For the purposes of this paper, we assume that is known, although the COGENT code used for our numerical example includes additional options, as discussed in Section 5.

The gyrokinetic system is posed in a domain defined by the tokamak magnetic geometry, which is comprised of field lines lying on concentric flux surfaces (Figure 1). In this paper, we assume an axisymmetric geometry, where all quantities are assumed to be constant in the toroidal direction. The configuration space domain therefore consists of a single poloidal slice. Due to large variations of plasma parameters along and across field lines (and therefore along and across sliced flux surfaces in the poloidal plane), there is strong motivation to discretize in coordinates where at least one of the coordinate directions is defined by the flux surfaces. Since a single, smooth, flux-surface-aligned coordinate mapping cannot be constructed over the entire domain, we consider a multiblock decomposition such as the one depicted in the left-hand side of Figure 3. This decomposition is constructed by first recognizing the natural partitioning defined by the magnetic separatrix into the core, scrape-off and private flux regions. Each region is further decomposed into blocks such that (i) each block can be mapped from a logically rectangular computational domain and (ii) adjacent blocks must abut along entire boundaries. The core region is therefore subdivided into the left (LCORE), middle (MCORE) and right (RCORE) blocks; the scrape-off layer is decomposed into the left (LSOL), left-central (LCSOL), middle-central (MCSOL), right-central (RCSOL) and right (RSOL) blocks, and the private flux region is decomposed into the left (LPF) and right (RPF) blocks. The right-hand side of Figure 3 depicts the inter-block connectivity in the mapped coordinate domain. Within each mapped block, rectangular grids are introduced, resulting in a block rectilinear gridding of the physical domain. We require that the grids be conformal across inter-block boundaries, but otherwise no additional grid smoothness across block boundaries is assumed. For parallelization purposes, the rectangular block grids are further decomposed in 4D, load balanced and assigned to processors in a fully general manner.

We comment that the multiblock decomposition rules imposed above could have been satisfied using only six blocks by combining the LCORE, MCORE and RCORE blocks into a single block and the LCSOL, MCSOL and RCSOL blocks into another block. However, the generation of smooth mappings on the resulting “long and skinny” merged blocks is non-trivial. The advantage of the ten-block decomposition shown in Figure 3 is that eight of the blocks are curvilinear quadrilaterals that are relatively modest deformations of the unit square; the MCORE and MCSOL blocks can be mapped to the unit square using nearly polar coordinate transformations.

On this mapped multiblock grid, we consider the discretization of the system (1)-(3). Among our requirements is the discrete enforcement of the zero velocity divergence condition (4) assumed in the conservative formulation. A second requirement is high-order (i.e.

, greater than second-order) accuracy, which reduces the number of phase space degrees of freedom to achieve a given level of accuracy. A high-order method is also important for reducing numerical dissipation in long-time integrations. We therefore begin with a review of a general approach

[7] for constructing fourth-order, finite-volume discretizations of hyperbolic conservation laws in mapped coordinates on a single block. In this context, we then describe the calculation of the gyrokinetic velocities in the mapped coordinate system such that the divergence free condition (4

) is satisfied to machine precision. In our finite volume approach, the mapped grid normal velocities are used in flux calculations on cell faces together with discretized distribution functions. On cell faces near interblock boundaries, calculation of the latter is accomplished using suitably high-order interpolation

[27], enabling the extension of the discretization to multiblock geometries such as the edge geometry in Figure 3.

3 Phase space discretization

Fundamental to our approach is a general strategy for the systematic development of high-order, finite-volume discretizations in mapped coordinates. Additional details are contained in [7].

3.1 Fourth-order, finite-volume discretization in a mapped block

Consider a smooth mapping from the unit cube onto the spatial domain :

 \mbX=\mbX(ξ), \mbX:[0,1]D→Ω.

Given this mapping, the divergence of a vector field on can be written in terms of derivatives in , which will serve as our computational domain. That is,

 ∇\mbX⋅\mbF=J−1∇ξ⋅(\mbNT\mbF), (5a) J=det(∂\mbX∂ξ),  (\mbNT)p,q=det(Rp(∂\mbX∂ξ,\mbeq)), 1≤p,q≤D, (5b)

where denotes the matrix obtained by replacing the row of the matrix by the vector , and denotes the unit vector in the coordinate direction.

In a finite volume approach, is discretized as a union of control volumes. For Cartesian grid finite volume methods, a control volume takes the form

 W\mbi=[\mbih,(\mbi+\mbu)h] , \mbi∈ZD , \mbu=(1,1,…,1),

where is the grid spacing. When using mapped coordinates, we define control volumes in as the images of the cubic control volumes . Then, by changing variables and applying the divergence theorem, we obtain the flux divergence integral over a physical control volume by

 ∫\mbX(W\mbi)∇\mbx⋅\mbFd\mbx=∫W\mbi∇ξ⋅(\mbNT\mbF)dξ=D−1∑d=01∑α=0(−1)α+1∫Vαd(\mbNT\mbF)ddVξ, (6)

where the and are lower and upper faces of cell in the -th direction, respectively. As described in [7], the integrals on the cell faces can be approximated using the following formula for the average of a product in terms of fourth-order accurate face averages of each factor:

 ⟨ab⟩\mbi+12\mbed=⟨a⟩\mbi+12\mbed⟨b⟩\mbi+12\mbed+h212\mbG⊥,d0(⟨a⟩\mbi+12\mbed)⋅\mbG⊥,d0(⟨b⟩\mbi+12\mbed)+O(h4). (7)

Here, is the second-order accurate central difference approximation to the component of the gradient operator orthogonal to the -th direction: , and the operator denotes a fourth-order accurate average over the cell face centered at :

 ⟨q⟩\mbi+12\mbed=1hD−1∫VαdqdVξ+O(h4).

Alternative expressions to (7) are obtained by replacing the averages and/or used in the transverse gradients by the corresponding face-centered pointwise values and/or , respectively.

When applied in the discretization of the phase space divergence operator in the gyrokinetic system (1), we consider the flux , where

 \mbu=(u0,u1,u2,u3)=(uv∥,\mbu\mbR)=(B∥∗˙v∥,B∥∗˙\mbR), (8)

and the species subscript is dropped for brevity. We therefore obtain

 ∫\mbX(W\mbi)∇\mbx⋅\mbFd\mbx=h33∑d=01∑α=0(−1)α+1Fd\mbi±12\mbed+O(h4), (9)

where, taking and as the factors in the product formula (7),

 (10)

We note that an alternative discretization can be obtained by preserving the flux as one of the product formula factors, yielding

 Fd\mbi±12\mbed=3∑s=0⟨Nsd⟩\mbi+12\mbed⟨Fs⟩\mbi+12\mbed+h2123∑s=0(\mbG⊥,d0⟨Nsd⟩\mbi+12\mbed))⋅(\mbG⊥,d0(⟨Fs⟩\mbi+12\mbed)), (11)

where is the -th component of and is the -th element of the matrix . In [7], it is demonstrated that the computation of the face averages can be reduced to integrals over cell edges. Moreover, assuming that the edge integrals are performed with the same quadratures wherever they appear,

 3∑d=01∑α=0(−1)α+1∫VαdNsddVξ=0, (12)

which guarantees the freestream property that the divergence of a constant vector field computed by (6) is identically zero. Free-stream preservation is an extremely important property in the simulation of flows using mapped coordinate systems, since it represents a constraint on the approximation of the metric terms that reduces the dependence of computed solutions on the choice of mapping and metric discretization [25]. However, as will be demonstrated in the next section, the factorization (10) enables a discretization in which the divergence of the gyrokinetic velocity vanishes to machine precision, thereby enforcing the assumption (4) made in the conservative formulation (1). Moreover, the formulation is free of discretized metric terms, which naturally achieves one of the goals addressed in free-stream preserving approaches.

Calculation of the face-averaged fluxes (10) is therefore reduced to the calculation of face-averaged distribution functions and mapped normal velocity components. One choice for the former is obtained from the fourth-order, centered-difference formula

 ⟨f⟩\mbi+12\mbed=712(¯f\mbi+¯f\mbi+\mbed)−112(¯f\mbi+2\mbed+¯f\mbi−\mbed)+O(h4), (13)

where denotes the average of on cell . This results in a dissipationless scheme to which a limiter can also be added. Alternatively, an upwind method with order higher than four, such as the fifth-order WENO scheme [23], may be employed. Boundary conditions are also implemented here through the setting of inflow conditions in physical boundary ghost cells. Fourth-order face averages of the mapped normal velocity components can be computed directly from (2) using the product formula (7) and metric factor face averages, but as shown in the next section, a more careful exploitation of the specific structure of the gyrokinetic velocity results in a discretization that is also discretely divergence free.

3.2 Gyrokinetic velocity discretization

As shown in Appendix 9.2, the divergence of the gyrokinetic velocity (2) is zero. In this section, we demonstrate how to preserve this property when computing the divergence using the mapped-grid, finite-volume discretization described in the preceding section. Specifically, we show how the mapped normal velocity components can be computed such that the divergence integral (6) with is zero to machine precision.

Let denote a magnetic potential (i.e., ) and let

 p=ρL(Φ+μB2Z). (14)

Letting , we define

 ˜\mbu=\mbu−ˆ\mbu, (15)

where is the vector with entries

 ˆ\mbuj=−δ0,jZmρL\mbB⋅∇\mbRp,    0≤j≤3. (16)

is divergence-free, and therefore so is . Using the components of , we define the 3-form

 \bsigma =˜u3 dx0∧dx1∧dx2−˜u2 dx0∧dx1∧dx3 (17) +˜u1 dx0∧dx2∧dx3−˜u0 dx1∧dx2∧dx3.

The mapped normal velocity components of can be expressed (see Appendix 9.3) in terms of surface integrals of using the parameterization given by our mapping (which implies a particular surface orientation that has already been accounted for in (6)) as

 ∫Vαd(\mbNT˜\mbu)dd\mbV\bxi=(−1)d+1∫\mbX(Vαd)\bsigma,0≤d≤3. (18)

Since is divergence-free, its exterior derivative is zero. Poincaré’s Lemma (applied on the contractible manifolds ) therefore guarantees the existence of a 2-form

 \bomega=∑0≤i

such that . It therefore follows that

 ˜\mbuj=3∑j′=0∂ζj,j′∂xj′,    0≤j≤3, (20)

where

 \bzeta=(ζi,j)=⎛⎜ ⎜ ⎜ ⎜⎝0−ω0,1ω0,2−ω0,3ω0,10−ω1,2ω1,3−ω0,2ω1,20−ω2,3ω0,3−ω1,3ω2,30⎞⎟ ⎟ ⎟ ⎟⎠. (21)

The form is not unique. As described in Appendix 9.4, particular satisfying (20)-(21) can be found by a careful inspection of , yielding

 ω0,j =(−1)j+1v∥(\mbb×∇\mbRp)j,  1≤j≤3, (22a) ω1,2 =−v∥(\mbA+mv∥ρLZ\mbb)3, (22b) ω1,3 =−v∥(\mbA+mv∥ρLZ\mbb)2, (22c) ω2,3 =−v∥(\mbA+mv∥ρLZ\mbb)1, (22d) ωi,j =−ωj,i,0≤j

Next, letting denote the pullback mapping [2] defined by , we apply Stokes’ theorem [32] to obtain

 ∫\mbX(Vαd)\bsigma=∫Vαd\mbX∗(d\bomega)=∫Vαdd(\mbX∗\bomega)=∑d′≠d∑β=0,1(−1)d′+1+β∫Aα,βd,d′\mbX∗\bomega, (23)

where and are the low and high side faces of in direction , respectively. The pullback form is defined by

 \mbX∗\bomega=∑0≤i

In terms of coordinates, the pullback integrals are then [2]

 (25)

For example, consider a cylindrical coordinate mapping of the form:

 X0 =v∥(ξ0), (26a) X1 =R(ξ1,ξ2)cos(ξ3), (26b) X2 =R(ξ1,ξ2)sin(ξ3), (26c) X3 =Z(ξ1,ξ2), (26d)

where for and . The evaluation of (25) yields

 ∫Aα,βd,d′\mbX∗\bomega=Qα,βd,d′, (27)

where,

 Qα,β0,1 =2πρL∫ξ12ξ02{[(−η0(\mbb×E)Z+η12Z(\mbb×∇B)Z)∂R∂ξ2 (28a) (28b) Qα,β0,2 =2πρL∫ξ11ξ01{[(−η0(\mbb×E)Z+η12Z(\mbb×∇B)Z)∂R∂ξ1 (28c) (28d) Qα,β0,3 =ρL∫ξ11ξ01∫ξ12ξ02[−η0(\mbb×\mbE)Φ+μη12Z(\mbb×∇B)Φ](∂R∂ξ2∂Z∂ξ1−∂R∂ξ1∂Z∂ξ2)dξ1dξ2, (28e) Qα,β1,2 =−2π(η2R\mbAΦ+η3mρLZR\/bΦ)ξ1=ξα1,ξ2=ξβ2, (28f) Qα,β1,3 =−∫ξ12ξ02[(η2\mbAR+η3mv∥ρLZ\mbbR)∂R∂ξ2+(η2\mbAZ+η3mv∥ρLZ\mbbZ)∂Z∂ξ2]ξ1=ξα1dξ2, (28g) Qα,β2,3 =−∫ξ12ξ02[(η2\mbAR+η3mv∥ρLZ\mbbR)∂R∂ξ1+(η2\mbAZ+η3mv∥ρLZ\mbbZ)∂Z∂ξ1]ξ2=ξα2dξ1, (28h) Qα,βd′,d =−Qα,βd,d′ (28i)

and , , and . Noting that the quantities are independent of for all , we have from (23) that

 ∫\mbX(Vα0)\bsigma =∑d′≠0∑β=0,1(−1)d′+1+βQα,β0,d′=∑β=0,1(−1)β(Qα,β0,1−Qα,β0,2), (29a) ∫\mbX(Vα1)\bsigma =∑d′≠1∑β=0,1(−1)d′+1+βQα,β1,d′=∑β=0,1(−1)β(Qα,β0,1−Qα,β1,2), (29b) ∫\mbX(Vα2)\bsigma =∑d′≠2∑β=0,1(−1)d′+1+βQα,β2,d′=∑β=0,1(−1)β(Qα,β0,2−Qα,β1,2), (29c) ∫\mbX(Vα3)\bsigma =∑d′≠3∑β=0,1(−1)d′+1+βQα,β3,d′=0, (29d)

which, together with (18), yields

 ∫\mbX(W)∇\mbX⋅˜\mbu d\mbx=3∑d=0∑α=0,1(−1)1+α+d∫\mbX(Vαd)\bsigma=0. (30)

Trivially,

 ∫\mbX(W)∇\mbX⋅ˆ\mbu d\mbx=∑α=0,1(−1)1+α∫Vα0N0,0ˆ\mbu0d\mbV\bxi=0, (31)

and therefore is discretely divergence free.

The assumption of axisymmetric fields allows additional simplifications of the quantities , , and . Assuming that has no toroidal component, we observe that

 −(\mbb×E)Z∂R∂ξ2+(\mbb×E)R∂Z∂ξ2=−bΦ(∂ϕ∂R∂R∂ξ2+∂ϕ∂Z∂Z∂ξ2)=−BΦB∂ϕ∂ξ2, (32)

and similarly, since has no toroidal component,

 (\mbb×∇B)Z∂R∂ξ2−(\mbb×∇B)R∂Z∂ξ2=−BΦB∂B∂ξ2=−BΦ∂ln(B)∂ξ2. (33)

Hence, since is constant,

 Qα,β0,1 =−2πρL(RB)tor[η0∫ξ12ξ02(1B∂ϕ∂ξ2)ξ1=ξβ1dξ2+η12ZlnB(ξβ1,ξ12)B(ξβ1,ξ02))]. (34)

Similarly,

 Qα,β0,2 =−2πρL(RB)tor[η0∫ξ11ξ01(1B∂ϕ∂ξ1)ξ2=ξβ2dξ1+η12ZlnB(ξ11,ξβ2)B(ξ01,ξβ2)]. (35)

Letting denote the magnetic flux, we may take , yielding

 Qα,β1,2 =−2π(η2Ψ+η3mρLZ(RB)torB)ξ1=ξα1,ξ2=ξβ2. (36)

Summarizing the above, the face integrals of the mapped normal velocities are

 ∫Vα0(\mbNT\mbu)0d\mbV\bxi =∑β=0,1(−1)β(Qα,β0,2−Qα,β0,1)+ˆUα (37a) ∫Vα1(\mbNT\mbu)1d\mbV\bxi =∑β=0,1(−1)β(Qα,β0,1−Qα,β1,2), (37b) ∫Vα2(\mbNT\mbu)2d\mbV\bxi =∑β=0,1(−1)β(Qα,β1,2−Qα,β0,2), (37c) ∫Vα3(\mbNT\mbu)3d\mbV\bxi =0, (37d)

where , , and are defined by (34), (35) and (36), respectively, and

 ˆUα =2πm∫ξ11ξ01∫ξ12ξ02\mbB⋅(ZE−μ2∇B)(∂R∂ξ1∂Z∂ξ2−∂R∂ξ2∂Z∂ξ1)Rdξ1dξ2. (38)

We note that no metric factors appear in , , and , which are computed exactly from the evaluation of magnetic field data at configuration space cell vertices, except for the cell face integrals of the transverse derivatives divided by . These latter integrals can be computed using the fourth-order product formula (7), in which the resulting integrals can be evaluated exactly in terms of nodal values. This fact plays a critical role in avoiding a severe instability that can arise in the high-order, finite-volume modeling of drift waves [10].

By tracing the individual terms of the gyrokinetic velocity (2) through the above development, the physical meaning of the terms in (34), (35), (36) and (38) can be identified. The and acceleration terms in (38) are clear. The first and second terms in (34) and (35) are the and drifts, respectively. The second term in (36) is the curvature drift. The first term in (36) is the parallel streaming contribution, whose magnitude, as mentioned in Section 2, dominates those of the drift terms by a few orders of magnitude for typical tokamak parameters. In addition to the fact that the parallel streaming, drift and curvature drift terms are all computed exactly, an important consequence of the velocity discretization described here is that, on radial cell faces contained in a flux surface, parallel streaming makes zero (to machine precision) contribution to the normal velocity component (37b), due to the subtraction of the uniform values effected by the sum. This fact ensures that parallel velocity discretization error cannot dominate the drift terms, thereby masking the contribution of the latter via what is sometimes referred to as “numerical pollution” [33].

3.3 Multiblock extension

The single block discretization just described can be extended to the multiblock edge plasma geometry (Figure 3) using the approach detailed in [27]. In order to apply at block interfaces the same fourth-order reconstruction (13) used in the block interiors, a halo of “extrablock” ghost cells is filled by interpolation from surrounding cell-averaged data. Assuming that the smooth mappings on each block possess smooth extensions beyond their respective boundaries, these extrablock ghost cells are generated by simply applying the mapping to an extended computational grid. Figure 4 shows an example of filling an extrablock ghost cell near the X point. The only aspect the calculation of fluxes at interblock boundaries that is special is a post-processing step performed to restore strict conservation. Since there is no guarantee that the fluxes calculated on each side of a multiblock interface using the above procedure will agree to better than fourth order, the two fluxes are averaged to define a consistent value for use on both adjacent blocks.

The key element is therefore the interpolation of valid neighbor block data to extrablock ghost cells, which we briefly summarize here. Full details are contained in [27]. We use a least-squares approach that allows us to obtain high-order accuracy independent of the degree of smoothness of the grid. We compute a polynomial interpolant in the neighborhood of a ghost cell of the form

 φ(x)≈∑pd≥0;p1+⋯+pD≤P−1apxp , p=(p1,…,pD) , xp=xp11…xpDD. (39)

We assume that we know the conserved quantities in a collection of control volumes . In that case, we impose the conditions

 ∫vφ(ξ)dξ=∑pd≥0;p1+⋯+pD≤P−1ap∫vx(ξ)pdξ , ∈V. (40)

The integrals on the left-hand side can be computed to any order from the known integrals of the conserved quantities , and the integrals of can be computed directly from the grid mapping. Thus, this constitutes a system of linear equations for the interpolation coefficients . Generally, we choose the number of equations to be greater than the number of unknowns in such a way that the resulting overdetermined system has maximal rank, so that it can be solved using least squares. In the case where we are computing an interpolant onto a finer grid from a coarser one in a locally-refined grid calculation, we impose the conservation condition as a linear constraint.

4 Mapping the edge geometry

The use of mapped coordinates to accommodate strong anisotropy along magnetic field lines requires the construction of block mappings from computational to physical coordinates in which one of the computational coordinates parameterizes flux surfaces. In this section, we describe an approach based on the assumed availability of the magnetic flux in cylindrical coordinates, from which the (assumed axisymmetric) magnetic field is obtained as

 BR(R,Z)=−1