5.3 Discretization procedure

5.3.1 Zero order term: Fokker-Planck equation

The starting point of the numerical calculations for the Fokker-Planck equation is the following expression

    ∂f(0)   1  ∂ (      )   11  ∂ ( ∘ ------    )
    --0--+  -2--- p2S(p0) -  -------   1 - ξ20λS(ξ0)
     ∂t     p ∂p     (      λp ∂ξ0                   )
      ---B0-(ψ-)----∂-             BP-0(ψ-)         (0)
    + λ(ψ,ξ0)^q (ψ )∂ψ   R0 (ψ)^q (ψ ) B0 (ψ ) λ(ψ,ξ0)S ψ
     (0)
=   SR                                                        (5.33)
where SR(0) is the bounce-averaged avalanche source term that comes into play in runaway regime. In order to avoid numerical singularities at p = 0, it is convenient to multiply all the terms by the partial Jacobian
J J  = -^q(ψ)-p2
 ψ p   B0 (ψ)
(5.34)

which leads to the equivalent form

     [            ]
   ∂  -^q(ψ)-p2f(0) ∕∂t
      B0 (ψ)   0
      ^q(ψ)  ∂ (      )
   + --------- p2S (0p)
     B0 (ψ)∂p          (∘ ------           )
   - -^q(ψ)----p-----∂--   1 - ξ2λ(ψ, ξ) S(0)
     B0 (ψ)λ (ψ,ξ0)∂ξ0         0      0  ξ
        p2    ∂ (            B   (ψ)           )
   + -----------  R0(ψ )^q(ψ) -P-0---λ (ψ,ξ0)S(ψ0)
     λ (ψ, ξ0)∂ψ              B0 (ψ)
   -^q(ψ-)  2 (0)
=  B0 (ψ)p RSR                                             (5.35)

Using the grid definition defined in Sec.5.2 and applying the backward time discretization, which corresponds to the fully implicit time differencing as discussed in Sec. 6.1.1, the discrete form of the Fokker-planck equation may be expressed as

                f (0)(k+1)         - f(0)(k)
   -^ql+1∕2-p2   -0,l+1∕2,i+1∕2,j+1∕2----0,l+1∕2,i+1∕2,j+1∕2
   B0,l+1∕2 i+1∕2                Δt
               (   (0)) |(k+1)
      ^ql+1∕2  ∂  p2Sp   ||
   + B-----------∂p----||
       0,l+1∕2           |l+1∕2,i+1∕2,j+1∕2
      ^q        p
   - --l+1∕2-----i+1∕2----×
     B0,l+1∕2 λl+1∕2,j+1∕2
    ∂  ( ∘ ------    ) ||(k+1)
    ----   1- ξ20λS (0ξ)  ||
    ∂ξ0                l+1∕2,i+1∕2,j+1∕2
       p2
   + -l+i1+∕12,∕j2+1∕2-×
     λ (             )|
    ∂--     BP-0   (0) ||(k+1 )
    ∂ψ  R0 ^q B0 λS ψ  |
                       l+1 ∕2,i+1∕2,j+1∕2
=  -^ql+1∕2-p2   S(0)                                        (5.36)
   B0,l+1∕2 i+1∕2 R,l+1 ∕2,i+1∕2,j+1∕2
where ^q l+12 = ^q (     )
 ψl+1∕2, B0,l+12 = B0(     )
 ψl+1∕2 and λl+12,j+12 = λ(             )
 ψl+1∕2,ξ0,j+1∕2. In a compact form
    ^ql+1∕2      f0(0,)l+(k1+∕12),i+1∕2,j+1∕2 - f(00,l)(+k1)∕2,i+1∕2,j+1∕2
   --------p2i+1∕2-----------------------------------
   B0,l+1∕2                     Δt
      ^q  2      (0)||(k+1)
   + B--p ∇p  ⋅Sp ||
       0           l+1∕2,i+1∕2,j+1∕2
      ^q  2      (0)||(k+1)
   + B--p ∇ ψ ⋅Sψ ||
       0           l+1∕2,i+1∕2,j+1∕2
   -^ql+1∕2- 2    (0)
