6.1 Matrix representation

6.1.1 Zero order term: the Fokker-Planck equation

Implicit time scheme

Projected on the numerical distribution function grid, and taking into account of the internal and external boundaries, the 3 - D electron Fokker-Planck equation may be expressed as

                 f(0)(k+1)    ′    - f(0)(k)      ′
    -^ql+1∕2-p2i+1∕2-0,l+1-∕2,i+1∕2,j-+1∕2----0,l+1∕2,i+1∕2,j-+1∕2
    B0,l+1∕2                      Δt
             i′=∑i+1j′′=∑j′+1  (0)
   + -^ql+1∕2-            ^M--      ′    ′′    f(0)(k+1)′     ′′
     B0,l+1∕2i′=i-1j′′=j′-1  p,l+1∕2,i+1∕2,j +1∕2 0,l+1∕2,i+1∕2,j +1∕2
                 ′
     ---p2i+1∕2-- l=∑l+1^-(0)               (0)(k+1)
   + λl+1∕2,j′+1 ∕2      M ψ,l′+1∕2,i+1∕2,j′+1∕2f0,l′+1∕2,i+1∕2,j′+1∕2
                 l′=l-1(                                            )
     -^ql+1∕2- 2     (0)                    3-        (0)(m=1 )(k)
   + B       pi+1∕2C     fM,l+1∕2,i+1∕2,j′+1 ∕2,2 ξ0,j+1∕2f0,l+1∕2,i+1∕2,j′+1∕2
       0,l+1∕2     (                                     )
=  + -^ql+1∕2-p2     S(0)             - S(0)                           (6.1)
     B0,l+1∕2 i+1∕2   R,l+1∕2,i+1∕2,j+1∕2   th,l+1∕2,i+1 ∕2,j+1∕2
where C(0) is the first order Legendre electron-electron self-collision term that ensures momentum conservation, as discussed in Sec.4.1.1 , a contribution that introduces a weak non-linear dependence, SR,l+12,i+12,j+12(0) is the runaway avalanche source term as introduced in Sec.3.6 and Sth,l+12,i+12,j+12(0) is the source of thermal that must be removed from the bulk since they have been knock-on to much higher energies. Here, the Fokker-Planck equation (6.1) is evaluated on the reduced pitch-angle grid which is described by the index number j.

Upwind differencing corresponding to the fully implicit time scheme is used, since it is usually numerically stable for arbitrary values of Δt. Therefore, with this method, a fast rate of convergence towards the steady-state solution limk→∞f0,l+12,i+12,j+12(0)(k+1) = f0,l+12,i+12,j+12(0)() may be achieved, using extremely large time step Δt, with respect to the usual collision reference time τc as discussed in Sec. 6.3. The fact that both momentum and spatial dynamics are considered simultaneously represents a considerable progress as compared to the standard operator splitting technique1, where alternatively, dynamics in each space are considered explicitely, a procedure which puts strong limitations on the time step Δt∕τc1.

In compact matrix form, the differential equation in the reduced momentum phase space has the following symbolic form

(        )          (    )
   ^A                  A^           (         )
  --- + ^B  X (k+1) =   ---  X(k) + C^ XM ,X (k)  + ^S(Rk)
  Δt                  Δt
(6.2)

