Notes on tokamak equilibrium

Notes on tokamak equilibrium
Youjun Hu
Institute of Plasma Physics, Chinese Academy of Sciences
Email: [email protected]
January 3, 2017
Abstract
Axisymmetric plasma equilibrium is the basis for the analysis of stability and transport in tokamak plasmas.
These are my notes when learning the tokamak equilibrium theory. To test what I have learned, I have developed
two numerical codes, one of which constructs a flux coordinate system with a desired form of Jacobian by using
discrete numerical equilibrium data Ψ(R, Z) output by the EFIT code, another of which solves the fixed boundary
Grad-Shafranov equation in a general coordinate system. These notes serve as a document for the codes. (These
notes are evolving. The latest version can be found at the following URL:
http://theory.ipp.ac.cn/˜yj/research notes/tokamak equilibrium/tokamak equilibrium.pdf )
1
Axisymmetric magnetic field
Due to the divergence-free nature of magnetic field, i.e., ∇ · B = 0, magnetic field can be generally expressed as the
curl of a vector potential,
B = ∇ × A.
(1)
We consider axisymmetric magnetic field. The axial symmetry means that, when expressed in the cylindrical
coordinate system (R, φ, Z), the components of B, namely BR , BZ , and Bφ , are all independent of φ. For this
case, it can be proved that an axisymmetric vector potential A suffices for expressing the magnetic field, i.e., all the
components of the vector potential A can also be taken independent of φ. Using this, Eq. (1) is written
1 ∂(RAφ )
∂AZ
∂AR
∂Aφ
φ̂.
(2)
R̂ +
Ẑ +
−
B=−
∂Z
R ∂R
∂Z
∂R
Define
Ψ(R, Z) ≡ RAφ (R, Z),
(3)
then Eq. (2) implies the components of the magnetic field, BR and BZ , can be written as
BR = −
1 ∂Ψ
R ∂Z
(4)
and
1 ∂Ψ
.
(5)
R ∂R
Note that the property of being axisymmetric and divergence-free enable the two components of B, BR and BZ , to
be expressed in terms of a single function Ψ(R, Z). (The function Ψ is usually called the “poloidal flux function” in
tokamak literatures. The reason for this nomenclature will become clear when we discuss the physical meaning of
Ψ in Sec. 1.4) Furthermore, it is ready to verify Ψ is constant along a magnetic field line, i.e. B · ▽Ψ = 0. [Proof:
∂Ψ
∂Ψ
B · ▽Ψ = B ·
R̂ +
Ẑ
∂R
∂Z
1 ∂Ψ ∂Ψ
1 ∂Ψ ∂Ψ
+
= −
R ∂Z ∂R R ∂R ∂Z
= 0.
(6)
BZ =
] In tokamak literatures, the φ̂ direction is called the toroidal direction, while the (R, Z) plane is called the poloidal
plane. Equations (4) and (5) give the expression for the poloidal components of the magnetic field. Define g ≡
RBφ (R, Z), then the toroidal component of the magnetic field is written
Bφ = Bφ φ̂ =
1
g
φ̂ = g∇φ.
R
(7)
Using Eqs. (4), (5), and (7), a general axisymmetric magnetic field can be written as
=
B
BR R̂ + BZ Ẑ + Bφ φ̂
1 ∂Ψ
1 ∂Ψ
R̂ +
Ẑ + g∇φ
−
R ∂Z
R ∂R
1
∇Ψ × φ̂ + g∇φ
R
∇Ψ × ∇φ + g∇φ.
=
=
=
1.1
(8)
Gauge transformation of Ψ
Next, we discuss the gauge transformation of the vector potential A in the axisymmetric case. It is well-known that
magnetic field remains the same under the following gauge transformation:
Anew = A + ∇f,
(9)
where f is an arbitrary scalar field. Here we require that ∇f be axisymmetric because, as mentioned above, an
axisymmetric vector potential suffices for describing an axisymmetric magnetic field. Note that ∇f is given by
∇f =
∂f
1 ∂f
∂f
R̂ +
Ẑ +
φ̂.
∂R
∂Z
R ∂φ
(10)
Since ∇f is axisymmetric, it follows that ∂ 2 f /∂R∂φ = 0, ∂ 2 f /∂Z∂φ = 0, and ∂ 2 f /∂φ2 = 0, which implies that
∂f /∂φ is independent of R, Z, and φ, i.e., ∂f /∂φ is actually a constant. Using this, the φ component of the gauge
transformation (9) is written
Anew
φ
=
=
1 ∂f
R ∂φ
C
Aφ + ,
R
Aφ +
(11)
where C is a constant. Note that the requirement of axial symmetry greatly reduces the degree of freedom of the
gauge transformation for Aφ (and thus for RAφ , i..e, Ψ). Multiplying Eq. (11) with R, we obtain the corresponding
gauge transformation for Ψ,
Ψnew = Ψ + C,
(12)
which indicates Ψ has the same gauge transformation as the familiar electric potential, i.e., adding a constant. (Note
that the definition Ψ(R, Z) ≡ RAφ does not mean Ψ(R = 0, Z) = 0 because Aφ can have a 1/R dependence under
the gauge transformation (11)).
1.2
Magnetic surfaces
For axial symmetry system, we can define magnetic surface in a trivial way (for non-axisymmetric system, the
definition may be a little harder, I will consider this later). The axial symmetry of tokamak magnetic field allows
us to introduce a surface of revolution that is generated by rotating the projection of a magnetic field line on (R, Z)
plane around the axis of symmetry, Z axis. The unique property of this revolution surface is that no field line pointintersects it and a field line with one point on it will have the whole field line on it. This revolution surface is usually
called magnetic surface or flux surface. For instance, consider an arbitrary magnetic field line, whose projection on
(R, Z) plane is shown in Fig. 1. A magnetic surface is generated by rotating the projection line around the Z axis.
Because Ψ is constant along a magnetic field line and Ψ is independent of φ, it follows that the value of Ψ is
constant on a magnetic surface. Therefore Ψ can be used as labels of magnetic surfaces.
1.3
Contours of Ψ on (R, Z) plane are magnetic surfaces
Becuase Ψ is constant along a magnetic field line and Ψ is independent of φ, it follows that the projection of a
magnetic field line onto (R, Z) plane is a contour of Ψ. On the other hand, it is ready to prove that the contour of
Ψ on (R, Z) plane is also the projection of a magnetic field line onto the plane, i.e., a magnetic surface. [Proof. The
contour of Ψ on (R, Z) plane is written
dΨ = 0,
(13)
i.e.,
∂Ψ
∂Ψ
dR +
dZ = 0.
∂R
∂Z
2
(14)
Z
project of a magnetic field line
on (R, Z) plane
R
R
Figure 1: A magnetic surface in tokamak is a revolution surface generated by rotating the projection of a magnetic
field line on the (R, Z) plane around the Z axis.
1 ∂Ψ
1 ∂Ψ
dR +
dZ = 0.
R ∂R
R ∂Z
Using Eqs. (4) and (5), the above equation is written
⇒
i.e.,
(15)
BZ dR − BR dZ = 0,
(16)
BZ
dZ
=
,
dR
BR
(17)
which is the equation of the projection of a magnetic field line on (R, Z) plane. Thus, we prove that the contour of
Ψ is also the projection of a magnetic field line on (R, Z) plane.]
1.4
Relation of Ψ with the poloidal magnetic flux
Note that Ψ is defined by Ψ = RAφ , which is actually a component of the vector potential A, thereby not having
an obvious physical meaning. Next, we try to find the physical meaning of Ψ, i.e., try to find some simple algebraic
relation of Ψ with some quantity that can be measured in experiments.
Ψ1
Z
Ψ2
(R1, Z)
(R2, Z)
R
Figure 2: The poloidal magnetic flux Ψp between the two magnetic surfaces Ψ1 and Ψ2 is given by Ψp = 2π(Ψ2 −Ψ1 ).
In Fig. 2, there are two magnetic surfaces labeled, respectively, by Ψ = Ψ1 and Ψ = Ψ2 . Using Gauss’s theorem
in the toroidal volume between the two magnetic surface, we know that the poloidal magnetic flux through any
toroidal ribbons between the two magnetic surfaces is equal to each other. Next, we calculate this poloidal magnetic
flux. To make the calculation easy, we select a plane perpendicular to the Z axis, as is shown by the dash line in
3
Fig. 1. In this case, only BZ contribute to the poloidal magnetic flux, which is written (the positive direction of the
plane is chosen in the direction of Ẑ)
Ψp
=
=
Z
R2
Bz (R, Z)2πRdR
R1
Z R2
R1
=
=
1 ∂Ψ
2πRdR
R ∂R
R2
∂Ψ
dR
R1 ∂R
2π[Ψ2 − Ψ1 ],
2π
Z
(18)
Equation (18) provides a simple physical meaning for Ψ, i.e., the difference of 2πΨ between two magnetic surfaces
is equal to the poloidal magnetic flux enclosed by the two magnetic surfaces. Noting that we are considering the
axisymmetric case, the physical meaning of Ψ can also be stated as: the difference of Ψ between two magnetic
surfaces is equal to the poloidal magnetic flux per radian. Due to this relation with the poloidal flux Ψp , Ψ is usually
called the “poloidal magnetic flux function” in tokamak literature. Note that it is the difference of Ψ between two
locations that determines the the physical quantities Ψp , which is consistent with the fact that gauge transformation
(12) dose not change the values of physical quantities.
1.5
Closed magnetic surfaces in tokamak
In most part of a tokamak plasma, the contours of Ψ on (R, Z) plane are closed curves. As discussed above, the
contours of Ψ are the projection of magnetic lines on the poloidal plane. Closed contoures of Ψ implies closed
magnetic surfaces, as shown in Fig 3.
Z
Magnetic surface Ψ
S0
S2
Ψa
R
S3
S1
R
Ψ0
S5
S4
Ψ1
Figure 3: Closed magnetic surfaces (blue) and various toroidal surfaces used to define the poloidal magnetic flux.
The magnetic flux through the toroidal surface S2 and S3 is equal to each other. Also the magnetic flux through S4
and S5 is equal to each other; the magnetic flux through S0 and S1 is equal to each other.
The innermost magnetic surface is actually a line, which is usually called the magnetic axis (in Fi.g 3, Ψ0 labels
the magnetic axis). Because the magnetic axis is the point of maximum/minimum of Ψ(R, Z), the value of ∇Ψ is
zero at the magnetic axis. As a result, the poloidal component of the equilibrium magnetic field is zero on magnetic
axis (refer to Eq. (8)), i.e., the magnetic field has only toroidal component there.
As discussed in Sec. 1.4, the poloidal magnetic flux enclosed by a magnetic surface Ψ (the poloidal magnetic flux
through the toroidal surfaces S2 ) is given by
Ψp = 2π(Ψ0 − Ψ),
(19)
where Ψ0 is the value of Ψ at the magnetic axis. Here the positive direction of the surface S2 is defined to be in
the clockwise direction when an observer looks along the direction of φ̂. In practice, we need to pay attention to
4
the positive direction of the toroidal surface used to define the poloidal flux (there can be a sign difference when
choosing different positive directions). Also note, in tokamak literature, the poloidal magnetic flux enclosed by a
closed magnetic surface can have two different definitions, one of which is the the poloidal magnetic flux through the
surface S2 in Fig. 3, the other one is the poloidal magnetic flux through the central hole of the magnetic surface,
i.e., the poloial flux through S1 in Fig. 3. The former definition is adopted in this article, except explicitly specified
otherwise. In the latter case, the poloidal magnetic flux is written
Ψp = 2π(Ψ − Ψa ),
(20)
where the positive direction of the surface S1 is defined to be in the clockwise direction.
Also note that, since the poloidal magnetic field can be written as Bp = ∇Ψ×∇φ, the condition ΨLCFS −Ψaxis > 0
means Bp points in the anticlockwise direction (viewed along φ direction), and ΨLCFS − Ψaxis < 0 means Bp points
in the clockwise direction.
1.6
Shape parameters of a closed magnetic surface
In this section we discuss the parameters that characteristic the shape of the projection of a magnetic surface on the
poloidal plane. The “midplane” is defined as the plane that passes through the magnetic axis and is perpendicular
to the symmetric axis (Z axis). For a up-down symmetric (about the midplane) magnetic surface, its shape is
usually characterized by four parameters, namely, the R coordinate of the innermost and outermost points on the
midplane, Rin and Rout ; the (R, Z) coordinators of the highest point of the magnetic surface, (Rtop , Ztop ). These
four parameters are indicated in Fig. 4.
1
(Rtop,Ztop)
Z
0.5
(Rin,0)
0
(Rout,0)
-0.5
-1
0
0.5
1
1.5
2
R
Figure 4: Four parameters characterizing the shape of a flux surface: the R coordinate of the innermost and
outermost points in the middle-plane, Rin and Rout ; the (R, Z) coordinators of the highest point of the flux surface,
(Rtop , Ztop ).
In terms of these four parameters, we can define the major radius of a magnetic surface
Rin + Rout
,
(21)
2
(which is the R coordinate of the geometric center of the magnetic surface), the minor radius of a magnetic surface
R0 =
a=
Rout − Rin
,
2
(22)
δ=
R0 − Rtop
,
a
(23)
the triangularity of a magnetic surface
and, the ellipticity of a magnetic surface
Ztop
.
(24)
a
Strictly speaking, the ellipticity κ defined above is different from the elongation, which is define by (κ − 1) and thus
is zero for a circular magnetic surface. However, many authors simply consider the ellipticity to be the elongation.
Usually, we specify the value of R0 , a, δ, and κ, instead of (Rin , Rout , Rtop , Ztop ), to characterize the shape of a
magnetic surface. Besides, using a and R0 , we can define another useful parameter ε ≡ a/R0 , which is called the
inverse aspect ratio.
The four shape parameters for the typical Last-Closed-Flux-Surface (LCFS) of EAST tokamak are: major radius
R0 = 1.85m (can reach 1.9m), minor radius a = 0.45m, ellipticity κ = 1.8 (can be in the range from 1.7 to 1.9),
triangularity δ = 0.6 (can be in the range from 0.5 to 0.7). Note that the major radius R0 of the LCFS is usually
different from Raxis (the R coordinate of the magnetic axis). Usually we have Raxis > R0 due to the Shafranov shift.
κ=
5
1.7
1.7.1
Safety factor
Definition of safety factor
Magnetic field lines on closed magnetic surfaces travel closed curves on the poloidal plane. Safety factor q is defined
as the number of toroidal loops a magnetic field line travels when it makes one loop on the poloidal plane, i.e.
△φ
,
(25)
2π
where △φ as the change of the toroidal angle when a magnetic field line travels a full loop on the poloidal plane.
q≡
1.7.2
Expression of safety factor in terms of magnetic field
The equation of magnetic field lines is given by
Rdφ
Bφ
=
,
dℓp
Bp
(26)
where dℓp is the line element along the direction of Bp on the poloidal plane. Equation (26) can be arranged in the
form
1 Bφ
dφ =
dℓp ,
(27)
R Bp
which can be integrated over dℓp to give
I
1 Bφ
△φ =
dℓp ,
(28)
R Bp
where the line integration is along the poloidal magnetic field (the contour of Ψ on the poloidal plane). Using this,
Eq. (25) is written
I
1 Bφ
1
dℓp .
(29)
q=
2π
R Bp
If the toroidal magnetic field is in the opposite direction of φ̂, then Bφ < 0 and q given in Eq. (29) is negative. The
safety factor characterizes the average pitch angle of magnetic field lines on closed magnetic surfaces.
1.7.3
Expression of safety factor in terms of magnetic flux
The safety factor given by Eq. (29) is expressed in terms of the components of the magnetic field. The safety factor
can also be expressed in terms of the magnetic flux enclosed by a magnetic surface. Define dΨp as the poloidal
magnetic flux enclosed by two neighbouring closed magnetic surface, then dΨp can be written
dΨp = 2πRdxBp
(30)
where dx is perpendicular to the first magnetic surface (so perpendicular to the Bp ) and its length is equal to the
length from the point on this magnetic surface to the point on the next magnetic surface. Using Eq. (30), the
poloidal magnetic field is written as
1 dΨp
Bp =
.
(31)
2πR dx
Define dΨt as the toroidal magnetic flux enclosed by the two magnetic surface, then dΨt is given by
I
dΨt = (Bφ dx)dℓp
(32)
where dℓp is the line element along the poloidal magnetic field line in the poloidal plane, dx is perpendicular to the
flux surface. Substituting Eq. (31) into Eq. (29), we obtain
I
I
I
1 Bφ
1 2πRdxBφ
1
dxBφ
1
dℓp =
dℓp =
dℓp .
(33)
q=
2π
R Bp
2π
R dΨp
dΨp
We know dΨp is a constant independent of the poloidal location, so dΨp can be taken out from the integration to
give
I
1
q =
dxBφ dℓp
dΨp
dΨt
.
(34)
=
dΨp
Equation (34) indicates that the safety factor of a magnetic surface is equal to the differential of the toroidal magnetic
flux with respect to the poloidal magnetic flux enclosed by the magnetic surface.
6
1.7.4
Rational surfaces vs. irrational surfaces
If the safety factor of a manetic surface is a rational number, i.e., q = n/m, where m and n are integers, then this
magnetic surface is called a rational surface, otherwise an irrational surface. It is obvious that a field line on a
rational surface with q = n/m closes itself after traveling n toroidal turns and m poloidal turns. An example of a
magnetic field line on a rational surface is shown in Fig. 5.
0.3
0.2
8
0
−0.1
2
1
X(m)
0
−1
−1
0
1
−2
−2
−0.2
−0.3
1.6 1.7 1.8 1.9
Y (m)
2
1012 14 16
18
6
20
4
2
1,22
21
3
19
17
5
15
7
13 11 9
0.1
Z(m)
Z(m)
0.3
0.2
0.1
0
−0.1
−0.2
−0.3
2
2.1 2.2
R(m)
Figure 5: Left: A magnetic field line (blue) on a rational surface with q = 2.1 = 21/10 (magnetic field is from EAST
discharge #[email protected]). This field line closes itself after traveling 21 toroidal loops and 10 poloidal loops. Right:
The intersecting points of the magnetic field line with the φ = 0 plane when it is traveling toroidally. The sequence
of the intersecting points is indicated by the number labels. The 22nd intersecting point coincides with the 1st point
and then the intersecting points repeat themselves.
1.8
Plasma current density
Using Ampère’s law, the current density can be written in terms of the magnetic field as
∂Bφ
1 ∂(RBφ )
∂BZ
∂BR
µ0 J = ▽ × B = −
φ̂.
R̂ +
Ẑ +
−
∂Z
R ∂R
∂Z
∂R
(35)
Use the definition g ≡ RBφ (R, Z), then Eq. (35) indicates that the poloidal components of the current density, JZ
and JR , can be written, respectively, as
1 ∂g
µ0 J R = −
,
(36)
R ∂Z
and
1 ∂g
µ0 JZ =
.
(37)
R ∂R
Ampere’s law (35) indicates the toroidal current density Jφ is given by
µ0 Jφ
=
=
Define a differential operator
∂BZ
∂BR
−
∂Z
∂R
1 ∂2Ψ
1 ∂Ψ
∂
−
−
R ∂Z 2
∂R R ∂R
∂
∂2
+R
△ Ψ≡
∂Z 2
∂R
∗
then Eq. (38) is written
µ0 Jφ = −
7
1 ∂Ψ
R ∂R
1 ∗
△ Ψ.
R
,
(38)
(39)
(40)
2
2.1
The consraint of force-balance to axisymmetric magnetic field
Force balance equation in tokamak plasmas: Grad-Shafranov equation
Next, we consider what constraints the force balance imposes on the axisymmetric magnetic field discussed above.
The momentum equation of plasmas is given by
∂u
ρ
+ u · ∇u = ρq E − ∇ · P + J × B,
(41)
∂t
where ρ, ρq , P, J, E, and B are mass density, charge density, thermal pressure tensor, current density, electric field,
and magnetic field, respectively. The electric field force ρq E is usually ignored due to either ρq = 0 or E = 0. Futher
assuming there is no plasma flow and the plasma pressure is isotropic, the steady state momentum equation (force
balance equation) is written
J × B = ∇P,
(42)
where P is the scalar plasma pressure.
Consider the force balance in the direction of B. Dotting the equilibrium equation (42) by B, we obtain
0 = B · ∇P,
(43)
which implies that P is constant along a magnetic field line. Since Ψ is also constant along a magnetic field line,
P can be expressed in terms of only Ψ on a single magnetic line. Note that this does not necesarily mean P is a
single-valued function of Ψ, i.e. P = P (Ψ). For instance, P can take differnt value on different magnetic field lines
with the same value of Ψ while still satisfying B · ∇P = 0. However, for an asymmetric pressure, it is ready to prove
that P is indeed a single-valued function of Ψ on a flux surface, i.e. P = P (Ψ) (refere to Sec. 11.8). On the other
hand, if P = P (Ψ), then we obtain
dP
B · ∇Ψ = 0,
B · ∇P =
dΨ
i.e., Eq. (43) is satisfied. Therefore P = P (Ψ) is equivalent to the force balance equation in the parallel (to the
magnetic field) direction.
Next, consider the φ component of Eq. (42), which is written
JZ BR − JR B Z =
1 ∂P
.
R ∂φ
(44)
Since P = P (Ψ), which implies ∂P/∂φ = 0, equation (44) reduces to
JZ BR − JR B Z = 0
(45)
Using the expressions of the poloidal current density (36) and (37) in the force balance equation (45) yields
∂g
∂g
BR +
BZ = 0,
∂R
∂Z
(46)
B · ∇g = 0.
(47)
which can be further written
According to the same reasoning for the pressure, we conclude that Eq. (47) is equivalent to g = g(Ψ). (The function
g defined here is usually called the “poloidal current function” in tokamak literature. The reason for this name is
discussed in Sec. 2.3.)
Next, consider the force balance in the R direction. The R component of the force balance equation (42) is
written
∂P
(48)
Jφ BZ − JZ B φ =
∂R
Using the expressions of the current density and magnetic field [Eqs. (5), (37), and (40)], equation (48) is written
−
1 ∂g g
∂P
1 ∗ 1 ∂Ψ
△ Ψ
−
= µ0
.
R
R ∂R R ∂R R
∂R
(49)
Using the fact that P and g are a function of only Ψ, i.e., P = P (Ψ) and g = g(Ψ), Eq. (49) is written
−
1 ∗ 1 ∂Ψ
1 dg ∂Ψ g
dP ∂Ψ
△ Ψ
−
= µ0
,
R
R ∂R R dΨ ∂R R
dΨ ∂R
8
(50)
which can be simplified to
△∗ Ψ = −µ0 R2
i.e.,
∂
∂2Ψ
+R
2
∂Z
∂R
1 ∂Ψ
R ∂R
dP
dg
−
g,
dΨ dΨ
= −µ0 R2
dP
dg
−
g.
dΨ dΨ
(51)
(52)
Equation (52) is known as Grad-Shafranov (GS) equation.
[Note that the Z component of the force balance equation is written
JR Bφ − Jφ BR = ∂P
∂Z
∂g 1 g
1
∂Ψ
∗ 1 ∂Ψ
⇒ − ∂Z
−
△
ψ R ∂Z = µ0 dP
RR
R
dΨ ∂Z
dg ∂Ψ 1 g
1
1 ∂Ψ
∂Ψ
∗
⇒ − dΨ ∂Z R R − R △ Ψ R ∂Z = µ0 dP
dΨ ∂Z
dg 1 g
1
1
dP
∗
⇒ − dΨ R R − R △ Ψ R = µ0 dΨ
dg
⇒ △∗ Ψ = −µ0 R2 dP
dΨ − dΨ g
which turns out to be identical with the Grad-Shafranov equation. This is not a coincidence. The reason is that
the force balance equation has been satisfied in three different directions, namely, in the φ̂, R̂, and B direction, and
thus it must be satisfied in any directions.]
2.2
Expression of axisymmetric equilibrium magnetic field
A general axisymmetric magnetic field, which is not necessarily an equilibrium magnetic field, is given by Eq. (8),
i.e.,
B = ∇Ψ × ∇φ + g∇φ,
(53)
For the above axisymmetric magnetic field to be consistent with the force balance equation (42), additional requirements for Ψ and g are needed, i.e., Ψ is restricted by the GS equation and g must be a function of only Ψ. Thus, an
axisymmetric equilibrium magnetic field is determined by specifying two functions, Ψ = Ψ(R, Z) and g = g(Ψ). The
function Ψ is determined by solving the GS equation with specified boundary condition. Note that the GS equation
contains two free functions, P (Ψ) and g(Ψ), both of which must be specified before the GS equation can be solved.
(The way to specify the function g(Ψ) to obtain desired global properties, such as total toroidal current and safety
factor, will be discussed later.) This feature makes the process of solving GS equation different from solving usual
partial differential equations where only boundary conditions are needed to be specified. For most cases, the terms
on the right-hand side of the GS equation are nonlinear about Ψ and thus the GS equation is a two-dimensional
(about the cylindrical coordinates R and Z) nonlinear partial differential equation for Ψ.
Equation (53) indicates that the poloidal and toroidal equilibrium magnetic field can be written as
Bp = ∇Ψ × ∇φ,
(54)
Bφ = g∇φ,
(55)
and
respectively.
2.3
Relation of g with the poloidal electric current
As is discussed in Sec. 2.1, to satisty the force balance in the toroidal direction, g ≡ RBφ must be a magnetic surface
function, i.e., g = g(Ψ). Using this, equations (36) and (37) are written
∂g
1 ∂g ∂Ψ
=
BR ,
R ∂Ψ ∂Z
∂Ψ
(56)
1 ∂g ∂Ψ
∂g
=
Bz ,
R ∂Ψ ∂R
∂Ψ
(57)
BR
JR
=
,
JZ
BZ
(58)
µ0 JR = −
and
µ0 JZ =
respectively. The above two equations imply that
9
which implies that the projecions of B lines and J lines on the poloidal plane are identical to each other. This
indicates that the J surfaces coincide with the magnetic surfaces. Using this and ∇ · J = 0, and following the same
steps in Sec. 1.4, we obtain
1
2π[g(Ψ2 ) − g(Ψ1 )],
(59)
Ipol =
µ0
where Ipol is the poloidal current enclosed by the two magnetic surfaces, the positive direction of Ipol is chosen to
be in the clockwise direction when observers look along φ̂. Equation (59) indicates that the difference of g between
two magnetic surface is proportional to the poloidal current. For this reason, g is usually calll the “poloidal current
function”.
In the above, we see that the relation of g with the poloidal electric current is similar to that of Ψ with the
poloidal magnetic flux. This similarity is due to the follwoing differential relations:
B=∇×A
Ψ = RAφ
µ0 J = ∇ × B
g = RBφ
2.4
Plasma current density
Using the equilibrium constraint in the R direction, Jφ given by Eq. (40) is written
Jφ
1
△∗ Ψ
µ0 R
dP
1 dg
= R
+
g.
dΨ µ0 R dΨ
(60)
= −
(61)
The poloidal current density Jp is written
Jp
≡
=
=
JR R̂ + JZ Ẑ
1
1 ∂g
1 ∂g
−
R̂ +
Ẑ .
µ0
R ∂Z
R ∂R
1
∇g × ∇φ
µ0
(62)
Using g = g(Ψ), Eq. (62) is written
Jp
1 dg
∇Ψ × ∇φ
µ0 dΨ
1 dg
Bp .
µ0 dΨ
=
=
The parallel (to the magnetic field) current density is written as
Jk
≡
=
=
=
=
J·B
B
J φ B φ + Jp · Bp
B
dg
g
dP
R dΨ + µ01R dΨ
g R
+
1 dg
µ0 dΨ
B
g dP
dΨ
+
1 dg
µ0 dΨ
h
g 2
R
B
g dP
dΨ +
1 dg
2
µ0 dΨ B
B
+
∇Ψ 2
R
.
i
∇Ψ 2
R
(63)
For later use, define
σ
≡
=
Jk
B
1 dg
dP 1
+
.
g
dΨ B 2
µ0 dΨ
10
(64)
Equation (64) is used in GTAW code to calculate Jk /B (actually calculated is µ0 Jk /B)[8]. Note that the expression
for Jk /B in Eq. (64) is not a magnetic surface function. Define σps as
σps
≡
σ − hσi
dP 1
1
g
−
2
dΨ B
B2
ps
Jk
,
B
=
≡
(65)
(66)
where Jkps is called Pfirsch-Schluter (PS) current. In cylindrical geometry, due to the poloidal symmetry, the PfierschSchluter current is obviously zero. In toroidal geometry, due to the poloidal asymmetry, the PS current is generally
nonzero. Thus, this quantity characterizes a toroidal effect.
Another useful quantity is µ0 hJ · Bi, which is written as
µ0 hJ · Bi
=
µ0 g
dP
dg 2
+
hB i,
dΨ dΨ
(67)
where h. . .i is flux surface averaging operator, which will be defined later in this note.
2.5
Solovév equilibrium
For most choices of P (Ψ) and g(Ψ), the GS equation has to be solved numerically. For the particular choice of P
and g profiles,
dP
c1
=− ,
dΨ
µ0
dg
= −c2 R02 ,
dΨ
analytical solution to the GS equation can be found, which is given by[9]
g
Ψ=
1
1
(c2 R02 + c0 R2 )Z 2 + (c1 − c0 )(R2 − R02 )2 ,
2
8
(68)
(69)
(70)
where c0 , c1 , c2 , and R0 are arbitrary constants. [Proof: By direct substitution, we can verify Ψ of this form is
indeed a solution to the GS equation (52).] A useful choice for tokamak application is to set c0 = B0 /(R02 κ0 q0 ),
c1 = B0 (κ20 + 1)/(R02 κ0 q0 ), and c2 = 0. Then Eq. (70) is written
B0
κ20 2
2 2
2 2
Ψ=
,
(71)
R
Z
+
(R
−
R
)
0
2R02 κ0 q0
4
which can be solved analytically to give the explicit form of the contour of Ψ on (R, Z) plane:
s
κ2
1 2R02 κ0 q0
Ψ − 0 (R2 − R02 )2 ,
Z=±
R
B0
4
(72)
which indicates the magnetic surfaces are up-down symmetrical. Using Eq. (68), i.e.,
dP
c1
B0 (κ20 + 1)
=−
=−
,
dΨ
µ0
µ0 R02 κ0 q0
the pressure is written
P = P0 −
B0 (κ20 + 1)
Ψ,
µ0 R02 κ0 q0
(73)
(74)
where P0 is a constant of integration. Note Eq. (71) indicates that that Ψ = 0 at the magnetic axis (R = R0 , Z = 0).
Therefore, Eq. (74) indicates that P0 is the pressure at the magnetic axis. The toroidal field function g is a constant
in this case, which implies there is no poloidal current in this equilibrium. (For the Solovev equilibrium (71), I found
numerically that the value of the safety factor at the magnetic axis (R = R0 , Z = 0) is equal to q0 g/(R0 B0 ). This
11
result should be able to be proved analytically. I will do this later. In calculating the safety factor, we also need the
expression of |∇Ψ|, which is given analytically by
s
2 2
∂Ψ
∂Ψ
|∇Ψ| =
+
∂R
∂Z
q
B0
[2RZ 2 + κ20 (R2 − R02 )R]2 + (2R2 Z)2 .
(75)
=
2R02 κ0 q0
)
Define Ψ0 = B0 R02 , and Ψ = Ψ/Ψ0 , then Eq. (71) is written as
1
κ2 2
2 2
Ψ =
R Z + 0 (R − 1)2 ,
2κ0 q0
4
where R = R/R0 , Z = Z/R0 . From Eq. (76), we obtain
r
1
κ2 2
Z=±
2κ0 q0 Ψ − 0 (R − 1)2 .
4
R
(76)
(77)
Given the value of κ0 , q0 , for each value of Ψ, we can plot a magnetic surface on (R, Z) plane. An example of the
nested magnetic surfaces is shown in Fig. 6.
1.2
1
Z/R0
0.8
0.6
0.4
0.2
0
0
0.2 0.4 0.6 0.8 1
R/R0
1.2 1.4 1.6
Figure 6: Flux surfaces of Solovév equilibrium for κ0 = 1.5 and q0 = 1.5, with Ψ varying from zero (center) to 0.123
(edge). The value of Ψ on the edge is determined by the requirement that the minimum of R is equal to zero. (To
prevent “divided by zero” that appears in Eq. (77) when R = 0, the value of Ψ on the edge is shifted to 0.123 − ε
when plotting the above figure, where ε is a small number, ε = 10−3 in this case.)
The minor radius of a magnetic surface of the Solovev equilibrium can be calculated by using Eq. (72), which
gives
q
√
(78)
Rin = R02 − AΨ,
q
√
(79)
Rout = R02 + AΨ,
and thus
q
q
√
√
R02 + AΨ − R02 − AΨ
Rout − Rin
a=
=
.
(80)
2
2
where A = 8R02 q0 /(B0 κ0 ). In my code of constructing Solovev magnetic surface, the value of a is specified by users,
and then Eq. (80) is solved numerically to obtain the value of Ψ of the flux surface. Note that the case Ψ = 0
corresponds to Rin = Rout = R0 , i.e., the magnetic axis, while the case Ψ = R02 B0 κ0 /(8q0 ) corresponds to Rin = 0.
Therefore, the reasonable value of Ψ of a magnetic surface should be in the range 0 6 Ψ < R02 B0 κ0 /(8q0 ). This
range is used as the interval bracketing a root in the bisection root finder.
Using Eq. (80), the inverse aspect ratio of a magnetic surface labeled by Ψ can be approximated as[9]
s
2q0 Ψ
ε≈
.
(81)
κ0 R02 B0
Therefore, the value of Ψ of a magnetic surface with the inverse aspect ratio ε is approximately given by
Ψ=
ε2 κ0 R02 B0
.
2q0
12
(82)
2.6
Equilibrium scaling
The GS equation is given by Eq. (52), i.e.,
∂
∂2Ψ
+R
2
∂Z
∂R
1 ∂Ψ
R ∂R
= −µ0 R2
dP
dg
−
g.
dΨ dΨ
(83)
If a solution to the GS equation is obtained, the solution can be scaled to obtain a family of solutions. Given an
equilibrium with Ψ(R, Z), P (Ψ), g(Ψ), then it is ready to prove that Ψ2 = sΨ, P2 = s2 P (Ψ), and g2 = ±sg(Ψ) is
also a solution to the GS eqaution, where s is a constant. In this case, both the poloidal and toroidal magnetic fields
are increased by a factor of s, and thus the safety factor remains unchanged. Also note that the pressure is increased
by s2 factor and thus the value of β (the ratio of the therm pressure to magnetic pressure) remains unchanged. Note
that g2 = ±sg(Ψ), which indicates that the direction of the toroidal magnetic field can be reversed without breaking
the force balance. Also note that Ψ2 = sΨ and s can be negative, which indicates that the direction of the toroidal
current can also be reversed without breaking the force balance.
The second kind of scaling is to set Ψ2 = Ψ, P2 = P (Ψ), and g22 = g 2 (Ψ) + c. It is ready to prove that the scaled
expression is still a solution to the GS equation because g2 g2′ = gg ′ . This scaling keep the pressure and the poloidal
field unchanged and thus the poloidal beta βp remains unchanged. This scaling scales the toroidal field and thus
can be used to generate a series of equilibria with different profile of safety factor.
Another scaling, which is trivial, is to set Ψ2 = Ψ, P2 = P (Ψ) + c, and g2 = g(Ψ). This scaling can be used to
test the effects of the pressure (not the pressure gradient) on various physical processes.
When a numerical equilibrium is obtained, we can use these scaling methods together to generate new equilibria
that satisfy particular global conditions. Note that the shape of magnetic surfaces of the scaled equilibrium remains
the same as the original one.
2.7
Plasma flow
In deriving the Grad-Shafranov equation, we have assumed that the plasma flow is zero. Next, we examine whether
this assumption is well justified for the EAST plasmas. Note that ∇P ≈ P0 /a, where P0 is the thermal pressure at the
magnetic axis and a is the minor radius of plasma. For typical EAST plasmas (EAST#[email protected]), P0 ≈ 2×104 Pa,
a = 0.45m. Then ∇P ≈ P0 /a = 4 × 104 N/m3 . One the other hand, the centrifugal force due to toroidal rotation
can be estimated as
Frot = ρm U 2 /R ≈ 4 × 1019 m−3 × 1.67 × 10−27 kg U 2 /1.85 = 3.6 × 10−8 U 2 ,
where U is the rotation velocity. To make the centrifugal force be comparable with ∇P , i.e.,
3.6 × 10−8 U 2 = 4 × 104 ,
the rotation velocity needs to be of the order U ≈ 1.0 × 106 m/s, which corresponds to a rotation frequency f =
U/(2πR) = 86 KHz which is larger by one order than the rotation frequency observed in EAST experiments (about
10KHz). This indicates the rotation has little influence on the static equilibrium. In other words, the EAST tokamak
equilibrium can be well described by the static equilibrium.
Note in passing that the complete momentum equation is given by
∂U
+ U · ∇U = ρq E + J × B − ∇ · P,
(84)
ρm
∂t
where ρq E term can be usually neglected due to either ρq ≈ 0 or E ≈ 0, P is a pressure tensor, which is different
from the scalar pressure considered in this note. The equilibrium with pressure tensor can be important for future
burning plasma, where the pressure contributed by energetic particles can be a tensor.
Mass density of EAST#[email protected], ρm = nD mD = 4 × 1019 m−3 × 2 × 1.6726 × 10−27 kg = 1.3 × 10−7 kg/m3 .
∇p ≈ p0 /a = 2 × 104 Pa /0.45m = 4 × 104 N/m3
2.8
(85)
Efficiency of tokamak magnetic field: Plasma beta
To characterize the efficiency of the magnetic field of tokamaks in confining plasmas, introduce the plasma β, which
is defined as the ratio of the thermal pressure to the magnetic pressure, i.e.,
β=
p
B 2 /2µ
13
.
0
(86)
Since the pressure in tokamak plasmas is inhomogeneous, the volume averaged pressure is usually used to define the
beta. In tokamak plasmas, the toroidal beta βt and the poloidal beta βp are defined, respectively, by
βt =
βp =
hpi
2 /2µ ,
Bt0
0
(87)
hpi
(88)
2 /2µ
Bpa
0
,
where h. . .i is the volume averaging, Bt0 is the vacuum toroidal magnetic field at the magnetic axis (or geometrical
center of the plasma), Bpa is the averaged poloidal magnetic field on the plasma surface. In tokamaks, the toroidal
magnetic field is dominant and thus the the toroidal beta βt (not βp ) is the usual way to characterize the the
efficiency of the magnetic field in confining plasmas. Why do we need βp ? The short answer is that βp characterizes
the efficiency of the plasma current in confining the plasma. This can be seen by using Ampere’s law to approximately
write the poloidal magnetic field Bpa as Bpa ≈ µ0 Ip /(2πa). Then βp is written
βp ≈
hpi
,
Ip2 /(8π 2 a2 )
(89)
which is the ratio of the pressure to the plsama current, and thus characterizes the efficieny of the plasma current in
confining the plsam. Furthermore βp is closely related to the normalized beta βN introduced in the next subsection
(refer to Eq. (91)). In addition, βp is proportional to an important current, the so-called bootstrapt current, in
tokamak plasmas. I will discuss this later.
2.9
Beta limit
Beta limit means there is a limit for the value of beta beyond which the plasma will encounter a serious disruption.
Early calculation of the beta limit on JET shows that the maximal βt obtained is proportional to Ip /aBt0 for
Ip [MA]/aBt0 6 3, , where Ip [MA] is the plasma current in mega Amper, a is the plasma minor radius in meter, Bt0
is the toroidal magnetic field in Tesla. This scaling relation βt max = Cβ Ip /aBt0 is often called Troyon scaling. This
scaling relation motivates the definition a normalized beta, βN , which is defined by
βN = 108
aBt0
βt ,
Ip
(90)
where all quantities are in SI units. Equation (90) can also be written as
βN = 108
hpi
,
Ip /a
(91)
which indicates that βN can be considered as the efficiency of the plasma current in confining the plasma. The
normalized beta βN is an operational parameter indicating how close the plasma is to reach destabilizing major
MHD activities. Its typical value is of order unit. The maximum value of βN before the onset of deleterious
instability is typically 3.5, although significantly higher values, e.g., βN = 7.2, have been achieved in the low aspect
ratio tokamak NSTX[11]. The ability to increase the value of βN can be considered to be the ability of controling
the major MHD instabilities, and thus can be used to characterize how well a tokamak device is operated. One goal
of EAST tokamak during 2015-2016 is to sustain a plasma with βN > 2 for at least 10 seconds.
(**check: Tokamak experiments have found that it is easier to achieve high βN in large Ip plasmas than in small
Ip plasmas. However, experiments found it is easier to achieve high βp in small Ip plasmas than in large Ip plasmas.
Examining the expression of βN and βp given by Eqs. (89) and Eq. (91), respectively, we recongnize that pressure
limit should have a scaling of hpi ∝ Ipα with 1 < α < 2. )
Tokamak experiments have also found that it is easier to achieve higher βt in low Bt plasmas than in higher Bt
plasmas, which indicates that the efficiency of the magnetic field in confining plasma is a discreasing function of the
magnitude of the magnetic field.
2.10
Why bigger tokamaks with larger plasma current are desired
As mentioned in Sec. 2.8, the beta limit study on JET tokamak shows that the maximal βt obtained is proportional
to Ip /aBt0 . This means the maximal plasmas pressure obtained is proportional to Ip /a, i.e.,
hpi ∝
14
Ip
a
(92)
The total plama energy is given by E ≈ hpi2πRa2 , where R is the major radius of the device. Using Eq. (92), we
obtain
E ∝ Ip aR.
(93)
Since fusion power is proportional to the plasma energy, the above equation is written as
Pfusion ∝ Ip aR,
(94)
which indicates, to obtain larger fusion power, we desire bigger tokamaks with larger plasma current.
2.11
Density limit
The maximum density that can be obtained in stable plasma operations (a.k.a. density limit) is empirically given
by
ne ≈ 1.5nG ,
(95)
where nG is the Greenwalt density, which is given by
nG = 1020
Ip
× 10−6
πa2
(96)
where Ip is the plasma current, a is the minor radius, all physical quantities are in SI units. The 1.5nG gives the
density limit that can be achived for a tokamak operation seneario with plasma current Ip and plasma minor radius
a. The Greenwalt density limit is an empirical one, which, like other empirical limits, can be exceeded in practice
(for example, the density actually achieved in an experiment can be ne = 1.6nG ). Equation (96) indicates that the
Greenwalt density is proportional to the current density. Therefore the ability to operate in large plasma current
density means the ability to operate with high plasma density.
Note that neither the pressure limit nor the density limit is determined by the force equilibrium constraints.
They are determined by the stability of the equilibrium. On the other hand, since the stability of the equilibrium is
determined by the equilibrium itself, the pressure and density limit involves equilibrium quantities. For this reason,
I decide to mention these contents (pressure and density limits) in these notes on equilibrium. Next, I will return to
the discussions of equilibrium.
3
Free boundary equilibrium problem
Free boundary equilibrium problem refers to the case where the value of Ψ on the boundary of the computational
box is unknown and must be determined from the current from both the plasma and external coils. Suppose the
computational box is a rectangle on (R, Z) plane. If all the current perpendicular to (R, Z) plane is known, the
value of Ψ at any point can be uniquely determined by using the Green function method, which gives
Ψ(R′ , Z ′ ) =
Z
G(R, Z; R′ , Z ′ )Jφ dRdZ +
P
Nc
X
G(Ric , Zic ; R′ , Z ′ )Iφ .
(97)
i=1
In solving the equilibrium problem, the current in external coils is given and known while the current carried by the
plasma is unknown, which need to be derived from the information of Ψ via Eq. (60), i.e.,
Jφ = −
1
△∗ Ψ.
µ0 R
(98)
To numerically solve GS equation within the computational box, we need the value of Ψ on the boundary of the
box as a boundary condition. Thus we need to adopt some initial guess of the value of Ψ on the boundary, then solve
the GS equation to get the value of Ψ within the computational box. Using the computed Ψ, we can calculate the
value of the plasma current perpendicular to the (R, Z) plane through Eq. (98). After this, all the current (current
in the plasma and in the external coils) perpendicular to the poloidal plane is known, we can calculate the value of
Ψ on the boundary of the box, Ψb , by using the Green function formulation Eq. (97). Note that Ψb calculated this
way usually differs from the initial guess of the value of Ψ on the boundary. Thus, we need to use the Ψb calculated
this way as a new guess value of Ψ on the computational boundary and repeat the above procedures. The process
is repeated until Ψb obtained in two successive iterations agrees with each other to a prescribed tolerance.
Before considering the free boundary equilibrium problem, it is instructive to consider the fixed boundary equilibrium problem, where the shape of the last closed flux surface is given, because this kind of problem provides
basic knowledges for dealing with the more complicated free boundary problem. In dealing with the fixed boundary
15
problem, the curvilinear coordinate system is useful. Specifically, the convenience provided by a curvilinear coordinate system in solving the fixed boundary tokamak equilibrium problem is that the curvilinear coordinates can be
properly chosen to make one of the coordinate surfaces coincide with the given boundary flux surface, so that the
boundary condition becomes trivial in this curvilinear coordinate system.
Next section discusses the basic theory of curvilinear coordinates system. (I learned the theory of general
coordinates from the appendix of Ref. [3], which is concise and easy to understand.) Many analytical theories and
numerical codes use the curvilinear coordinate systems that are constructed with one coordinate surface coinciding
with the magnetic surface. These kinds of curvilinear coordinates are usually called the magnetic surface coordinates.
In these coordinate systems, we need to choose a poloidal coordinate θ and a toroidal coordinate ζ. A particular
choice for θ and ζ is such one that makes the magnetic field lines be straight lines on (θ, ζ) plane. This kind of
coordinate system is usually called a flux coordinate system.
4
4.1
Curvilinear coordinate system
Coordinates transformation and Jacobian
In the Cartesian coordinates, the location vector r is described by the coordinates (x, y, z), i.e.,
r = xx̂ + yŷ + zẑ.
(99)
The transformation between the Cartesian coordinates system, (x, y, z), and a general coordinates system, (x1 , x2 , x3 ),
can be written as
r = x(x1 , x2 , x3 )x̂ + y(x1 , x2 , x3 )ŷ + z(x1 , x2 , x3 )ẑ.
(100)
(For example, cylindrical coordinates (R, φ, Z) can be considered as a general coordinate systems, which are defined
by r = R cos φx̂ + R sin φŷ + Zẑ.) The transformation function in Eq. (100) can be written as
x = x(x1 , x2 , x3 )
y = y(x1 , x2 , x3 )
z = z(x1 , x2 , x3 )
(101)
The Jacobian determinant (or simply Jacobian) of the transformation in Eq. (101) is defined by
∂x
∂x ∂x
∂x1 ∂x2 ∂x3 ∂y
∂y
∂y J = ∂x
∂x3 ,
2
∂z1 ∂x
∂z
∂z ∂x
∂x
∂x
1
2
(102)
3
which can be written as
∂r
∂r
∂r
×
·
.
∂x1
∂x2 ∂x3
It is easy to prove that the Jacobian J in Eq. (103) can also be written (refer to another notes)
J =
J = (∇x1 × ∇x2 · ∇x3 )−1 .
(103)
(104)
The Jacobian J of the Cartesian coordinates is obviously equal to one. If the Jacobian of a coordinate system is
greater than zero, it is called a right-hand coordinate system. Otherwise it is called a left-hand system.
4.2
Orthogonality relation
Next, we shall prove the following orthogonality relation
∂r
= δij ,
(105)
∂xj
where δij is the Kronical delta function. [Proof: The left-hand side of Eq. (105) can be written as
i i
i ∂r
∂ x̂
∂ ŷ
∂ẑ
∂y
∂z
∂x
∂x
∂x
∂x
i
∇x ·
x̂ + x j +
ŷ + y j +
ẑ + z j
=
x̂ +
ŷ +
ẑ ·
∂xj
∂x
∂y
∂z
∂xj
∂x
∂xj
∂x
∂xj
∂x
i i
i ∂x
∂y
∂z
∂x
∂x
∂x
=
x̂ +
ŷ +
ẑ ·
x̂ +
ŷ +
ẑ
∂x
∂y
∂z
∂xj
∂xj
∂xj
∂xi ∂y
∂xi ∂z
∂xi ∂x
+
+
=
∂x ∂xj
∂y ∂xj
∂z ∂xj
i
∂x
=
∂xj
= δij ,
∇xi ·
16
where the second equality is due to
∂ x̂
∂ ŷ
∂ẑ
= 0, j = 0, j = 0,
(106)
∂xj
∂x
∂x
since x̂, ŷ, ẑ are constant vectors independent of spatial location.]
It can be proved that ∇xi is a contravariant vector while ∂r/∂xi is a covariant vector (I do not prove this). The
orthogonality relation in Eq. (105) is fundamental to the theory of general coordinates. (The cylindrical coordinate
system (R, φ, Z) is an example of general coordinates. As an exercise, we can verify that the cylindrical coordinates
have the above property. In this case, x = x1 cos x2 , y = x1 sin x2 , z = x3 , where x1 ≡ R, x2 ≡ φ, x3 ≡ Z.) The
orthogonality relation allows one to write the covariant basis vectors in terms of contravariant basis vectors and vice
versa. For example, the orthogonality relation tells that ∂r/∂x1 is orthogonal to ∇x2 and ∇x3 , thus, ∂r/∂x1 can
be written as
∂r
= A∇x2 × ∇x3 ,
(107)
∂x1
where A is a unknown variable to be determined. To determine A, dotting Eq. (107) by ∇x1 , and using the
orthogonality relation again, we obtain
1 = A(∇x2 × ∇x3 ) · ∇x1 ,
(108)
which gives
A =
=
(∇x2
J
1
× ∇x3 ) · ∇x1
(109)
Thus ∂r/∂x1 is written, in terms of ∇x1 , ∇x2 , and ∇x3 , as
Similarly, we obtain
and
∂r
= J ∇x2 × ∇x3 .
∂x1
(110)
∂r
= J ∇x3 × ∇x1
∂x2
(111)
∂r
= J ∇x1 × ∇x2 .
∂x3
(112)
∂r
= J ∇xj × ∇xk ,
∂xi
(113)
Equations (110)-(112) can be generally written
where (i, j, k) represents the cyclic order in the variables (x1 , x2 , x3 ). Equation (113) expresses the covariant basis
vectors in terms of the contravariant basis vectors. On the other hand, from Eq. (110)-(112), we obtain
∇xi = J −1
∂r
∂r
×
,
j
∂x
∂xk
(114)
which expresses the contravariant basis vectors in terms of the covariant basis vectors.
4.3
Example: (ψ, θ, ζ) coordinates
Suppose (ψ, θ, ζ) is an arbitrary general coordinate system. Then the covariant basis vectors are ∇ψ, ∇θ, and ∇ζ,
and the corresponding contravariant basis vectors are written as
and
∂r
= J ∇θ × ∇ζ,
∂ψ
(115)
∂r
= J ∇ζ × ∇ψ,
∂θ
(116)
∂r
= J ∇ψ × ∇θ.
∂ζ
(117)
17
In Einstein notation, contravariant basis vectors are denoted with upper indices as
eψ ≡ ∇ψ;
eθ ≡ ∇θ;
eζ ≡ ∇ζ.
(118)
and the covariant basis vectors are denoted with low indices as
eψ ≡
∂r
;
∂ψ
eθ ≡
∂r
∂θ ;
eζ ≡
∂r
.
∂ζ
Then the orthogonality relation, Eq. (105), is written as
eα · eβ = δαβ .
(119)
Then, in term of the contravairant basis vectors, A is written
A = Aψ eψ + Aθ eθ + Aζ eζ ,
(120)
where Aψ = A · eψ , Aθ = A · eθ , and Aζ = A · eζ . Similarly, in term of the covariant basis vectors, A is written
A = Aψ eψ + Aθ eθ + Aζ eζ ,
(121)
where Aψ = A · eψ , Aθ = A · eθ , and Aζ = A · eζ .
[In passing, we note that Ψ ≡ Aφ R is the covariant toroidal component of A in cylindrical coordinates (R, φ, Z).
The proof is as follows. Note that the covariant form of A should be expressed in terms of the contravariant basis
vector (∇R, ∇φ, and ∇Z), i.e.,
A = A1 ∇R + A2 ∇φ + A3 ∇Z.
(122)
where A2 is the covariant toroidal component of A. To obtain A2 , we take scalar product of Eq. (122) with ∂r/∂φ
and use the orthogonality relation (105), which gives
A·
∂r
= A2 .
∂φ
(123)
In cylindrical coordinates (R, φ, Z), the location vector is written as
r(R, Z, φ) = RêR (φ) + ZêZ .
(124)
∂r
= Rêφ ,
∂φ
(125)
A2 = Aφ R,
(126)
Using this, we obtain
Use Eq. (125) in Eq. (123) giving
which indicates that Ψ = Aφ R is the covariant toroidal component of the vector potential.]
4.4
Gradient, divergence, and curl in general coordinates (ψ, θ, ζ)
The gradient of a scalar function f (ψ, θ, ζ) is readily calculated from the chain rule,
∇f =
∂f
∂f
∂f
∇ψ +
∇θ +
∇ζ.
∂ψ
∂θ
∂ζ
(127)
Note that the gradient of a scalar function is in the covariant representation. The inverse form of this expression is
obtained by dotting the above equation by the three contravariant basis vectors, respectively,
∂f
= (J ∇θ × ∇ζ) · ∇f,
∂ψ
∂f
= (J ∇ζ × ∇ψ) · ∇f,
∂θ
∂f
= (J ∇ψ × ∇θ) · ∇f.
∂ζ
(128)
(129)
(130)
Using Eq. (127), the directional derivative in the direction of ∇ψ is written as
∇ψ · ∇f = |∇ψ|2
∂f
∂f
∂f
+ (∇θ · ∇ψ)
+ (∇ζ · ∇ψ) .
∂ψ
∂θ
∂ζ
18
(131)
To calculate the divergence of a vector, the vector should be in the contravariant representation since we can make
use of the fact that
∇ · (∇α × ∇β) = 0,
(132)
for any scalar quantities α and β. Thus we write vector A as
A = A1 J ∇θ × ∇ζ + A2 J ∇ζ × ∇ψ + A3 J ∇ψ × ∇θ,
(133)
where A1 = A · ∇ψ, etc.. Then the divergence of A is readily calculated
∇·A
=
=
∇(A1 J ) · (∇θ × ∇ζ) + ∇(A2 J ) · (∇ζ × ∇ψ) + ∇(A3 J ) · (∇ψ × ∇θ)
∂A2 J
∂A3 J
1 ∂A1 J
,
+
+
J
∂ψ
∂θ
∂ζ
(134)
(135)
where the second equality is obtained by using Eqs. (128), (129), and (130).
To take the curl of a vector, it should be in the covariant representation since we can make use of the fact that
∇ × ∇α = 0. Thus the curl of A is written as
∇×A
=
=
=
=
∇ × (A1 ∇ψ + A2 ∇θ + A3 ∇ζ)
∇A × ∇ψ + ∇A2 × ∇θ + ∇A3 × ∇ζ
1
∂A1
∂A1
∂A2
∂A3
∂A2
∂A3
∇θ +
∇ζ × ∇ψ +
∇ψ +
∇ζ × ∇θ +
∇ψ +
∇θ × ∇ζ
∂θ
∂ζ
∂ψ
∂ζ
∂ψ
∂θ
1 ∂A1
1 ∂A3
∂A1
∂A3
∂A2
1 ∂A2
J ∇ψ × ∇θ +
J ∇ζ × ∇ψ +
J ∇θ × ∇ζ.
(136)
−
−
−
J
∂ψ
∂θ
J
∂ζ
∂ψ
J
∂θ
∂ζ
Note that taking the curl leaves a vector in the contravariant representation.
4.5
Metric tensor for general coordinate system
Consider a general coordinate system (ψ, θ, ζ). The metric tensor is the transformation matrix between the covariant
basis vectors and the contravariant ones. To obtain the metric matrix, we write the contrariant basis vectors in
terms of the covariant ones, such as
∇ψ = a1 J ∇θ × ∇ζ + a2 J ∇ζ × ∇ψ + a3 J ∇ψ × ∇θ.
(137)
Taking the scalar product respectively with ∇ψ, ∇θ, and ∇ζ, Eq. (137) is written as
a1 = |∇ψ|2 ,
(138)
a2 = ∇ψ · ∇θ,
(139)
a = ∇ψ · ∇ζ.
(140)
∇θ = b1 J ∇θ × ∇ζ + b2 J ∇ζ × ∇ψ + b3 J ∇ψ × ∇θ,
(141)
3
Similarly, we write
Taking the scalar product respectively with ∇ψ, ∇θ, and ∇ζ, Eq. (??) becomes
b1 = ∇θ · ∇ψ
(142)
b2 = |∇θ|2 ,
(143)
b = ∇θ · ∇ζ.
(144)
3
The same situation applies for the ∇ζ basis vector,
∇ζ = c1 ∇θ × ∇ζJ + c2 ∇ζ × ∇ψJ + c3 ∇ψ × ∇θJ ,
(145)
Taking the scalar product respectively with ∇ψ, ∇θ, and ∇ζ, Eq. (??) becomes
c1 = ∇ζ · ∇ψ
(146)
c2 = ∇ζ · ∇θ
(147)
c = |∇ζ|
(148)
3
19
2
Summarizing the above results in matrix form, we

 
|∇ψ|2
∇ψ
 ∇θ  =  ∇θ · ∇ψ
∇ζ · ∇ψ
∇ζ
obtain
∇ψ · ∇θ
|∇θ|2
∇ζ · ∇θ


∇θ × ∇ζJ
∇ψ · ∇ζ
∇θ · ∇ζ   ∇ζ × ∇ψJ 
∇ψ × ∇θJ
|∇ζ|2
(149)
Similarly, to convert contravariant basis vector to covariant one, we write
∇θ × ∇ζJ = d1 ∇ψ + d2 ∇θ + d3 ∇ζ
(150)
Taking the scalar product respectively with ∇θ × ∇ζJ , ∇ζ × ∇ψJ , and ∇ψ × ∇θJ , the above equation becomes
d1 = |∇θ × ∇ζ|2 J 2
(151)
d2 = (∇θ × ∇ζJ ) · (∇ζ × ∇ψJ )
(152)
d3 = (∇θ × ∇ζJ ) · (∇ψ × ∇θJ )
(153)
∇φ × ∇ψJ = e1 ∇ψ + e2 ∇θ + e3 ∇ζ
(154)
e1 = (∇ζ × ∇ψ) · (∇θ × ∇ζ)J 2
(155)
For the second contravariant basis vector
e2 = (∇ζ × ∇ψ) · (∇ζ × ∇ψ)J 2
(156)
e3 = (∇ζ × ∇ψ) · (∇ψ × ∇θ)J
(157)
2
For the third contravariant basis vector
∇ψ × ∇θJ = f1 ∇ψ + f2 ∇θ + f3 ∇ζ
(158)
f1 = (∇ψ × ∇θ) · (∇θ × ∇ζ)J 2
(159)
f2 = (∇ψ × ∇θ) · (∇ζ × ∇ψ)J 2
(160)
f3 = (∇ψ × ∇θ) · (∇ψ × ∇θ)J
(161)
Summarizing these results, we obtain

 
|∇θ × ∇ζ|2 J 2
∇θ × ∇ζJ
 ∇ζ × ∇ψJ  =  (∇ζ × ∇ψ) · (∇θ × ∇ζ)J 2
(∇ψ × ∇θ) · (∇θ × ∇ζ)J 2
∇ψ × ∇θJ
2


∇ψ
(∇θ × ∇ζ) · (∇ψ × ∇θ)J 2
(∇ζ × ∇ψ) · (∇ψ × ∇θ)J 2   ∇θ 
∇ζ
(∇ψ × ∇θ) · (∇ψ × ∇θ)J 2
(162)
Note that the matrix in Eqs. (149) and (162) should be the inverse of each other. It is ready to prove this by directly
calculating the product of the two matrix.
4.5.1
(∇θ × ∇ζ) · (∇ζ × ∇ψ)J 2
(∇ζ × ∇ψ) · (∇ζ × ∇ψ)J 2
(∇ψ × ∇θ) · (∇ζ × ∇ψ)J 2
Special case: metric tensor for (ψ, θ, φ) coordinate system
Suppose that (ψ, θ, φ) are arbitrary general coordinates except that φ is the usual toroidal angle in cylindrical
coordinates. Then ∇φ = 1/Rφ̂ is perpendicular to both ∇ψ and ∇θ. Using this, Eq. (149) is simplified to



 
∇θ × ∇φJ
|∇ψ|2
∇ψ · ∇θ
0
∇ψ
 ∇θ  =  ∇ψ · ∇θ
|∇θ|2
0   ∇φ × ∇ψJ 
(163)
∇ψ × ∇θJ
0
0
1/R2
∇φ
Similarly, Eq. (162) is simplified to

 
∇θ × ∇φJ
|∇θ|2 J 2 /R2
 ∇φ × ∇ψJ  =  −∇ψ · ∇θJ 2 /R2
∇ψ × ∇θJ
0
−∇θ · ∇ψJ 2 /R2
|∇ψ|2 J 2 /R2
0


0
∇ψ
0   ∇θ 
R2
∇φ
(164)
[Note that the matrix in Eqs. (163) and (164) should be the inverse of each other. The product of the two matrix,



|∇θ|2 J 2 /R2
−∇θ · ∇ψJ 2 /R2 0
|∇ψ|2
∇ψ · ∇θ
0
J2
2
 −∇ψ · ∇θJ 2 /R2
|∇θ|2
0 ,
(165)
0   ∇ψ · ∇θ
R2 |∇ψ|
2
2
0
0
1/R
0
0
R
20
can be calculated to give


A 0 0
 0 A 0 ,
0 0 1
where
A = |∇θ|2 |∇ψ|2 J 2 /R2 − (∇θ · ∇ψ)2 J 2 .
By using the definition of the Jacobian in Eq. (104), it is easy to verify that A = 1, i.e.,
|∇θ|2 |∇ψ|2 − (∇θ · ∇ψ)2 =
R2
,
J2
(166)
]
4.6
Covariant and contravariant representation of equilibrium magnetic field
The axisymmetric equilibrium magnetic field is given by Eq. (53), i.e.,
B = ∇Ψ × ∇φ + g(Ψ)∇φ.
(167)
In (ψ, θ, φ) coordinate system, the above expression can be written as
B = −Ψψ ∇φ × ∇ψ − Ψθ ∇φ × ∇θ + g(Ψ)∇φ,
(168)
where the subscripts denote the partial derivatives with the corresponding subscripts. Note that Eq. (168) is a mixed
representation, which involves both covariant and contravariant basis vectors. Equation (168) can be converted to
contravariant form by using the metric tensor, giving
B = −Ψψ ∇φ × ∇ψ − Ψθ ∇φ × ∇θ + g(Ψ)
1
J ∇ψ × ∇θ.
R2
Similarly, Eq. (168) can also be transformed to covariant form, giving
J
J
J
J
2
2
B = Ψψ 2 ∇ψ · ∇θ + Ψθ 2 |∇θ| ∇ψ + −Ψψ 2 |∇ψ| − Ψθ 2 ∇θ · ∇ψ ∇θ + g(Ψ)∇φ.
R
R
R
R
For the convenience of notation, define
hαβ =
J
∇α · ∇β,
R2
(169)
(170)
(171)
then Eq. (170) is written as
B = (Ψψ hψθ + Ψθ hθθ )∇ψ + (−Ψψ hψψ − Ψθ hψθ )∇θ + g(Ψ)∇φ.
5
(172)
Magnetic surface coordinate system (ψ, θ, φ)
A coordinate system (ψ, θ, φ), where φ is the usual cylindrical toroidal angle, is called a magnetic surface coordinate
system if Ψ is a function of only ψ, i.e., ∂Ψ/∂θ = 0 (of course we also have ∂Ψ/∂φ = 0 since we are considering
axially symmetrical case). In terms of (ψ, θ, φ) coordinates, the contravariant form of the magnetic field, Eq. (169),
is written as
J
B = −Ψ′ ∇φ × ∇ψ + g(Ψ) 2 ∇ψ × ∇θ,
(173)
R
where Ψ′ ≡ dΨ/dψ. The covariant form of the magnetic field, Eq. (170), is written as
J
J
(174)
B = Ψ′ 2 ∇ψ · ∇θ ∇ψ + −Ψ′ 2 |∇ψ|2 ∇θ + g(Ψ)∇φ.
R
R
21
5.1
Relation between Jacobian and poloidal angle θ
In (ψ, θ, φ) coordinates, a line element is written
dl =
∂r
∂r
∂r
dψ +
dθ +
dφ
∂ψ
∂θ
∂φ
(175)
The line element that lies on a magnetic surface (i.e., dψ = 0) and on a poloidal plane (i.e., dφ = 0) is then written
dℓp
∂r
dθ
∂θ
J ∇φ × ∇ψdθ.
=
=
(176)
We use the convention that dℓp and dθ take the same sign, i.e.,
dℓp = |J ∇φ × ∇ψ|dθ.
(177)
Using the fact that ∇ψ and ∇φ is orthogonal and ∇φ = φ̂/R, the above equation is written as
dθ =
R
dlp
|J ∇ψ|
(178)
Given |J ∇ψ|, Eq. (178) can be used to determine the θ coordinate of points on a magnetic surface.
5.2
Calculating θ coordinate
Once |J ∇ψ| is known, one can use Eq. (178) to calculate the value of θ of a point by performing the following line
integral:
Z xi,j
R
dlp
(179)
θi,j =
|J
∇ψ|
0
where the line integration is along the contour Ψ = Ψj . It is here that the positive direction of θ can be selected.
It is obvious that the sign of the Jacobian of the constructed coordinates may be different from the J appearing
in Eq. (179), depending on the positive direction we choos for the poloidal coordinate. Denote the Jacobian of the
constructed coordinates by J ′ , then
J ′ = ±J
(180)
This sign should be taken into account after the radial coordinate and the postive directio of the poloidal angle is
chosen. In GTAW, I choose the positive direction of θ to be in the anticlockwise direction when observers look along
the direction of φ̂. To achieve this, the line integration in Eq. (179) should be along the anticlockwise direction (I
use the determination of the direction matrix, a well known method in graphic theory, to determine the direction.).
In order to evaluate the integration in Eq. (179), we need to select a zero point for θ coordinate. The usual
choice for θ = 0 line is a horizontal ray on the midplane that starts from the magnetic axis and points to the low
filed side of the device (this is my choice in the GTAW code).
5.2.1
Normalized poloidal coordinate
The range of θ defined by Eq. (??) is usually not within [0 : 2π]. Define a normalized poloidal coordinate θ:
θi,j
=
=
θi,j
H
R
|J ∇ψ| dlp
H
R
|J ∇ψ| dlp
2π
2π
Z
xi,j
0
R
dlp
|J ∇ψ|
(181)
which is obviously within the range [0 : 2π]. Sine we have modified the definition of the poloidal angle, the Jacobian
of the new coordinates (ψ, θ, φ) is different from that of (ψ, θ, φ). Next, we determine the Jacobian Jnew of the new
coordinates (ψ, θ, φ). Equation (181) can be written as θi,j = s(ψj )θi,j with
s(ψ) = H
2π
R
|J ∇ψ| dlp
22
.
(182)
The Jacobian Jnew of the new coordinates system (ψ, θ, φ) is written
Jnew
1
(∇ψ × ∇θ) · ∇φ
1
{∇ψ × ∇[s(ψ)θ]} · ∇φ
1
1
s(ψ) (∇ψ × ∇θ) · ∇φ
1
J ′.
s(ψ)
1
±
J
s(ψ)
≡
=
=
=
=
(183)
The Jacobian J can be set to various forms to achieve desired poloidal coordinates (as given in the next section).
After the radial coordinate ψ is chosen, all the quantities on the right-hand side of Eq. (181) are known and the
integration can be performed to obtain the value of θ of each point on each flux surface.
5.2.2
The form of Jacobian for equal-arc-length poloidal angle
If the Jacobian J is chosen to be of the following form
J =
R
.
|∇ψ|
(184)
Then θi,j in Eq. (181) is written
θi,j
=H
2π
dlp
Z
xi,j
dlp .
(185)
0
and the Jacobian Jnew given by Eq. (183) now takes the form
H
H
dlp R dΨ
dlp R
=
.
Jnew = ±
2π |∇ψ|
2π |∇Ψ| dψ
(186)
Equation (185) indicates a set of poloidal points with equal arc intervals corresponds to a set of uniform θi points.
Therefore this choice of the Jacobian is called the equal-arc-length Jacobian. Note that Eq. (185) does not involve
the radial coordinate ψ. Therefore the values of θ of points on any magnetic surface can be determined before the
radial coordinate is chosen. By using Eq. (185) (to calculate θ) and the definition of ψ (to calculate ψ), we obtain
a magnetic surface coordinate system (ψ, θ, φ).
5.2.3
Local safety factor
The local safety factor is defined by
B · ∇φ
,
(187)
B · ∇θ
which characterizes the local pitch angle of a magnetic field line on a magnetic surface (i.e. on (θ, φ) plane).
Substituting the contravariant representation of the magnetic field, Eq. (173), into the above equation, the local
safety factor is written
g J
(188)
qlocal (ψ, θ) = − 2 ′ .
R Ψ
Note the expression qlocal in Eq. (188) depends on the Jacobian J . This is because the definition of qlocal depends
on the defintion of θ, which in turn depends on the the Jacobian J . [In passing, note that in terms of qlocal , the
contravariant form of the magnetic field, Eq. (173), is written
qlocal =
B = −Ψ′ (∇φ × ∇ψ + qlocal ∇ψ × ∇θ).
] The global safety factor is defined as the poloidal average of the local safety factor,
Z 2π
1
qglobal (ψ) ≡
qlocal (ψ, θ)dθ
2π 0
Z 2π
J
1 g
dθ.
= −
′
2π Ψ 0 R2
23
(189)
(190)
(191)
The physical meaning of qglobal is obvious: it represents the number of toroidal circles a magnetic field line travels
when the line travels a complete poloidal circle. Note that qlocal and qglobal defined this way can be negative, which
depends on the choice of the positive direction of φ and θ coordinates (note that the safety factor given in G-eqdsk
file is always positive, i.e. it is the absolute value of the safety factor defined here).
(In passing, let us consider the numerical calculation of qglobal . Using the relation dℓp and dθ [Eq. (178)], equation
(191) is further written
I
dℓp
1 g
sign(J )
qglobal (ψ) = −
′
2π Ψ
R|∇ψ|
I
1 sign(J )
dℓp
= − g
.
(192)
′
2π sign(Ψ )
R|∇Ψ|
Equation (192) is used in the GTAW code to numerically calculate the value of qglobal on magnetic surfaces. Using
Bp = |∇Ψ|/R and Bφ = g/R, the absolute value of qglobal is written
I
1 |Bφ |
1
dℓp ,
(193)
|qglobal | =
2π
R Bp
which is the familiar formula we see in textbooks.)
5.2.4
The form of Jacobian for sraight-field-line poloidal angle
If the Jacobian J is chosen to be of the following form
J (ψ, θ) = R2 ,
then Eq. (188) implies that qlocal is a magnetic surface function, i.e., the magnetic field lines are straight on (ψ, θ)
plane. The poloidal angle in Eq. (181) is written
Z xi,j
1
2π
dlp ,
θi,j = H 1
R|∇ψ|
dl
R|∇ψ| p 0
which can be further written
θi,j = H
2π
1
R|∇Ψ| dlp
Z
xi,j
0
1
dlp .
R|∇Ψ|
The Jacobian Jnew given by Eq. (183) now takes the form
H
H 1
R|∇ψ| dlp
2
2
= ±R
Jnew = ±R
2π
1
R|∇Ψ| dlp
2π
dΨ
.
dψ
(194)
Figure 7 compares the equal-arc-poloidal angle with the straight-line poloidal angle, which shows that the resolution
of the straight-line poloidal angle is not good near the low-field-side midplane.
5.2.5
Verification of Jabobian
After the magnetic coordinates are constructed, we can evaluate the Jacobian Jnew by using directly the definition
of the Jacobian, i.e.,
1
Jnew =
,
(∇ψ × ∇θ) · ∇φ
which can be further written as
Jnew = R(Rθ Zψ − Rψ Zθ ),
(195)
where the particial differential can be evaluated by using numerical differetial schemes. The results obtained by this
way should agree with results obtained from the analytical form of the Jacobian. This consistency check provide a
verification for the correctness of the theory derivation and numerical implementation. In evaluating the Jacobian
by using the analytical form, we may need to evluate ∇ψ, which finally reduces to evaluating ∇Ψ. The value of
|∇Ψ| can be obtained numerically based on the numerical data of Ψ. Then the cubic spline interpolating formula
is used to obtain the value of |∇Ψ| at desired points. (Jnew calculated by the second method is used in the GTAW
code; the first methods are also implemented in the code for the benchmark purpose.) In the following sections, for
notation ease, the Jacobiban of the constructed coordinate system will be denoted by J .
24
0.6
0.6
0.4
0.4
0.2
0.2
Z(m)
0.8
Z(m)
0.8
0
0
-0.2
-0.2
-0.4
-0.4
-0.6
-0.6
-0.8
-0.8
1.6
1.8
2
R(m)
2.2
1.6
1.8
2
R(m)
2.2
Figure 7: The equal-arc poloidal angle (left) and the straight-line poloidal angle (right) for EAST equilibrium
#[email protected]. The blue lines correspond to the equal-θ lines, withpunifrom θ interval between neighbour lines. The
surface)
red lines correspond
to the magnetic surfaces, which start from Ψt = 0.01714 (the innermost magnetic
p
p
and end at Ψt = 0.9851 (the boundary magnetic surface), and are spaced in equal increaments of Ψt .
5.2.6
Radial coordinate
The cylindrical coordinates (R, φ, Z) is a right-hand system, with the positive direction of Z pointing vertically up.
In GTAW code, the positive direction of θ is chosen in the anticlockwise direction when observers look along the
direction of φ̂. Then the definition J −1 = ∇ψ × ∇θ · ∇φ indicates that (1) J is negative if ∇ψ points from the
magnetic axis to LCFS; (2) J is postive if ∇ψ points from the LCFS to the magnetic axis. This can be used to
determine the sign of Jacobian after using the anaytical formual to obtain the absolute value of Jacobian.
The radial coordinate ψ can be chosen to be various surface function, e.g., volume, poloidal, and toroidal magnetic
flux within a magnetic surface.
√
The frequently used radial coordinates include Ψ, Ψ, and Ψ, where Ψ is defined by
Ψ=
Ψ − Ψ0
,
Ψa − Ψ0
(196)
where Ψ0 and Ψa are the values of Ψ at the magnetic axis and LCFS, respectively. For the last two choices of the
radial coordinate, ∇ψ points from the magnetic axis
pto LCFS. Other choices of the radial coordinates include the
toroidal magnetic flux and its square root, Ψt , and Ψt , where Ψt and Ψt are defined by
dΨt
= 2πq, Ψt (0) = 0
dΨ
and
Ψt =
Ψt
,
Ψt (1)
respectively,
p where Ψt (0) and Ψt (1) are the values of Ψt at the magnetic axis and LCFS, respectively.
If ψ = Ψt , then
dΨ
dΨ dΨt
1 dΨt
1 dΨt dΨt
1
=
=
=
=
Ψt (1)2ψ
dψ
dΨt dψ
2πq dψ
2πq dΨt dψ
2πq
5.3
(197)
(198)
(199)
Other choices of the radial coordinate ψ, check, to be deleted
The radial coordinate ψ can be chosen to be various surface function, e.g. volume, poloidal, and toroidal magnetic
flux within a magnetic surface. Once the radial coordinate is chosen and the form of function h(ψ, θ) is given, the
function f (ψ) in Eq. (??) can be determined from the equation that relates the Jacobian with the radial derivative
of some surface functions. Three common choices of the radial coordinate ψ are respectively ψ = Ψ, ψ = Ψt , and
ψ = V . Next, we consider the last two cases and derive the explicit expression of function f (ψ).
Case 2:
Using the form of the Jacobian, Eq. (212) is written as
Z 2π
h(ψ, θ)dθ.
(200)
V ′ = 2πf (ψ)
0
25
If we choose the radial coordinate as ψ = V , then V ′ = 1. Using this, Eq. (200) is written as
f (ψ) = 2π
Z
2π
h(ψ, θ)dθ
0
−1
,
(201)
which determines the function f (ψ).
Case 3: Using Eq. (222), we obtain
V ′ −2
hR i.
(202)
2π
If we choose the radial coordinate as ψ = Ψt , then Ψ′t = 1. Making use of this and Eq. (200), Eq. (202) is written
as
Z
Ψ′t = g
2π
1 = ghR−2 if (ψ)
h(ψ, θ)dθ,
0
i.e.,
f (ψ) = ghR
−2
i
Z
2π
h(ψ, θ)dθ
0
−1
,
(203)
which determines the function f (ψ).
The three choices for radial coordinate ψ are summarized in Table 1.
ψ
Ψ
Ψt
V
f (ψ)
R 2π h(ψ,θ) i−1
1 g
2π | q | 0
R2 dθ
h
i−1
R
2π
ghR−2 i 0 h(ψ, θ)dθ
h R
i−1
2π
h
2π
0
h(ψ, θ)dθ
Table 1: The choice of the meaning of ψ determines the form of the function f (ψ) in the Jacobian expression (??).
6
Constructing magnetic surface coordinate system from discrete Ψ(R, Z)
data
Given an axisymmetric tokamak equilibrium in (R, φ, Z) coordinates (e.g., 2D data Ψ(R, Z) on a rectangular grids
(R, Z) in G-file), we can construct a magnetic surface coordinates (ψ, θ, φ) by the following two steps. (1) Find out a
series of magnetic surfaces on (R, Z) plane and select radial coordinates for each magnetic surface (e.g. the poloidal
flux within each magnetic surface). (2) Specify the Jacobian or some property you want the poloidal angle to have.
Then calculate the poloidal angle of each point on each flux surface (on the φ = const plane) by using Eq. (178)
(if the Jacobian is specified) or some method specified by you to achieve some property you prefer for the poloidal
angle (if you do not specify a Jacobian). Then we obtain the magnetic surface coordinates system (ψ, θ, φ).
6.1
Finding magnetic surfaces
Two-dimensional data Ψ(R, Z) on a rectangular grids (R, Z) is read from the G EQDSK file (G-file) of EFIT code.
Based on the 2D array data, I use 2D cubic spline interpolation to construct a interpolating function Ψ = Ψ(R, Z).
To construct a magnetic surface coordinate system, we need to find the contours of Ψ, i.e., magnetic surfaces. The
values of Ψ on the magnetic axis, Ψ0 , and the value of Ψ on the last closed flux surface (LCFS), Ψb , are given in
G-file. Using these two values, I construct a 1D array “psival” with value of elements changing uniform from Ψ0 to
Ψb . Then I try to find the contours of Ψ with contour level value ranging from Ψ0 to Ψb . This is done in the following
way: construct a series of straight line (in the poloidal plane) that starts from the location of the magnetic axis
and ends at one of the points on the LCFS. Combine the straight line equation, Z = Z(R), with the interpolating
function Ψ(R, Z), we obtain a one variable function h = Ψ(R, Z(R)). Then finding the location where Ψ is equal to
a specified value Ψi , is reduced to finding the root of the equation Ψ(R, Z(R)) − Ψi = 0. Since this is a one variable
equation, the root can be easily found by using simple root finding scheme, such as bisection and Newton’s method
(bisection method is used in GTAW code). After finding the the roots for each value in the array “psival” on each
straight lines, the process of finding the contours of Ψ is finished. The contours of Ψ found this way are plotted in
Fig. 8.
26
1
Z
0.5
0
-0.5
-1
1.2
1.4
1.6
1.8
2
2.2
2.4
2.6
R
Figure 8: Verification of the numerical code that calculates the contours of the poloidal flux Ψ. The bold line in the
figure indicates the LCFS. The contour lines (solid lines) given by the gnuplot program agrees well with the results
I calculate by using interpolation and root-finding method (the two sets of contours are indistinguishable in this
scale). My code only calculate the contour lines within the LCFS, while those given by gnuplot contains additional
contour lines below the X point and on the left top in the figure. Eqdisk file of the equilibrium was provided by Dr.
Guoqiang Li (filename: g013606.07104).
In the above, we mentioned that the point of magnetic axis and points on the LCFS are needed to construct
the straight lines. In G-file, points on LCFS are given explicitly in an array. The location of magnetic axis is also
explicitly given in G-file. It is obvious that some of the straight lines Z = Z(R) that pass through the location of
magnetic axis and points on the LCFS will have very large or even infinite slope. On these lines, finding the accurate
root of the equation Ψ(R, Z(R)) − Ψi = 0 is difficult or even impossible. The way to avoid this situation is obvious:
switch to use function R = R(Z) instead of Z = Z(R) when the slope of Z = Z(R) is large (the switch condition I
used is |dZ/dR| > 1).
In constructing the flux surface coordinate with desired Jacobian, we will need the absolute value of the gradient
of Ψ, |∇Ψ|, on some specified spatial points. To achieve this, we need to construct a interpolating function for |∇Ψ|.
The |∇Ψ| can be written as
s
2 2
∂Ψ
∂Ψ
+
,
(204)
|∇Ψ| =
∂R
∂Z
By using the center difference scheme to evaluate the partial derivatives with respect to R and Z in the above
equation (using one side difference scheme for the points on the rectangular boundary), we can obtain an 2D array
for the value of |∇Ψ| on the rectangular (R, Z) grids. Using this 2D array, we can construct an interpolating function
for ∇Ψ by using the cubic spline interpolation scheme.
27
Z(m)
Z
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
1.2 1.4 1.6 1.8 2 2.2 2.4
R
1.2
1.6
2
R(m)
2.4
Figure 9: Grid points (the intersecting points of two curves in the figure) corresponding to uniform poloidal flux and
uniform poloidal arc length for EAST equilibrium shot 13606 at 7.1s (left) (G-file name: g013606.07104) and shot
38300 at 3.9s (right) (G-file name: g038300.03900).
0.4
0.35
0.3
|∇ψ|
0.25
0.2
0.15
0.1
0.05
0
π/2
π
θ
3π/2
2π
Figure 10: |∇Ψ| as a function of the poloidal angle. The different lines corresponds to the values of |∇Ψ| on
different magnetic surfaces. The stars correspond to the values on the boundary magnetic surface while the plus
signs correspond to the value on the innermost magnetic surface (the magnetic surface adjacent to the magnetic
axis). The equilibrium is for EAST shot 38300 at 3.9s.
6.2
Magnetic surface average operator
Define the magnetic surface average operator
R
Gd3 V
∆Ψ
R
hGi ≡ lim
,
∆Ψ→0
d3 V
∆Ψ
(205)
where the volume integration is over the small volume between two adjacent flux surfaces with Ψ difference being
△Ψ. The differential volume element can be written as
d3 V = Rdφ
dΨ
dlp .
|∇Ψ|
(206)
dΨ
dlp
Bp
(207)
Using Bp = |∇Ψ|/R, the volume element is written as
d3 V = dφ
28
0.25
2.2
2.1
0.2
2
1.9
Bφ(Tesla)
Bp(Tesla)
0.15
0.1
1.8
1.7
1.6
1.5
0.05
1.4
0
π/2
π
θ
1.3
3π/2
2π
π/2
π
θ
3π/2
2π
Figure 11: The Poloidal magnetic field Bp = |∇Ψ|/R (left) and toroidal magnetic field Bφ = g/R (right) as a
function of the poloidal angle. The different lines corresponds to the values on different magnetic surfaces. The
stars correspond to the values on the boundary magnetic surface while the plus signs correspond to the value on the
innermost magnetic surface (the magnetic surface adjacent to the magnetic axis). The equilibrium is for EAST shot
38300 at 3.9s.
0
-2
-4
-6
-8
-10
-12
-14
-16
-18
π/2
π
3π/2
2π
Figure 12: Equal-arc Jacobian as a function of the poloidal angle on different magnetic surfaces. The dotted line
corresponds to the values of Jacobian on the boundary magnetic surface. The equilibrium is for EAST shot 38300
at 3.9s.
Using this, the flux average defined in Eq. (205) can be written as
R
Gdφ dΨ
Bp dlp
∆Ψ
hGi =
lim R
dΨ
∆Ψ→0
dφ Bp dlp
∆Ψ
R
2π ∆Ψ G dΨ
Bp dlp
R
=
lim
dΨ
∆Ψ→0 2π
dl
∆Ψ Bp p
H
1
2πdΨ G Bp dlp
H
=
2πdΨ B1p dlp
H
G B1 dlp
H 1p
.
=
Bp dlp
29
(208)
0.7
0.6
|∇ψ|
0.5
0.4
0.3
0.2
0.1
0
π/2
π
θ
3π/2
2π
Figure 13: |∇Ψ| as a function of the poloidal angle. The different lines corresponds to values of |∇Ψ| on different
magnetic surfaces. The stars correspond to the values of |∇Ψ| on the boundary magnetic surface while the plus signs
correspond to the value on the innermost magnetic surface (the magnetic surface adjacent to the magnetic axis).
The equilibrium is a Solovev equilibrium.
-0.75
-0.8
-0.85
-0.9
-0.95
-1
-1.05
-1.1
-1.15
-1.2
-1.25
-1.3
π/2
π
3π/2
2π
Figure 14: Jacobian on different magnetic surfaces as a function of the poloidal angle. The equilibrium is a Solovev
equilibrium and the Jacobian is a equal-arc Jacobian. The stars correspond to the values of Jacobian on the
boundary magnetic surface while the plus signs correspond to the value on the innermost magnetic surface (the
magnetic surface adjacent to the magnetic axis).
(Equation (208) is used in the GTAW code to calculate the magnetic surface averaging.) Using Eq. (178) and
Bp = |∇Ψ|/R, equation (208) can also be written as
R 2π
G|J |dθ
hGi = R0 2π
.
(209)
|J |dθ
0
Noting that the Jacobian does not change sign, the above equation is written as
R 2π
GJ dθ
.
hGi = R0 2π
J dθ
0
(210)
Using the expression of the volume element dτ = |J |dθdφdψ, the volume within a magnetic surface is written
Z
Z
Z ψ Z 2π
|J |dθdψ.
(211)
V (ψ) = dτ = |J |dθdφdψ = 2π
ψ0
Using this, the differential of V with respect to ψ is written as
Z 2π
dV
V′ ≡
|J |dθ.
= 2π
dψ
0
30
0
(212)
Using this, Eq. (209) is written as
hGi =
6.3
2π
V′
Z
2π
G|J |dθ
0
(213)
Flux Surface Functions
Next, examine the meaning of the following volume integral
Z
D(ψ) ≡
B · ∇θdτ,
(214)
V
where the volume V = V (ψ), which is the volume within the magnetic surface labeled by ψ. Using ∇ · B = 0, the
quantity D can be further written as
Z
D=
∇ · (θB)dτ.
(215)
V
Note that θ is not a single-value function of the spacial points. In order to evaluate the integration in Eq. (215),
we need to select one branch of θ, which can be chosen to be 0 6 θ < 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 (215) is written as
Z
Z
Z
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
Z
Z
D =
θB · dS +
θB · dS + 0
S1
S2
Z
Z
=
0B · dS +
2πB · dS
S1
S2
Z
B · dS.
(216)
= 2π
S2
Eq. (216) indicates that D is 2π times the magnetic flux through the S2 surface. Thus, the poloidal flux through
S2 is written as
Z
1
1
D=
B · ∇θdτ.
(217)
Ψp =
2π
2π V
Using the expression of the volume element dτ = |J |dθdφdψ, Ψp can be further written in terms of flux surface
averaged quantities.
Z
1
B · ∇θ|J |dθdφdψ
Ψp =
2π V
Z 2π
Z ψ
B · ∇θ|J |dθ
dψ
=
0
0
=
Z
ψ
dψ
0
Z
2π
Ψ′ ∇ψ × ∇φ · ∇θ|J |dθ
0
= − sign(J )
Z
ψ
dψ
0
= −2π sign(J )
Z
ψ
Z
2π
Ψ′ (ψ)dθ
0
Ψ′ (ψ)dψ
0
= −2π sign(J )[Ψ(ψ) − Ψ(0)].
(218)
Note that the sign of the Jacobian appears in Eq. (218), 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. (218) is exactly consistent with that in Eq. (19).
31
Similarly, the toroidal flux within a flux surface is written as
Z
1
Ψt =
B · ∇φdτ,
2π V
(219)
the poloidal current within a flux surface is written as
K(ψ) =
1
2π
Z
V
J · ∇θdτ,
(220)
J · ∇φdτ.
(221)
and toroidal current within a flux surface is written as
I(ψ) =
1
2π
Z
V
(**check**)The toroidal magnetic flux is written as
Ψt
Z
1
=
B · ∇φ|J |dθdφdψ
2π
Z 2π
Z ψ
1
g 2 |J |dθ
dψ
=
R
0
0
Z ψ ′ V
1
g
dψ.
=
2π R2
0
V′
1
′
⇒ Ψt = g
2π R2
dΨt
1
1
⇒
=g
dV
2π R2
dΨ
1
g 1
⇒
.
=
dV
2πq 2π R2
(222)
(223)
Next, calculate the derivative of the toroidal flux with respect to the poloidal flux.
dΨt
dΨp
=
Ψ′t
Ψ′p
=
−
gV ′
(2π)2 Ψ′
1
R2
,
(224)
Comparing this result with Eq. (402) indicates that it is equal to the safety factor, i.e.,
dΨt
= q(ψ).
dΨp
− sgn(J )
(225)
V′ g
hR−2 i
(2π)2 Ψ′
By using the contravariant representation of current density (278), the poloidal current within a magnetic surface is
written as
Z
1
J · ∇θJ dθdφdψ
K(ψ) =
2π
Z
1
(−g ′ )∇φ × ∇ψ · ∇θJ dθdψ
=
µ0
Z
1
g ′ dθdψ
= −
µ0
Z
2π ψ ′
= −
g dψ
µ0 0
2π
(226)
= − [g(ψ) − g(0)].
µ0
32
Note that the poloidal current is proportional to g, which explains why g is sometimes called poloidal current function
in tokamak literatures.
"
#
′ J
′ J
2
− Ψ 2 |∇ψ|
+ Ψ 2 ∇ψ · ∇θ
∇ψ × ∇θ − g ′ ∇φ × ∇ψ,
R
R
ψ
θ
The toroidal current is written as
Z
1
J · ∇φJ dθdφdψ
Iφ (ψ) =
2π
#
Z "
1
′ J
′ J
2
= −
Ψ 2 |∇ψ|
+ Ψ 2 ∇ψ · ∇θ
∇ψ × ∇θ · ∇φJ dθdφdψ
2πµ0
R
R
ψ
θ
#
Z "
1
′ J
′ J
2
Ψ 2 |∇ψ|
+ Ψ 2 ∇ψ · ∇θ
dθdψ
= −
µ0
R
R
ψ
θ
#
Z "
1
′ J
2
= −
Ψ 2 |∇ψ|
dθdψ
µ0
R
ψ
Z 2π Z ψ
J
1
dψ Ψ′ 2 |∇ψ|2
dθ
= −
µ0 0
R
0
ψ
Z 2π 1
J
= −
dθ Ψ′ 2 |∇ψ|2 − 0 .
µ0 0
R
(227)
The last equality is due to ∇ψ = 0 at ψ = 0. By using the flux surface average operator, Eq. (227) is written
V ′ Ψ′ |∇ψ|2
.
(228)
Iφ (ψ) = −
2πµ0
R2
Next, calculate another useful surface-averaged quantity,
g2
1 ′
J
1 ′ J
2
+ g Ψ ∇ψ · ∇θ R2
J
g Ψ R2 |∇ψ|
hJ · Bi
θ
ψ
=
2
hB · ∇φi
µ0 hg/R i
R
2π 2π
1 ′ J
J
1 ′
2
2
+ g Ψ ∇ψ · ∇θ R2
V ′ 0 dθg
g Ψ R2 |∇ψ|
θ
ψ
=
µ0 ghR−2 i
R
1 ′
J
1 ′ J
2π 2 2π
2
+
g
dθ
Ψ
|∇ψ|
Ψ
∇ψ
·
∇θ
V′
g
R2
g
R2
0
θ
ψ
=
µ0 ghR−2 i
R 2π
2π
1 ′ J
2
V ′ g 0 dθ
g Ψ R2 |∇ψ|
ψ
=
−2
µ0 hR i
R
2π
2π
1 ′ J
2
V ′ g 0 dθ
g Ψ R2 |∇ψ|
ψ
=
µ0 hR−2 i
The differential with respect to ψ and the integration with respect to θ can be interchanged, yielding
R
i
h
2π
1 ′
2π
Ψ
dθ RJ2 |∇ψ|2
′g
V
g
0
hJ · Bi
ψ
=
hB · ∇φi
µ0 hR−2 i
Ei
D
h
2
1
1 ′ ′ |∇ψ|
g
Ψ
V
′
2
V
g
R
ψ
=
−2
µ0 hR i
′ ′
g
ΨV
|∇ψ|2
=
µ0 V ′ hR−2 i
g
R2
ψ
33
(229)
(230)
7
7.1
Magnetic surface coordinates (ψ, θ, ζ) withgeneral toroidal angle ζ
Definition of the general toroidal angle ζ
In Sec. 5.2.3, we introduced the local safety factor qlocal . Equation (188) indicates that if the Jacobian is chosen to
be of the form J = α(ψ)R2 , where α(ψ) is an arbitrary function of ψ, then the local safety factor is independent of
θ and φ, i.e., magnetic line is straight in (θ, φ) plane. On the other hand, if we want to make field line straight in
(θ, φ) plane, the Jacobian must be chosen to be of the specific form J = α(ψ)R2 . We note that, as mentioned in
Sec. 5.1, the poloidal angle is fully determined by the choice of the Jacobian. The specific choice of J = α(ψ)R2
is usually too restrictive for choosing a desired poloidal angle (for example, the equal-arc poloidal angle can not be
achieved by this choice of Jacobian). Is there any way that we can make the field line straight in a coordinate system
at the same time ensure that the Jacobian can be freely adjusted to obtain desired poloidal angle? The answer is
yes. The obvious way to achieve this is to define a new toroidal angle ζ that generalizes the usual toroidal angle φ.
Define the new toroidal angle ζ as
ζ = φ − q(ψ)δ(ψ, θ),
(231)
where δ is a function of ψ and θ, q is a function of only ψ (note that here q is an arbitrary function, which is not
necessarily the global safety factor). Then the new local safety factor B · ∇ζ/B · ∇θ is written as
B · ∇ζ
B · ∇θ
=
=
=
(∇Ψ × ∇φ + g∇φ) · ∇(φ − qδ)
(∇Ψ × ∇φ + g∇φ) · ∇θ
(∇Ψ × ∇φ + g∇φ) · [∇φ − ∇(qδ)]
(∇Ψ × ∇φ) · ∇θ
2
g|∇φ| + (∇Ψ × ∇φ) · [−∇(qδ)]
.
(∇Ψ × ∇φ) · ∇θ
(232)
In (ψ, θ, φ) coordinates, the above equation is written as
B · ∇ζ
B · ∇θ
=
=
g|∇φ|2 − Ψ′ (∇ψ × ∇φ) ·
h
∂(qδ)
∂θ ∇θ
+
−Ψ′ J −1
g J
∂δ
− ′ 2 −q
Ψ R
∂θ
∂(qδ)
∂ψ ∇ψ
i
(233)
To make the new local safety faction independent of θ, right-hand side of Eq. (233) should also be independent of
θ, i.e.,
g J
∂δ
− ′ 2 −q
= α(ψ),
(234)
Ψ R
∂θ
where α(ψ) is an arbitrary function of ψ. In Ref.[6], α(ψ) is chosen to be equal to q(ψ), i.e., α(ψ) = q(ψ). In this
case, the new local safety factor is equal to q and Eq. (234) is written as
g J
∂δ
=− ′
− 1.
∂θ
Ψ q R2
(235)
Equations (235) is used in GTAW to calculate ∂δ/∂θ. (Note that J in Eq. (235) is the Jacobian of the coordinate
system (ψ, θ, φ), and it happens to be equal to the Jacobian of the new coordinate system (ψ, θ, ζ).) If the function
δ(ψ, θ) used in defining the generalized toroidal angle satisfies Eq. (235), the field line is straight (with slope being
q) on (θ, ζ) plane. In summary, in this method, we make the field line straight by defining a new toroidal angle,
instead of requiring the Jacobian to take particular forms. Thus, the freedom of choosing the form of the Jacobian
is still available to be used later to define a good poloidal angle coordinate.
Equation (235) can be integrated over θ to give
g
δ(ψ, θ) = δ(ψ, 0) − ′
Ψq
Z
θ
0
J
dθ − θ.
R2
(236)
Since there is no other requirements for the ψ dependence of δ, the δ(ψ, 0) can be chosen to be zero. Then the above
equations is written
Z θ
g
J
δ=− ′
dθ − θ,
(237)
Ψ q 0 R2
34
Using the definition of the local safety factor, Eq. (188), the above equation is written
1
δ=
q
Z
θ
0
qlocal dθ − θ.
(238)
For later use, from Eq. (237), we obtain
∂(δq)
∂ψ
=
−
Z θ
Z
J
d g θ J
g ∂
dq
dθ
−
dθ −
θ.
′
2
′
2
dψ Ψ
Ψ ∂ψ 0 R
dψ
0 R
(239)
This formula is used in GTAW code to calculate ∂(δq)/∂q, where the derivative ∂(g/Ψ′ )/∂ψ is calculated numerically
by using the central difference scheme.
7.2
Contravariant form of magnetic field in (ψ, θ, ζ) coordinates
The contravariant form of the magnetic field in (ψ, θ, φ) coordinates is given by Eq. (173), i.e.,
B = −Ψ′ ∇φ × ∇ψ +
g
J ∇ψ × ∇θ.
R2
(240)
Next, we derive the contravariant form of the magnetic field in (ψ, θ, ζ) coordinates. Using the definition of ζ, Eq.
(240) is written as
B =
=
=
=
=
=
g
J ∇ψ × ∇θ
R2
g
−Ψ′ ∇ζ × ∇ψ − Ψ′ ∇(qδ) × ∇ψ + 2 J ∇ψ × ∇θ
R
g
∂qδ
∇θ × ∇ψ + 2 J ∇ψ × ∇θ
−Ψ′ ∇ζ × ∇ψ − Ψ′
∂θ
R
∂δ
g
′
′
−Ψ ∇ζ × ∇ψ + Ψ q
+
J ∇ψ × ∇θ
∂θ Ψ′ R2
−Ψ′ ∇ζ × ∇ψ − qΨ′ ∇ψ × ∇θ
−Ψ′ (∇ζ × ∇ψ + q∇ψ × ∇θ).
−Ψ′ ∇(ζ + qδ) × ∇ψ +
(241)
(242)
Equation (242) is the contravariant form of the magnetic field in (ψ, θ, ζ) coordinates.
7.3
Relation between the partial derivatives in (ψ, θ, φ) and (ψ, θ, ζ) coordinates
Noting the simple fact that
d
d
=
,
dx
d(x + c)
(243)
where c is a constant, we conclude that
∂f
∂ζ
=
ψ,θ
∂f
∂φ
,
(244)
ψ,θ
(since φ = ζ + q(ψ)δ(ψ, θ), where the part q(ψ)δ(ψ, θ) acts as a constant when we hold ψ and θ constant), i.e., the
symmetry property with respect to the new toroidal angle ζ is identical with the one with respect to the old toroidal
angle φ. On the other hand, generally we have
∂f
∂f
6=
(245)
∂ψ θ,ζ
∂ψ θ,φ
and
∂f
∂θ
ψ,ζ
6=
∂f
∂θ
.
(246)
ψ,φ
In the special case that f is axisymmetric (i.e., f is independent of φ in (ψ, θ, φ) coordinates), then two sides of Eqs.
(245) and (246) are equal to each other. Note that the partial derivatives ∂/∂ψ and ∂/∂θ in Sec. 7.1 and 7.2 are
taken in (ψ, θ, φ) coordinates. Because the quantities involved in Sec. 7.1 and 7.2 are axisymmetric, these partial
derivatives are equal to their counterparts in (ψ, θ, ζ) coordinates.
35
7.4
Periodic property of δ(ψ, θ) about θ
Next, we prove that, if δ(ψ, 0) = δ(ψ, 2π), then q appearing in Eq. (242) is equal to qglobal defined by Eq. (190).
Proof: Equation (190) can be written as
Z 2π
B · ∇φ
1
dθ
qglobal =
2π 0 B · ∇θ
Z 2π
1
B · ∇(ζ + qδ)
=
dθ
2π 0
B · ∇θ
Z 2π
Z 2π
1
B · ∇ζ
B · ∇(qδ)
1
=
dθ +
dθ
2π 0 B · ∇θ
2π 0
B · ∇θ
Z 2π
Z 2π
B · ∇(qδ)
1
1
dθ
q(ψ)dθ +
=
2π 0
2π 0
B · ∇θ
Z 2π
1
B · ∇(qδ)
= q+
dθ.
(247)
2π 0
B · ∇θ
The second term in the above equation can be written as
Z 2π
Z 2π
B · ∇(qδ)
B · (q∇δ + δq ′ ∇ψ)
1
1
dθ =
dθ
2π 0
B · ∇θ
2π 0
B · ∇θ
i
h
Z 2π B · q ∂δ ∇θ + (δq ′ + q ∂δ )∇ψ
∂θ
∂ψ
1
=
dθ
2π 0
B · ∇θ
Using Eq. (173), i.e., B = −Ψ′ ∇φ × ∇ψ + g(Ψ) R12 J ∇ψ × ∇θ, the above expression is written as
∂δ −1 Z 2π
Z 2π
−Ψ′ q ∂θ
J
B · ∇(qδ)
1
1
dθ =
dθ
′
−1
2π 0
B · ∇θ
2π 0
−Ψ J
Z 2π
1
∂δ
=
q dθ
2π 0
∂θ
Z 2π
∂δ
1
dθ.
= q
2π 0 ∂θ
1
= q [δ(ψ, 2π) − δ(ψ, 0)].
2π
(248)
Using the assumption that δ(ψ, 0) = δ(ψ, 2π), the above expression is reduced to zero. Therefore Eq. (247) is written
as qglobal = q, which prove what we want.
On the other hand, if q = qglobal , then, by following the same procedures as above, we can prove that δ(ψ, 0) =
δ(ψ, 2π). In my numerical code, the qglobal is read in from G-Eqdsk file and is used to set the value of q in Eqs.
(242) and (231). Thus , q in my code is always equal to qglobal . Thus, it follows that δ function constructed from
Eq. (237) automatically has the periodic property δ(ψ, 0) = δ(ψ, 2π), i.e.,
Z 2π
g
J
0=− ′
dθ − 2π,
(249)
Ψ q 0 R2
(My notes: At first, I thought that if I want to guarantee the periodic property of δ, I must impose some additional
constraint on the Jacobian (specifically the constraint in Eq. (249)). On the other hand, I found numerically that
the Jacobian constructed in the code happens to guarantee the periodic property of δ when I do not impose any
additional constraint on it. Now I realize that this is not a coincidence: it is always valid since in my numerical code
q is always equal to qglobal . It took me a whole day to finally resolve this issue.)
7.5
Steps to construct a straight-line flux coordinate system
In Sec. 6, we have provided the steps to construct the magnetic surface coordinate system (ψ, θ, φ). Only one
additional step is needed to construct the straight-line flux coordinate system (ψ, θ, ζ). The additional step is to
calculate the generalized toroidal angle ζ according to Eq. (231), where δ is obtained from Eq. (237). This step
introduces the new toroidal angle ζ and thus introduces a new magnetic surfaces coordinate system (ψ, θ, ζ), which
is a straight-line flux coordinate system. Also note that the Jacobian of (ψ, θ, ζ) coordinates happens to be equal to
that of (ψ, θ, φ) coordinates.
36
7.6
Form of operator B · ∇ in (ψ, θ, ζ) coordinate system
The usefulness of the contravariant form [Eq. (242] of the magnetic field lies in that it allows direct writing out the
form of B · ∇ operator in a coordinate system. (The operator B0 · ∇ is usually called magnetic differential operator.)
In (ψ, θ, ζ) coordinate system, by using the contravariant form Eq. (242), the operator is written as
B · ∇f
=
=
−Ψ′ (∇ζ × ∇ψ) · ∇f (ψ, θ, ζ) − Ψ′ q(∇ψ × ∇θ) · ∇f (ψ, θ, ζ)
∂
∂
′ −1
f.
+q
−Ψ J
∂θ
∂ζ
(250)
Next, consider the solution of the magnetic differential equation, which is given by
B · ∇f = h.
(251)
where h = h(ψ, θ, ζ) is some known function. Using Eq. (250), the magnetic differential equation is written as
∂
1
∂
f = − ′ J h(ψ, θ, ζ).
+ q(ψ)
(252)
∂θ
∂ζ
Ψ
Note that the coefficients before the two partial derivatives of the above equation are all independent of θ and ζ. This
indicates that different Fourier harmonics in θ and ζ are decoupled. As a result of this fact, if f and the right-hand
side of the above equation are Fourier expanded respectively as (note that, following the convention adopted in
tokamak literatures[6], the Fourier harmonics are chosen to be ei(mθ−nζ) , instead of ei(mθ+nζ) )
X
f (ψ, θ, ζ) =
fmn (ψ)ei(mθ−nζ) ,
(253)
m,n
and
−
X
1
J
h(ψ,
θ,
ζ)
=
γmn (ψ)ei(mθ−nζ) ,
Ψ′
m,n
(254)
then Eq. (252) can be readily solved to give
γmn
.
(255)
i[m − nq]
The usefulness of the straight line magnetic coordinates (ψ, θ, ζ) lies in that, as mentioned in the above, it makes
the coefficients before the two partial derivatives both independent of θ and ζ, thus, allowing a simple solution to
the magnetic differential equation.
Equation (255) indicates that there is a resonant response to a perturbation ei(mθ−nζ) on a magnetic surface with
m − nq = 0. Therefore, the magnetic surface with q = m/n is called the “resonant surface” for the perturbation
ei(mθ−nζ) . The phase change of the perturbation along a magnetic field is given by m∆θ −n∆ζ, which can be written
as ∆θ(m − nq). Since m − nq = 0 on a resonant surface, the above formula indicates that there is no phase change
along a magnetic field line on a resonant surface, i.e., the parallel wavenumber kk is zero on a resonant surface.
Next, we discuss a new poloidal angle often used in the tearing mode theory, which is defined by
n
(256)
χ = θ − ζ.
m
Then it is ready to verify that the Jacobian of (ψ, χ, ζ) coordinates is equal to that of (ψ, θ, ζ) coordinates [proof:
(J ′ )−1 = ∇ψ × ∇χ · ∇ζ = ∇ψ × ∇(θ − nζ/m) · ∇ζ = ∇ψ × ∇θ · ∇ζ = J −1 ]. The component of B along ∇χ direction
(a covariant component) is written
fmn =
B (χ)
≡
=
=
=
=
B · ∇χ
−Ψ′ (∇ζ × ∇ψ + q∇ψ × ∇θ) · ∇(θ − nζ/m)
n
−Ψ′ (∇ζ × ∇ψ · ∇θ) + Ψ′ (q∇ψ × ∇θ · ∇ζ)
m
n
−Ψ′ J −1 + Ψ′ qJ −1
n m
′ −1
q −1 .
ΨJ
m
(257)
At the resonant surface q = m/n, Eq. (257) implies B (χ) = 0. On the other hand, the covariant component of B in
θ direction is written
B (θ)
≡
=
=
=
B · ∇θ
−Ψ′ (∇ζ × ∇ψ + q∇ψ × ∇θ) · ∇θ
−Ψ′ ∇ζ × ∇ψ · ∇θ
−Ψ′ J −1 .
37
(258)
Using (??), equation (257) is written
n B (χ) = B (θ) 1 − q .
m
(259)
In the cylindrical limit, J is a constant independent of the poloidal angle. Then Eq. (258) indicates that B (θ) is
also a constant on a magnetic surface.
7.7
Covariant form of magnetic field in (ψ, θ, ζ) coordinate system
In the above, we have given the covariant form of the magnetic field in (ψ, θ, φ) coordinates (i.e., Eq. (174)). Next,
we derive the corresponding form in (ψ, θ, ζ) coordinate. In order to do this, we need to express the ∇φ basis vector
in terms of ∇ψ, ∇θ, and ∇ζ basis vectors. Using the definition of the generalized toroidal angle, we obtain
g∇φ
=
g∇(ζ + qδ)
=
g∇ζ + gq∇δ + gδ∇q
∂δ
∂δ
g∇ζ + gq
∇ψ +
∇θ + gδq ′ ∇ψ
∂ψ
∂θ
∂δ
∂δ
′
gq
+ gδq ∇ψ + gq ∇θ + g∇ζ
∂ψ
∂θ
∂δ
∂(qδ)
∇ψ + gq ∇θ + g∇ζ.
g
∂ψ
∂θ
=
=
=
Using Eq. (260), the covariant form of the magnetic field, Eq. (174), is written as
∂δ
∂(qδ)
J
J
∇ψ + gq
− Ψ′ 2 |∇ψ|2 ∇θ + g∇ζ.
B = Ψ′ 2 ∇ψ · ∇θ + g
R
∂ψ
∂θ
R
The expression (261) can be further simplified by using the equation (??) to eliminate ∂δ/∂θ, which gives
2
g
J
∂(qδ)
R2
J
B =
Ψ′ 2 ∇ψ · ∇θ + g
∇ψ + − ′ − gq
− Ψ′ |∇ψ|2
∇θ + g∇ζ
R
∂ψ
Ψ
J
R2
2
g + |∇Ψ|2
∂(qδ)
R2 J
J
∇ψ + −
−
gq
∇θ + g∇ζ.
=
Ψ′ 2 ∇ψ · ∇θ + g
R
∂ψ
Ψ′
J
R2
Using B02 = (|∇Ψ|2 + g 2 )/R2 , the above equation is written as
B02 R2
∂(qδ)
R2 J
′ J
∇ψ + −
− gq
∇θ + g∇ζ
B =
Ψ 2 ∇ψ · ∇θ + g
R
∂ψ
Ψ′
J
R2
B2
∂(qδ)
J
∇ψ + − 0′ J − gq ∇θ + g∇ζ.
=
Ψ′ 2 ∇ψ · ∇θ + g
R
∂ψ
Ψ
(260)
(261)
(262)
(263)
Equation (263) is the covariant form of the magnetic field in (ψ, θ, ζ) coordinate system. For the particular choice
of the radial coordinate ψ = −Ψ and the Jacobian J = α(ψ)/B02 , Eq. (263) reduces to
∂(qδ)
J
∇ψ + I(ψ)∇θ + g∇ζ,
(264)
B = − 2 ∇ψ · ∇θ + g
R
∂ψ
with I(ψ) = α(ψ) − gq. The magnetic field expression in Eq. (264) frequently appears in tokamak literatures.
7.8
Form of operator (B × ∇ψ/B 2 ) · ∇ in (ψ, θ, ζ) coordinate system
In solving the MHD eigenmode equations in toroidal geometries, besides the B · ∇ operator, we will also encounter
another surface operator (B × ∇ψ/B 2 ) · ∇. Next, we derive the form of the this operator in (ψ, θ, ζ) coordinate
system. Using the covariant form of the equilibrium magnetic field [Eq. (263)], we obtain
B × ∇ψ
B2
1
g
−
=
J
−
gq
∇θ × ∇ψ + 2 ∇ζ × ∇ψ.
(265)
B2
B2
Ψ′
B
38
Using this, the (B × ∇ψ/B 2 ) · ∇ operator is written as
2
B × ∇ψ
1
B
g
∂
∂
·
∇
=
J
+
gq
J −1
+ 2 J −1
B2
B 2 Ψ′
∂ζ
B
∂θ
1
J −1
J −1 ∂
∂
=
+
g
q
+
g
,
Ψ′
B2
∂ζ
B 2 ∂θ
(266)
(267)
which is the form of the operator in (ψ, θ, ζ) coordinate system.
Examining Eq. (267), we find that if the Jacobian J is chosen to be of the form J = α(ψ)/B 2 , where α is some
magnetic surface function, then the coefficients before the two partial derivatives will be independent of θ and ζ.
It is obvious that the independence of the coefficients on θ and ζ will be advantageous to some applications. The
coordinate system (ψ, θ, ζ) with the particular choice of J = α(ψ)/B 2 is called the Boozer coordinates, named after
A.H. Boozer, who first proposed this choice of the Jacobian. The usefulness of the new toroidal angle ζ is highlighted
in Boozer’s choice of the Jacobian, which makes both B · ∇ and (B × ∇ψ/B 2 ) · ∇ be a constant-coefficient differential
operator. For other choices of the Jacobian, only the B · ∇ operator is a constant-coefficient differential operator.
7.9
Radial differential operator
In solving the MHD eigenmode equations in toroidal geometry, we also need the radial differential operator ∇ψ · ∇.
Next, we derive the form of the operator in (ψ, θ, ζ) coordinates. Using
∇f =
∂f
∂f
∂f
∇ψ +
∇θ +
∇ζ,
∂ψ
∂θ
∂ζ
the radial differential operator is written as
∇ψ · ∇f
=
=
=
=
=
=
∂f
∂ψ
∂f
|∇ψ|2
∂ψ
∂f
|∇ψ|2
∂ψ
∂f
|∇ψ|2
∂ψ
∂f
|∇ψ|2
∂ψ
∂f
|∇ψ|2
∂ψ
|∇ψ|2
∂f
∂θ
∂f
+ (∇θ · ∇ψ)
∂θ
∂f
+ (∇θ · ∇ψ)
∂θ
∂f
+ (∇θ · ∇ψ)
∂θ
∂f
+ (∇θ · ∇ψ)
∂θ
∂f
+ (∇θ · ∇ψ)
∂θ
+ (∇θ · ∇ψ)
+ (∇ζ · ∇ψ)
∂f
∂ζ
+ {∇[φ − qδ(ψ, θ)] · ∇ψ}
− ∇[qδ] · ∇ψ
∂f
∂ζ
∂f
∂ζ
∂f
− [q∇δ + δ∇q] · ∇ψ
∂ζ
∂δ
∂f
∂δ
′
− q
∇ψ +
∇θ + δq ∇ψ · ∇ψ
∂ψ
∂θ
∂ζ
∂δ
∂(qδ)
∂f
−
|∇ψ|2 + q ∇θ · ∇ψ
,
∂ψ
∂θ
∂ζ
(268)
where ∂(qδ)/∂ψ and q∂δ/∂θ are given respectively by Eqs. (239) and (??). Using the above formula, ∇ψ · ∇ζ is
written as
∂(qδ)
∂δ
∇ψ · ∇ζ = −
|∇ψ|2 + q ∇θ · ∇ψ .
(269)
∂ψ
∂θ
This formula is used in GTAW.
7.10
Field-aligned coordinates
The magnetic field in Eq. (242) can be further written
B = −Ψ′ ∇(ζ − qθ) × ∇ψ.
(270)
Define a new coordinate α ≡ ζ − qθ. Then in the new coordinate system (ψ, θ, α), the magnetic field in Eq. (270)
is written
B = −Ψ′ ∇α × ∇ψ,
(271)
which is called the Clebsch form. Using Eq. (271), the magnetic differential operator B · ∇ is written
B · ∇f = −Ψ′
39
1 ∂
f,
J ∂θ
(272)
where J = (∇ψ × ∇θ · ∇α)−1 is the Jacobian of the coordinate system (ψ, θ, α), which happens to be equal to
the Jacobian of (ψ, θ, ζ) coordinates. Equation (272) implies that the partial derivative ∂/∂θ in this case is just
the directional derivative along a magnetic filed line. Due to this fact, (ψ, θ, α) coordinates are usually called
“field-aligned coordinates” or “field-line-following coordinates”[1, 4]. Turbulence in tokamak plasmas usually has
kk ≪ k⊥ , where kk and k⊥ are the parallel and perpendicular wavenumbers, respectively. Due to this elongated
structure along the parallel direction, one can use less grids in the parallel direction than in the perpendicular
direction in turbulence simulation. In this case, the field-aligned coordinates (ψ, θ, α) provide suitable coordinates
to be used in the simulation.
Equation (270) implies that B · ∇α = 0, i.e., α is constant along a magentic field line. A magnetic line on an
irrational surface seems to sample all the points on the surface. This seems to indicate that α is a flux surface
label for irrational surface. However, α must be a non-flux-surface-function so that it can provide a suitable toroidal
coordinate. I had once been confused by this conflict for a long time. The key point to resolve this confusion is
to realize that it is wrong to say there is only one magnetic line on an irrational surface, i.e. it is wrong to say a
magnetic line on an irrational surface samples all the points on the surface. There are still inifite number of magnetic
field lines that can not be connected with each other on an irrational surface. Then the fact B · ∇α = 0 does not
imply that α must be the same on these different magnetic field lines. In fact, although B · ∇α = 0, the gradient of
α along the perpendicular direction on a flux-surface is nonzero, i.e., B × ∇ψ · ∇α 6= 0. [Proof:
B × ∇ψ · ∇α
=
=
=
6=
Ψ′ (∇ψ × ∇α) × ∇ψ · ∇α
Ψ′ [|∇ψ|2 ∇α − (∇α · ∇ψ)∇ψ] · ∇α
Ψ′ [|∇ψ|2 |∇α|2 − (∇α · ∇ψ)2 ]
0,
(273)
where the last non-equality is due to that ∇α and ∇ψ are usually not orthgonal to each other. If ∇α and ∇ψ are
orthgonal to each other, then (ψ, θ, α) coordinates seem to be not good coordinates] This indicates that α is not
constant on a flux-surface.
It is easy to realize that direction of the various basis vectors are as follows
∂r
|ψ,θ −→ usual toroidal direction
∂α
∂r
|ψ,α −→ field line direction
∂θ
∂r
|θ,α −→ radial and toroidal
∂ψ
In the above, sine ζ is a generalized toroidal angle that makes the magnetic field line straight on (θ, ζ) plane, the
magnetic field lines on (θ, α) are also straight. We can also define a field-aligned coordinates that are not necessarily
straight on (θ, α) plane. The definition of α of this kind field-aligned corrdinates is given by
!
Z θ
r0
B · ∇φ
dθ + φ = (qθf + φ).
(274)
α=
q0
0 B · ∇θ
(check** In the practical use of the field-aligned coordinates, the θ coordinate, which is along the magnetic field
line, can not be infinite, i.e., we can not follow a magnetic field for infinite distance. It must be truncated into a
finite interval.
[check** may be wrong. **Next, I explain the practical use of the field-aligned coordinates in the flux-tube
turbulence simulations. The flux-tube means a region that is in the vicinity of a magnetic line and follows the
magnetic field line. On every magnetic surface, the width of the flux-tube is determined by the width of α coordinate.
We follow the magnetic field line for a distance longer than the 2π/kk and choose the width of α so that the
perpendicular width of the flux tube on a magnetic surface is much larger than the perpendicular wavelength of the
turbulence. Then we can use the periodic condtion at α = αmin and α = αmax where [αmin , αmax ] is the width of α
coordinate chosen by us.)**]
7.11
Other expressions for magnetic field
The expression of the magnetic field in Eq. (242) can be rewritten in terms of the flux function Ψp and Ψt discussed
in Sec. 6.3. Equation (242) is
B = ∇Ψ × ∇ζ + q∇θ × ∇Ψ,
(275)
40
which, by using Eq. (218), i.e., ∇Ψ = ∇Ψp /(2π), is rewritten as
B=
1
(∇ζ × ∇Ψp + q∇Ψp × ∇θ),
2π
(276)
which, by using Eq. (225), i.e., q = dΨt /dΨp , is further written as
B=
7.12
1
(∇ζ × ∇Ψp + ∇Ψt × ∇θ).
2π
(277)
Expression of current density
Let us derive the contravariant expression for the current density. Using
µ0 J = ∇ × B,
along with magnetic field expression (174) and the curl formula (136), we obtain
"
#
′ J
′ J
2
µ0 J = − Ψ 2 |∇ψ|
+ Ψ 2 ∇ψ · ∇θ
∇ψ × ∇θ − g ′ ∇φ × ∇ψ,
R
R
ψ
θ
(278)
which is the contravariant form of the current density vector. Next, for later use, calculate the parallel current. By
using Eqs. (174) and (278), the parallel current density is written as
"
#
J
′ J
2
′ J
+ Ψ 2 ∇ψ · ∇θ
g∇ψ × ∇θ · ∇φ − g ′ −Ψ′ 2 |∇ψ|2 ∇φ × ∇ψ · ∇θ
µ0 J · B = − Ψ 2 |∇ψ|
R
R
R
ψ
θ
"
#
J
J
J
= − Ψ′ 2 |∇ψ|2
+ Ψ′ 2 ∇ψ · ∇θ
gJ −1 + g ′ J −1 Ψ′ 2 |∇ψ|2
R
R
R
ψ
θ
)
( 1
g′ ′ J
1
′ J
′ J
2
2
2 −1
Ψ 2 |∇ψ|
Ψ 2 ∇ψ · ∇θ − 2 Ψ 2 |∇ψ|
+
= −g J
g
R
g
R
g
R
ψ
θ
"
#
Ψ′ J
Ψ′ J
2
= −g 2 J −1
+
|∇ψ|
∇ψ · ∇θ
.
(279)
g R2
g R2
ψ
θ
8
Grad-Shafranov equation in (r, θ) coordinates
Consider (r, θ) coordinates, which are related to the cylindrical coordinates (R, Z) by Z = r sin θ and R = R0 +r cos θ,
as shown in Fig. 15.
Next, we transform the GS equation from (R, Z) coordinates to (r, θ) coordinates. Using the relations R =
R0 + r cos θ and Z = r sin θ, we have
r=
p
sin θ = p
⇒
(R − R0 )2 + Z 2 ⇒
Z
(R − R0 )2 + Z 2
∂r
Z
=
= sin θ
∂Z
r
⇒ cos θ
r − Z Zr
∂θ
.
=
∂Z
r2
r − Z Zr
1 − sin2 θ
cos2 θ
∂θ
=
=
=
∂Z
r(R − R0 )
R − R0
R − R0
r − Z Zr
∂ sin θ
1 − sin2 θ
cos2 θ
=
=
=
∂Z
r2
r
r
The GS equation in (R, Z) coordinates is given by
dP
1 ∂Ψ
∂
dg
∂2Ψ
= −µ0 R2
+
R
−
g(Ψ).
2
∂Z
∂R R ∂R
dΨ dΨ
41
(280)
(281)
(282)
(283)
(284)
Z
R = R0 + r cosθ
Z = r sinθ
r
R0
R
θ
Figure 15: The relation between (r, θ) and (R, Z) coordinates.
The term ∂Ψ/∂Z is written as
∂Ψ
∂Z
=
=
∂Ψ ∂r
∂Ψ ∂θ
+
∂r ∂Z
∂θ ∂Z
∂Ψ
∂Ψ cos2 θ
sin θ +
.
∂r
∂θ R − R0
Using Eq. (285), ∂ 2 Ψ/∂Z 2 is written as
∂2Ψ
∂Ψ
∂Ψ cos2 θ
∂
∂
=
sin
θ
+
∂Z 2
∂Z ∂r
∂Z ∂θ R − R0
∂Ψ ∂
∂Ψ ∂
∂Ψ
∂Ψ
cos2 θ
cos2 θ ∂
∂
+
+
(sin θ) +
= sin θ
∂Z ∂r
∂r ∂Z
R − R0 ∂Z ∂θ
∂θ ∂Z R − R0
2
2
2
2
2
2
∂ Ψ cos θ
∂Ψ cos θ
cos θ
∂ 2 Ψ cos2 θ
∂ Ψ
∂ Ψ
sin
θ
+
+
+
sin
θ
+
= sin θ
∂r2
∂r∂θ R − R0
∂r r
R − R0 ∂θ∂r
∂θ2 R − R0
1
cos2 θ
∂Ψ
2 cos θ sin θ
−
∂θ R − R0
R − R0
∂r
R − R0
∂ p
(R − R0 )2 + Z 2 =
=
= cos θ
∂R
∂R
r
Z
.
sin θ = p
(R − R0 )2 + Z 2
R − R0
∂θ
= −Z
∂R
r3
∂θ
Z
= − 2.
∂R
r
R − R0
cos θ = p
(R − R0 )2 + Z 2
(285)
(286)
(287)
cos θ
r−
∂
cos θ =
∂R
R−R0
(R
r
2
r
− R0 )
42
=
1 − cos2 θ
sin2 θ
=
r
r
(288)
(289)
R
∂
∂R
1 ∂Ψ
R ∂R
=
=
=
=
=
=
−
∂
1 ∂Ψ ∂r
∂Ψ ∂θ
+
∂R R ∂r ∂R
∂θ ∂R
∂
1 ∂Ψ
∂Ψ Z
R
cos θ −
∂R R ∂r
∂θ r2
∂Ψ
1
∂
∂Ψ Z
∂Ψ
∂Ψ Z
+
R
−
cos θ −
cos
θ
−
∂R ∂r
∂θ r2
∂r
∂θ r2
R2
2
∂Ψ ∂
1 ∂Ψ
Z
∂ 2 Ψ ∂θ
∂ 2 Ψ ∂θ Z
∂Ψ ∂
∂Ψ Z
∂ 2 Ψ ∂r
∂ Ψ ∂r
cos
θ
+
−
+
cos
θ
−
+
−
cos
θ
−
∂r2 ∂R ∂r∂θ ∂R
∂r ∂R
∂θ∂r ∂R
∂θ2 ∂R r2
∂θ ∂R r2
R ∂r
∂θ r2
2
∂ Ψ
∂Ψ sin2 θ
∂2Ψ Z
∂Ψ 1
1 ∂Ψ
∂2Ψ Z Z
∂Ψ Z
∂2Ψ
cos θ +
cos θ −
+
−
cos θ −
Z 2 cos θ −
cos θ −
∂r2
∂r∂θ r2
∂r r
∂θ∂r
∂θ2 r2 r2
∂θ r3
R ∂r
∂θ r2
R
∂ 2 Ψ sin2 θ
∂2Ψ Z
∂Ψ sin2 θ ∂Ψ 1
∂2Ψ
2
cos
θ
+
−
2
cos
θ
+
+
Z 2 cos θ
2
2
∂r
∂θ2 r2
∂r r
∂θ r3
∂r∂θ r
1 ∂Ψ
∂Ψ 1
cos θ −
sin θ
R ∂r
∂θ r
(290)
(291)
Sum of the expression on r.h.s of Eq. (286) and the expression on line (290) can be reduced to
∂ 2 Ψ ∂Ψ 1
1 ∂2Ψ
+
+
∂r2
∂r r
r2 ∂θ2
(292)
Using these, the GS equation is written as
1 ∂2Ψ
1
∂ 2 Ψ ∂Ψ 1
+
+ 2
−
2
∂r
∂r r
r ∂θ2
R0 + r cos θ
∂Ψ
∂Ψ 1
cos θ −
sin θ
∂r
∂θ r
= −µ0 (R0 + r cos θ)2
dg
dP
−
g(Ψ),
dΨ dΨ
which can be arranged in the form
1
∂Ψ
1 ∂2
∂Ψ 1
dg
dP
1 ∂ ∂
Ψ−
r
+
cos θ −
sin θ = −µ0 (R0 + r cos θ)2
−
g(Ψ),
r ∂r ∂r r2 ∂θ2
R0 + r cos θ ∂r
∂θ r
dΨ dΨ
(293)
which agrees with Eq. (3.6.2) in Wessson’s book[12], where f is defined by f = RBφ /µ0 , which is different from
g ≡ RBφ by a 1/µ0 factor.
8.1
Large aspect ratio expansion
Consider the case that the boundary flux surface is circular with radius r = a and the center of the cirle at
(R = R0 , Z = 0). Consider the case ε = a/R0 → 0. Expanding Ψ in the small parameter ε,
Ψ = Ψ0 + Ψ1
(294)
where Ψ0 ∼ O(ε0 ), Ψ1 ∼ O(ε1 ). Substituting Eq. (294) into Eq. (293), we obtain
∂Ψ0
∂Ψ1
1
∂Ψ0 1
1
∂Ψ1 1
1 ∂ ∂Ψ0 1 ∂ ∂Ψ1 1 ∂ 2 Ψ0 1 ∂ 2 Ψ1
r
+
r
+ 2
+
−
cos
θ
−
sin
θ
−
cos
θ
−
sin
θ
= −µ0 (R0 +r c
r ∂r ∂r r ∂r ∂r r ∂θ2 r2 ∂θ2 R0 + r cos θ
∂r
∂θ r
R0 + r cos θ
∂r
∂θ r
Multiplying the above equation by R02 , we obtain
2
∂ ∂Ψ0
R02
1 ∂ ∂Ψ1
1 ∂ 2 Ψ0
2 1 ∂ Ψ1
r
+R02
r
+R02 2
+R
−
0
r ∂r ∂r
r ∂r ∂r
r ∂θ2
r2 ∂θ2 R0 + r cos θ
1
R02
Further assume the following ordering
R0
∂Ψ0
∂Ψ1
∂Ψ0 1
R02
∂Ψ1 1
cos θ −
sin θ −
cos θ −
sin θ = −
∂r
∂θ r
R0 + r cos θ
∂r
∂θ r
(295)
∂Ψ
∼ O(ε−1 )Ψ,
∂r
(296)
and
∂Ψ
∼ O(ε0 )Ψ.
∂θ
Using these orderings, the order of the terms in Eq. (295) can be estimated as
R02
Ψ0
1 ∂ ∂Ψ0
r
∼ 2 ∼ O(ε−2 )
r ∂r ∂r
ε
43
(297)
(298)
R02
1 ∂ ∂Ψ1
Ψ1
r
∼ 2 ∼ O(ε−1 )
r ∂r ∂r
ε
(299)
R02
1
1 ∂ 2 Ψ0
∼ 2 Ψ0 ∼ O(ε−2 )
r2 ∂θ2
ε
(300)
Ψ1
1 ∂ 2 Ψ1
∼ 2 ∼ O(ε−1 )
2
2
r ∂θ
ε
R0
r
≈1−
cos θ
R0 + r cos θ
R0
R02
Ψ0
∂Ψ0
cos θ ∼
∼ O(ε−1 )
∂r
ε
∂Ψ0 1
Ψ0
R0
sin θ ∼
∼ O(ε−1 )
∂θ r
ε
R0
Ψ1
∂Ψ1
cos θ ∼
= O(ε0 )
∂r
ε
Ψ1
∂Ψ1 1
sin θ ∼
= O(ε0 )
R0
∂θ r
ε
R0
(301)
(302)
(303)
(304)
(305)
(306)
The leading order (ε−2 order) balance is given by the following equation:
R02
1 ∂ ∂Ψ0
1 ∂ 2 Ψ0
r
+ R02 2
= −µ0 R04 P ′ (Ψ0 ) − R02 g ′ (Ψ0 )g(Ψ0 ),
r ∂r ∂r
r ∂θ2
(307)
It is reasonable to assume that Ψ0 is independent of θ since Ψ0 corresponds to the limit a/R → 0. (The limit
a/R → 0 can have two cases, one is r → 0, another is R → ∞. In the former case, Ψ must be independent of θ since
Ψ should be single-valued. The latter case corresponds to a cylinder, for which it is reasonable (really?) to assume
that Ψ0 is independent of θ.) Then Eq. (307) is written
1 ∂ ∂Ψ0
r
= −µ0 R02 P ′ (Ψ0 ) − g ′ (Ψ0 )g(Ψ0 ).
r ∂r ∂r
(308)
(My remarks: The leading order equation (308) does not correponds strictly to a cylinder equilibrium because the
magnetic field B = ∇Ψ0 × ∇φ + g∇φ depends on θ.) The next order (ε−1 order) equation is
R02
R02
1 ∂ 2 Ψ1
∂Ψ0
1 ∂ ∂Ψ1
r
+ R02 2
− R0
cos θ = −µ0 R02 2R0 r cos θP ′ (Ψ0 ) − µ0 R04 P ′′ (Ψ0 )Ψ1 − R02 [g ′ (Ψ0 )g(Ψ0 )]′ Ψ1
2
r ∂r ∂r
r ∂θ
∂r
1 ∂ ∂Ψ1
1 ∂ 2 Ψ1
∂Ψ0
r
+ R02 2
+ {µ0 R04 P ′′ (Ψ0 ) + R02 [g ′ (Ψ0 )g(Ψ0 )]′ }Ψ1 = −µ0 R02 2R0 r cos θP ′ (Ψ0 ) + R0
cos θ (309)
2
r ∂r ∂r
r ∂θ
∂r
1 ∂ ∂Ψ1
1 ∂ 2 Ψ1
∂Ψ0
d
dr
r
+ R02 2
+ {µ0 R04 P ′ (Ψ0 ) + R02 g ′ (Ψ0 )g(Ψ0 )}
Ψ1 = −µ0 R02 2R0 r cos θP ′ (Ψ0 ) + R0
cos θ
2
r ∂r ∂r
r ∂θ
dr
dΨ0
∂r
(310)
It is obvious that the simple poloidal dependence of cos θ will satisfy the above equation. Therefore, we consider Ψ1
of the form
dΨ0 (r)
Ψ1 = ∆(r)
cos θ,
(311)
dr
where ∆(r) is a new function to be determined. Substitute this into the Eq. (), we obtain an equation for ∆(r),
R02
1
R02
dΨ0 d∆
1 dΨ0 (r) d
d2 Ψ 0
dr dΨ0 (r)
dΨ0
r
+ r∆ 2 −R02 2 ∆
+ {µ0 R04 P ′ (Ψ0 )+R02 g ′ (Ψ0 )g(Ψ0 )}
∆
= −µ0 R02 2R0 rP ′ (Ψ0 )+R0
dr dr
dr
r
dr
dr
dΨ0
dr
dr
(312)
1
R02
dΨ0 d∆
d2 Ψ 0
1 dΨ0 (r) d
dΨ0
21 d
r
+R0
r∆ 2 −R02 2 ∆
+ {µ0 R04 P ′ (Ψ0 )+R02 g ′ (Ψ0 )g(Ψ0 )}∆ = −µ0 R02 2R0 rP ′ (Ψ0 )+R0
dr dr
r dr
dr
r
dr
dr
dr
(313)
d
r dr
d
r dr
44
2 2
dΨ0 d∆
d Ψ0
1 dΨ0 (r) d
dΨ0
21 d
2 d Ψ0 d∆
r
+∆R0
r
+R
−R02 2 ∆
+ {µ0 R04 P ′ (Ψ0 )+R02 g ′ (Ψ0 )g(Ψ0 )}∆ = −µ0 R02 2R0 rP ′ (Ψ0 )+R0
0
dr dr
r dr
dr2
dr2 dr
r
dr
dr
dr
(314)
2 2
dΨ0 d∆
d Ψ0
1 dΨ0 (r)
d
dΨ0
21 d
2 1 d
2 d Ψ0 d∆
R0
r
+∆R0
r
+R
−
+ {µ0 R04 P ′ (Ψ0 )+R02 g ′ (Ψ0 )g(Ψ0 )}∆ = −µ0 R02 2R0 rP ′ (Ψ0 )+R0
0
r dr
dr dr
r dr
dr2
r2 dr
dr2 dr dr
dr
(315)
Using the identity
2 dΨ0
1 d
d Ψ0
1 dΨ0 (r)
d 1 d
r
=
r
− 2
,
dr r dr
dr
r dr
dr2
r
dr
d
r dr
1
R02
equation () is written as
dΨ0 d∆
dΨ0
d2 Ψ0 d∆ d
1 d
dΨ0
2 d
21 d
r
+∆R0
r
+R02
R0
+ {µ0 R04 P ′ (Ψ0 )+R02 g ′ (Ψ0 )g(Ψ0 )}∆ = −µ0 R02 2R0 rP ′ (Ψ0 )+R0
r dr
dr dr
dr r dr
dr
dr2 dr dr
dr
(316)
Using the leading order equation (), we know that the second and fourth term on the l.h.s of the above equation
cancel each other, giving
dΨ0 d∆
d2 Ψ0 d∆
dΨ0
1 d
r
+ R02
= −µ0 R02 2R0 rP ′ (Ψ0 ) + R0
(317)
R02
2
r dr
dr dr
dr dr
dr
dΨ0 d∆
d2 Ψ0 d∆
1 dΨ0
1 d
r
+
= −µ0 2R0 rP ′ (Ψ0 ) +
(318)
⇒
2
r dr
dr dr
dr dr
R0 dr
Using the identity
" #
2
1 dr d
1 d
dΨ0 d∆
d2 Ψ0 d∆
dΨ0
d∆
r
=
r
+
,
r dΨ0 dr
dr
dr
r dr
dr dr
dr2 dr
(319)
" #
2
1 dΨ0
dΨ0
d∆
1 dr d
r
= −µ0 2R0 rP ′ (Ψ0 ) +
,
r dΨ0 dr
dr
dr
R0 dr
(320)
" #
2
2
1 d
dP
dΨ0
d∆
1 dΨ0
⇒
r
= −µ0 2R0 r
+
,
r dr
dr
dr
dr
R0
dr
(321)
equation (318) is written
Using
Bθ0 =
1 dΨ0
R0 dr
(322)
equation (321) is written
1 dP
B2
1 d
2 d∆
rBθ0
= −µ0 2 r
+ θ0 .
r dr
dr
R0 dr
R0
d
r
dP (Ψ0 )
2 d∆
2
⇒
,
rBθ0
=
−2µ0 r
+ Bθ0
dr
dr
R0
dr
(323)
(324)
which agrees with equation (3.6.7) in Wessson’s book[12].
9
Fixed boundary tokamak equilibrium problem
The fixed boundary equilibrium problem (also called the “inverse equilibrium problem” by some authors) refers to
the case where the shape of a magnetic surface is given and one is asked to solve the equilibrium within this magnetic
surface. To make it convenient to deal with the shape of the boundary, one usually use a general coordinates system
which has one coordinate surface coinciding with the given magnetic surface. This makes it trivial to deal with the
irregular boundary. To obtain the equilibrium, one needs to solve the GS equation in the general coordinate system.
Next we derive the form of the GS equation in a general coordinate system. The main task is to derive the form of
the toroidal elliptic operator in the general coordinate system. The toroidal elliptic operator takes the form
1
∗
2
∇Ψ
(325)
△ Ψ≡R ∇·
R2
45
For an arbitrary general coordinate system (ψ, θ, φ) (the (ψ, θ, φ) coordinate system here is an arbitrary general
coordinate system except that ∇φ is perpendicular to both ∇ψ and ∇θ), the toroidal elliptic operator is written
(
)
R2
J
J
J
J
⋆
2
2
△ Ψ=
Ψψ 2 |∇ψ|
+ Ψθ 2 |∇θ|
+ Ψψ 2 (∇ψ · ∇θ) + Ψθ 2 ∇θ · ∇ψ
,
(326)
J
R
R
R
R
ψ
θ
θ
ψ
where the subscripts denotes partial derivatives, J is the Jacobian of the coordinate system (ψ, θ, φ). [Next, we
provide the proof of Eq. (326). The gradient of Ψ is written as (note that Ψ is independent of φ)
∇Ψ =
∂Ψ
∂Ψ
∇θ +
∇ψ,
∂θ
∂ψ
(327)
which is in the covariant form. To calculate the divergence of ∇Ψ, it is convenient to express ∇Ψ in terms of the
contravariant basis vectors. Using the metric matrix, we obtain
∇ψ = |∇ψ|2 ∇θ × ∇φJ + ∇ψ · ∇θ∇φ × ∇ψJ ,
(328)
∇θ = ∇ψ · ∇θ∇θ × ∇φJ + |∇θ|2 ∇φ × ∇ψJ .
(329)
and
Using these, Eq. (327) is written as
∇Ψ
=
=
Ψθ (∇ψ · ∇θ∇θ × ∇φJ + |∇θ|2 ∇φ × ∇ψJ ) + Ψψ (|∇ψ|2 ∇θ × ∇φJ + ∇ψ · ∇θ∇φ × ∇ψJ )
(Ψθ ∇ψ · ∇θ + Ψψ |∇ψ|2 )∇θ × ∇φJ + (Ψθ |∇θ|2 + Ψψ ∇ψ · ∇θ)∇φ × ∇ψJ
(330)
Using the divergence formula, the elliptic operator in Eq. (325) is written as
1
∇Ψ
△∗ Ψ = R 2 ∇ ·
R2
1
1
2
2
(Ψ
∇ψ
·
∇θ
+
Ψ
|∇ψ|
)∇θ
×
∇φJ
+
(Ψ
|∇θ|
+
Ψ
∇ψ
·
∇θ)∇φ
×
∇ψJ
= R2 ∇ ·
θ
ψ
θ
ψ
R2
R2
J
J
∂
R2 ∂
2
2
(Ψ
∇ψ
·
∇θ
+
Ψ
|∇ψ|
)
+
(Ψ
|∇θ|
+
Ψ
∇ψ
·
∇θ)
,
=
θ
ψ
θ
ψ
J ∂ψ R2
∂θ R2
"
#
R2
J
J
J
J
2
2
=
Ψθ 2 ∇ψ · ∇θ
+ Ψθ 2 |∇θ|
+ Ψψ 2 ∇ψ · ∇θ
,
+ Ψψ 2 |∇ψ|
J
R
R
R
R
ψ
θ
ψ
θ
(331)
which is identical with Eq. (326).]
Using Eq. (326), the GS equation [Eq. (52)] is written
"
#
J
J
J
J
dP
dg
R2
2
2
Ψψ 2 |∇ψ|
+ Ψθ 2 |∇θ|
+ Ψθ 2 ∇ψ · ∇θ
+ Ψψ 2 ∇ψ · ∇θ
= −µ0 R2
−
g, (332)
J
R
R
R
R
dΨ
dΨ
ψ
θ
ψ
θ
which is the form of the GS equation in (ψ, θ, φ) coordinate system.
9.1
Finite difference form of toroidal elliptic operator in general coordinate system
The toroidal elliptic operator in Eq. (326) can be written
△∗ Ψ =
R2 ψψ
[(h Ψψ )ψ + (hθθ Ψθ )θ + (hψθ Ψθ )ψ + (hψθ Ψψ )θ ],
J
(333)
where haβ is defined by Eq. (171), i.e.,
J
∇α · ∇β.
(334)
R2
Next, we derive the finite difference form of the toroidal elliptic operator. The finite difference form of the term
(hψψ Ψψ )ψ is written
1
Ψi,j+1 − Ψi,j
Ψi,j − Ψi,j−1
ψψ
(hψψ Ψψ )ψ |i,j =
hψψ
−
h
i,j−1/2
δψ i,j+1/2
δψ
δψ
hαβ =
=
ψψ
ψψ
Hi,j+1/2
(Ψi,j+1 − Ψi,j ) − Hi,j−1/2
(Ψi,j − Ψi,j−1 ),
46
(335)
where
H ψψ =
hψψ
.
(δψ)2
The finite difference form of (hθθ Ψθ )θ is written
Ψi+1,j − Ψi,j
Ψi,j − Ψi−1,j
1
θθ
θθ
θθ
h
− hi−1/2,j
(h Ψθ )θ |i,j =
δθ i+1/2,j
δθ
δθ
=
θθ
θθ
Hi+1/2,j
(Ψi+1,j − Ψi,j ) − Hi−1/2,j
(Ψi,j − Ψi−1,j ),
where
H θθ =
hθθ
.
(δθ)2
The finite difference form of (hψθ Ψθ )ψ is written as
Ψi+1,j+1/2 − Ψi−1,j+1/2
Ψi+1,j−1/2 − Ψi−1,j−1/2
1
ψθ
ψθ
ψθ
(Ψθ h )ψ i,j =
h
− hi,j−1/2
.
δψ i,j+1/2
2δθ
2δθ
(336)
(337)
(338)
(339)
Approximating the value of Ψ at the grid centers by the average of the value of Ψ at the neighbor grid points, Eq.
(339) is written as
ψθ
ψθ
(Ψθ hψθ )ψ |i,j = Hi,j+1/2
(Ψi+1,j + Ψi+1,j+1 − Ψi−1,j − Ψi−1,j+1 ) − Hi,j−1/2
(Ψi+1,j−1 + Ψi+1,j − Ψi−1,j−1 − Ψi−1,j ).
(340)
where
hψθ
H ψθ =
.
(341)
4δψdθ
Similarly, the finite difference form of (hψθ Ψψ )θ is written as
Ψi+1/2,j+1 − Ψi+1/2,j−1
Ψi−1/2,j+1 − Ψi−1/2,j−1
1
ψθ
hψθ
−
h
(Ψψ hψθ )θ |i,j =
i−1/2,j
δθ i+1/2,j
2δψ
2δψ
=
ψθ
ψθ
Hi+1/2,j
(Ψi+1,j+1 + Ψi,j+1 − Ψi+1,j−1 − Ψi,j−1 ) − Hi−1/2,j
(Ψi,j+1 + Ψi−1,j+1 − Ψi,j−1 − Ψi−1,j−1
(342)
).
Using the above results, the finite difference form of the operator J △⋆ Ψ/R2 is written as
J ∗ △ Ψ
= (hψθ Ψθ )ψ + (hψψ Ψψ )ψ + (hθθ Ψθ )θ + (hψθ Ψψ )θ
R2
i,j
=
+
+
+
=
+
+
+
+
ψψ
ψψ
Hi,j+1/2
(Ψi,j+1 − Ψi,j ) − Hi,j−1/2
(Ψi,j − Ψi,j−1 )
θθ
θθ
Hi+1/2,j
(Ψi+1,j − Ψi,j ) − Hi−1/2,j
(Ψi,j − Ψi−1,j )
ψθ
ψθ
Hi,j+1/2
(Ψi+1,j + Ψi+1,j+1 − Ψi−1,j − Ψi−1,j+1 ) − Hi,j−1/2
(Ψi+1,j−1 + Ψi+1,j − Ψi−1,j−1 − Ψi−1,j )
ψθ
ψθ
(Ψi,j+1 + Ψi−1,j+1 − Ψi−1,j−1 − Ψi,j−1 )
Hi+1/2,j
(Ψi+1,j+1 + Ψi,j+1 − Ψi+1,j−1 − Ψi,j−1 ) − Hi−1/2,j
ψψ
ψψ
θθ
θθ
Ψi,j (−Hi,j+1/2
− Hi,j−1/2
− Hi+1/2,j
− Hi−1/2,j
)
ψθ
ψθ
ψψ
ψθ
ψθ
Ψi−1,j−1 (Hi,j−1/2
+ Hi−1/2,j
) + Ψi,j−1 (Hi,j−1/2
− Hi+1/2,j
+ Hi−1/2,j
)
ψθ
ψθ
ψθ
ψθ
θθ
Ψi+1,j−1 (−Hi,j−1/2
− Hi+1/2,j
) + Ψi−1,j (Hi−1/2,j
− Hi,j+1/2
+ Hi,j−1/2
)
ψθ
ψθ
ψθ
ψθ
θθ
Ψi+1,j (Hi+1/2,j
+ Hi,j+1/2
− Hi,j−1/2
) + Ψi−1,j+1 (−Hi,j+1/2
− Hi−1/2,j
)
ψψ
ψθ
ψθ
ψθ
ψθ
Ψi,j+1 (Hi,j+1/2
+ Hi+1/2,j
− Hi−1/2,j
) + Ψi+1,j+1 (Hi,j+1/2
+ Hi+1/2,j
)
The coefficients are given by
1
J
|∇ψ|2 = (Rθ2 + Zθ2 ),
R2
J
J
1 2
= 2 |∇θ|2 = (Rψ
+ Zψ2 ),
R
J
hψψ =
(343)
hθθ
(344)
and
hψθ =
1
J
∇ψ · ∇θ = − (Rθ Rψ + Zθ Zψ ),
R2
J
47
(345)
where the Jacobian
J = R(Rθ Zψ − Rψ Zθ ).
(346)
The partial derivatives, Rθ , Rψ , Zθ , and Zψ , appearing in Eqs. (343)-(346) are calculated by using the central
difference scheme. The values of hψψ , hθθ , hψθ and J at the middle points are approximated by the linear average
of their values at the neighbor grid points.
9.2
Expression of metric elements of coordinate system (ψ, θ, φ)
To calculate the expression in Eq. (334), we need to calculate the metric elements of the coordinate system (ψ, θ, φ).
Note that, in this case, the coordinate system is (ψ, θ) while R and Z are functions of ψ and θ, i.e.,
R = R(ψ, θ),
(347)
Z = R(ψ, θ).
(348)
Next, we express the elements of the metric matrix in terms of R, Z and their partial derivatives with respect to ψ
and θ. We note that
∇R = R̂ = Rψ ∇ψ + Rθ ∇θ
(349)
∇Z = Ẑ = Zψ ∇ψ + Zθ ∇θ
(350)
From Eqs. (349) and (350), we obtain
We note that
∇ψ =
1
(Zθ R̂ − Rθ Ẑ),
Rψ Zθ − Zψ Rθ
(351)
∇θ =
1
(Zψ R̂ − Rψ Ẑ).
Z ψ Rθ − Rψ Z θ
(352)
∇R × ∇φ · ∇Z =
1
,
R
i.e.,
(Rψ ∇ψ + Rθ ∇θ) × ∇φ · (Zψ ∇ψ + Zθ ∇θ) =
(353)
1
R
⇒ (Rψ ∇ψ × ∇φ + Rθ ∇θ × ∇φ) · (Zψ ∇ψ + Zθ ∇θ) =
1
R
=⇒ J = R(Rθ Zψ − Rψ Zθ )
(354)
1
R
(355)
⇒ Rθ Zψ J −1 − Rψ Zθ J −1 =
(356)
Using this, Eqs. (349) and (350) are written as
∇ψ = −
R
(Zθ R̂ − Rθ Ẑ)
J
(357)
and
R
(Zψ R̂ − Rψ Ẑ).
J
Using Eqs. (357) and (358), the elements of the metric matrix are written as
∇θ =
(358)
|∇ψ|2 =
R2 2
(Z + Rθ2 ),
J2 θ
(359)
|∇θ|2 =
R2 2
2
(Z + Rψ
),
J2 ψ
(360)
and
R2
(Zθ Zψ + Rθ Rψ ).
(361)
J2
Eqs. (359), (360), and (361) can be used to express the elements of the metric matrix in terms of R, Rψ , Rθ , Zψ ,
and Zθ . [Combining the above results, we obtain
∇ψ · ∇θ = −
∇ψ · ∇θ
Z θ Zψ + Rθ Rψ
=−
.
2
|∇ψ|
Zθ2 + Rθ2
48
(362)
Equation (361) is used in GTAW code.] Using the above results, hαβ are written as
hψψ =
1
J
|∇ψ|2 = (Zθ2 + Rθ2 )
2
R
J
1
J
2
|∇θ|2 = (Zψ2 + Rψ
),
R2
J
J
1
= 2 ∇ψ · ∇θ = − (Zθ Zψ + Rθ Rψ )
R
J
hθθ =
hψθ
(363)
(364)
(365)
[As a side product of the above results, we can calculate the arc length in the poloidal plane along a constant ψ
surface, dℓ, which is expressed as
p
dℓ =
(dR)2 + (dZ)2
q
(Rψ dψ + Rθ dθ)2 + (Zψ dψ + Zθ dθ)2 .
=
Note that dψ = 0 since we are considering the arc length along a constant ψ surface in (R, Z) plane. Then the above
equation is reduced to
p
(Rθ dθ)2 + (Zθ dθ)2
dℓ =
q
Rθ2 + Zθ2 dθ
=
=
|J ∇ψ|
dθ,
R
(366)
which agrees with Eq. (178).]
10
Special treatment at coordinate origin
Ψ ≈ a00 + a10 R + a01 Z + a11 RZ + a20 R2 + a02 Z 2 .
p
R = R0 + b11 ψ cos θ
p
Z = Z0 + c11 ψ sin θ
Ψ
≈
=
=
(367)
(368)
(369)
p
2
p
p
p
p
p
a00 + a10 R0 + b11 ψ cos θ + a01 c11 ψ sin θ + a11 R0 + b11 ψ cos θ c11 ψ sin θ + a20 R0 + b11 ψ cos θ + a02 c11 ψ sin θ
p
p
p
p
p
1
a00 + a10 R0 + a10 b11 ψ cos θ + a01 c11 ψ sin θ + a11 R0 c11 ψ sin θ + a11 b11 ψc11 ψ sin 2θ + 2a20 R02 + a20 (b11 )2 ψ cos2 θ + 2a20 R
2
p
p
d0 + d1 ψ cos θ + d2 ψ sin θ + d3 ψ sin 2θ + d4 ψ cos2 θ + d5 ψ sin2 θ
Ψ = d0 + d1
R = R0 + b11
p
ψ cos θ + d2
p
ψ sin θ
p 2
p 2
p
p
ψ cos θ + b12 ψ cos 2θ + b21
ψ cos θ + b22
ψ cos 2θ
Z = Z0 + c11
p 2
p 2
p
p
ψ sin θ + c12 ψ sin 2θ + c21
ψ sin θ + c22
ψ sin 2θ
49
(370)
(371)
10.1
Pressure and toroidal field function profile
The function p(Ψ) and g(Ψ) in the GS equation are free functions which must be specified by users before solving
the GS equation. Next, we discuss one way to specify the free functions. Following Ref. [9], we take P (Ψ) and g(Ψ)
to be of the forms
(372)
P (Ψ) = P0 − (P0 − Pb )p̂(Ψ),
1
1 2
g (Ψ) = g02 (1 − γĝ(Ψ)),
2
2
with p̂ and ĝ chosen to be of polynomial form:
α
p̂(Ψ) = Ψ ,
β
ĝ(Ψ) = Ψ ,
where
Ψ≡
Ψ − Ψa
,
Ψb − Ψa
(373)
(374)
(375)
(376)
with Ψb the value of Ψ on the boundary, Ψa the value of Ψ on the magnetic axis, α, β, γ, P0 , Pb , and g0 are free
parameters. Using the profiles of P and g given by Eqs. (372) and (373), we obtain
1
dP (Ψ)
α−1
= − (P0 − Pb )αΨ
dΨ
∆
where ∆ = Ψb − Ψa , and
1
1
dg
β−1
.
= − g02 γ βΨ
dΨ
2
∆
Then the term on the r.h.s (nonlinear source term) of the GS equation is written
1
dg
1
1
dP
α−1
β−1
+ g02 γ βΨ
.
−
g = µ0 R 2
(P0 − Pb )αΨ
− µ0 R 2
dΨ dΨ
∆
2
∆
g
(377)
(378)
(379)
The value of parameters P0 , Pb , and g0 in Eqs. (372) and (373), and the value of α and β in Eqs. (374) and (375)
can be chosen arbitrarily. The parameter γ is used to set the value of the total toroidal current. The toroidal current
density is given by Eq. (61), i.e.,
dP
1 dg g
Jφ = R
+
,
(380)
dΨ µ0 dΨ R
which can be integrated over the poloidal cross section within the boundary magnetic surface to give the total
toroidal current,
Z
Iφ =
Jφ dS
Z 1 dg g
dP
dRdZ
+
R
=
dΨ µ0 dΨ R
Z 1
1 1 2 1 ′
R −
=
(P0 − Pb )p̂′ (Ψ) −
g0 γ ĝ (Ψ) dRdZ
(381)
∆
µ0 R 2
∆
Using
dRdZ =
1
J dψdθ,
R
(382)
Eq. (381) is written as
Iφ =
Z −
1
∆
(P0 − Pb )p̂′ (Ψ) −
1 1 2 1 ′
J dψdθ,
(Ψ)
g
γ
ĝ
µ0 R 2 2 0 ∆
(383)
from which we solve for γ, giving
R
−∆Iφ − (P0 − Pb ) [p̂′ (Ψ)]J dψdθ
R 1
γ=
.
1
2
′
2µ0 g0
R2 ĝ (Ψ) J dψdθ
If the total toroidal current Iφ is given, Eq. (384) can be used to determine the value of γ.
50
(384)
10.2
Boundary magnetic surface and initial coordinates
In the fixed boundary equilibrium problem, the shape of the boundary magnetic surface (it is also the boundary
of the computational region, which is usually the last-closed-flux-surface) is given while the shape of the inner flux
surface is to be solved. A simple analytical expression for a D-shaped magnetic surface takes the form
R = R0 + a cos(θ + ∆ sin θ),
(385)
Z = κa sin θ,
(386)
with θ changing from 0 to 2π. According to the definition in Eqs. (21), (22), and (24) we can readily verify that the
parameters a, R0 , κ appearing in Eqs. (385) and (386) are indeed the minor radius, major radius, and ellipticity,
respectively. According to the definition of triangularity Eq. (23), the triangularity δ for the magnetic surface
defined by Eqs. (385) and (386) is written as
δ = sin ∆.
(387)
Another common expression for the shape of a magnetic surface was given by Miller[5, 10], which is written as
R = R0 + a cos[θ + arcsin(∆ sin θ)],
(388)
Z = κa sin θ.
(389)
Note that Miller’s formula is only slightly different from the formula given in Eqs. (385) and (386). For Miller’s
formula, it is easy to prove that the triangularity δ is equal to ∆ (instead of δ = sin ∆ as given in Eq. (387)).
In the iterative metric method[7] for solving the fixed boundary equilibrium problem, we need to provide an initial
guess of the shape of the inner flux surface (this initial guess is used to construct a initial generalized coordinates
system). A common guess of the inner flux surfaces is given by
R = ψ α (RLCFS − R0 ) + R0 ,
(390)
Z = ψ α ZLCFS ,
(391)
where α is a parameter, ψ is a label parameter of flux surface. If the shape of the LCFS is given by Eqs. (385) and
(386), then Eqs. (390) and (391) are written as
R = R0 + ψ α a cos(θ + ∆ sin θ),
(392)
Z = ψ a κa sin θ.
(393)
0.4
0.4
0.2
0.2
Z/R0
Z/R0
Fig. 16 plots the shape given by Eqs. (392) and (393) for a =0.4, R0 = 1.7, κ = 1.7, ∆ = arcsin(0.6), and α = 1
with ψ varying from zero to one.
0
0
-0.2
-0.2
-0.4
-0.4
0.4
0.6
0.8
1
R/R0
1.2
1.4
0.4
0.6
0.8
1
R/R0
1.2
1.4
Figure 16: Shape of flux surface given by Eqs. (392) and (393). Left figure: points with the same value of ψ are
connected to show ψ coordinate surface; Right figure: dot plot. Parameters are a =0.4m, R0 = 1.7m, κ = 1.7,
∆ = arcsin(0.6), α = 1 with ψ varying from zero (center) to one (boundary). The shape parameters of LCFS are
chosen according to the parameters of EAST tokamak.
10.3
Fixed boundary equilibrium numerical code
The tokamak equilibrium problem where the shape of the LCFS is given is called fixed boundary equilibrium problem.
I wrote a numerical code that uses the iterative metric method[7] to solve this kind of equilibrium problem. Figure
17 describes the steps involved in the iterative metric method.
51
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
Z
Z
0
0
-0.2
-0.2
-0.4
-0.4
-0.6
-0.6
-0.8
-0.8
0
0.5
1
1.5
2
2.5
0
0.5
1
R
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
Z
0
Z
1.5
2
2.5
1.5
2
2.5
R
0
-0.2
-0.2
-0.4
-0.4
-0.6
-0.6
-0.8
-0.8
0
0.5
1
1.5
2
2.5
0
0.5
R
1
R
0.8
0.6
0.4
0.2
Z
0
-0.2
-0.4
-0.6
-0.8
0
0.5
1
1.5
2
2.5
R
Figure 17: Upper left figure plots the initial coordinate surfaces. After solving the GS equation to obtain the location
of the magnetic axis, I shift the origin point of the initial coordinate system to the location of the magnetic axis
(upper right figure). Then, reshape the coordinate surface so that the coordinate surfaces ψ = const lies on magnetic
surfaces (middle left figure). Recalculate the radial coordinate ψ that is consistent with the Jacobian constraint and
interpolate flux surface to uniform ψ coordinates (middle right figure). Recalculate the poloidal coordinate θ that is
consistent with the Jacobian constraint and interpolate poloidal points on every flux surface to uniform θ coordinates
(bottom left figure).
10.4
Benchmark of the code
To benchmark the numerical code, I set the profile of P and g according to Eqs. (68) and (69) with the parameters
c2 = 0, c1 = B0 (κ20 + 1)/(R02 κ0 q0 ), κ0 = 1.5, and q0 = 1.5. The comparison of the analytic and numerical results are
shown in Fig. 18.
Note that the parameter c0 in the Solovev equilibrium seems to be not needed in the numerical calculation. In
fact this impression is wrong: the c0 parameter is actually needed in determining the boundary magnetic surface of
the numerical equilibrium (in the case considered here c0 is chosen as c0 = B0 /(R02 κ0 q0 )).
10.5
Low-beta equilibrium vs. high-beta equilibrium
With the pressure increasing, the magnetic axis usually shifts to the low-field-side of the device, as is shown in Fig.
19.
52
Z/R0
1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
0
0.5
1
R/R0
1.5
2
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
Z(m)
Z(m)
Figure 18: Agreement between the magnetic surfaces (contours of Ψ) given by the Solovev analytic formula and
those calculated by the numerical code. The two sets of magnetic surfaces are indistinguishable at this scale. The
boundary magnetic surface is selected by the requirement that Ψ = 0.11022 in the Solovev formula (77). Parameters:
κ0 = 1.5, q0 = 1.5.
0
0
-0.2
-0.2
-0.4
-0.4
-0.6
-0.6
-0.8
-0.8
1.2 1.4 1.6 1.8 2 2.2
R(m)
1.2 1.4 1.6 1.8 2 2.2
R(m)
Figure 19: Comparison of two equilibria obtained with P0 = 104 Pasca (left) and P0 = 105 Pasca (right), respectively,
where P0 is the pressure at the magnetic axis. All the other parameters are the same for the two equilibria, α = 1.0,
β = 1.0, Pb = 10−1 Pasca, g0 = 1.0T m, Iφ = 500 kA, and the LCFS is given by miller’s formulas (388) and (389)
with R0 = 1.7, a = 0.45, κ = 1.7, and δ = 0.6.
10.6
Analytical form of Jacobian (need cleaning up)
Consider the Jacobian of the form
J =µ
R
R0
m
ψn ,
(394)
where m and n are arbitrary integers which can be appropriately chosen by users, µ0 and R0 are constants included
for normalization. In the iterative metric method of solving fixed boundary equilibrium problem, we first construct
a coordinates transformation (θ, ψ) → (R(θ, ψ), Z(θ, ψ)) (this transformation is arbitrary except for that surface
ψ = 1 coincides with the last closed flux surface), then solve the GS equation in (θ, ψ) coordinate system to get
the value of Ψ at grid points, and finally adjust the value of (R(θ, ψ), Z(θ, ψ)) to make surface ψ = const lies on
a magnetic surface. It is obvious the Jacobian of the final transformation we obtained usually does not satisfy the
constraint given by Eq. (394) since we do not use any information of Eq. (394) in the above steps. Now comes the
question: how to make the transformation obtained above satisfy the constraint Eq. (394) through adjusting the
values of θ? To make the constraint Eq. (394) satisfied, θ and ψ should satisfy the relation
m
R(θ, ψ)
J (θ, ψ) = µ
ψn ,
(395)
R0
which
Using Eq. (), we obtain
Z
m
J 1 R0
ψn µ R
0
0
m
Z θ
J 1 R0
dθ n
θ=
ψ µ R
0
θ
dθ =
Z
θ
dθ
53
(396)
normalized to 2π, the normalized θ is written as
θ=
10.7
Rθ
R0 m
R
m
dθ ψJn µ1 RR0
dθ ψJn µ1
0
2π R 2π
0
Rθ
dθJ
0
= 2π R 2π
dθJ
0
1 m
R
1 m
R
(397)
Toroidal elliptic operator in magnetic surface coordinate system
In the magnetic surface coordinate system, by using ∂Ψ/∂θ = 0, the toroidal elliptic operator in Eq. (326) is reduced
to
"
#
2
J
J
R
Ψψ 2 |∇ψ|2
+ Ψψ 2 ∇ψ · ∇θ
,
(398)
△⋆ Ψ =
J
R
R
ψ
θ
and the GS equation, Eq. (332), is reduced to
"
#
R2
J
J
dg
dP
2
Ψψ 2 |∇ψ|
+ Ψψ 2 ∇ψ · ∇θ
= −µ0 R2
−
g(Ψ),
J
R
R
dΨ dΨ
ψ
θ
(399)
Equation (399) is the GS equation in magnetic surface coordinate system.
10.8
Grad-Shafranov equation with prescribed safety factor profile (to be finished)
In the GS equation, g(Ψ) is one of the two free functions which can be prescribed by users. In some cases, we want
to specify the safety factor profile q(Ψ), instead of g(Ψ), in solving the GS equation. Next, we derive the form of
the GS equation that contains q(Ψ), instead of g(Ψ), as a free function. The safety factor defined in Eq. (191) can
be written
Z 2π
J
1 g
dθ
(400)
q(ψ) = −
′
2π Ψ 0 R2
R 2π
Z
1 g 0 R−2 J dθ 2π
= −
J dθ
R 2π
2π Ψ′
J dθ
0
0
Z 2π
1 g
−2
J dθ
(401)
hR i
= −
2π Ψ′
0
V ′ hR−2 i
= − sgn(J )
g.
(402)
(2π)2 Ψ′
Equation (402) gives the relation between the safety factor q and the toroidal field function g. This relation can be
used in the GS equation to eliminate g in favor of q, which gives
(2π)2
Ψ′ q.
V ′ hR−2 i
dg
(2π)2
(2π)2
′
⇒
g = ′ −2 q
qΨ
dΨ
V hR i V ′ hR−2 i
ψ
g = − sgn(J )
Multiplying Eq. (399) by R−2 gives
"
#
J
J
dp
dg
1
Ψ′ 2 |∇ψ|2
+ Ψ′ 2 (∇ψ · ∇θ)
+ µ0
+ R−2
g = 0.
J
R
R
dΨ
dΨ
ψ
θ
Surface-averaging the above equation, we obtain
"
#
Z
2π
dp
dg
′ J
′ J
2
Ψ 2 |∇ψ|
dθ
+ Ψ 2 (∇ψ · ∇θ)
+ µ0
+ hR−2 i
g = 0,
′
V
R
R
dΨ
dΨ
ψ
θ
⇒
2π
V′
Z
dp
dg
J
+ µ0
+ hR−2 i
g = 0,
dθ Ψ′ 2 |∇ψ|2
R
dΨ
dΨ
ψ
54
(403)
(404)
(405)
(406)
(407)
Z
2π
|∇ψ|2
dp
dg
′
Ψ
dθ
J
+ µ0
+ hR−2 i
g = 0,
V′
R2
dΨ
dΨ
ψ
|∇ψ|2
dp
dg
1
+ µ0
+ hR−2 i
g = 0.
⇒ ′ V ′ Ψ′
V
R2
dΨ
dΨ
ψ
|∇ψ|2
dp
dg
′ ′
⇒ V Ψ
+ µ0 V ′
+ hR−2 iV ′
g = 0,
R2
dΨ
dΨ
ψ
⇒
Substitute Eq. (404) into the above equation to eliminate gdg/dΨ, we obtain
|∇ψ|2
qΨ′
′ ′
′ dp
4
⇒ V Ψ
= 0,
+ µ0 V
+ q(2π)
R2
dΨ
V ′ hR−2 i ψ
ψ
(408)
(409)
(410)
(411)
Eq. (411) agrees with Eq. (5.55) in Ref. [9].
|∇ψ|2
q
|∇ψ|2
q
′
′′
4
′
′ dp
′′
′
4
⇒V
Ψ′ = 0 (412)
Ψ + q(2π)
Ψ + µ0 V
Ψ + V
+ q(2π)
R2
R2
dΨ
V ′ hR−2 i
V ′ hR−2 i ψ
ψ
( )
2
|∇ψ|
1
q
dp
V′
⇒ Ψ′′ = − ′
(413)
Ψ ′ + µ0 V ′
Ψ′ + q(2π)4
V D
R2
V ′ hR−2 i ψ
dΨ
ψ
where
D=
The GS equation is
|∇ψ|2
R2
+
(2π)4 q 2
hR−2 i V ′
dg
dp
−g
dΨ
dΨ
qΨ′
q(2π)4
⋆
2 dp
⇒ △ Ψ = −µ0 R
−
dΨ V ′ hR−2 i V ′ hR−2 i ψ
(
)
4
q
dp
q(2π)
q
Ψ′′
Ψ′ +
⇒ △⋆ Ψ = −µ0 R2
−
dΨ V ′ hR−2 i
V ′ hR−2 i ψ
V ′ hR−2 i
△⋆ Ψ = −µ0 R2
Using Eq. (413) to eliminate Ψ′′ in the above equation, the coefficients before (−µ0 dp/dΨ) is written as
q(2π)4
q
1
2
′
B = R − ′ −2
V
V hR i
V ′ hR−2 i V ′ D
q 2 (2π)4 1
R2 D −
.
=
D
V′
hR−2 i2
Substituting the expression of D into the above equation, we obtain
4 |∇ψ|2
q 2 q 2 (2π)4
1
2 (2π)
R2
+
R
−
B =
D
R2
hR−2 i V ′
V′
hR−2 i2
q 2 (2π)4
1
|∇ψ|2
1
2
R2
R
−
,
+
=
D
R2
V′
hR−2 i
hR−2 i
which is equal to the expression (5.58) in Ref. [9]. The coefficient before Ψ′ is written as
(
" #)
2
|∇ψ|
q(2π)4
q
1
q
q
V′
A = − ′ −2
−
+ q(2π)4
V hR i
V ′ hR−2 i ψ
V ′ hR−2 i V ′ D
R2
V ′ hR−2 i ψ
ψ
Define
|∇ψ|2
,
α=
R2
q
β = ′ −2 .
V hR i
1
A = −(2π)4 β βψ − β ′ [(V ′ α)ψ + q(2π)4 βψ ]
V D
55
(414)
(415)
(416)
(417)
(418)
(419)
1
D
A = Dβψ − β ′ [(V ′ α)ψ + q(2π)4 βψ ]
−(2π)4 β
V
(420)
D
1
A = Dβψ − β ′ [V ′′ α + V ′ αψ + q(2π)4 βψ ]
−β(2π)4
V
(421)
=⇒
=⇒
Using
D = α + (2π)4 hR−2 iβ 2
(422)
Eq. () is written as
1
1
1
D
A = αβψ + (2π)4 hR−2 iβ 2 βψ − β ′ V ′′ α − β ′ V ′ αψ − β ′ q(2π)4 βψ
=⇒
−β(2π)4
V
V
V
D
1 ′′
1
4
−2
2
4
=⇒
A
=
αβ
+
(2π)
hR
iβ
β
−
β
V
α
−
βα
−
β
q(2π)
β
ψ
ψ
ψ
ψ
−β(2π)4
V′
V′
A
1
D = αβψ + (2π)4 hR−2 iβ 2 βψ − β ′ V ′′ α − βαψ − β 2 hR−2 i(2π)4 βψ
4
−β(2π)
V
1
A
D = αβψ − β ′ V ′′ α − βαψ
−β(2π)4
V
A
1
α
2
=⇒
− β ′ V ′′ α
D = −β
−β(2π)4
β ψ
V
A
1
α
α
2
=⇒
− β 2 ′ V ′′
D = −β
4
−β(2π)
β ψ
V
β
#
" 1 ′′ α
α
A
2
+
D = −β
V
=⇒
−β(2π)4
β ψ V′
β
#
" A
α
′
′′ α
2 1
=⇒
V +V
D = −β ′
−β(2π)4
V
β ψ
β
1 α ′
A
D = −β 2 ′
V
=⇒
4
−β(2π)
V
β
ψ
3
(2π)4
q
1
|∇ψ|2 hR−2 i ′2
=⇒ A =
V
D
V ′ hR−2 i
V′
R2
q
ψ
=⇒
(423)
(424)
(425)
(426)
(427)
(428)
(429)
(430)
(431)
(432)
But the expression of A is slightly different from that given in Ref. [9] [Eq. (5.57)]. Using the above coefficients, the
GS equation with the q-profile held fixed is written as
dp
∂
⋆
Ψ = −Bµ0
.
(433)
∆ −A
∂ψ
dΨ
11
11.1
Misc contents
Cylindrical tokamak
For a large aspect-ratio, circular cross section tokamak, the R on a magnetic surface is nearly constant, R ≈ R0 .
The poloidal angle dependence of the magnetic field can be neglected, i.e., Bφ (r, θ) ≈ Bφ (r), and Bp (r, θ) ≈ Bp (r).
Using these, the safety factor in Eq. (29) is approximated to
I
I
1
1 Bφ
1 Bφ (r) 1
1 Bφ (r) 1
r Bφ (r)
q=
dℓp ≈
dℓp =
2πr =
,
(434)
2π
R Bp
2π Bp (r) R0
2π Bp (r) R0
R0 Bp (r)
where r is the minor radius of the magnetic surface.
56
11.2
(s, α) parameters
The normalized pressure gradient, α, which appears frequently in tokamak literature, is defined by[2]
α = −R0 q 2
dp
1
,
B02 /2µ0 dr
(435)
dp
,
dr
(436)
which can be futher written
α = −R0 q 2
where p = p/(B02 /2µ0 ). Equation (436) can be further written as
α=−
1 2 dp
q
,
εa dr
(437)
where εa = a/R0 , r = r/a, and a is the minor radius of the boundary flux surface. (Why is there a q 2 factor in the
definition of α?)
The global magnetic shear s is defined by
r dq
,
(438)
s=
q dr
which can be written
s=
r dq
.
q dr
(439)
In the case of large aspect ratio and circular flux surface, the leading order equation of the Grad-Shafranov equation
in (r, θ) coordinates is written
1 d dΨ
r
= −µ0 R0 Jφ (r),
(440)
r dr dr
which gives concentric circular flux surfaces centered at (R = R0 , Z = 0). Assume that Jφ is uniform distributed,
i.e., |Jφ | = I/(πa2 ), where I is the total current within the flux surface r = a. Further assume the current is in the
opposite direction of ∇φ, then Jφ = −I/(πa2 ). Using this, Eq. (440) can be solved to give
Ψ=
µ0 I
R0 r 2 .
4πa2
(441)
√
Then it follows that the normalized radial coordinate ρ ≡ (Ψ − Ψ0 )/(Ψb − Ψ0 ) relates to r by r = ρ (I check
this numerically for the case of EAST discharge #38300). Sine in my code, the radial coordinate is Ψ, I need to
transform the derivative with respect to r to one with respect to Ψ, which gives
1
1 dp 1
1 dp 1
dp
1 dp
= − q2 √ = − q2
α = − q2
√ = − q2
√ (Ψb − Ψ0 ).
ε dr
ε d ρ
ε dρ 2 ρ
ε dΨ 2 ρ
s=
√
ρ dq 1
r dq
1 dq
=
(Ψb − Ψ0 ).
√ (Ψb − Ψ0 ) =
q dr
q dΨ 2 ρ
2q dΨ
(442)
(443)
The necessary condition for the existence of TAEs with frequency near the upper tip of the gap is given by[2]
α < −s2 + ε,
(444)
which is used in my paper on Alfvén eigenmodes on EAST tokamak[8]. Equations (442) and (443) are used in the
GTAW code to calculate s and α.
11.3
Toroidal magnetic field of EAST tokamak
Using Ampere’s circuital law
I
B · dl = µ0 I,
(445)
along the toroidal direction and assuming perfect toroidal symmetry, Eq. (445) is written
2πRBφ = µ0 I,
57
(446)
which gives
µ0 I
.
(447)
2πR
Neglecting the poloidal current contributed by the plasma, the poloidal current is determined solely by the current
in the TF (Toroidal Field) coils. The EAST tokamak has 16 groups of TF coils, with each coils having 130 turns of
wire (I got to know the number of turns from Dr. Sun Youwen). Denote the current in a single turn by Is , then Eq.
(447) is written
µ0 × 16 × 130 × Is
Is
Bφ =
= 4.160 × 10−4
(448)
2πR
R
Using this formula, the strength of the toroidal magnetic field at R = 1.7m for Is = 104 A is calculated to be
Bφ = 2.447T . This field (Is = 104 A, and thus Bt = 2.447 at R = 1.7m) was chosen as one of the two scenarios of
EAST experiments during 2014/6-2014/9 (another scenario is Is = 8 × 103 A). (The limit of the current in a single
turn of the TF coils is 14.5 kA (from B. J. Xiao’s paper [13]).
Note that the exact equiliibrium toroidal magnetic field Bφ is given by Bφ = g(Ψ)/R. Compare this with Eq.
(447), we know that the approximation made to obtain Eq. (448) is equivalent to g(Ψ) ≈ µ0 ITF /2π, i.e. assuming
g is a contant function of Ψ. The poloidal plasma current density is related to g by g ′ (Ψ)Bp /µ0 . The constant g
corresponds to zero plasma poloidal current, which is consistent to the assumption used to obtain Eq. (448).
Bφ =
11.4
Comparison of EAST with DIII-D tokamak
The size of EAST tokamak is similar to that of DIII-D tokamak. The comparison of the main parameters are
summarized in Table. 2. The significant difference between EAST and DIII-D is that DIII-D has a larger minor
radius (0.67m for DIII-D and 0.45m for EAST), which makes DIII-D able to operate with a larger toroidal current
than that EAST can do (3.0 MA for DIII-D and 1.0 MA for EAST) for the same current density. Another significant
defference between EAST and DIII-D is that the coils of EAST are supper-conductive while the coils of DIII-D are
not. The supper-conductive coils make EAST be able to generate much larger magnetic field (maximum 3.5T for
EAST and maximum 2.2T for DIII-D) and operate at longer pulse.
Major radius R0
minor radius a
Maximum plasma current
Maximum toroidal field Bt
Available Ohm magnetic flux
EAST
1.85m
0.45m
1.0MA
3.5T
12Vs
DIII-D
1.67m
0.67m
3.0 MA
2.2T
≈ 10.5 Vs
Table 2: Comparison of main parameters of EAST and DIII-D tokmak.
11.5
Miller’s formula for shaped flux surfaces
According to Refs. [5, 10], Miller’s formula for a series of shaped flux surfaces is given by
R = R0 (r) + r cos{θ + arcsin[δ(r) sin θ]},
(449)
Z = κ(r)r sin θ,
(450)
where κ(r) and δ(r) are elongation and triangularity profile, R0 (r) is the Shafranov shift profile, which is given by
r 2 aR0′
1−
,
(451)
R0 (r) = R0 (a) −
2
a
where R0′ is a constant, R0 (a) is the major radius of the center of the boundary flux surface. The triangularity
profile is
r 2
δ(r) = δ0
,
(452)
a
and the elongation profile is
r 4
κ(r) = κ0 − 0.3 + 0.3
.
(453)
a
The nominal ITER parameters are κ0 = 1.8, δ0 = 0.5 and R0′ = −0.16. I wrote a code to plot the shapes of the flux
surface (/home/yj/project/miller flux surface). An example of the results is given in Fig. 20.
58
2
1.5
1
Z/a
0.5
0
-0.5
-1
-1.5
-2
1 1.5 2 2.5 3 3.5 4 4.5
R/a
Figure 20: Flux-surfaces given by Eqs. (449) and (450) with r/a varying from 0.1 to 1.0 (corresponding boundary
surface). Other parameters are R0 (a)/a = 3, κ0 = 1.8, δ0 = 0.5, R0′ = −0.16.
11.6
Double transport barriers pressure profile
An analytic expression for the pressure profile of double (inner and external) transport barriers is given by
−(ψ − ψi )
−(ψ − ψe )
P (ψ) = ai 1 + tanh
+ ae 1 + tanh
−c
wi
we
(454)
where ψ is the normalized poloidal flux, wi and we are the width of the inner and external barriers, ψi and ψe are
the locations of the barriers, ai and ae is the height of the barriers, c is a constant to ensure P (ψ) = 0 at ψ = 1.
2.5
P(ψ)
2
1.5
1
0.5
0
0
0.2
0.4
0.6
0.8
1
ψ
1.8
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0
8
7
6
5
4
3
safty factor
p0/(104 Pa)
Figure 21: Pressure profile of double (inner and external) transport barriers given by Eq. (454) with ai = 1, bi = 0.2,
ψi = 0.36, ψe = 0.96, wi = 0.2, we = 0.04, c = 0.
2
1
0
0.2
0.4
0.6
0.8
1
r2
Figure 22: Equilibrium pressure profile for EAST discharge #38300 at 3.9s (reconstructed by EFIT code, gfile name:
g038300.03900), which shows a boundary transport barrier.
59
11.7
Ballooning transformation
To construct a periodic function about θ, we introduces a function z(θ) which is defined over −∞ < θ < ∞ and
vanishes sufficiently fast as |θ| → ∞ so that the following infinite summation converge:
∞
X
z(θ + 2πl).
(455)
l=−∞
If we use the above sum to define a function
z(θ) =
∞
X
z(θ + 2πl),
(456)
l=−∞
then it is obvious that
z(θ + 2π) = z(θ),
(457)
i.e., z(θ) is a periodic funcion about θ with period of 2π.
If we use the right-hand-side of Eq. (456) to represent z(θ), then we do not need to worry about the periodic
property of z(θ) (the periodic property is guaranteed by the representation)
11.8
Discussion about the poloidal current function, check!
Note that, on both an irrational surface and a rational surface, there are infinite number of magnetic field lines that
are not connected with each other (it is wrong to say there is only one magnetic field line on a irrational surface).
Sine B · ∇Ψ = 0, the value Ψ is a constant along any one of the magnetic field lines. Now comes the question:
whether the values of Ψ on different field lines are equal to each other? To answer this question, we can choose a
direction different from B on the magnetic surface and examine whether Ψ is constant or not along this direction,
i.e, whether k · ∇Ψ equals zero or not, where k is the chosen direction. For axsiymmetric magnetic surfaces, it is
ready to see that k = φ̂ is a direction on the magnetic surface and it is usually not identical with B/B. Then we
obtain
1 ∂Ψ
= 0.
(458)
k · ∇Ψ = φ̂ · ∇Ψ =
R ∂φ
Then, since B · ∇Ψ = 0 and k · ∇Ψ = 0, where B and k are two differnt dirctions on the magnetic surfaces, we know
that Ψ is constant on the surface, i.e., the values of Ψ on different field lines are equal to each other. This reasoning
applies to case of axsiymmetric magnetic surfaces. It is ready to do the some reasoning for non-axisymmetrica
magnetic surface after we find a convient direction k on the magnetic surface.
[check***As discussed in Sec. 2.1, the force balance equation of axisymmetric plasma requires that B · ∇g = 0.
From this and the fact B · ∇Ψ = 0, we conclude that g is a function of Ψ, i.e., g = g(Ψ). However, this reasoning
is not rigorous. Note the concept of a function requires that a function can not be a one-to-more map. This means
that g = g(Ψ) indicates that the values of g must be equal on two different magnetic field lines that have the same
value of Ψ. However, the two equations B · ∇g = 0 and B · ∇Ψ = 0 do not require this constraint. To examine
whether this constraint removes some equilibria from all the possible ones, we consider a system with an X point.
Inside one of the magnetic islands, we use
g = Ψ2 /(B0 R03 ),
(459)
and inside the another, we use
g = Ψ3 /(B02 R05 ),
(460)
Then solve the two GS equations respectively within the boundary of the two islands. It is easy to obtain two
magnetic surfaces that have the same value of Ψ respectively inside the two islands. Equations (459) and (460)
indicate that the values of g on the two magnetic surfaces are different from each other. It is obvious the resulting
equilibrium that contain the two islands can not be recovered by directly solving a single GS equation with a given
function g(Ψ).**check]
11.9
tmp check!
(In practice, I choose the positive direction of θ and φ along the direction of toroidal and poloidal magnetic field
(i.e., B · ∇φ and B · ∇θ are always positive in (ψ, θ, φ) coordinates system). Then, the qlocal defined by Eq. (187) is
always positive. It follows that qglobal should be also positive. Next, let us examine whether this property is correctly
60
preserved by Eq. (192). Case 1: The radial coordinate ψ is chosen as Ψ′ ≡ dΨ/dψ > 0. Then the factor before the
integration in Eq. (192) is negative. We can further verify that J is always negative for either the case that ∇Ψ is
pointing inward or outward. Therefore the .r.h.s. of Eq. (192) is always positive for this case. Case 2: The radial
coordinate ψ is chosen as Ψ′ ≡ dΨ/dψ < 0. Then the factor before the integration in Eq. (192) is positive. We can
further verify that J is always positive for either the case that ∇Ψ is pointing inward or outward. The above two
cases include all possibilities. Therefore, the positivity of qglobal is always guaranteed)
a magnetic surface forms a central hole around Z axis. Using Gauss’s theorem in the volume within the central
hole, and noting that no magnetic field line point-intersects a magnetic surface, we know that the magnetic flux
through any cross section of the hole is equal to each other. Next we calculate this magnetic flux. To make the
calculation easy, we select a plane cross section perpendicular to the Z axis, as is shown by the dash line in Fig. 1.
In this case, only BZ contribute to the magnetic flux, which is written (the positive direction of the cross section is
chosen in the direction of êZ )
Ψp1
=
=
=
=
Z
Z
Rc
Bz (R, Zc )2πRdR
0
Rc
0
1 ∂Ψ
2πRdR
R ∂R
Rc
∂Ψ
dR
∂R
0
2π[Ψ(Rc , Zc ) − Ψ(0, Zc )].
2π
Z
Note that the axisymmetry requires that the axis of symmetry, Z axis, must be a magnetic field line. Since B·∇Ψ = 0,
it follows that the value of Ψ on the Z axis is a constant (denoted by Ψa below). Further note that the value of Ψ
is constant on a magnetic surface. Thus, Ψp1 in Eq. (18) is written
Ψp1 = 2π(Ψ − Ψa ).
(461)
be generalized to any revolution surface that is generated by rotating a curve segment on the poloidal plane
around Z axis. For instance, a curve on the poloidal plane that connects the magnetic axis and a point on a flux
surface can form a toroidal surface (e.g., surface S2 in Fig. 52). The magnetic flux through the toroidal surface S2
is given by
i.e.
Ψp1
Ψ − Ψa =
,
(462)
2π
which indicates that the difference of Ψ between the Z axis and a magnetic surface is the poloidal magnetic flux per
radian through the central hole, Ψp1 /2π.
The magnetic surface forms a central hole around Z axis. The magnetic flux through any cross section of the
central hole is equal to each other and is given by Ψp = 2π(Ψb − Ψa ), where Ψa and Ψb are the value of Ψ at the Z
axis and the magnetic surface, respectively.
The conclusion in Eq. (461) can be generalized to any revolution surface that is generated by rotating a curve
on the poloidal plane about Z axis. For instance, a curve on the poloidal plane that connects the magnetic axis and
a point on a flux surface can form a toroidal surface (e.g., surface S2 in Fig. 52).
Also note the difference between Ψp and Ψp1 defined in Sec. 1.4: Ψp1 is the magnetic flux through the central
hole of a torus and thus includes the flux in the center transformer, and Ψp is the magnetic flux through the ribbon
between the magnetic axis and the magnetic surface.
11.10
Radial coordinate to be deleted
We know that the toroidal flux ψt , safety factor q, and the Ψ in the GS equation are related by the following
equations:
dψt = 2πqdΨ
(463)
Z Ψ
qdΨ
(464)
=⇒ ψt = 2π
0
Define:
ρ≡
r
61
ψt
π
(465)
(In the Toray ga code, the radial coordinate ρ is defined as
r
ψt
,
πBt0
ρ≡
(466)
where Bt0 is a constant factor.ρ defined this way is of length dimension, which is an effective geometry radius
obtained by approximating the flux surface as circular.)
I use Eq. (465) to define ρ. Then we have
ψt = πρ2
dψt
= 2πρ
dρ
(468)
dψt dψ
= 2πρ
dψ dρ
(469)
dψ
= 2πρ
dρ
(470)
=⇒
=⇒
(467)
=⇒ 2πq
=⇒
ρ
dψ
=
dρ
q
(471)
Eq. (471) is used to transform between ψ and ρ.
dρ = p
1
Φ/πR02 B0
1
1
11
1 1
1
dΦ =
2πqdψ =
qdψ
2 πB0 R02
ρ 2 πB0 R02
ρ B0 R02
⇒ dψ =
ρB0 R02
dρ
q
References
[1]
M. A. Beer, S. C. Cowley , and G. W. Hammett. Field-aligned coordinates for nonlinear simulations of tokamak
turbulence. Phys. Plasmas (1994-present), 2(7):2687–2700, 1995.
[2]
H. L. Berk, J. W. Van Dam, D. Borba, J. Candy, G. T. A. Huysmans , and S. Sharapov. More on core localized
toroidal alfvén eigenmodes. Phys. Plasmas, 2(9):3401–3406, 1995.
[3]
Allen H. Boozer. Physics of magnetically confined plasmas. Rev. Mod. Phys., 76:1071–1141, Jan 2005.
[4]
Yang Chen and Scott E. Parker. A delta-f particle method for gyrokinetic simulations with kinetic electrons
and electromagnetic perturbations. J. of Comput. Phys., 189:463, 2003.
[5]
Yang Chen, Scott E. Parker, J. Lang , and G.-Y. Fu. Linear gyrokinetic simulation of high-n toroidal alfvén
eigenmodes in a burning plasma. Phys. Plasmas, 17(10):102504, 2010.
[6]
C.Z Cheng and M.S Chance. Nova: a nonvariational code for solving the mhd stability of axisymmetric toroidal
plasmas. J. of Comput. Phys., 71(1):124–146, 1987.
[7]
J DeLucia, S.C Jardin , and A.M.M Todd. An iterative metric method for solving the inverse tokamak equilibrium problem. Journal of Computational Physics, 37(2):183–204, 1980.
[8]
Youjun Hu, Guoqiang Li, N. N. Gorelenkov, Huishan Cai, Wenjun Yang, Deng Zhou , and Qilong Ren. Numerical
study of alfvén eigenmodes in the experimental advanced superconducting tokamak. Phys. Plasmas, 21(5):0,
2014.
[9]
Stephen C. Jardin. Computational methods in plasma physics. CRC Press, 2010.
[10] R. L. Miller, M. S. Chu, J. M. Greene, Y. R. Lin-Liu , and R. E. Waltz. Noncircular, finite aspect ratio, local
equilibrium model. Phys. Plasmas, 5(4):973–978, 1998.
62
[11] S.A. Sabbagh, A.C. Sontag, J.M. Bialek, D.A. Gates, A.H. Glasser, J.E. Menard, W. Zhu, M.G. Bell, R.E. Bell,
A. Bondeson, C.E. Bush, J.D. Callen, M.S. Chu, C.C. Hegna, S.M. Kaye, L.L. Lao, B.P. LeBlanc, Y.Q. Liu,
R. Maingi, D. Mueller, K.C. Shaing, D. Stutman, K. Tritz , and C. Zhang. Resistive wall stabilized operation
in rotating high beta nstx plasmas. Nucl. Fusion, 46(5):635, 2006.
[12] John Wesson. Tokamaks. Oxford University Press, 2004.
[13] B J Xiao, D A Humphreys , and M L Walker. East plasma control system. Fusion Engineering and Design,
83:181, 2008.
63