5.8 Moments of the Distribution Function

5.8.1 Flux discretization for moment calculations

The calculation of momentum-space moments of the distribution function, such as the density of power absorbed or the stream function, requires to calculate the bounce-averaged momentum space fluxes Sp(0) associated with a distribution function. Considering a given distribution function f(0) (which could be f0(0), ^f (0) or g(0)) and given momentum-space diffusion Dp(0)O and convection Fp(0)Ocoefficients, associated with a particular physical mechanism O (such as collisions, RF waves and DC electric field) and calculated in chapter 4, these fluxes are given by (3.187) or equivalently (3.216) and their components are

Sp(0) = -D pp(0)O∂f(0)
-∂p-- + ∘ ------
  1- ξ2
---p--0-D(0)O∂f(0)
∂-ξ--
   0 + Fp(0)Of(0) (5.557)
Sξ0(0) = -D ξp(0)O∂f(0)
 ∂p + ∘ ------
--1--ξ20-
   pDξξ(0)O∂f(0)-
∂ ξ0 + Fξ(0)Of(0) (5.558)

5.8.2 Numerical integrals for moment calculations

Density

From calculations in Sec.3.6, the flux surface averaged density ⟨ne⟩V,l+12 at ψl+12 may be expressed as a sum of three terms

                0           1           1
⟨ne⟩V,l+1∕2 = ⟨ne⟩V,l+1∕2 + ⟨ne⟩V,l+1∕2 + ⟨^ne⟩V,l+1∕2

the first one corresponding to the zero order Fokker-Planck equation

                    np∑- 1n∑ξ0-1
⟨ne⟩0     = 2π ^ql+1∕2-         p2   λl+1∕2,j+1∕2f (0)             Δp     Δξ
    V,l+1∕2      ^ql+1∕2 i=0  j=0   i+1∕2           0,l+1∕2,i+1∕2,j+1∕2  i+1∕2  0,j+1∕2
(5.573)

while the two others result from the solution of the electron drift kinetic equation

                    np∑-1nξ∑0-1
⟨ne⟩1      = 2π^ql+1∕2         p2    λl+1∕2,j+1∕2g(0)           Δpi+1∕2Δ ξ0,j+1∕2
   V,l+1∕2     ^ql+1∕2 i=0  j=0  i+1∕2           l+1∕2,i+1∕2,j+1∕2
(5.574)

and

                     np∑-1nξ∑0-1
⟨^ne⟩1      = 2π^ql+1∕2         p2    λl+1∕2,j+1∕2^f(0)           Δp     Δ ξ
    V,l+1∕2     ^ql+1∕2 i=0  j=0  i+1∕2 1,-1,0     l+1∕2,i+1∕2,j+1∕2   i+1∕2   0,j+1∕2
(5.575)

Current Density

In a similar way, the flux surface averaged parallel current ⟨  ⟩
 J∥ϕ,l+12 at ψl+12 may be expressed as a sum of three terms

⟨  ⟩        ⟨  ⟩0        ⟨  ⟩1       ⟨ ^⟩1
 J∥ ϕ,l+1∕2 = J∥ ϕ,l+1∕2 +  J∥ ϕ,l+1∕2 +  J∥ ϕ,l+1∕2
(5.576)

where the zero order term is

⟨  ⟩
 J∥ϕ,l+120 = 2πq
---e-
 meq
-l+1∕2-
ql+1∕2 i=0np-1 j=0nξ0-1p3
-i+1∕2
γi+1∕2H(|      |          )
 |ξ0,j+1 ∕2|-  ξ0T,l+1∕2
× ξ0,j+12f0,l+12,i+12,j+12(0)Δp i+12Δξ0,j+12 (5.577)

The first order term arising from function g is

⟨  ⟩
 J∥ϕ,l+121 = 2πqe
-----
 meql+1∕2
------
ql+1∕2 i=0np-1 j=0nξ0-1p3i+1∕2
------
γi+1∕2H(|      |          )
 |ξ0,j+1 ∕2|-  ξ0T,l+1∕2
× ξ0,j+12gl+12,i+12,j+12(0)Δp i+12Δξ0,j+12 (5.578)

while the other one which results from f^ is more complex and

⟨  ⟩
 J^∥ϕ,l+121 = 2πq
