11.1 Definition of the field-line-following coordinates (ψ,𝜃,α)

In (ψ,𝜃,ζ) coordinates, a magnetic field line is straight in (𝜃,ζ) plane with slope being q. Then the equation for a magnetic field line is written as

ζ = q𝜃 + α,
(291)

where α is a constant in (𝜃,ζ) plane and can be used to label magnetic field lines on a magnetic surface. This motivates us to use α, i.e.,

α ≡ ζ − q𝜃,
(292)

to replace ζ. Then the magnetic field in Eq. (261) is written as

B = Ψ ′∇ ψ × ∇α,
(293)

which is called the Clebsch form. The direction

∂r
--|ψ,α = 𝒥∇ α× ∇ ψ,
∂𝜃
(294)

is parallel (or anti-parallel) to the magnetic field direction. Due to this fact, (ψ,𝜃,α) coordinates are usually called “field-line-following coordinates” or “field-aligned coordinates” [26].

Equation (293) implies that

B ⋅∇α = 0,
(295)

and

B ⋅∇ψ = 0,
(296)

i.e., both α and ψ are constant along a magnetic field line. Taking scalar product of Eq. (293) with 𝜃, we obtain

            ′
B ⋅∇ 𝜃 = − Ψ-,
          𝒥
(297)

which is nonzero, i.e., only 𝜃 among (ψ,𝜃,α) is changing along a magnetic field line. (Here 𝒥 = (ψ ×∇𝜃 ⋅∇α)1 is the Jacobian of the coordinate system (ψ,𝜃,α), which happens to be equal to the Jacobian of (ψ,𝜃,ζ) coordinates.)

Using Eq. (293), the magnetic differential operator B ⋅∇ in the new coordinate system (ψ,𝜃,α) is written

         Ψ ′∂
B ⋅∇f  = −-𝒥 ∂𝜃f,
(298)

which is just a partial derivative over 𝜃, as is expected, since only 𝜃 is changing along a magnetic field line.

By the way, note that (B ⋅∇α)(B ⋅∇𝜃) = 0, i.e., the magnetic field lines are straight with zero slope on (𝜃,α) plane.

Using Eqs. (292) and (255), α can be written as

       ∫ 𝜃
α = ϕ −   ˆqd𝜃,                            (299)
        0
where ˆq = B ⋅∇ϕ∕B ⋅∇𝜃 is the local safety factor. (If we choose the straight-field-line 𝜃, then α is written as α = ϕq𝜃.) Define δ = 0𝜃ˆq d𝜃, which is called tor_shift in TEK code, then α = ϕδ. In TEK, I choose 𝜃 [π,π) with 𝜃 = π corresponding to the high-field-side midplane, and 𝜃 is increasing along the counter-clockwise direction viewed along ϕ.  The 𝜃 cut (i.e.,𝜃 = ±π) is far away from the low-field-side where ballooning modes often have larger amplitude. The (x,y) grid near the 𝜃 cut is highly twisted in real space and interplation is needed in mapping physical quantity from the grid at 𝜃 = π plane to that at 𝜃 = +π. Numerical errors more likely appear there. So we prefer that the 𝜃 cut is located in less important area (area where mode amplitude is small).

It is widely believed that turbulence responsible for energy transport in tokamak plasmas usually has kk, where k and k are the parallel and perpendicular wavenumbers, respectively. Due to this elongated structure along the parallel direction, less grids can be used in the parallel direction than that in the perpendicular direction in turbulence simulation. In this case, the field-aligned coordinates (ψ,𝜃,α) provide suitable coordinates to be used, where less gridpoints can be used for 𝜃 coordinate in simulations and even some ∂∕∂𝜃 derivatives can be neglected (high-n approximation), which simplifies the equations that need to be solved. However, there is a more important reason why almost all gyrokinetic codes use field-aligned coordinates: the  stability of numerical algorthims is improved when we use coarse grids in the parallel direction because the parallel Courant condition (for explicit schemes) Δt ΔL∕v can be more easily satisfied (especially for the cases with kinetic electrons), where ΔL is the parallel grid spacing, which is larger when coarse grids are used in the parallel direction. This is also mentioned in Ref. [21] and it seems to be right from my experiences of testing several algorithm but a strict test is needed to verify this. This can also be understood in the following way: the coarse parallel grid automatically filters out physically irrelevant but numerically problematic high-k modes, permitting much longer time steps for explicit time stepping, in both particle and fluid codes[12].