11.2 Flux Surface Functions—to be deleted

Next, examine the meaning of the following volume integral

       ∫

D(ψ) ≡  V B ⋅∇ 𝜃dτ,
(233)

where the volume V = V (ψ) is the volume within the magnetic surface labeled by ψ. Using ∇⋅ B = 0, the quantity D can be further written as

     ∫
D  =   ∇ ⋅(𝜃B )dτ.
      V
(234)

Note that 𝜃 is not a single-value function of the spacial points. In order to evaluate the integration in Eq. (234), we need to select one branch of 𝜃, which can be chosen to be 0 𝜃 < 2π. Note that function 𝜃 = 𝜃(R,Z) is not continuous in the vicinity of the contour of 𝜃 = 0. Next, we want to use the Gauss’s theorem to convert the above volume integration to surface integration. Noting the discontinuity of the integrand 𝜃B in the vicinity of the contour of 𝜃 = 0, the volume should be cut along the contour, thus, generating two surfaces. Denote these two surfaces by S1 and S2, then equation (234) is written as

    ∫           ∫          ∫
D =    𝜃B ⋅dS +    𝜃B ⋅dS+     𝜃B ⋅dS,
     S1          S2         S3
where the direction of surface S1 is in the negative direction of 𝜃, the direction of S2 is in the positive direction of 𝜃, and the surface S3 is the toroidal magnetic surface ψ = ψ0. The surface integration through S3 is obviously zero since B lies in this surface. Therefore, we have
     ∫          ∫
D  =    𝜃B ⋅dS+    𝜃B ⋅dS + 0
     ∫S1        ∫S2

   =  S1 0B ⋅dS+ S2 2πB ⋅dS
       ∫
   = 2π   B ⋅dS.                                  (235)
        S2
Eq. (235) indicates that D is 2π times the magnetic flux through the S2 surface. Thus, the poloidal flux through S2 is written as
      1     1 ∫
Ψp = --D  = ---  B ⋅∇ 𝜃dτ.
     2π     2π V
(236)

Using the expression of the volume element = |𝒥|d𝜃dϕdψ, Ψp can be further written in terms of flux surface averaged quantities.

      1 ∫
Ψp = 2π-  B ⋅∇ 𝜃|𝒥 |d𝜃dϕd ψ
     ∫ ψ V ∫ 2π
   =    dψ     B ⋅∇𝜃|𝒥|d𝜃
     ∫0    ∫0
       ψ     2π  ′
   =  0 dψ  0  Ψ ∇ψ × ∇ϕ ⋅∇ 𝜃|𝒥 |d𝜃
             ∫ ψ   ∫ 2π
   = − sign(𝒥)    dψ    Ψ ′(ψ)d𝜃
              0∫    0
   = − 2π sign(𝒥) ψ Ψ′(ψ )dψ
                0
   = − 2π sign(𝒥)[Ψ(ψ)− Ψ(0)].                        (237)
Note that the sign of the Jacobian appears in Eq. (237), which is due to the positive direction of surface S2 is determined by the positive direction of 𝜃, which in turn is determined by the sign of the Jacobian (In my code, however, the positive direction of 𝜃 is chosen by me and the sign of the Jacobian is determined by the positive direction of 𝜃). We can verify the sign of Eq. (237) is exactly consistent with that in Eq. (27).

Similarly, the toroidal flux within a flux surface is written as

     1 ∫
Ψt =---   B ⋅∇ ϕdτ,
    2π  V
(238)

the poloidal current within a flux surface is written as

         ∫
K(ψ) = 1--  J ⋅∇𝜃dτ,
       2π  V
(239)

and toroidal current within a flux surface is written as

         ∫
I(ψ) =-1-   J⋅∇ ϕdτ.
      2π  V
(240)

(**check**)The toroidal magnetic flux is written as

       ∫
Ψt =-1-  B ⋅∇ ϕ|𝒥 |d𝜃dϕdψ
    2∫π    ∫
      ψ     2π -1-
  =  0 dψ  0  gR2 |𝒥 |d𝜃
    ∫ ψ[ V ′⟨ 1 ⟩ ]
  =     g---  -2-  dψ.                         (241)
     0   2π   R
Ψt= g  ′
V--
2π⟨   ⟩
  1--
  R2

dΨ
--t
dV = g1
---
2π⟨  1 ⟩
  -2-
  R

   dΨ    g  1  ⟨ 1 ⟩
⇒  ---= ------- --2 .
   dV   2πq 2π  R
(242)

Next, calculate the derivative of the toroidal flux with respect to the poloidal flux.

dΨt-  Ψt′
dΨp = Ψp′
            ′  ⟨   ⟩
    = − -gV2-′- -12 ,                         (243)
        (2π) Ψ   R
Comparing this result with Eq. (443) indicates that it is equal to the safety factor, i.e.,
dΨt-
dΨp = q(ψ).
(244)