---e-
me^q
-l+1∕2
ql+1∕2  R
----p---
R0,l+1∕2B
-T0,l+1∕2-
B0,l+1 ∕2 i=0np-1 j=0nξ0-1p3
-i+1∕2-
γi+1∕2λ2,-2,2l+12,j+12
× ξ0,j+12f^ l+12,i+12,j+12(0)Δp i+12Δξ0,j+12. (5.579)

Power Density Associated with a Flux

The density of power absorbed by the plasma through a particular mechanism is the sum

⟨    ⟩0        ⟨   ⟩0        ⟨   ⟩1        ⟨    ⟩1
 P Oabs V,l+1∕2 =  POabs V,l+1∕2 +  POabs V,l+1∕2 +  ^PaObs
                                                 V,l+1∕2

where the respective contributions are given by the equations (3.322) and (3.324-3.325) and discretized as

⟨  O ⟩
 PabsV,l+120 = 2π-
me^ql+1∕2-
^ql+1∕2 i=1np j=0nξ0-1p3i
 γiλl+12,j+12S p,l+12,i,j+12(0)O( (0))
 f0ΔpiΔξ0,j+12 (5.580)
⟨    ⟩
 PaObsV,l+121 = 2π
---
me^ql+1∕2
------
^ql+1∕2 i=1np j=0nξ0-1p3
-i
 γiλl+12,j+12S p,l+12,i,j+12(0)O(   )
 g(0)ΔpiΔξ0,j+12 (5.581)
⟨    ⟩
 P^OabsV,l+121 = 2π
---
me^q
-l+1∕2-
^ql+1∕2 i=1np j=0nξ0-1p3
-i
 γiλl+12,j+12^S p,l+12,i,j+12(0)O(   )
 ^f(0)ΔpiΔξ0,j+12 (5.582)

The discretization of the momentum-space flux components Sp,l+12,i,j+12(0)O and S^p,l+12,i,j+12(0)O is done in (5.565).

Stream Function for Momentum Space fluxes

The stream function gives the local direction of the momentum-space fluxes, and its gradient is an indication of the flux intensity. Because it is a flux function, it is naturally defined on the momentum-space flux grid. According to the three equivalent expressions for the stream function (3.352-3.353), we have the following discretizations, for 1 i np and 1 j nξ - 1

Al+12,i,j(0) =     2
-2πpi--
ne,l+1∕2 m=0j-1Δξ 0,m+12Sp,l+12,i,m+12(0) (5.583)
Al+12,i,j(0) =  2πp2
----i--
ne,l+1∕2 m=jnξ-1Δξ 0,m+12Sp,l+12,i,m+12(0) (5.584)

and

              ∘ -------
           2π   1- ξ20,ji∑-1
A (l+0)1∕2,i,j =-----------     pm+1∕2Δpm+1 ∕2S(ξ0,)l+1∕2,m+1 ∕2,j
              ne,l+1 ∕2   m=0
(5.585)

where the boundary conditions are

A (0l+)1∕2,0,j = A (0l+)1∕2,i,0 = A (0l+)1∕2,i,n = 0
                              ξ
(5.586)

The discretization of the momentum-space flux components Sp,l+12,i,j+12(0)O and Sξ,l+12,i+12,j(0)O is done in (5.565) and (5.572).

Ohmic electric field

As shown in Sec. 4.2, the flux surface averaged parallel Ohmic electrid field ⟨  ⟩
 E∥ϕ(ψ) may be expressed as a function of its local value E0(ψ ) taken at the poloidal position where the magnetic field B is minimum, and

⟨  ⟩                 ^ql+1∕2   Rp   BT 0,l+1∕2-l+1 ∕2,j+1∕2
 E∥ ϕ,l+1∕2 = E∥0,l+1∕2----------------------λ1,-3,4
                     ql+1∕2 R0,l+1∕2 B0,l+1∕2
(5.587)

Exact and effective fractions of trapped electrons

The exact fraction of trapped electrons is given by relation,

Ft,l+12 = ⌊
  n∑p-1nξ∑0-1
⌈          p2   H  (||ξ0,j+1∕2||- ξ0T,l+1∕2)λl+1∕2,j+1∕2
  i=0  j=0  i+1∕2
×(                                 )                ]
  ^f(l+0)1∕2,i+1∕2,j+1∕2 + g(l0+)1∕2,i+1∕2,j+1∕2 Δpi+1∕2Δξ0,j+1∕2