where ^A is a single diagonal matrix associated to time differencing, ^B corresponds to the flux divergence and C^ is the first order Legendre correction, and S^ R is the runaway avalanche source term. Here X(k) is a vector whose components are the discrete values of the distribution function f0(0) at time step (k), organized as follows

        (|         (|          ({  j′ = 0
        |||         |||  i = 0 →    j′ = ...
        ||||         {          (   ′
  (k)   {  l = 0 → ||            j = nξ0 - n ξ0T,l+1∕2 - 1
X    →  |         ||(  i = ...
        ||||            i = np - 1
        |||(  l = ...
           l = nψ - 1
(6.3)

while XM corresponds to the Maxwellian distribution function.

Without radial transport, ^
B is a block diagonal matrix. Each block, which describes the momentum dynamics at location ψl+12, is a square matrice of 15 diagonals whose size (             )
 nξ - nξ
   0    0T,l+1∕2np×(             )
 nξ - nξ
   0    0T,l+1∕2np progressively decreases from ψ12 to ψnξ 0-12 because of the trapped/passing boundary enlarges from the center to the plasma edge, as shown in Fig. 6.1. The main diagonal of ^B is dominant because collisions predominate over other physical processes at each plasma radius.


cmcmcmPIC

Figure 6.1: Qualitative shape of matrix BbbB for the Fokker-Planck equation


The introduction of the radial dynamics adds several extra off-diagonals, which connect neighboring blocks corresponding to different radial positions, in addition to the main diagonal which is also modified accordingly. The complexity arises from the fact that trapped electrons may become passing as a result of the radial transport process, and conversely. However, matrix ^B keeps a global banded structure and is still highly sparce, a property that is extensively used for reducing memory storage requirement. Indeed, size of ^B is roughly given by relation

             ⌊                       ⌋
    (  )       l=n∑ψ- 1(             )  2
size ^B  =  n2p⌈        nξ0 - n ξ0T,l+1∕2 ⌉ ≤  n2ψn2pn2ξ
                l=0                             0
(6.4)

For tokamak with very large aspect ratio, size( )
 ^Bnψ2np2nξ02 since trapped particle contribution is fairly negligible. In this limit, an upper boundary of the memory size requirement may be estimated. For the reference case, nψ = 20, np = 200 and nξ0 = 200, the total number of coefficients reaches 64 × 10+10, and the needed memory capacity2 is 5.12TBytes ! Hopefully, this huge number may be drastically reduced down to 11 × nψnpnξ0, since ^
A becomes in that limit a simple banded matrix with exactly 11 diagonals. The required memory falls down therefore to 70.4MBytes3, a level which can be easily handled by most computers today.

Crank-Nicholson time scheme

The Crank-Nicholson time scheme is used for time evolution studies of the distribution function f0(0). It is second order accurate in time, but this scheme requires usualy Δt∕τc1, in order to avoid spurious numerical oscillations towards the steady-state solution f0(0)(∞ ). From Eq.6.2, it is straightforward to derive the new matrix form of the Fokker-Planck equation

(        )          (        )
  A^   B^             A^   ^B            (         )    (k)
  ---+ --  X (k+1) =   ---- --  X (k) + ^C  XM ,X (k) + S^R
  Δt    2             Δt    2
(6.5)

by just replacing

            (              )
^  (k+1)   ^  X-(k) +-X-(k+1)
BX      →  B        2
(6.6)

since ^B is a linear operator.

6.1.2 Up to first order term: the Drift Kinetic equation

Projected on the numerical distribution function grid, and taking into account of the internal and external boundaries, the 3 - D electron drift kinetic equation may be expressed as

i′=i+1j′′=j′+1
 ∑     ∑    ^M-(0)    ′     ′   g(0)(k)           =
′     ′′  ′    p,l+1∕2,i+1∕2,j+1∕2 l+1 ∕2,i′+1∕2,j′′+1∕2
i=i-1j =j-1                   (                                          )
^^ (0)                 2     (0)                    3-       (0)(m=1)(k)
W p,l+1∕2,i+1∕2,j′+1∕2 - pi+1∕2C   fM,l+1∕2,i+1∕2,j′+1∕2,2ξ0,j+1∕2gl+1∕2,i+1∕2,j′+1∕2
                                                                        (6.7)
where
   (0)                    i′=∑i+1j′′=∑j+1---(0)
^^W  p,l+1∕2,i+1∕2,j+1∕2  =  -            M^ p,l+1 ∕2,i′+1∕2,j′′+1∕2f^l(0+)1∕2,i′+1∕2,j′′+1∕2
                         i′=i-1j′′=j-1
                         i′=i+1j′′=j+1
                          ∑     ∑   -^(0)               ^(0)
                       -  ′    ′′   H ψ,l+1 ∕2,i′+1∕2,j′′+1 ∕2fl+1∕2,i′+1∕2,j′′+1∕2
                         i=i-1j =j-(1                                         )
                          2    ^(0)                    3-      ^(0)(m=1)
                       - pi+1∕2C     fM,l+1∕2,i+1∕2,j+1∕2,2ξ0,j+1∕2fl+1∕2,i+1∕2,j+1∕2
                                                                            (6.8)

As mentioned in Sec.5.7.2, j {0,nξ0 - 1 }, while j {                    }
 0,n ξ0 - m ξ0T,l+1∕2 - 1 corresponds to the reduced pitch-angle grid which depends of the radial position ψl+12, since all the trapped region has been removed. In Eq.6.7, time evolution is not considered, since function g(0) is only determined for steady-state value of  ^
f (0). Therefore, iterations to reach the solution only result from the non-linear electron self-collision operator C(0), that ensures momentum conservation, in order to find a self-consistent solution.

In compact matrix form, the differential equation in the reduced momentum phase space has the following symbolic form

                     (        )
G^Y  (k+1) = ^GY (k) + ^C XM  ,Y(k) + ^^W
(6.9)

where ^G corresponds to the flux divergence, ^C is the first order Legendre correction and ^^W to the contribution of the radial gradient of the distribution function f0(0) . Here Y (k) is a vector whose components are the discrete values of the distribution function g(0)(k) at iteration step (k ), organized as follows

       (|          (|          ({ j′ = 0
       |||          |||  i = 0 →   j′ = ...
       ||||          {          (  ′
  (k)   {  l = 0 → ||            j =  nξ0 - m ξ0T,l+1∕2 - 1
Y    → |          ||(  i = ...
       ||||             i = np - 1
       |||  l = ...
       (  l = nψ - 1
(6.10)

and vector XM is corresponding to the Maxwellian distribution function, as defined in Sec. 6.1.1.

By construction, G^ is simply a block diagonal matrix. Each block, which describes the momentum dynamics at location ψl+12, is a square matrice of 9 diagonals whose size (              )
 nξ0 - m ξ0T,l+1∕2np×(              )
 n ξ0 - m ξ0T,l+1∕2np progressively decreases from ψ12 to ψnξ 0-12 because of the trapped/passing boundary enlarges from the center to the plasma edge, as shown in Fig. 6.2. The main diagonal of ^G is also dominant because collisions predominate over other physical processes at each plasma radius.


cmcmcmPIC

Figure 6.2: Qualitative shape of matrix ^G for the drift kinetic equation


The matrix  ^
G has a global banded structure with an extremely high sparcity, a property that is also extensively used for memory storage, like for the Fokker-Planck equation (see Sec. 6.1.1). Indeed, the size of ^G is roughlu given by relation

              ⌊l=n -1                 ⌋2
     (^)     2⌈  ∑ψ   (              )⌉     2  2 2
size  G  = n p         nξ0 - m ξ0T,l+1∕2   ≤ nψn pnξ0
                 l=0
(6.11)

For tokamak with very large aspect ratio, size(  )
 G^nψ2np2nξ02 since trapped particle contribution is fairly negligible. In this limit, size(  )
 G^size(  )
  ^B, where ^B is the flux matrix of the Fokker-Planck equation. For the values of nψ, np and nξ0 taken in Sec. 6.1.1, the required memory is approximately 57.6MBytes, a lower level than for the Fokker-Planck equation, since the trapped region is completely removed in the calculations.