By using the contravariant representation of current density (475), the poloidal current within a magnetic surface is written as

          ∫
K(ψ) = -1-  J⋅∇ 𝜃𝒥 d𝜃dϕd ψ
       2π∫
     = 1-- (− g′)∇ϕ × ∇ ψ⋅∇ 𝜃𝒥d𝜃dψ
       μ0
        -1-∫  ′
     = −μ0   g d𝜃dψ
           ∫ ψ
     = − 2π   g′dψ
        μ0  0
     = − 2π-[g(ψ)− g(0)].                             (245)
        μ0
Note that the poloidal current is proportional to g, which explains why g is sometimes called poloidal current function in tokamak literature.
[(          )    (            ) ]
   Ψ′ 𝒥-|∇ ψ|2  +   Ψ′ 𝒥-∇ ψ ⋅∇ 𝜃
     R2       ψ      R2        𝜃ψ ×∇𝜃 g′∇ϕ ×∇ψ,

The toroidal current is written as

          ∫
Iϕ(ψ) =-1-  J ⋅∇ϕ 𝒥d𝜃dϕdψ
       2π       [                               ]
           1  ∫  (  ′ 𝒥    2)    ( ′ 𝒥        )
     = − 2πμ--    Ψ R2-|∇ψ|    +  Ψ R2-∇ψ ⋅∇ 𝜃   ∇ ψ × ∇𝜃⋅∇ ϕ𝒥 d𝜃dϕdψ
            0 [(          )  ψ (            ) ]𝜃
         1--∫     ′ 𝒥    2       ′ 𝒥-
     = − μ0     Ψ R2 |∇ ψ|  ψ +  Ψ R2 ∇ψ ⋅∇ 𝜃 𝜃 d𝜃dψ
            ∫ [(          ) ]
     = − 1--    Ψ ′ 𝒥-|∇ ψ|2   d𝜃dψ
         μ0       R2       ψ
            ∫ 2π  ∫ ψ   (          )
     = − 1--    d𝜃   dψ  Ψ ′ 𝒥-|∇ ψ|2
         μ0  0     0       R2       ψ
         1  ∫ 2π  (  ′ 𝒥    2   )
     = − μ0-    d𝜃 Ψ R2-|∇ ψ| − 0  .                                   (246)
             0
The last equality is due to ψ = 0 at ψ = 0. By using the flux surface average operator, Eq. (246) is written
           ′ ′⟨     2⟩
Iϕ(ψ) = − V-Ψ-  |∇-ψ|- .
         2πμ0    R2
(247)

Next, calculate another useful surface-averaged quantity,

          ⟨   [(          )    (            ) ]⟩
            g2-  1Ψ′ 𝒥-|∇ψ |2  +  1Ψ ′∇ ψ⋅∇ 𝜃 𝒥
-⟨J-⋅B⟩--  --𝒥---g--R2------ψ----g---------R2-𝜃---
⟨B⋅∇ ϕ⟩ =                μ0⟨g∕R2⟩
          2π∫ 2π     [(1   𝒥     )    (1          𝒥) ]
          V′ 0  d𝜃g2  gΨ ′R2 |∇ ψ|2 ψ + gΨ ′∇ ψ ⋅∇𝜃R2  𝜃
        = -----------------------−2-------------------
                    [(      μ0g⟨R)  ⟩ (            ) ]
          2π′g2∫ 2π d𝜃  1Ψ ′ 𝒥2|∇ ψ|2 +  1Ψ ′∇ ψ ⋅∇𝜃-𝒥2
        = V----0------g--R--------ψ---g---------R---𝜃-
                            μ0g⟨R −2⟩
          2π ∫ 2π   [(1  ′ 𝒥    2) ]
          V′g 0  d𝜃  gΨ  R2|∇ ψ|  ψ
        = ---------μ-⟨R−2⟩---------
             ∫     [0(           ) ]
          2Vπ′g 02π d𝜃  1gΨ ′ 𝒥R2|∇ ψ|2
        = -----------------------ψ-                           (248)
                   μ0⟨R−2⟩
The differential with respect to ψ and the integration with respect to 𝜃 can be interchanged, yielding
          2π [ 1  (∫2π   𝒥     ) ]
 ⟨J ⋅B⟩    V′g  gΨ′  0 d𝜃 R2|∇ ψ|2  ψ
⟨B-⋅∇ϕ⟩-= ---------μ-⟨R−2⟩---------
             [      0⟨    2⟩]
          V1′g  1gΨ′V′ |∇Rψ2|
        = ----------−2------ψ
                μ0⟨R[ ⟩′ ′⟨     2⟩]
        = ----g----- Ψ-V-  |∇ψ|-                     (249)
          μ0V ′⟨R−2⟩   g     R2    ψ