×⌊
  n∑p- 1nξ0∑- 1
⌈          p2i+1∕2λl+1∕2,j+1∕2
  i=0  j=0
×(  (0)                ^(0)               (0)            )                ]
  f0,l+1∕2,i+1∕2,j+1∕2 + fl+1∕2,i+1∕2,j+1∕2 + gl+1∕2,i+1∕2,j+1∕2 Δpi+1 ∕2Δ ξ0,j+1∕2-1
(5.588)

according to calculations given in Sec. 3.6.

The effective fraction of trapped electrons, as deduced from the Lorentz model in Sec. 5.6.2 is

Ft,l+12eff. = 3-
2BT-0,l+1∕2
 B0,l+1∕2×
⌊               nξ -1
⌈ ^ql+1∕2BT-0,l+1∕2 ∑0   2      l+1∕2,j+1∕2
  ql+1∕2 B0,l+1∕2      ξ0,j+1∕2λ2,- 2,2    Δ ξ0,j+1∕2
                 j=0
  q     R       n∑ξ0-1         (|       |          )
- -l+1∕2--0,l+1∕2-     σj+1∕2H  |ξ0,j+1∕2|- ξ0T,l+1∕2
  ql+1∕2  Rp     j=0
×         (       ||      ||)        ]
ξ0,j+1∕2IL  ψl+1∕2,ξ0,j+1∕2  Δ ξ0,j+1∕2 (5.589)

Runaway loss rate

As shown in Sec. 3.6, the runaway loss rate ⟨Γ R⟩V (ψ) is given

                          nξ-1
             ^ql+1∕2-  2    ∑0    l+1∕2,j+1∕2 (0)
⟨Γ R⟩V,l+1∕2 = ^ql+1∕22πpnp-1      λ         Sp,l+1∕2,np-1,j+1∕2Δ ξ0,j+1∕2
                           j=0
(5.590)

Magnetic ripple losses

In a similar way, the magnetic ripple loss rate ΓST (0)(ψ) is given by

ΓST,l+12(0) = 2πp ic2 j=0nξ0-1λl+12,j+12(1 - H (||ξ     ||- ξ        ))
         0,j+1 ∕2    0ST,l+1∕2Sp,l+12,ic,j+12(0)Δξ 0,j+12
+ 4πλl+12,jST ∘ ---------
  1 - ξ2
       0ST,j i=0np-1p i+12H(p     - p     )
  i+1∕2    ic+1∕2Sξ0,l+12,i+12,jST(0)Δp i+12 (5.591)

and the second formulation given in Sec.3.6 is

ΓST,l+12(0) = 2π i=0np-1 j=0nξ0-1(      (|      |           ))
 1- H   |ξ0,j+1∕2|- ξ0ST,l+1∕2H(              )
 pi+1∕2 - pic+1∕2
× νdST,l+12,i+12,j+12f0,l+12,i+12,j+12(0)Δξ 0,j+12Δpi+12 (5.592)

where ic is the index number that corresponds to the detrapping threshold by collisions, and ξ0ST,l+12 is the picth-angle boundary value between super-trapped and trapped electrons.

Non-thermal bremsstrahlung

For the bremsstrahlung emission, it is necessary to calculate numericaly all coefficients of the Legendre series. Since Legendre polynomials Pm strongly oscillate between -1 and +1, as their order m increases, it is not possible to evaluate accurately integrals of the type

       ∫ +1
h(m) =     h (x)Pm (x) dx
        -1
(5.593)

by standard integration techniques, like trapezoidal or Simpson rules. The only possibility is to replace integral (5.593) by a discrete sum, namely a Gaussian quadrature,

      ∑N
h(m ) =    wnh (xn)Pm (xn)
      n=1
(5.594)

where weights wn and abscissas xn are determined independently. Here, the use of Legendre polynomials lead to consider the fast ans accurate Gauss-Legendre algorithm as derived by G. B. Ribicki in Ref. [?], where xn are N zeros of the Legendre polynomial of degree N, the weights being given by the relation

     ---------2--------
wn =       2 [  ′    ]2
     (1 - xn) PN (xn)
(5.595)

Very accurate determination of h(m ) may be obtained by this method, which requires a value of N = 50.