=  B0,l+1∕2pi+1∕2SR,l+1 ∕2,i+1∕2,j+1∕2                           (5.37)
where
             |                             ( 2 (0))||(k+1)
-^q- 2      (0)||(k+1)               -^ql+1∕2--∂--p-Sp---||
B0 p ∇p ⋅S p |               =   B0,l+1∕2     ∂p    ||
              l+1∕2,i+1∕2,j+1∕2                        l+1∕2,i+1∕2,j+1∕2
                                    ^ql+1∕2    pi+1∕2
                                 - ---------l+1∕2,j+1∕2 ×
                                   B0,l+1∕2λ         |
                                  ∂  ( ∘ ----2-  (0))|(k+1)
                                 ∂-ξ-    1- ξ0λS ξ  ||                (5.38)
                                    0                l+1∕2,i+1∕2,j+1∕2
and
            ||(k+1)                  p2
^q-p2∇ ψ ⋅S(ψ0)||                =  ----i+1-∕2---×
B0           l+1∕2,i+1∕2,j+1∕2     λl+1∕2,j+1∕2
                                 ∂  (    B        )||(k+1)
                                 --- R0 ^q--P0λS (0ψ) ||                (5.39)
                                 ∂ψ       B0        l+1∕2,i+1∕2,j+1∕2

5.3.2 First order term: Drift kinetic equation

Since the first order drift kinetic equation may be also expressed in a conservative form as for the Fokker-Planck one as shwon in Sec. 3.5.5, a similar formalism may be kept. In that case,

                                 (                   )
    1--∂-( 2  (0))   ---1----1-∂-- ∘ -----2         (0)
    p2∂p  p S p  -  λ(ψ,ξ0) p∂ξ0    1 - ξ0λ(ψ, ξ0)S ξ
         (      )                (∘ ------           )
=   1--∂- p2^S (0p) -  ---1----1-∂--   1 - ξ20λ(ψ, ξ0)S^(0)         (5.40)
    p2∂p            λ(ψ,ξ0) p∂ξ0                   ξ
where in the left-hand side, the fluxes concern the function g(0)(ψ, p,ξ0) which is to be determined, knowing ^Sp(0) and ^Sξ(0) from the spatial derivative of f0(0)(ψ,p,ξ0) given by the zero order Fokker-Planck equation. Multiplying also both sides by the partial Jacobian JψJp defined in Sec. 3.5.1, one obtains
       (     )               (∘ ------           )
    ∂-- p2S(0) - ---p-----∂--   1 - ξ2λ(ψ, ξ) S(0)
    ∂p     p     λ (ψ,ξ0)∂ξ0         0     0   ξ
    ∂  (     )      p     ∂  (∘ ------           )
=   --- p2^S(p0) - ------------   1 - ξ20λ(ψ, ξ0) ^S(ξ0)           (5.41)
    ∂p           λ (ψ,ξ0)∂ξ0
and the discrete form of the first order drift kinetic equation is then simply

      ( 2 (0))||(k)
    ∂--p-Sp---||                ---pi+1-∕2---
        ∂p    |              - λl+1∕2,j+1∕2 ×
              |l+1∕2,i+1∕2,j+1∕2
        (∘  ------    )||(k)
    -∂--    1- ξ20λS (0) |
    ∂ ξ0             ξ  |l+1 ∕2,i+1∕2,j+1∕2
      (   (0))|(k)
    ∂  p2^Sp   ||                   pi+1 ∕2
=   ----∂p----||              - --l+1∕2,j+1∕2 ×
              |l+1∕2,i+1∕2,j+1∕2  λ
        (∘  ------   )|(k)
    -∂--    1- ξ2^S(0) ||                                  (5.42)
    ∂ ξ0         0 ξ   |l+1∕2,i+1∕2,j+1∕2