A routine in tokamak operation is to reconstruct magnetic field under the constraints of MHD force balance and various measurements. This kind of task can be done by various codes, e.g., EFIT. I developed a similar code called heq (github.com/youjunhu/heq).
I also discuss the fixed-boundary equilibrium problem, where the boundary magnetic surface is given and one is asked to solve the force-balance equation within that boundray.
Another topic is how to construct spatial coordinates that conform to the shape of the magnetic surfaces, based on discrete numerical equilibrium data output by the equilibrium reconstructing codes.
Let us begin with the basics.
Due to the divergence-free nature of magnetic field, i.e., ∇⋅ B = 0, magnetic field can be expressed as the curl of a vector field,
| (1) |
where A is called the vector potential of B. In cylindrical coordinates (R,ϕ,Z), the above expression is written
| (2) |
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. (2) is written
| (3) |
In tokamak literature, direction is called the toroidal direction, and (R,Z) planes (i.e., ϕ = const planes) are called poloidal planes.
Equation (3) indicates that the two poloidal components of B, namely BR and BZ, are determined by a single component of A, namely Aϕ. This motivates us to define a function Ψ(R,Z):
| (4) |
Then Eq. (3) implies the poloidal components, BR and BZ, can be written as
| (5) |
| (6) |
(Note that it is the property of being axisymmetric and divergence-free that enables us to express the two components of B, namely BR and BZ, in terms of a single function Ψ(R,Z).) Furthermore, it is ready to prove that Ψ is constant along a magnetic field line, i.e. B ⋅∇Ψ = 0. [Proof:
The function Ψ is usually called the “poloidal flux function” in tokamak literature because Ψ can be related to the poloidal magnetic flux, as we will discuss in Sec. 2.7.
Using Eqs. (5) and (6), the poloidal magnetic field Bp is written as
Next, let’s examine the toroidal component Bϕ. Equation (3) indicates that Bϕ involves both AR and AZ, which means that using the potential form does not enable useful simplification for Bϕ. Therfore we will directly use Bϕ. Define g ≡ RBϕ(R,Z) (the reason that we define this quantity will become clear when we discuss the forece balance), then the toroidal magnetic field is written
| (9) |
Combining Eqs. (8) and (9), we obtain
which is a general expression of axisymmetric magnetic field. Expression (10) is a famous formula in tokamak physics.
Let us discuss the gauge transformation of the vector potential A in the axisymmetric case. As is well known, magnetic field remains the same under the following gauge transformation:
| (11) |
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. In cylindrical coordinates, ∇f is given by
| (12) |
Since ∇f is axisymmetric, it follows that all the three components of ∇f are independent of ϕ, i.e., ∂2f∕∂R∂ϕ = 0, ∂2f∕∂Z∂ϕ = 0, and ∂2f∕∂ϕ2 = 0, which implies that ∂f∕∂ϕ is independent of R, Z, and ϕ, i.e., ∂f∕∂ϕ is actually a spatial constant. Using this, the ϕ component of the gauge transformation (11) is written
where C is a constant. The requirement of being axial symmetry greatly reduces the degree of freedom of the gauge transformation for Aϕ. Multiplying Eq. (13) with R, we obtain the corresponding gauge transformation for Ψ,
| (14) |
which indicates Ψ has the same gauge transformation as the electric potential, i.e., adding a constant. Note that the definition Ψ(R,Z) ≡ RAϕ does not imply Ψ(R = 0,Z) = 0 because Aϕ can adopt 1∕R dependence under the gauge transformation (13). However, we are usually interested in the situation where Aϕ is finite at R = 0 (and axisymmetry indicates that Aϕ(R = 0,Z) is a spatial constant). In this case, Ψ is zero at R = 0. This is the case we encounter in equilibrium reconstruction, where magnetic flux measurements are used to constrain the numerically reconstructed Ψ.
Because Ψ 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, are contours of Ψ on (R,Z) plane also the projections of magnetic field lines onto the plane? Yes, they are. [Proof. A contour of Ψ on (R,Z) plane satisfies
| (15) |
i.e.,
| (16) |
| (17) |
Using Eqs. (5) and (6), the above equation is written
| (18) |
i.e.,
| (19) |
which is the equation of the projection of a magnetic field line in (R,Z) plane. This proves that contours of Ψ are also the projections of magnetic field lines in (R,Z) plane.]
For axial symmetry system, magnetic surfaces can be defined in a trivial way. 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 point-intersects it and a field line with one point on it will have the whole field line on it. This revolution surface can be called a magnetic surface. For instance, consider an arbitrary magnetic field line, whose projection on the poloidal plane is shown in Fig. 1. A magnetic surface is generated by rotating the projection line around the Z axis (some people disagree with this defintion since they only consider toroidal surfaces that are closed within a tokamak vessell as magnetic surfaces.)
The value of Ψ is constant on a magnetic surface (since Ψ is constant along a magnetic field line and Ψ is independent of ϕ). On the other hand, the value of Ψ is usually different on different magnetic surfaces. The above two facts enable Ψ to be used as labels of magnetic surfaces.
Note that Ψ is defined by Ψ = RAϕ, which is just a component of the vector potential A, thereby having no obvious physical meaning. Next, we try to find the physical meaning of Ψ, i.e., some simple algebraic relation of Ψ with some quantity that can be measured in experiments.
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 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 )
Equation (20) 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, Ψ 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 (14) dose not change the values of physical quantities.By measuring the voltage around a toroidal wire loop, we can obtain the time derivative of the poloidal magnetic flux though the loop and, after integrating over time, the poloidal magnetic flux itself.
Suppose that the loop is located at (R,Z) and denote the magnetic flux through the loop by Ψpol(R,Z,t) (only the poloidal magnetic field contribute to this flux since the loop is in the toroidal direction). Then Faraday’s law gives
| (21) |
where 𝜀 is the emf. If the loop is a coil with N turns, the induced voltage V in the coil is N times the emf 𝜀, i.e., V = N𝜀. Using this, Eq. (21) is written as
| (22) |
Integrating the above equation over time, we obtain
| (23) |
The starting time t = 0 can be chosen at a time when no plasma is present and thus the initial value, Ψpol(R,Z,0), is easy to obtain.
As discussed in Sec. 2.7 ,the relation between Ψ and Ψpol is given by
| (24) |
where Ψ(R = 0,Z,t), as discussed above, is zero. Then Eq. (24) is written as
| (25) |
which tells us how to obtain Ψ form the measured Ψpol(R,Z,t), which in trun is inferred from the measured voltage V , as is given by Eq. (23).
Note that the positive normal direction of the surface (where the magnetic flux Ψpol is defined) is chosen in the Z direction.
The above toroidal loop of wire used to measure poloidal magnetic flux is often called “flux loop” by tokamak operators. There are usually many flux loops (e.g. 35 on EAST[31], 41 on DIII-D) at different locations in the poloidal plane (see Fig. 3). The measured value of poloidal flux can be used as constraints in reconstructing magnetic configuration by, e.g. EFIT. With the feedback control (by adjusting the current in the poloidal field coils), these measurement, along with the poloidal field measurement by magnetic probes, can be used to control the shape of the last-closed-flux-surface (LCFS), the distance of the LCFS from the first wall, and the X-point location. This is often called iso-flux control, gap control, or X-point control.
In most part of a tokamak plasma, 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 contours of Ψ implies closed magnetic surfaces, as shown in Fig 4.
The innermost magnetic surface reduces to a curve, which is called magnetic axis (in Fig. 4, Ψ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 is discussed in Sec. 2.7, the poloidal magnetic flux enclosed by a magnetic surface Ψ (the poloidal magnetic flux through the toroidal surfaces S2) is given by
| (26) |
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 the positive direction chosen (there can be a sign difference when choosing different positive directions).
Also note, 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. 4, the other one is the poloidal magnetic flux through the central hole of the magnetic surface, i.e., the poloidal flux through S1 in Fig. 4. In the latter case, as is discussed in Sec. 2.8, the poloidal magnetic flux is related to Ψ by
| (27) |
where the positive direction of the surface S1 is 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.
Let us introduce parameters characterizing the shape of a magnetic surface in 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 can be roughly characterized by four parameters, namely, the R coordinate of the innermost and outermost points in 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. 5.
In terms of these four parameters, we can define the major radius of a magnetic surface
| (28) |
(which is the R coordinate of the geometric center of the magnetic surface), the minor radius of a magnetic surface
| (29) |
the triangularity of a magnetic surface
| (30) |
and, the ellipticity (elongation) of a magnetic surface
| (31) |
Usually, we specify the value of R0, a, δt, and κ, instead of (Rin,Rout,Rtop,Ztop), to characterize the shape of a magnetic surface. The value of the triangularity δt is usually positive in traditional tokamak operations, but negative triangularity is achievable and potentially useful, which is under active investigation.
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.5 to 2.0), triangularity δt = 0.6 (can be in the range from 0.3 to 0.6). 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 so-called Shafranov shift.
Magnetic field lines on closed magnetic surfaces travel closed curves in a poloidal plane. For these field lines, we can define the safety factor q, which is the number of toroidal loops a magnetic field line travels when it makes one poloidal loop, i.e.
| (32) |
where △ϕ as the change of the toroidal angle when a magnetic field line travels a full poloidal loop. The safety factor can also be understood as the average pitch angle of a magnetic field line in (𝜃,ϕ) plane of a closed magnetic surface.
For open field line region (where a field line touches the wall before its poloidal projection can close itself), the “connection length” is often used to characterize the magnetic field.
The equation of magnetic field lines is given by
| (33) |
where dℓp is the line element along the direction of Bp on the poloidal plane. Equation (33) can be arranged in the form
| (34) |
which can be integrated over dℓp to give
| (35) |
where the line integration is along the poloidal magnetic field (the contour of Ψ on the poloidal plane). Using this, Eq. (32) is written
| (36) |
The safety factor given by Eq. (36) is expressed in terms of the components of the magnetic field. The safety factor can also be expressed in terms of the magnetic flux. Define ΔΨp as the poloidal magnetic flux enclosed by two neighboring magnetic surface, then ΔΨp is given by
| (37) |
where Δx is the length of a line segment in the poloidal plane between the two magnetic surfaces, which is perpendicular to the first magnetic surface (so perpendicular to the Bp). Note that Δx, as well as R and Bp, generally depends on the poloidal location whereas ΔΨp is independent of the poloidal location.
Using Eq. (37), the poloidal magnetic field is written as
| (38) |
Substituting Eq. (38) into Eq. (36), we obtain
| (39) |
We know ΔΨp is a constant independent of the poloidal location, so ΔΨp can be taken outside the integration to give
| (40) |
It is ready to realise that the integral appearing in Eq. (40) is the toroidal magnetic flux enclosed by the two magnetic surfaces, ΔΨt. Using this, Eq. (40) is written as
| (41) |
Equation (41) 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.
If the safety factor of a magnetic surface is a rational number, i.e., q = m∕n, where m and n are integers, then this magnetic surface is called a rational surface, otherwise an irrational surface. A field line on a rational surface with q = m∕n closes itself after it travels n poloidal loops. An example of a field line on a rational surface is shown in Fig. 6.
In the above, the magnetic field is assumed to be axisymmetric. With this assumption, the poloidal magnetic field (having two components) can be expressed in terms of a single component of the vector potential A, Aϕ (specifically via Ψ ≡ AϕR). This kind of simplification can not be achieved if the axisymmetricity assumption is dropped, because other components of the vector potential (namely AR and AZ) will appear in the expression of the poloidal magnetic field. Let us re-examine Eq. (2) for a general magnetic perturbation:
When studying tearing modes and turbulence, most authors narrow the possible perturbations by setting δAR = δAZ = 0, i.e.,
| (43) |
| (44) |
| (45) |
where δΨ = RδAϕ. Therefore this kind of magnetic perturbation can still be written in the same form of the equilibrium poloidal magnetic field:
| (46) |
The above approximation is widely used in practice, e.g., tearing mode theory; turbulence simulation, where δAϕ is replaced by δA∥. (Do we miss some magnetic perturbations that is important for plasma transport when using the above specific form?)
The total magnetic field is then written as
| (47) |
**check**Can the projection of the total magnetic field line in the poloidal plane can be traced by tracing the contour of Ψ + δΨ? No. The contours of Ψ + δΨ will not show island structures in the poloidal plane. To show the expected island structures, we need to subtract non-reconnecting poloidal magnetic field from the total poloidal field. I will discuss this in Sec. (), where I will show that contours of the so-called helical flux will give the expected island structures near the resonant surfaces.**can be worng, I have not checked this.
Next, we go back to discuss the 2D case (i.e., assuming axisymmetry).
When the displacement current term is neglectable (the case we consider here), the conductive current is just another representation of the magnetic field. Specifically, the current density can be written in terms of the magnetic field as (Ampère’s law):
| (48) |
Use Eq. (48) and the definition g ≡ RBϕ, the poloidal components of the current density, JZ and JR, can be written as
| (49) |
and
| (50) |
respectively.
Ampere’s law (48) indicates the toroidal current density Jϕ is given by
Define △⋆ by
| (52) |
which is the Laplace operator in cylindrical coordinates for the axisymmertic case, then Eq. (51) is written as
| (53) |
(Many authors call Eq. (53) the Grad-Shafranov equation. This is incorrect. This is just Ampere’s law, which has nothing to do with the force-balance.)
Let us consider what constraint the force balance imposes on the axisymmetric magnetic field discussed above. The MHD momentum equation is given by
| (54) |
where ρ, ρq, ℙ, J, E, and B are mass density, charge density, thermal pressure tensor, current density, electric field, and magnetic field, respectively. The electric field force ρqE is usually ignored due to either ρq = 0 or E = 0. Further assume that there is no plasma flow (u = 0, the flow effect is discussed in A.2) and the plasma pressure is isotropic, then the steady state momentum equation (force balance equation) is written as
| (55) |
where P is the scalar plasma pressure.
Is the force balance (55) always satisfied in a real toakamak discharge? To answer this question, we need to go back to the original momentum equation (54). The imbalance between J × B and ∇P will give rise to the compressional Alfven waves, the time-scale of which, τA, is much shorter than the time-scale τ we are interested in. Therefore, on the time scale τ (and for slow flow with u < Cs, where Cs is the the sound speed), the leading order of the momentum equation is the force balance (55). (to be sure, I need to think about this again). This reasoning is from Youwen Sun[25].
Consider the force balance in the direction of B. Dotting the equilibrium equation (55) by B, we obtain
| (56) |
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 necessarily mean P is a single-valued function of Ψ, (i.e. P = P(Ψ)). This is because P still has the freedom of taking different values on different magnetic field lines with the same value of Ψ while still satisfying B ⋅∇P = 0. This situation can appear when there are saddle points (X points) in Ψ contours (refer to Sec. A.10) and P takes different functions of Ψ in islands of Ψ sepearated by a X point. For pressure within a single island of Ψ, P = P(Ψ) can be safely assumed.
On the other hand, if P = P(Ψ), then we obtain
B ⋅∇P = B ⋅∇Ψ = 0, |
i.e., Eq. (56) is satisfied, indicating P = P(Ψ) is a sufficient condition for the force balance in the parallel (to the magnetic field) direction.
Consider the force balance in the toroidal direction. The ϕ component of Eq. (55) is written
| (57) |
Since P = P(Ψ), which implies ∂P∕∂ϕ = 0, equation (57) reduces to
| (58) |
Using the expressions of the poloidal current density (49) and (50) in the force balance equation (58) yields
| (59) |
which can be further written
| (60) |
According to the same reasoning for the pressure, we conclude that g = g(Ψ) is a sufficient condition for the toroidal force balance. (The function g defined here is usually called the “poloidal current function” in tokamak literature. The reason for this name is discussed in Sec. A.3.)
Consider the force balance in direction. The component of Eq. (55) is written
| (61) |
Using the expressions of the current density and magnetic field [Eqs. (6) and (50)], equation (61) is written
| (62) |
Assuming the sufficient condition discussed above, i.e., P and g are a function of only Ψ, i.e., P = P(Ψ) and g = g(Ψ), Eq. (62) is written
| (63) |
which can be simplified to
| (64) |
which is the requirement of force-balance along the major radius. On the other hand, we know Jϕ can be expressed in Ψ via Eq. (53). Combining this with Eq. (64) yields
| (65) |
i.e.,
| (66) |
Equation (66) is known as Grad-Shafranov (GS) equation.
[Note that the Z component of the force balance equation is written
|
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, , , and B direction) and thus it must be satisfied in all the directions.]
A general axisymmetric magnetic field (which does not necessarily satisfy the force balance), is given by Eq. (10), i.e.,
| (67) |
For the above axisymmetric magnetic field to be consistent with the force balance equation (55), there are additional requirements for Ψ and g. Specifically, Ψ is restricted by the GS equation and g should be a function of only Ψ. Therefore an axisymmetric equilibrium magnetic field is fully determined by two functions, Ψ = Ψ(R,Z) and g = g(Ψ). The Ψ is determined by solving the GS equation with specified RHS source terms and boundary conditions.
The RHS source terms in the GS equation (66) are P(Ψ) and g(Ψ), both of which must be specified before the GS equation can be solved. For most cases, the source terms are nonlinear about Ψ and thus the GS equation is a two-dimensional (in R and Z) nonlinear partial differential equation for Ψ.
For most choices of P(Ψ) and g(Ψ), the GS equation (66) has to be solved numerically. For some particular choices of P and g profiles, analytical solutions are available, one of which is the Solovév equilibrium and is discussed in Appendix A.1.
Note that we solve the GS equation in order to obtain the poloidal magnetic flux Ψ and thus the poloidal magnetic field. The toroidal magnetic field must be specified in some way before we can solve the GS equation. There are several ways of specifying the toroidal magnetic field: (1) given g(Ψ), (2) given ⟨j∥⟩, (3) given the safety factor q(Ψ). There are simple relations between g, ⟨j∥⟩, and q, which allows translation form one to another (discussed later). In transport simulations, ⟨j∥⟩ is obtained from current drive models and neoclassical bootstrap current models. Note that the specification of the source terms (P, g, q, and ⟨j∥⟩) usually involve the unknown Ψ (via not only the explicit presence of Ψ, but also the flux-surface averaging which implicit involves Ψ). This indicates that iterations are needed when numerically solving the GS equation.
Since J = μ0−1∇× B, the current density J can be inferred from a given magnetic field. The components of J (expressed in terms of g and Ψ) are given by Eqs. (49), (50) and (53) and these expressions can be further simplified by using the equilibrium constraints, such as g = g(Ψ) and △∗Ψ = −μ0R2 −g. The simplified J expressions are given in A.8.
On the other hand, in the kinetic equilibrium reconstruction[19], it is the current that is first (partially) specified (e.g., by summing sources of current drive and bootstrap current) and then the current is used as constraints for the GS equation, i.e, constraints for the magnetic field.
The GS equation is given by Eq. (66), i.e.,
| (68) |
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 = s2P(Ψ), and g2 = ±sg(Ψ) is also a solution to the GS equation, 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 = g2(Ψ) + c. It is ready to prove that the scaled expression is still a solution to the GS equation because g2g2′ = 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 family of equilibria with different profiles 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, one 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.
The above scaling is made under the constraint that the the GS equation (68), is satisfied. In practice, we may scale Ψ by a factor while fixing g and P. This does not satisfy the GS equation, but allows more flexibility in changing the the safety factor profile. Scaling Ψ by a factor corresponds to scaling the plasma current and the poloidal magnetic field.
Given all the toroidal currents, Ψ can be calculated using a formula similar to the Biot-Savart Law (see (667)):
| (69) |
where Jϕ is the plasma toroidal current density, Ii is the toroidal curent in No. i PF coil located at (R = Ri,Z = Zi), G is a function given by
On the other hand, the force-balance indicates that Jϕ can be expressed in terms of Ψ via Eq. (64), i.e.,
| (71) |
Substituting this into Eq. (69) gives an implicit formula for Ψ, which can be iterated (assuuming an initial guess of Ψ(R,Z) on the rhs and assuming the function forms, P(Ψ) and g(Ψ), are known). Will the iteration turn out to converge? We do not know for sure, and numerical experiments indicate it does in some cases[17]. Let us discuss these cases. The 1D functions, P(Ψ) and g(Ψ), are modeled as polynomials in Ψ with coefficients αn and β0 to be determined:
| (72) |
| (73) |
where x = Ψ = (Ψ − ΨM)∕(ΨB − ΨM), ΨM and ΨB are values of Ψ at the magnetic axis and LCFS (values of ΨM and ΨB are figured out from Ψ(R,Z)).
Choosing an initial guess of Ψ(R,Z) on gridpoints, we can get the values of αn, β0, and Ii by solving a least square problem that minimises the difference between quantities computed (from Ψ and Ii) and the corresponding quantities measured in actual experiments. After this, the rhs of Eq. (69) is fully known, and we can use this equation to update Ψ(R,Z). Then, using the latest Ψ, we solve the least square problem again. Then we obtain new Ψ using Eq. (69) again. We repeat the above procedure until convergecne in Ψ(R,Z). This is called Picard iteration.
I use the above method in developing a numerical code called HEQ. The following subsection discusses the least square problem in details.
| (74) |
| (75) |
| (76) |
| (77) |
| (78) |
Plugging expressions (72) and (73) into (71), and organizing the result according to the coefficients (α0,α1,α2,β0), we obtain
For notation ease, definethen Eq. (79) is written as
| (80) |
Plugging expression (80) into Eq. (69), we obtain
Define the free parameters as a column vector u = (c0,c1,c2,c3,I0,…,INc−1)T, and N = 4 + Nc, i.e., the size of vector u, i.e., the number of free parameters. Then, at a given (R,Z), the rhs of Eq. (81) can be written as matrix-vector product, Γu. Denote the total number of measurements of the poloidal flux by MΨ. Then matrix elements of Γ for (i = 0,…,MΨ − 1) are given by:
| (82) |
for (j = 0,…,3), and
| (83) |
for (j = 4,…,N − 1) . Here (Ri(FL),Zi(FL)) is the location where the ith flux measurement is made.
The matrix Γ is called “response matrix”, which is of shape (M,N), The value of M is equal to number of measurements included (measurements are merged to Γ by row stacking). We will include MΨ measurements of the poloidal flux, MB measurements of the poloidal magnetic field, and 1 measurement of plasma current. Then M = MΨ + MB + 1. (For EAST, MΨ = 35,MB = 38.)
Next, we consider the poloidal field measurement:
| (84) |
where i is the positive normal direction of the No. i magnetic probe, i,R = i ⋅eR, i,Z = i ⋅eZ. On the other hand, Bp(Ri,Zi) can be inferred from Ψ via
| (85) |
where
| (86) |
and GBR and GBZ is given by Eq. (671) and (672). The rhs of Eq. (85) indicates that the matrix elements of Γ for (i = MΨ,…,MΨ + MB − 1) are given by:
| (87) |
for (j = 0,…,3), and
| (88) |
for (j = 4,…,N − 1) .
Next, we consider the constraint of plasma current. The plasma current Ip can be inferred from Ψ via
| (89) |
The rhs of Eq. (89) indicates that the matrix elements of Γ for i = MΨ + MB + 1 are given by:
| (90) |
for (j = 0,…,3), and zero for (j = 4,…,n − 1) .
Step 0. Initial guess of Ψ: Ψ(k) with k = 0.
Step 1. Compute elements of response matrix Γ using Ψ(k).
Step 2. Solve linear least-square problem to get (c1,c2,c2,c4,I1,…,INc).
Step 3. Update Ψ using the Picard iteration:
| (91) |
or in its discrete form:
| (92) |
Step 4: k = k + 1 and goto Step 1.
In Step 1, we first search for the magnetic axis and boundary surface of Ψ(k) so that we can get the values of Ψ(k) at those locations. These values are needed in computing x = (Ψ(k) − ΨM)∕(ΨB − ΨM).
A formula for computing q value at the magnetic axis [ref. P. M. Bellan’s paper]:
qaxis = , |
where
| (93) |
Jϕ axis = ∑ j=03c jbj(x) = c0b0(0) + c3b3(0) = c0Raxis + c3 |
| (94) |
| (95) |
If we want to invert the Laplace operator △∗ of the GS equation to solve for Ψ, we encounter two issues: (1) the RHS of the GS equation involves functions of Ψ, where both the functions and Ψ are unknown; (2) the values of Ψ on a given boundy should be prescribed, which in turn invovles two issues: (a) how to choose the shape of the bounday? (b) how to know the value of Ψ on the boundary? The answer to isssues (a) and (b) is that we can choose any boundy we like (e.g., rectangular region) and guess the values of Ψ on it (which will be updated in iterations discussed later). The answer to issue (1) is that the function forms are chosen by users, usually as polymials in Ψ, e.g. [17]
where x = (Ψ − ΨM)∕(ΨB − ΨM), ΨM and ΨB are values of Ψ at the magnetic axis and LCFS (but the locations of the axis and LCFS are unknown), the free parameters αn and βn are assumed known (which will be later adjusted in the least-square method to make the resulting solution approximately match some measurements and constraints imposed). To make the RHS fully known, we need to guess values of Ψ in the inner region. Then inverting △∗ to get new Ψ. The values we obtained via inerting △∗ usually differ from what we used in the RHS, so we need to interate until convergence. We call this interation as the first-level iteration.
After the first-level iteration coverges, we can calculate Jϕ through Eq. (64) or Eq. (53). After this, all the current (current in the plasma, and current in the external coils, which are assumed to be known and will be adjusted in the least-square method) perpendicular to the poloidal plane is known, we can calculate the value of Ψ on the boundary, Ψb, by using the Green’s function method. If Ψb calculated this way differs from the initial guess of the value of Ψ on the boundary, we need to iterate: use the Ψb calculated as a new guess value of Ψ on the boundary and repeat the above procedures until convergence. We call this iteration as the second-level iteration.[?].
The thrid level iteration is to iterate over the free parameters αn, βn, the PF coil currents, to make the solution match match some measurements and constraints imposed in the least square sence. This iteration is an optimization problem.
Plasma physists love to consider a kind of simplified problem: the fixed boundary equilibrium problem, where the shape of the boundary flux surface is given (the value of Ψ is a constant on this boundary). In dealing with the fixed boundary problem, the curvilinear coordinate system is useful. Specifically, the convenience is that the coordinates can be adjusted to make one of the coordinate surfaces coincide with the given boundary flux surface, so that the boundary condition becomes trivial.
More generally, curvilinear coordinates can be ajusted to make coordinate surfaces coincide with magnetic surfaces (dicussed later). This often simplifies analysis of wave and transport problems, especially when we properly choose the poloidal/toroidal coordinate to make magnetic field lines look like straight lines in terms of these coordinates.
Next section discusses the basic theory of curvilinear coordinates system[4].
In many studies of tokamak plasmas, one need construct a curvilinear coordinate system based on a given magnetic cofiguration in order to make the problem amenable to analytical methods or numerical methods. Specifically, many theories and numerical codes use the curvilinear coordinate systems that are constructed with one coordinate surface coinciding with magnetic surfaces. In these coordinate systems, we need to choose a poloidal coordinate 𝜃 and a toroidal coordinate ζ. As metioned above, a particular choice for 𝜃 and ζ is one that makes the magnetic field lines be straight lines in (𝜃,ζ) plane. These kinds of coordinates are often called magnetic coordinates. That is, “magnetic coordinates are defined so they conform to the shape of the magnetic surfaces and trivialize the equations for the field lines.”
A further tuned magnetic coordinate system is the so-called field aligned (or filed-line following) coordinate system, in which changing one of the three coordinates with the other two fixed would correspond to following a magnetic field line. The field aligned coordinates are discussed in Sec. 15.
Next, let us discuss some general properties about coordinates transformation.
In the Cartesian coordinates, a point is described by its coordinates (x,y,z), which, in the vector form, is written as
| (96) |
where r is the location vector of the point; , , and are the basis vectors of the Cartesian coordinates, which are constant, independent of spactial location. The transformation between the Cartesian coordinates system, (x,y,z), and a general coordinates system, (x1,x2,x3), can be expressed as
| (97) |
For example, cylindrical coordinates (R,ϕ,Z) can be considered as a general coordinate systems, which are defined by r = R cosϕ + R sinϕ + Z.
The transformation function in Eq. (97) can be written as
| (98) |
A useful quality characterizing coordinate transformation is the Jacobian determinant (or simply called Jacobian), which, for the transformation in Eq. (98), is defined by
| (99) |
which can also be written as
| (100) |
It is easy to prove that the Jacobian 𝒥 in Eq. (100) can also be written (the derivation is given in my notes on Jacobian)
| (101) |
Conventionally, the Jacobian of the transformation from the Cartesian coordinates to a particular coordinate system σ is called the Jacobian of σ, without explitly mentioning that this transformation is with respect to the Cartesian coordinates.
Using the defintion in Eq. (99), the Jacobian 𝒥 of the Cartesian coordinates can be calculated, yielding 1. Likewise, the Jacobian of the cylindrical coordinates (R,ϕ,Z) can be calculated as follows:
In a curvilinear coordinate system (x1,x2,x3), there are two kinds of basis vectors: ∇xi and ∂r∕∂xi, with i = 1,2,3. These two kinds of basis vectors satisfy the following orthogonality relation:
| (102) |
where δij is the Kronical delta function. [Proof: Working in a Cartesian coordinate system (x,y,z) with the corresponding basis vectors denoted by (,,), then the left-hand side of Eq. (102) can be written as
where the second equality is due to ∂∕∂xj = 0,∂∕∂xj = 0,∂∕∂xj = 0 since ,, are constant vectors independent of spatial location; the chain rule has been used in obtaining Eq. (104)][The cylindrical coordinate system (R,ϕ,Z) is an example of general coordinates. As an exercise, we can verify that the cylindrical coordinates have the property given in Eq. (102). In this case, x = x1 cosx2, y = x1 sinx2, z = x3, where x1 ≡ R, x2 ≡ ϕ, x3 ≡ Z.]
It can be proved that ∇xi is a contravariant vector while ∂r∕∂xi is a covariant vector (I do not prove this and do not bother with the meaning of these names, just using this as a naming scheme for easy reference).
The orthogonality relation in Eq. (102) is fundamental to the theory of general coordinates. 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
| (105) |
where A is a unknown variable to be determined. To determine A, dotting Eq. (105) by ∇x1, and using the orthogonality relation again, we obtain
| (106) |
which gives
| (108) |
Similarly, we obtain
| (109) |
and
| (110) |
Equations (108)-(110) can be generally written
| (111) |
where (i,j,k) represents the cyclic order in the variables (x1,x2,x3). Equation (111) expresses the covariant basis vectors in terms of the contravariant basis vectors. On the other hand, from Eq. (108)-(110), we obtain
| (112) |
which expresses the contravariant basis vectors in terms of the covariant basis vectors.
Suppose (ψ,𝜃,ζ) is an arbitrary general coordinate system. Following Einstein’s notation, contravariant basis vectors are denoted with upper indices as
| (115) |
In term of the contravairant basis vectors, A is written
| (116) |
where the components are easily obtained by taking scalar product with eψ,e𝜃,andeζ, yielding Aψ = A ⋅ eψ, A𝜃 = A ⋅ e𝜃, and Aζ = A ⋅ eζ. Similarly, in term of the covariant basis vectors, A is written
| (117) |
where Aψ = A ⋅ eψ, A𝜃 = A ⋅ e𝜃, and Aζ = A ⋅ eζ.
Using the above notation, the relation in Eq. (111) is written as
| (118) |
| (119) |
| (120) |
where 𝒥 = [(∇ψ ×∇𝜃) ⋅∇ζ]−1. Similarly, the relation in Eq. (112) is written as
| (121) |
| (122) |
| (123) |
The gradient of a scalar function f(ψ,𝜃,ζ) is readily calculated from the chain rule,
| (124) |
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 respectively by the three contravariant basis vectors, yielding
| (125) |
| (126) |
| (127) |
Using Eq. (124), the directional derivative in the direction of ∇ψ is written as
| (128) |
To calculate the divergence of a vector, it is desired that the vector should be in the contravariant form because we can make use of the fact:
| (129) |
for any scalar quantities α and β. Therefore we write vector A as
| (130) |
where A(ψ) = A ⋅∇ψ, A(𝜃) = A ⋅∇𝜃, A(ζ) = A ⋅∇ζ. Then the divergence of A is readily calculated as
where the second equality is obtained by using Eqs. (125), (126), and (127).
The Laplacian operator is defined by ∇2 ≡∇⋅∇. Then ∇2f is written as (f is an arbitrary function)
To proceed, we can use the divergence formula (132) to express the divergence in the above expression. However, the vector in the above (blue term) is not in the covariant form desired by the divergence formula (132). If we want to directly use the formula (132), we need to transform the vector (blue term in expression (133)) to the covariant form. This process seems to be a little complicated. Therefore, I choose not to use this method. Instead, I try to simplify expression (133) by using basic vector identities:
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
Note that taking the curl of a vector in the covariant form leaves the vector in the contravariant form.
Consider a general coordinate system (ψ,𝜃,ζ). I define the metric tensor as the transformation matrix between the covariant basis vectors and the contravariant ones. Equations (111) and (112) express the relation between the two sets of basis vectors using cross product. Next, let us express the relation in matrix from. To obtain the metric matrix, we write the contrariant basis vectors in terms of the covariant ones, such as
| (139) |
Taking the scalar product respectively with ∇ψ, ∇𝜃, and ∇ζ, Eq. (139) is written as
| (140) |
| (141) |
| (142) |
Similarly, we write
| (143) |
Taking the scalar product with ∇ψ, ∇𝜃, and ∇ζ, respectively, the above becomes
| (144) |
| (145) |
| (146) |
The same situation applies for the ∇ζ basis vector,
| (147) |
Taking the scalar product with ∇ψ, ∇𝜃, and ∇ζ, respectively, the above equation becomes
| (148) |
| (149) |
| (150) |
Summarizing the above results in matrix form, we obtain
| (151) |
Similarly, to convert contravariant basis vector to covariant one, we write
| (152) |
Taking the scalar product respectively with ∇𝜃 ×∇ζ𝒥 , ∇ζ ×∇ψ𝒥 , and ∇ψ ×∇𝜃𝒥 , the above equation becomes
| (153) |
| (154) |
| (155) |
For the second contravariant basis vector
| (156) |
| (157) |
| (158) |
| (159) |
For the third contravariant basis vector
| (160) |
| (161) |
| (162) |
| (163) |
Summarizing these results, we obtain
| (164) |
where
M = , |
This matrix and the matrix in Eqs. (151) should be the inverse of each other. It is ready to prove this by directly calculating the product of the two matrix.
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. (151) is simplified to
| (165) |
Similarly, Eq. (164) is simplified to
| (166) |
[Note that the matrix in Eqs. (165) and (166) should be the inverse of each other. The product of the two matrix,
| (167) |
can be calculated to give
, |
where
A = |∇𝜃|2|∇ψ|2𝒥2∕R2 − (∇𝜃 ⋅∇ψ)2𝒥2. |
By using the definition of the Jacobian in Eq. (101), it is easy to verify that A = 1, i.e.,
| (168) |
]
The axisymmetric equilibrium magnetic field is given by Eq. (67), i.e.,
| (169) |
In a general coordinate system (ψ,𝜃,ϕ) (not necessarily magnetic surface coordinates), the above expression can be written as
| (170) |
where the subscripts denote the partial derivatives with the corresponding subscripts. Note that Eq. (170) is a mixed representation, which involves both covariant and contravariant basis vectors. Equation (170) can be converted to the contravariant form by using the metric tensor, giving
| (171) |
Similarly, Eq. (170) can also be transformed to the covariant form, giving
| (172) |
For the convenience of notation, define
| (173) |
then Eq. (172) is written as
| (174) |
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 (we also have ∂Ψ∕∂ϕ = 0 since we are considering axially symmetrical case). In terms of (ψ,𝜃,ϕ) coordinates, the contravariant form of the magnetic field, Eq. (171), is written as
| (175) |
where Ψ′≡ dΨ∕dψ. The covariant form of the magnetic field, Eq. (172), is written as
| (176) |
The local safety factor is defined by
| (177) |
which characterizes the local pitch angle of a magnetic field line in (𝜃,ϕ) plane of a magnetic surface. Substituting the contravariant representation of the magnetic field, Eq. (175), into the above equation, the local safety factor is written
| (178) |
Note that the expression in Eq. (178) depends on the Jacobian 𝒥 . This is because the definition of depends on the definition of 𝜃, which in turn depends on the the Jacobian 𝒥 .
In terms of , the contravariant form of the magnetic field, Eq. (175), is written
| (179) |
and the parallel differential operator B0 ⋅∇ is written as
| (180) |
If happens to be independent of 𝜃 (i.e., field lines are straight in (𝜃,ϕ) plane), then the above operator becomes a constant coefficient differential oprator (after divided by 𝒥−1). This simplification is useful because different poloidal harmonics are decoupled in this case. We will discuss this issue futher in Sec. 14.
The global safety factor defined in Eq. (36) is actually the poloidal average of the local safety factor, i.e.,
Note that q and 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).Next, let us transform the 𝜃 integration in expression (182) to a curve integral in the poloidal plane. Using the relation dℓp and d𝜃 [Eq. (190)], expression (182) is further written
Expression (183) is used in the GTAW code to numerically calculate the value of q on magnetic surfaces (as a benchmarking of the q profile specified in the G-eqdsk file). Expression (183) can also be considered as a relation between q and g. In the equilibrium problem where q is given (fixed-q equilibrium), we can use expression (183) to obtain the corresponding g (which explicitly appears in the GS equation):
| (184) |
We note that expression (184) involves magnetic surface averaging, which is unknown before we know Ψ. Therefore iteration is usually needed in solving the fixed-q equilibrium (i.e., we guess the unknown Ψ, so that the magnetic surface averaging in expression (184) can be performed, yielding the values of g.)
Using Bp = |∇Ψ|∕R and Bϕ = g∕R, the absolute value of q in expression (183) is written
Given the definition of a magnetic surface coordinate system (ψ,𝜃,ϕ), the Jacobian of this system is fully determined. On the other hand, given the definition of ψ, ϕ, and the Jacobian, the definition of 𝜃 is fully determined (can have some trivial shifting freedoms). Next, let us discuss how to calculate 𝜃 in this case. In (ψ,𝜃,ϕ) coordinates, a line element is written
| (187) |
The line element that lies on a magnetic surface (i.e., dψ = 0) and in a poloidal plane (i.e., dϕ = 0) is then written
| (189) |
Using the fact that ∇ψ and ∇ϕ are orthogonal and ∇ϕ = ∕R, the above equation is written as
| (190) |
Given |𝒥∇ψ|, Eq. (190) can be integrated to determine the 𝜃 coordinate of points on a magnetic surface.
—–
| (191) |
Once |𝒥∇ψ| is known, the value of 𝜃 of a point can be obtained by integrating expression (190), i.e.,
| (192) |
where the curve integration is along the contour Ψ = Ψj, xref,j is a reference point on the contour, where value of the poloidal angle is chosen as 𝜃ref,j. The choice of the positive direction of 𝜃 is up to users. Depending on the positive direction chosen, the sign of the Jacobian of the constructed coordinates can have a sign difference from the 𝒥 appearing in Eq. (192). Denote the Jacobian of the constructed coordinates by 𝒥′, then
| (193) |
This sign can be determined after the radial coordinate and the positive direction of the poloidal angle are chosen. In GTAW code, I choose the positive direction of 𝜃 to be in anticlockwise direction when observers look along the direction of . To achieve this, the line integration in Eq. (192) 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 from a given set of discrete points on a magnetic surface.)
The span of 𝜃 defined by Eq. (192) is usually not 2π in one poloidal loop. This poloidal angle can be scaled by s(ψ) to define a new poloidal coordinate 𝜃, whose span is 2π in one poloidal loop, where s(ψ) is a magnetic surface function given by
| (194) |
Then 𝜃 is written as
where 𝜃ref,j = s(ψj)𝜃ref,j. Sine we have modified the definition of the poloidal angle, the Jacobian of the new coordinates (ψ,𝜃,ϕ) is different from that of (ψ,𝜃,ϕ). The Jacobian 𝒥new of the new coordinates (ψ,𝜃,ϕ) is written as The Jacobian 𝒥 can be set to various forms to achieve various poloidal coordinates, which will be discussed in the next section. After the Jacobian and the radial coordinate ψ is chosen, all the quantities on the right-hand side of Eq. (195) are known and the integration can be performed to obtain the value of 𝜃i,j of each point on each flux surface.[The reference points xref,j and the values of poloidal angle at these points can be chosen by users. One choice of the reference points xref,j are those points on the horizontal ray in the midplane that starts from the magnetic axis and points to the low filed side of the device and 𝜃ref,j at these points is chosen as zero (this is my choice in the GTAW code). In the TEK code, the reference points are chosen at the high-field side of the midplane and 𝜃ref,j = −π at the reference points.]
If the Jacobian 𝒥 is chosen to be of the following form
| (197) |
Then 𝜃i,j in Eq. (195) is written
| (198) |
and the Jacobian of new coordinates (ψ,𝜃,ϕ), 𝒥new, which is given by Eq. (196), now takes the form
| (199) |
Equation (198) 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. (198) 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.
The volume element in (ψ,𝜃,ϕ) coordinates is given by dV = |𝒥|d𝜃dϕdψ. If we choose a Jacobian that is independent of 𝜃, then uniform 𝜃 grids will correspond to grids with uniform volume interval. In this case, 𝒥 is written as
| (200) |
where h(ψ) is a function independent of 𝜃. Then 𝜃i,j in Eq. (195) is written
| (201) |
and the Jacobian of the new coordinates (ψ,𝜃,ϕ), 𝒥new, is given by Eq. (196), which now takes the following form:
| (202) |
Note that both 𝜃i,j and 𝒥new are independent of the function h(ψ) introduced in Eq. (200). (h(ψ) is eliminated by the normalization procedure specified in Sec. 10.4 due to the fact that h(ψ) is constant on a magnetic surface.) The equal-volume poloidal angle is also called Hamada poloidal angle.
The equal-volume poloidal angle is useful in achieving loading balance for parallel particle simulations. Assume that markers are loaded uniform in space and the poloidal angle is domain decomposed and assigned to different MPI process. Then the equal-volume poloidal angle can make marker number in each MPI process be equal to each other and thus work loading to each process be equal. (**check**If the domain decomposition is also applied to the radial direction, to achieve loading balance, then the radial coordinate ψ should be chosen in a way that makes ∮ (R∕∇ψ)dlp be independent of ψ, so that 𝒥new in Eq. (202) is constant in space.**)
If the Jacobian 𝒥 is chosen to be of the Boozer form:
| (203) |
then the poloidal angle in Eq. (195) is written as
| (204) |
The final Jacobian is given by
| (205) |
The usefullness of Boozer poloidal angle will be further discussed in Sec. 14.8 after we introduce a gneralized toroidal angle.
If the Jacobian 𝒥 is chosen to be of the following form
𝒥 (ψ,𝜃) = R2, |
then Eq. (178) implies that the local safety factor, (ψ,𝜃) = −g∕Ψ′, is a magnetic surface function, i.e., the magnetic field lines are straight in (ψ,𝜃) plane. Then the poloidal angle in Eq. (195) is written
| (206) |
The Jacobian 𝒥new given by Eq. (196) now takes the form
| (207) |
Let us denote an arbitrary poloidal angle by 𝜃 and the above straight-field-line poloidal angle by 𝜗, then it is ready to find the following relation between 𝜃 and 𝜗:
| (208) |
where is the local safety factor corresponding to the arbitrary poloidal angle 𝜃, i.e., = B⋅∇ϕ∕(B⋅∇𝜃). [Proof: Using d𝜃 = dlp, the poloidal angle 𝜗 given in Eq. (206) is written as
Note that Boozer poloidal angle is very close to the poloidal angel disccused here because the two Jacobians are very similar:
| (210) |
All Jacobians introduced above can be written in a general form:
| (211) |
The choice of (i = 2,j = k = 0) gives the PEST coordinate, (i = j = 0,k = 2) give the Boozer coordinate, (i = j = 1,k = 0) gives the equal-arc coordinate, (i = j = k = 0) gives the Hammada coordinate.
Figure 7 compares the equal-arc-poloidal angle and 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. Since ballooning modes take larger amplitude near the low-field-side midplane, better resolution is desired there. This is one reason that I often avoid using the straight-line poloidal angle in my numerical codes.
After the magnetic coordinates are constructed, we can evaluate the Jacobian 𝒥new by using directly the definition of the Jacobian, i.e.,
| (212) |
which can be further written as
| (213) |
where the partial differential can be evaluated by using numerical differential 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 evaluate ∇ψ, which finally reduces to evaluating ∇Ψ. The value of |∇Ψ| is obtained numerically based on the numerical data of Ψ given in cylindrical coordinate grids. Then the cubic spline interpolating formula is used to obtain the value of |∇Ψ| at desired points. (𝒥new calculated by the second method (i.e. using analytic form) 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 𝒥 , rather than 𝒥new.
The radial coordinate ψ can be chosen to be various surface function, e.g., volume, poloidal or toroidal magnetic flux within a magnetic surface. The frequently used radial coordinates include Ψ, and , where Ψ is defined by
| (214) |
where Ψ0 and Ψa are the values of Ψ at the magnetic axis and LCFS, respectively. Other choices of the radial coordinates: the toroidal magnetic flux and its square root, Ψt, and , where Ψt and Ψt are defined by
| (215) |
and
| (216) |
respectively, where Ψt(0) and Ψt(1) are the values of Ψt at the magnetic axis and LCFS, respectively.
If ψ = , then
| (217) |
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 𝒥−1 = ∇ψ ×∇𝜃 ⋅∇ϕ indicates that (1) 𝒥 is negative if ∇ψ points from the magnetic axis to LCFS; (2) 𝒥 is positive if ∇ψ points from the LCFS to the magnetic axis. This can be used to determine the sign of Jacobian after using the analytical formula to obtain the absolute value of Jacobian.
If ψ = Ψ or ψ = , ∇ψ points from the magnetic axis to LCFS.
The volume between magnetic surfaces can also be used as a radial coordinate. The differential volume element is written as
| (218) |
Integrating over the toroidal angle, we obtain
| (219) |
Further integrating over the poloidal angle, we obtain
| (220) |
i.e.,
| (221) |
In codes I wrote, I stick to using Ψ as the radial coordinate when doing computation, and transform to other radial coordinates when presenting the results if needed.
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 that we 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. (190) (if the Jacobian is specified) or some method specified by us to achieve some property we prefer for the poloidal angle (if a Jacobian is not directly specified). Then we obtain the magnetic surface coordinates system (ψ,𝜃,ϕ).
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, I 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 method (bisection method is used in GTAW code). After finding 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.
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
| (222) |
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.
Metric elements of the (ψ,𝜃,ϕ) coordinates, e.g., ∇ψ ⋅∇𝜃, are often needed in practical calculations. Next, we express these metric elements in terms of the cylindrical coordinates (R,Z) and their partial derivatives with respect to ψ and 𝜃. Note that, in this case, the coordinate system is (ψ,𝜃,ϕ) while R and Z are functions of ψ and 𝜃, i.e.,
| (223) |
| (224) |
Then ∇R and ∇Z are written as
| (225) |
| (226) |
wehre Rψ ≡ ∂R∕∂ψ, etc. Equations (225) and (226) can be solved to give
| (227) |
| (228) |
Using the above expressions, the Jacobian of (ψ,𝜃,ϕ) coordinates, 𝒥 , is written as
| (230) |
Using this, Expressions (227) and (228) are written as
| (231) |
and
| (232) |
Then the elements of the metric matrix are written as
| (233) |
| (234) |
and
| (235) |
Equations (233), (234), and (235) are the expressions of the metric elements in terms of R, Rψ, R𝜃, Zψ, and Z𝜃. [Combining the above results, we obtain
| (236) |
Equation (235) is used in GTAW code. Using the above results, hαβ = ∇α ⋅∇β are written as
| (237) |
| (238) |
| (239) |
As a side product of the above results, we can calculate the arc length in the poloidal plane along a constant ψ surface, dℓp, which is expressed as
In some cases (e.g., turbulence simulation), model tokamak magnetic field, which is not an exact solution to the GS equation, is often used. In the model, the safety factor profile q(ψ), toroidal field function g(ψ), and the magnetic surface shape (R(ψ,𝜃),Z(ψ,𝜃)) are given. To use this model in a simulation, we need to calculate its poloidal magnetic field, which is determined by the poloidal magnetic flux function Ψ. To determine Ψ, we need to use Eq. (182), i.e.,
| (241) |
and re-organize the formula as
| (242) |
which can be integrated to obtain Ψ and thus the poloidal magnetic field Bp = ∇Ψ ×∇ϕ, where 𝒥 = [(∇ψ ×∇𝜃) ⋅∇ϕ]−1. The toroidal magnetic field can be obtained from g(ψ) by Bϕ = g∕R. In most papers, g(ψ) is chosen to be a constant.
A typical magnetic surface shape used in simulations is the Miller shape, which is given by
| (243) |
where r = ψ is the radial coordinate, R0(r), δ(r), and κr(r) are the Shafronov shift, triangularity, and elongation profiles, which can be arbitrarily specified. For the special case of R0 being a constant, δ(r) = 0, and κ(r) = 1, this shape reduces to a concentric-circular magnetic field. An example of calculating the poloidal field of the model field is given in Sec. 16. This kind of model field can be called theoretical physicists’ tokamak. Computational physicists often use this model for code benchmarking purpose. The famous DIII-D cyclone base case is an example, which was extensively used for benchmarking gyrokinetic simulation of ion temperature driven turbulence.
The magnetic surface average of a physical quantity G(ψ,𝜃,ϕ) is defined by
| (244) |
where the volume integration is over a small volume between two adjacent flux surfaces with Ψ differing by △Ψ. [This formula (with finite ΔΨ) is used in TEK code to calculate the radial heat flux.]
The above 3D volume integration can also be written as a 2D surface integration. The differential volume element is given by d3V = |𝒥|dψd𝜃dϕ, where 𝒥 is the Jacobian of (ψ,𝜃,ϕ) coordinates. Using this, equation (244) is written as
which is a 2D averaging over a magnetic surface and thus is called magnetic surface average. Note that the surface averaging of any n≠0 harmonic is zero (n is the toroidal mode number). Therefore the magnetic surface average contains only the contribution from the n = 0 component, i.e., axisymmetric component. (On the other hand, m≠0 poloidal harmonics of G can contribute to the surface average since the Jacobian has a poloidal angle dependence.) Using this and noting that 𝒥 is axisymmetric, then expression (245) is written as
| (246) |
where G0(𝜃) is defined by the following Fourier expansion:
| (247) |
_________________________________________________________________________________________________________________________
“Zonal” and “mean” components
⟨G⟩ is sometimes called the “zonal” component of G if the radial wavelength of ⟨G⟩ is much smaller than the equilibrium scale length. If the radial wavelength of ⟨G⟩ is comparable to the equilibrium scale length, ⟨G⟩ is usually called “mean” component in tokamak literature. For example, mean flows are of system space scale and thus are easy to be observed in experiments. On the other hand, the “zonal” flow, which usually refers to the turbulence generated secondary flow, is of much smaller radial scale (the radial wavelength of zonal flow is of several Larmor radius) and thus is difficult to observe in experiments.
_________________________________________________________________________________________________________________________
Sometimes, we do not want the Jacobian to explicitly appear in the formula. This can be achieved by writing the differential volume element as
| (248) |
Using Bp = |∇Ψ|∕R, the volume element is further written as
| (249) |
Using this, the averaging defined in Eq. (244) is written as
| (251) |
(Equation (251) is used in the GTAW code to calculate the magnetic surface averaging.) Using Eq. (190) and Bp = |∇Ψ|∕R, equation (251) can also be written as
| (252) |
Using the expression of the volume element dτ = |𝒥|d𝜃dϕdψ, the volume within a magnetic surface is written
| (253) |
Using this, the differential of V with respect to ψ is written as
| (254) |
Using this, Eq. (252) is written as
⟨G⟩ = ∫ 02πG|𝒥|d𝜃 |
Next, examine the meaning of the following volume integral
| (255) |
where the volume V = V (ψ) is the volume within the magnetic surface labeled by ψ. Using ∇⋅ B = 0, the quantity D can be further written as
| (256) |
Note that 𝜃 is not a single-value function of the spacial points. In order to evaluate the integration in Eq. (256), we need to select one branch of 𝜃, which can be chosen to be 0 ≤ 𝜃 < 2π. Note that function 𝜃 = 𝜃(R,Z) is not continuous in the vicinity of the contour of 𝜃 = 0. Next, we want to use the Gauss’s theorem to convert the above volume integration to surface integration. Noting the discontinuity of the integrand 𝜃B in the vicinity of the contour of 𝜃 = 0, the volume should be cut along the contour, thus, generating two surfaces. Denote these two surfaces by S1 and S2, then equation (256) is written as
| (258) |
Using the expression of the volume element dτ = |𝒥|d𝜃dϕdψ, Ψp can be further written in terms of flux surface averaged quantities.
Note that the sign of the Jacobian appears in Eq. (259), 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. (259) is exactly consistent with that in Eq. (26).Similarly, the toroidal flux within a flux surface is written as
| (260) |
the poloidal current within a flux surface is written as
| (261) |
and toroidal current within a flux surface is written as
| (262) |
(**check**)The toroidal magnetic flux is written as
⇒ Ψt′ = g |
⇒ = g |
| (264) |
Next, calculate the derivative of the toroidal flux with respect to the poloidal flux.
Comparing this result with Eq. (465) indicates that it is equal to the safety factor, i.e.,
| (266) |
By using the contravariant representation of current density (497), the poloidal current within a magnetic surface is written as
−∇ψ ×∇𝜃 − g′∇ϕ ×∇ψ, |
The toroidal current is written as
The last equality is due to ∇ψ = 0 at ψ = 0. By using the flux surface average operator, Eq. (268) is written
| (269) |
Next, calculate another useful surface-averaged quantity,
In Sec. 10.1, we introduced the local safety factor (ψ,𝜃). Equation (178) indicates that if the Jacobian is chosen to be of the particular form 𝒥 = h(ψ)R2, then the local safety factor is independent of 𝜃, 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 𝒥 = h(ψ)R2. We note that, as mentioned in Sec. 10.3, the poloidal angle is fully determined by the choice of the Jacobian. The specific choice of 𝒥 = α(ψ)R2 is usually too restrictive for achieve a desired poloidal resolution (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 a new toroidal angle ζ by[10]
| (272) |
where δ = δ(ψ,𝜃) is a unknown function to be determined by the constraint of field line being straight in (𝜃,ζ) plane. Using Eq. (179), the new local safety factor in (ψ,𝜃,ζ) coordinates is written as
To make the new local safety factor be independent of 𝜃, the right-hand side of Eq. (273) should be independent of 𝜃, i.e.,
| (274) |
where c(ψ) can be an arbitrary function of ψ. A convenient choice for c(ψ) is c(ψ) = q, i.e., making the new local safety factor be equal to the original global safety factor, i.e., new = q. In this case, equation (274) is written as
| (275) |
which, on a magnetic surface labed by ψ, can be integrated over 𝜃 to give
| (276) |
where 𝜃ref is an starting poloidal angle arbitrarily chosen for the integration, and δ(ψ,𝜃ref) is the constant of integration. In the following, both 𝜃ref and δ(ψ,𝜃ref) will be chosen to be zero. Then the above equations is written
| (277) |
Substituting the above expression into the definition of ζ (Eq. 272), we obtain
| (278) |
which is the formula for calculating the general toroidal angle. If 𝜃 is a straight-field line poloidal angle, then ζ in Eq. (278) reduces to the usual toroidal angle ϕ.
In summary, magnetic field line is straight in (𝜃,ζ) plane with slope being q if ζ is defined by Eq. (278). 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 choose a good poloidal angle coordinate. Note that the Jacobian of the new coordinates (ψ,𝜃,ζ) is equal to that of (ψ,𝜃,ϕ). [Proof:
[In numerical implementation, the term ∫ 0𝜃d𝜃 appearing in δ is computed by using
For later use, from Eq. (277), we obtain
This formula is used in GTAW code, where the derivative ∂(g∕Ψ′)∕∂ψ is calculated numerically by using the central difference scheme.]
Recall that the contravariant form of the magnetic field in (ψ,𝜃,ϕ) coordinates is given by Eq. (179), i.e.,
| (282) |
Next, let us derive the corresponding form in (ψ,𝜃,ζ) coordinates. Using the definition of ζ, equation (282) is written as
The expression of the magnetic field in Eq. (284) can be rewritten in terms of the flux function Ψp and Ψt discussed in Sec. 13.2. Equation (284) is
| (285) |
which, by using Eq. (259), i.e., ∇Ψ = ∇Ψp∕(2π), is rewritten as
| (286) |
which, by using Eq. (266), i.e., q = dΨt∕dΨp, is further written as
| (287) |
Noting the simple fact that
| (288) |
where c is a constant, we conclude that
| (289) |
(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,
| (290) |
and
| (291) |
In the special case that f is axisymmetric (i.e., f is independent of ϕ in (ψ,𝜃,ϕ) coordinates), then two sides of Eqs. (290) and (291) are equal to each other. Note that the partial derivatives ∂∕∂ψ and ∂∕∂𝜃 in Sec. 14.1 and 14.2 are taken in (ψ,𝜃,ϕ) coordinates. Because the quantities involved in Sec. 14.1 and 14.2 are axisymmetric, these partial derivatives are equal to their counterparts in (ψ,𝜃,ζ) coordinates.
In Sec. 11, 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. (272), where δ is obtained from Eq. (277). Also note that the Jacobian of (ψ,𝜃,ζ) coordinates happens to be equal to that of (ψ,𝜃,ϕ) coordinates.
The usefulness of the contravariant form [Eq. (284] of the magnetic field lies in that it allows a simple 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. (284), the operator is written as
Next, consider the solution of the following magnetic differential equation:
| (293) |
where h = h(ψ,𝜃,ζ) is some known function. Using Eq. (292), the magnetic differential equation is written as
| (294) |
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 is Fourier expanded as
| (295) |
(note that, following the convention adopted in tokamak literature[10], the Fourier harmonics are chosen to be ei(m𝜃−nζ), instead of ei(m𝜃+nζ)), and the right-hand side is expanded as
| (296) |
then Eq. (294) can be readily solved to give
| (297) |
The usefulness of the straight line magnetic coordinates (ψ,𝜃,ζ) lies in that, as mentioned previously, it makes the coefficients before the two partial derivatives both independent of 𝜃 and ζ, thus, allowing a simple solution to the magnetic differential equation.
Equation (297) indicates that, for the differential equation (293), 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 ei(m𝜃−nζ) along a magnetic field is given by mΔ𝜃 − nΔζ, which can be written as Δ𝜃(m−nq). Since m−nq = 0 on a resonant surface, this indicates that there is no phase change along a magnetic field line on a resonant surface, i.e., the parallel wavenumber k∥ is zero on a resonant surface.
Next, we discuss a special poloidal angle, which is useful in describling a perturnbation of single harmonic (m,n). This poloidal angle is defined by
| (298) |
where (m,n) are the mode numbers of the perturbation. The poloidal angle χ is often called helical angle and is special in that its definition is associated with a perturbation (the mode numbers of the perturbation appear in the definition) while the definition of the poloidal angles discussed previously only involve the equilibrium quantities.
The poloidal angle χ is designed to make 3D perturbations of the form ∼ f(ψ,m𝜃 −nζ) reduce to 2D perturbations, i.e.,
| (299) |
It is ready to verify that the Jacobian of coordinates (ψ,χ,ζ) is equal to that of coordinates (ψ,𝜃,ζ) [proof: (𝒥′)−1 = ∇ψ ×∇χ ⋅∇ζ = ∇ψ ×∇(𝜃 − nζ∕m) ⋅∇ζ = ∇ψ ×∇𝜃 ⋅∇ζ = 𝒥−1].
The component of B along ∇χ direction (i.e., the covariant component) is written
At the resonant surface q = m∕n, equation (300) implies B(χ) = 0. The direction ∇χ defines the reconnecting component of the magnetic field?On the other hand, the component of B along ∇𝜃 direction is written
Using (301) and (300), the relation between B(𝜃) and B(χ) is written as
| (302) |
In the above, we have obtained the covariant form of the magnetic field in (ψ,𝜃,ϕ) coordinates (i.e., Eq. (176)). 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
Using Eq. (303), the covariant form of the magnetic field, Eq. (176), is written as
| (304) |
This expression can be further simplified by using equation (275) to eliminate ∂δ∕∂𝜃, which gives
| (307) |
with I(ψ) = h(ψ) − gq. The magnetic field expression in Eq. (307) frequently appears in tokamak literature[29]. In this form, the coefficients before both ∇𝜃 and ∇ζ depends on only the radial coordinate. In terms of I(ψ), the Jabobian can also be written as
| (308) |
In solving the MHD eigenmode equations in toroidal geometries, besides the B ⋅∇ operator, we will also encounter another surface operator (B×∇ψ∕B2) ⋅∇. Next, we derive the form of the this operator in (ψ,𝜃,ζ) coordinate system. Using the covariant form of the equilibrium magnetic field [Eq. (306)], we obtain
| (309) |
Using this, the (B ×∇ψ∕B2) ⋅∇ operator is written as
which is the form of the operator in (ψ,𝜃,ζ) coordinate system.Examining Eq. (311), we find that the coefficients before the two partial derivatives will be independent of 𝜃 and ζ if the Jacobian 𝒥 is chosen to be of the form 𝒥 = h(ψ)∕B2, where h is some magnetic surface function. 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 𝒥 = h(ψ)∕B2 is called the Boozer coordinates. The usefulness of the new toroidal angle ζ is highlighted in Boozer’s choice of the Jacobian, which makes both B ⋅∇ and (B ×∇ψ∕B2) ⋅∇ be a constant-coefficient differential operator. For other choices of the Jacobian, only the B⋅∇ operator is a constant-coefficient 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 = ∇ψ + ∇𝜃 + ∇ζ, |
the radial differential operator is written as
where ∂(qδ)∕∂ψ and q∂δ∕∂𝜃 are given respectively by Eqs. (281) and (275). Using the above formula, ∇ψ ⋅∇ζ is written as
| (313) |
This formula is used in GTAW code.
In (ψ,𝜃,ζ) coordinates, a magnetic field line is straight in (𝜃,ζ) plane with slope being q. Then the equation for a magnetic field line is written as
| (314) |
where α is a constant in (𝜃,ζ) plane and can be used to label magnetic field lines on a magnetic surface. This motivates us to use α, i.e.,
| (315) |
to replace ζ. Then the magnetic field in Eq. (284) is written as
| (316) |
which is called the Clebsch form. The direction
| (317) |
is parallel (or anti-parallel) to the magnetic field direction. Due to this fact, (ψ,𝜃,α) coordinates are usually called “field-line-following coordinates” or “field-aligned coordinates” [2, 6].
Equation (316) implies that
| (318) |
and
| (319) |
i.e., both α and ψ are constant along a magnetic field line. Taking scalar product of Eq. (316) with ∇𝜃, we obtain
| (320) |
which is nonzero, i.e., only 𝜃 among (ψ,𝜃,α) is changing along a magnetic field line. (Here 𝒥 = (∇ψ ×∇𝜃 ⋅∇α)−1 is the Jacobian of the coordinate system (ψ,𝜃,α), which happens to be equal to the Jacobian of (ψ,𝜃,ζ) coordinates.)
Using Eq. (316), the magnetic differential operator B ⋅∇ in the new coordinate system (ψ,𝜃,α) is written
| (321) |
which is just a partial derivative over 𝜃, as is expected, since only 𝜃 is changing along a magnetic field line.
By the way, note that (B ⋅∇α)∕(B ⋅∇𝜃) = 0, i.e., the magnetic field lines are straight with zero slope on (𝜃,α) plane.
Using Eqs. (315) and (278), α can be written as
where = B ⋅∇ϕ∕B ⋅∇𝜃 is the local safety factor. (If we choose the straight-field-line 𝜃, then α is written as α = ϕ−q𝜃.) Define δ = ∫ 0𝜃 d𝜃, which is called tor_shift in TEK code, then α = ϕ−δ. In TEK, I choose 𝜃 ∈ [−π,π) with 𝜃 = −π corresponding to the high-field-side midplane, and 𝜃 is increasing along the counter-clockwise direction viewed along ∇ϕ. The 𝜃 cut, i.e., 𝜃 = ±π is far away from the low-field-side where ballooning modes often have larger amplitude. The (x,y) grid near the 𝜃 cut is highly twisted in real space and interplation is needed in mapping physical quantity from the grid at 𝜃 = −π plane to that at 𝜃 = +π. Numerical errors more likely appear there. So we prefer that the 𝜃 cut is located in less important area (area where mode amplitude is small).It is widely believed that turbulence responsible for energy transport in tokamak plasmas usually has k∥≪ k⊥, where k∥ and k⊥ are the parallel and perpendicular wavenumbers, respectively. Due to this elongated structure along the parallel direction, less grids can be used in the parallel direction than that in the perpendicular direction in turbulence simulation. In this case, the field-aligned coordinates (ψ,𝜃,α) provide suitable coordinates to be used, where less gridpoints can be used for 𝜃 coordinate in simulations and even some ∂∕∂𝜃 derivatives can be neglected (high-n approximation), which simplifies the equations that need to be solved. There is another reason why almost all gyrokinetic codes use field-aligned coordinates: the stability of numerical algorthims is improved when we use coarse grids in the parallel direction because the parallel Courant condition (for explicit schemes) Δt ≤ ΔL∥∕v∥ can be more easily satisfied (especially for the cases with kinetic electrons), where ΔL∥ is the parallel grid spacing, which is larger when coarse grids are used in the parallel direction. This is also mentioned in Ref. [22] and it seems to be right from my experiences of testing several algorithm but a strict test is needed to verify this. This can also be understood in the following way: the coarse parallel grid automatically filters out physically irrelevant but numerically problematic high-k∥ modes, permitting much longer time steps for explicit time stepping, in both particle and fluid codes[12].
The fact B ⋅∇α = 0 implies that α is constant along a magnetic field line. At first glance, 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 infinite 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 α on a flux-surface along the perpendicular (to B) direction is nonzero, i.e., B ×∇Ψ ⋅∇α≠0. [Proof:
In (ψ,𝜃,ϕ) coordinates, ∇ϕ is perpendicular to ∇ψ. However, in field-line-following coordinates (ψ,𝜃,α), ∇α is not perpendicular to ∇ψ. Therefore ∇α is not along the binormal direction B ×∇ψ.
The generalized toroidal angle α is defined by Eq. (322), i.e., α = ϕ −δ, where δ = ∫ 0𝜃 d𝜃. The gradient of α is then written as
Then
| (325) |
| (326) |
Another method of computing the above quantities: Using Eqs. (231) and (232), expression (324) is written as
In GEM[7] and GENE[13] codes, the field-aligned coordinates (x,y,z) are defined by
| (330) |
| (331) |
| (332) |
where r is an arbitrary flux surface label with length dimension, which is often chosen in GEM to be the minor radius of a magnetic surface in the midplane. Here r0 and R0 are constant quantities of length dimension, r0 is the minor radius of a reference magnetic surface (usually corresponding to the center of the radial simulation box), R0 is the major radius of the magnetic axis, q0 is the safety factor value on the r = r0 surface. The constant length q0R0 introduced in the definition of z is to make z approximately correspond to the length along the field line in the large-aspect ratio limit. The constant length r0∕q0 introduced in the definition of y is to make y corresponds to the arc-length in the poloidal plane traced by a field line when its usual toroidal angle increment Δϕ is α. This explanation makes y look like a poloidal coordinate whereas y is actually a toroidal coordinate.
Next, let us calculate the wave number along the y direction, ky, for a mode with toroidal wave number n. The wavelength along the y direction, λy, is given by
| (333) |
Then the wavenumber ky is written as
| (334) |
On the other hand, the poloidal wavenumber k𝜃 is given by
| (335) |
where m is the poloidal mode number of the mode in (ψ,𝜃,ϕ) coordinates. If the mode has the property k∥≈ 0, i.e., m ≈ nq0, then k𝜃 is equal to the ky. The motivation of introducing the constant length r0∕q0 in the definition of y is to make ky ≈ k𝜃 for a mode with k∥≈ 0.
Some authors call ky or k𝜃 by the name “binormal wavenumber”, which is not an appropriate name in my opinion. Some authors call y the binormal direction, which is also an inappropriate name since neither ∇y nor ∂r∕∂y is along the binormal direction B0 ×∇ψ.
In this section, I try to visualize gridpoints in the field aligned coordinates. The directions of the covariant basis vectors of (ψ,𝜃,α) coordinates are as follows:
| (336) |
| (337) |
| (338) |
Here ∂r∕∂ψ|𝜃,α is a combination of the usual radial and toroidal direction, which needs some clarification. Note that, ϕ is related to α by Eq. (322), i.e.,
| (339) |
(where the second equality becomes exact if 𝜃 is the straight-field-line poloidal angle defined in Sec. 10.4.), which indicates that, for q′(ψ)≠0 and 𝜃≠0, the usual toroidal angle ϕ is changing when changing ψ and holding 𝜃 and α fixed. Figure 17b shows how the usual toroidal angle ϕ changes when we change ψ and hold 𝜃 and α fixed.
The relation ϕ ≈ α + q(ψ)𝜃 given by Eq. (339) indicates that the toroidal shift along ∂r∕∂ψ|α,𝜃 for a radial change form ψ1 to ψ2 is given by (q(ψ2) − q(ψ2))𝜃, which is larger on 𝜃 isosurface with larger value of 𝜃. An example for this is shown in Fig. 18 for 𝜃 = 19 × 2π∕63, where ∂r∕∂ψ|α,𝜃 has larger toroidal shift than that in Fig. 17 for 𝜃 = 9 × 2π∕63.
The ∂r∕∂ψ|𝜃,α curves can be understood from another perspective. Examine a family of magnetic field lines that start from 𝜃 = 0 and ϕ = ϕ1 but different radial coordinates. These starting points all have the same value of α, which is equal to ϕ1. When following these field lines to another isosurfce of 𝜃, the intersecting points of these field lines with the 𝜃 isosurface will trace out a ∂r∕∂ψ|𝜃,α line with α = ϕ1. Examine another family of magnetic field lines similar to the above but with the starting toroidal angle ϕ = ϕ2. They will trace out another ∂r∕∂ψ|𝜃,α line (with α = ϕ2) on the 𝜃 isosurface. Continue the process, we finally get those curves in Fig. 17b and Fig. 18b.
For a harmonic in (ψ,𝜃,ϕ) coordinates given by A(ψ,𝜃,ϕ) = exp(ikψψ + im𝜃 + inϕ), the radial wave number is kψ. Let us calculate the corresponding radial wavenumber kψ⋆ in the new coordinates (ψ,𝜃,α), which is defined by
| (340) |
where the phase is given by phase = kψψ + m𝜃 + nϕ. Then the above expression is written as
Let us examine how many ψ grid points are needed to resolve the ψ dependence in (ψ,𝜃,α) coordinates on the high-field side (𝜃 = π). Assume kψ ≈ 0, then kψ⋆ at 𝜃 = π is given by kψ⋆ = nπq′. The corresponding wave-length is given by λψ⋆ = 2π∕kψ⋆. The grid spacing Δψ should be less than half of this wave-length (sampling theorem). Then the grid number should satisfy that
| (343) |
where Lψ is the radial width of the computational domain.
The number of Fourier harmonics that need to be included is given by
| (344) |
For DIII-D cyclone base case, choose the radial coordinate ψ as r. At the radial location ψ = r0 = 0.24m, q0 = 1.4, ŝ0 = 0.78, then q′0 = s0q0∕r0 = 4.5m−1. Then Nr⋆ = n× 0.45 for the radial width Lr = 0.10m.
Figure 19 plots ∂r∕∂ψ|𝜃,α lines on the 𝜃 = 0,2π isosurfaces, which are chosen to be on the low-field-side midplane. On 𝜃 = 0 surface, ∂r∕∂ψ|𝜃,α lines are identical to ∂r∕∂ψ|𝜃,ϕ lines. On 𝜃 = 2π surface, each ∂r∕∂ψ|𝜃,α line has large ϕ shift. In old version of my code, 𝜃 = 0,2π surfaces are chosen as the 𝜃 cuts (in the new version 𝜃 = [−π,π]). A connection condition for the perturbations is needed between these two surfaces. This connection condition is discussed in Sec. 15.5.
Since (ψ,𝜃,ϕ) and (ψ,𝜃 + 2π,ϕ) correspond to the same spatial point, a real space continuous quantity f expressed in terms of coordinates (ψ,𝜃,ϕ), i.e., f = f(ψ,𝜃,ϕ), must satisfy the following periodic conditions along 𝜃:
| (345) |
Since (ψ,𝜃,ϕ) and (ψ,𝜃,ϕ + 2π) correspond to the same spatial point, f must satisfy the following periodic conditions along ϕ:
| (346) |
Since (ψ,𝜃,α) and (ψ,𝜃,α + 2π) correspond to the same spatial point, a real space continuous quantity g expressed in terms of field-line-following coordinates (ψ,𝜃,α), i.e., g = g(ψ,𝜃,α), must satisfy the following periodic condition along α:
| (347) |
However, generally there is no periodic condition along 𝜃,
| (348) |
because P1 = (ψ,𝜃,α) and P2 = (ψ,𝜃 + 2π,α) are generally not the same spatial point. In fact, equation (322) implies, for point P1, its toroidal angle ϕ1 is given by
| (349) |
while for point P2, its toroidal angle ϕ2 is given by
| (350) |
i.e., ϕ1 and ϕ2 are different by 2πq. From this, we know that (ψ,𝜃,α) and (ψ,𝜃 + 2π,α − 2πq) correspond to the same spatial point. Therefore we have the following periodic condition:
| (351) |
or equivalently
| (352) |
For the fully kinetic ion module of GEM code that I am developing, 𝜃 is chosen in the range [0 : 2π]. The condition (352) imposes the following boundary condition:
| (353) |
If α is on a grid, α + 2πq is usually not on a grid. Therefore, to get the value of g(ψ,0,α + 2πq), an interpolation of the discrete date over the generalized toroidal angle α (or equivalently ϕ) is needed, as is shown in Fig. 20.
Figure 21 compares a small number of ϕ contours and α contours on a magnetic surface.
As is shown in the left panel of Fig. 21, with ϕ fixed, an 𝜃 curve reaches its starting point when 𝜃 changes from zero to 2π. However, as shown in the right panel of Fig. 21, with α fixed, an 𝜃 curve (i.e. a magnetic field line) does not necessarily reach its starting point when 𝜃 changes from zero to 2π. There is a toroidal shift, 2πq, between the starting point and ending point. Therefore there is generally no periodic condition along 𝜃 since q is not always an integer. A mixed periodic condition involves both 𝜃 and α is given in (351).
In field-line-following coordinates (ψ,𝜃,α), a toroidal harmonic of a physical perturbation can be written as
| (354) |
where n is the toroidal mode number, m′, which is not necessary an integer, is introduced to describe the variation along a field line. The periodic condition given by Eq. (351) requires that
| (355) |
To satisfy the above condition, we can choose
| (356) |
where N is an arbitrary integer, i.e.,
| (357) |
We are interested in perturbation with a slow variation along the field line direction (i.e., along ∂r∕∂𝜃|ψ,α) and thus we want the value of m′ to be small. One of the possible small values given by expression (357) is to choose N = −n × NINT((qmax + qmin)∕2), so that m′ is given by
| (358) |
where NINT is a function that return the nearest integer of its argument, qmax and qmin is the maximal and minimal value of the safety factor in the radial region in which we are interested. [In the past, I choose m′(ψ) = nq − NINT(nq). However, m′(ψ) in this case is not a continuous function of ψ and thus is not physical.] This form is used to set the initial density perturbation in the fully kinetic code I am developing. Note that m′ in Eq. (358) depends on the radial coordinate ψ through q(ψ). Also note that m′ here is different from the poloidal mode number m in (ψ,𝜃,ϕ) coordinate system. It is ready to show that the perturbation given by Eq. (354) with m′∼ 1 and n ≫ 1 has large poloidal mode number m when expressed in (ψ,𝜃,ϕ) coordinates. [Proof: Expression (354) can be written as
| (359) |
Assume that 𝜃 is the straight-field-line poloidal angle in (ψ,𝜃,ϕ) coordinate system, then δ(ψ,𝜃) = q𝜃 and the above equation is written as
| (360) |
which indicates the poloidal mode number m in (ψ,𝜃,ϕ) coordinates is given by m = m′−nq. For the case with m′∼ 1 and n ≫ 1, m is much larger than one.]
Since α contours on a magnetic surface are magnetic field lines, they span out the 3D shape of magnetic surface when there are many α contours on a magnetic surface, as is shown by the right-panel of Fig. 22.
Figure 23 compares the ϕ coordinate surface of (ψ,𝜃,ϕ) coordinates with the α coordinate surface of (ψ,𝜃,α) coordinates.
The above grid is often called “flux-tube”, since it is created by following field lines, and it looks like a tube if the field lines are very near to each other (e.g., when we choose a very narrow radial and toroidal region to start from). Since no magnetic field line passes through the sides of the tube, the flux through any cross section of the tube is equal. The term “flux tube” is often used in astrophysics.
Most gyrokinetic simulation codes use field-line-following coordinates in constructing spatial mesh. The mesh is conceptually generated by the following three steps: (1) selecting some initial points; (2) tracing out magnetic-field-lines passing through these points; (3) choose the intersecting points of these field-lines with a series of chosen surfaces as the final grid-points. The initial points and the chosen surfaces differ among various codes and thus the resulting grid differs. Next, let us discuss some examples.
Given the definition of (ψ,𝜃) coordinates, choose toroidally symmetrical points (can be a toroidal wedge) in 𝜃 = 0 plane (𝜃 = 0 plane is usually chosen to be the low-field-side midplane). Then trace out the magnetic-field-lines passing through these points for one poloidal circuit (usually chosen in the range 𝜃 ∈ [−π,π]) and record the intersection points of these field-lines with various 𝜃 = const planes. Note that the gridpoints in 𝜃 = −π plane usually do not coincide those in 𝜃 = +π plane due to the toroidal shift arising when the safety factor is irrational. Interpolation can be used to map physical variables defined on gridpoints in 𝜃 = −π plane to those in 𝜃 = +π plane.
Given the definition of (ψ,𝜃) coordinates, 2D grid-points can be chosen on ϕ = 0 plane based on (ψ,𝜃) coordinates. Then trace out the magnetic-field-lines starting from these points for one toroidal circuit and record the intersection points of these field-lines with ϕj = jΔϕ planes, where j = 1,2,…,Nt − 1, Δϕ = 2π∕(Nt − 1). It is obvious that the resulting mesh are not toroidally symmetrical. And also the grids on ϕ = 0 plane differ from those on ϕ = 2π plane. Interpolation can be used to mapping physical variables defined on grid-points of ϕ = 0 to those of ϕ = 2π plane. In this case, the number of “toroidal grid-points” Nt (i.e., the number of poloidal planes) is actually the number of grid-points in the parallel direction within one toroidal circuit.
XGC1 can handle the region outside of the LCFS. Here we only discuss the region inside the LCFS. At each radial gridpoint on ϕ = 0 plane, follow the magnetic field line starting form this point for one poloidal loop and record the intersection points of this field-line with ϕj = jΔϕ planes, where j = 1,2,…,Nt, Δϕ = 2π∕Nt. For the case q > 1, one magnetic-field-line will have more than one intersection points on some poloidal planes. Repeat tracing the field line for each radial location. Then project (toroidally) all the intersection points on different poloidal planes to a single poloidal plane and rotate (toroidally) these 2D grids to define a 3D grid that are toroidally symmetrical.
The generalized toroidal angle α is numerically calculated in my code. To verify B ⋅∇α = 0 along a magnetic field-line, figure 27 plots the values of α along a magnetic field line, which indicates that α is constant. This indicates the numerical implementation of the field-aligned coordinates is correct.
Let us introduce the binormal wavenumber, which is frequently used in presenting turbulence simulation results. Define the binormal direction s by
s = , |
which is a unit vector lying on a magnetic surface and perpendicular to B. The binormal wavenumber of a mode is defined by
| (361) |
where p is the phase of the mode. Consider a mode given by exp(ikψψ + im𝜃 − inζ), then the phase p = kψψ + m𝜃 − nζ. Then kbn is written as
| (364) |
Using Eq. (284), i.e., B = −(∇ζ ×∇Ψ + q∇Ψ ×∇𝜃), the above expression is written as
| (365) |
which indicates the binormal wavenumber generally depends on the poloidal angle. For large aspect-ratio tokamak, we have Bϕ ≈ B, q ≈ Bϕr∕(BpR). Then Eq. (365) is written
| (366) |
which indicates the binormal wavenumber are approximately independent of the poloidal angle. Since m = nq on a resonant surface, the above equation is written |kbn|≈ m∕r, which is the usual poloidal wave number. Due to this relation, the binormal wavenumber kbn is often called the poloidal wavenumber and denoted by k𝜃 in papers on tokamak turbulence. In the GENE code, y coordinate is defined by y = αr0∕q0. Then the ky of a mode of toroidal mode number n is given by ky = 2π∕λy where λy = λαr0∕q0 and λα = 2π∕n. Then ky is written as ky = nq0∕r0, which is similar to the binormal defined above. For this reason, ky of GENE code is also called binormal wave-vector, which is in fact not reasonable because neither ∂r∕∂y or ∇y is along the binormal direction.
Assume magnetic surfaces of a magnetic configuration are known and given by
| (367) |
| (368) |
where (r,𝜃) are two parameters and r is magnetic surface label (i.e., ∂Ψ∕∂𝜃|r = 0). The above parametric equations specify a series of concentric-circular magnetic surfaces.
Assume the toroidal field function g(r) = RBϕ is given. Then the toroidal magnetic field is determined by Bϕ = g∕R. Further assume the safety factor profile q(r) is given, then the magnetic field is fully determined. Next, let us derive the explicit form of the poloidal magnetic field Bp, which is given by
| (369) |
which involves the poloidal magnetic flux Ψp. Therefore our task is to express Ψp in terms of q and g. Using q(r) = dΨt∕dΨp, we obtain
dΨp = dΨt, |
Integrate the above equation over r, we obtain
| (370) |
which an be written as
| (371) |
where use has been made of Ψt = ∫ 0r ∫ −ππBϕrdrd𝜃. Using Bϕ = g∕R and R = R0 + r cos𝜃, the above equation is written
| (372) |
Using maxima (an open-source computer algebra system), the above integration over 𝜃 can be performed analytically, giving
| (373) |
Using this, equation (372) is written as
| (374) |
which can be simplified as
| (375) |
This is what we want—the expression of the poloidal magnetic flux in terms of q and g. [Another way of obtaining Eq. (375) is to use Eq. (182), i.e.,
| (376) |
where 𝒥 is the Jacobian of the (r,𝜃,ϕ) coordinates and is given by 𝒥 = R(R𝜃Zr −RrZ𝜃) = −Rr. Then Eq. (376) is simplified as
| (377) |
which, after being integrated over r, gives Eq. (375).]
Using Eq. (375), the poloidal magnetic field in Eq. (369) is written as
[Using the formulas ∇r = −(Z𝜃−R𝜃) and 𝒥 = R(R𝜃Zr −RrZ𝜃), where 𝒥 is the Jacobian of the (r,𝜃,ϕ) coordinates, we obtain 𝒥 = −Rr and ∇r = cos𝜃 + sin𝜃, ∇ϕ = ∕R. Then Eq. (378) is written as
| (379) |
This is the explicit form of the poloidal magnetic field in terms of g and q. The magnitude of Bp is written as
| (380) |
Note that both Bp and Bϕ depend on the poloidal angle 𝜃.]
I use Eq. (375) to compute the 2D data of Ψ (Ψ = Ψp∕2π) on the poloidal plane when creating a numerical G-eqdsk file for the above magnetic configuration (Fortran code is at /home/yj/project_new/circular_configuration_with_q_given).
Assume that the poloidal plasma current is zero, then g(r) = RBϕ is a constant independent of r. This is always assumed by the authors who use concentric-circular configuration but is seldom explicitly mentioned.
In analytical work, 1∕R dependence on (r,𝜃) is often approximated as
= = ≈(1 − 𝜀cos𝜃), |
where 𝜀 = r∕R0 is the local inverse aspect ratio.
Since the above field is derived from the general form given by Eq. (10), it is guaranteed that the field is divergence-free. In case of any doubt, let us directly verify this. Write B as
| (381) |
where 𝒥 is the Jacobian of (r,𝜃,ϕ) coordinates; B(1), B(2), and B(3) are given by
| (382) |
| (383) |
| (384) |
Use Bp given by (378), then B(1), B(2), and B(3) are written as
| (385) |
| (386) |
and
| (387) |
respectively. Then, by using the divergence formula in (r,𝜃,ϕ) coordinates, ∇⋅ B is written as
The answer is no. It is ready to verify that the poloidal magnetic flux function Ψ = Ψp∕2π given by Eq. (375) is not a solution to the GS equation (612) even if the plasma pressure in the GS equation is set to zero. The above expression is a solution to the GS equation in the limit of infinite aspect ratio and zero plasma pressure. The finite aspect ratio and plasma pressure requires the magnetic surfaces to have the Shafranov shift in order to satisfy the GS equation (see Sec. A.14).
For the above magnetic field, the toroidal shift involved in the definition of the generalized toroidal angle can be expressed in simple analytical form. The toroidal shift is given by
| (389) |
where the local safety factor can be written as
| (390) |
Using 𝒥 = −Rr and
| (391) |
The local safety factor in Eq. (390) is written as
| (392) |
Using this, expression (389) is written
| (393) |
Assume 𝜃 ∈ (−π,π), then the integration ∫ 0𝜃1∕Rd𝜃 can be analytically performed (using maxima), yielding
| (394) |
Then expression (393) is written
| (395) |
where use has been made of sin𝜃∕(cos𝜃 + 1) = tan(𝜃∕2). Using this, the generalized toroidal angle can be written as
The results given by the formula (395) are compared with the results from my code that assumes a general numerical configuration. The results from the two methods agree with each other, as is shown in Fig. 28, which provides confidence in both the analytical formula and the numerical code.In passing, we note that the straight-field-line poloidal angle 𝜃f can also be considered to be defined by
| (397) |
i.,e,
| (398) |
Then using Eq. (396), 𝜃f is written as
| (399) |
which agrees with Eq. (A2) in Gorler’s paper[13].
Let ψ = r and define hψR = ∇ψ ⋅, hαR = ∇α⋅, etc. Explicit expressions for these elements can be written as
| (401) |
Using expression (395), dδ∕dr can be evaluated analytically, yielding
arctan(x) = |
(I did not remember this formula and I use SymPy to obtain this.) These expressions are used to benchmark the numerical code that assume general flux surface shapes. The results show that the code gives correct result when concentric circular flux surfaces are used.
Taking the 𝜃 derivative of δ, equation (395) is written as (using Sympy)
| (402) |
where
| (403) |
Equation (392) should be equal to given by Eq. (392). This was verified numerically.
Taking the r derivative of Eq. (375), we obtain
| (404) |
i.e.,
| (405) |
| (406) |
The magnetic shear for a concentric-circular configuration is defined by
| (407) |
where r is the minor radius of a magnetic surface. The above expression can be re-arranged as
| (408) |
Integrating the above equation over r and assuming ŝ is a constant, we obtain
| (409) |
Performing the integration, the above equation is written as
| (410) |
where q0 = q(r0). Equation (410) can be finally written as
| (411) |
This is a profile with a constant magnetic shear s. In Ben’s toroidal ITG simulation, the following q profile is used:
| (412) |
with q′(r0) = ŝq0∕r0. This is a linear profile over r, with the values of q and the shear at r = r0 being q0 and ŝ, respectively.
The fixed boundary equilibrium problem (also called the “inverse equilibrium problem” by some authors) refers to the case where the shape of a boundary 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 uses 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
| (413) |
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
| (414) |
where the subscripts denotes partial derivatives, 𝒥 is the Jacobian of the coordinate system (ψ,𝜃,ϕ). [Next, we provide the proof of Eq. (414). The gradient of Ψ is written as (note that Ψ is independent of ϕ)
| (415) |
Using this expression and the divergence formula (132), the elliptic operator in Eq. (413) is written
Using Eq. (414), the GS equation (66) is written
| (417) |
which is the form of the GS equation in (ψ,𝜃,ϕ) coordinate system.
The toroidal elliptic operator in Eq. (414) can be written
| (418) |
where haβ is defined by Eq. (173), i.e.,
| (419) |
Next, we derive the finite difference form of the toroidal elliptic operator. The finite difference form of the term (hψψΨψ)ψ is written
| (421) |
The finite difference form of (h𝜃𝜃Ψ𝜃)𝜃 is written
| (423) |
The finite difference form of (hψ𝜃Ψ𝜃)ψ is written as
| (424) |
Approximating the value of Ψ at the grid centers by the average of the value of Ψ at the neighbor grid points, Eq. (424) is written as
| (425) |
where
| (426) |
Similarly, the finite difference form of (hψ𝜃Ψψ)𝜃 is written as
| (428) |
| (429) |
and
| (430) |
where the Jacobian
| (431) |
The partial derivatives, R𝜃, Rψ, Z𝜃, and Zψ, appearing in Eqs. (428)-(431) are calculated by using the central difference scheme. The values of hψψ, h𝜃𝜃, hψ𝜃 and 𝒥 at the middle points are approximated by the linear average of their values at the neighbor grid points.
| (432) |
| (433) |
| (434) |
Ψ = d0 + d1cos𝜃 + d2sin𝜃 |
| (435) |
| (436) |
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. [16], we take P(Ψ) and g(Ψ) to be of the forms
| (437) |
| (438) |
with and ĝ chosen to be of polynomial form:
| (439) |
| (440) |
where
| (441) |
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. (437) and (438), we obtain
| (442) |
where Δ = Ψb − Ψa, and
| (443) |
Then the term on the r.h.s (nonlinear source term) of the GS equation is written
| (444) |
The value of parameters P0, Pb, and g0 in Eqs. (437) and (438), and the value of α and β in Eqs. (439) and (440) 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. (570), i.e.,
| (445) |
which can be integrated over the poloidal cross section within the boundary magnetic surface to give the total toroidal current,
Using
| (447) |
Eq. (446) is written as
| (448) |
from which we solve for γ, giving
| (449) |
If the total toroidal current Iϕ is given, Eq. (449) can be used to determine the value of γ.
In the fixed boundary equilibrium problem, the shape of the boundary magnetic surface (it is also the boundary of the computational region) 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
| (450) |
| (451) |
with 𝜃 changing from 0 to 2π. According to the definition in Eqs. (28), (29), and (31) we can readily verify that the parameters a, R0, κ appearing in Eqs. (450) and (451) are indeed the minor radius, major radius, and ellipticity, respectively. According to the definition of triangularity Eq. (30), the triangularity δ for the magnetic surface defined by Eqs. (450) and (451) is written as
| (452) |
Another common expression for the shape of a magnetic surface was given by Miller[8, 21], which is written as
| (453) |
| (454) |
Note that Miller’s formula is only slightly different from the formula (450). For Miller’s formula, it is easy to prove that the triangularity δ is equal to Δ (instead of δ = sinΔ as given in Eq. (452)).
In the iterative metric method[11] 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
| (455) |
| (456) |
where α is a parameter, ψ is a label parameter of flux surface. If the shape of the LCFS is given by Eqs. (450) and (451), then Eqs. (455) and (456) are written as
| (457) |
| (458) |
Fig. 30 plots the shape given by Eqs. (457) and (458) for a =0.4, R0 = 1.7, κ = 1.7, Δ = arcsin(0.6), and α = 1 with ψ varying from zero to one.
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[11] to solve this kind of equilibrium problem. Figure 31 describes the steps involved in the iterative metric method.
To benchmark the numerical code, I set the profile of P and g according to Eqs. (533) and (534) with the parameters c2 = 0, c1 = B0(κ02 + 1)∕(R02κ0q0), κ0 = 1.5, and q0 = 1.5. The comparison of the analytic and numerical results are shown in Fig. 32.
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κ0q0)).
With the pressure increasing, the magnetic axis usually shifts to the low-field-side of the device, as is shown in Fig. 33.
Consider the Jacobian of the form
| (459) |
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. (459) since we do not use any information of Eq. (459) in the above steps. Now comes the question: how to make the transformation obtained above satisfy the constraint Eq. (459) through adjusting the values of 𝜃? To make the constraint Eq. (459) satisfied, 𝜃 and ψ should satisfy the relation
| (460) |
which
Using Eq. (), we obtain
∫ 0𝜃d𝜃 = ∫ 0𝜃d𝜃m |
| (461) |
normalized to 2π, the normalized 𝜃 is written as
| (462) |
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(Ψ), rather than g(Ψ), as a free function. The safety factor defined in Eq. (182) can be written
Equation (465) 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
| (466) |
| (467) |
Note that this expression involves the flux surface average, which depends on the flux surface shape and the shape is unknown before Ψ is determined.
Multiplying Eq. (595) by R−2 gives
| (468) |
Surface-averaging the above equation, we obtain
| (469) |
| (470) |
| (471) |
| (472) |
| (473) |
Substitute Eq. (467) into the above equation to eliminate gdg∕dΨ, we obtain
| (474) |
Eq. (474) agrees with Eq. (5.55) in Ref. [16].
| (475) |
| (476) |
where
| (477) |
The GS equation is
| (478) |
| (479) |
| (480) |
Using Eq. (476) to eliminate Ψ′′ in the above equation, the coefficients before (−μ0dp∕dΨ) is written as
A = − |
Define
α = , |
β = . |
A = −(2π)4β |
| (483) |
| (484) |
Using
| (485) |
Eq. () is written as
| (486) |
| (487) |
| (488) |
| (489) |
| (490) |
| (491) |
| (492) |
| (493) |
| (494) |
| (495) |
But the expression of A is slightly different from that given in Ref. [16] [Eq. (5.57)]. Using the above coefficients, the GS equation with the q-profile held fixed is written as
| (496) |
Let us derive the contravariant expression for the current density. Using
μ0J = ∇× B, |
along with magnetic field expression (176) and the curl formula (138), we obtain
which is the contravariant form of the current density vector. Next, for later use, calculate the parallel current. By using Eqs. (176) and (497), the parallel current density is written as
The self-inductance of a current loop is defined as the ratio of the magnetic flux Φ traversing the loop and its current I:
| (499) |
where
| (500) |
It can be proved that L is independent of the current I in the loop, i.e., L is fully determined by the shape of the loop.
On the other hand, the energy contained in the magnetic field produced by the loop current is given by
| (501) |
where the volume includes all space where B is not negligible. It can be proved that (to be proved) W, L, and I are related to each other by:
| (502) |
i.e.,
| (503) |
which can be considered an equivalent definition of the self-inductance.
The internal inductance Li of tokamak plasma is defined in such a way that W only includes the magnetic energy within the plasma. Specifically, Li is defined by
| (504) |
where the integration over the plasma volume P and only the poloidal field B𝜃 appears in the integration since plasma current produces only the poloidal magnetic field.
The normalized internal inductance li is defined as
| (505) |
where R0 is the major radius of the device (equal to R of the magnetic axis). Using Eq. (504), expression (505) is written as
| (506) |
which is the definition of li used in the ITER design.
Another way of defining the normalized internal inductance is
| (507) |
where ⟨…⟩S is the surface average over the plasma boundary. For circular cross section with minor radius a and assuming B𝜃 is independent of the poloidal angle, then, Ampere’s law gives B𝜃(a) = μ0I∕(2πa). Then ⟨B𝜃2⟩S is approximated as
| (508) |
Using this and V ≈ πa22πR0, Eq. (507) is written as
| (509) |
which agrees with the definition in Eq. (506).
The normalized internal inductance reflects the peakness of the current density profile in the toroidal plasma: a small value of li corresponds to a broad current profile.
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), where r is the minor radius of the relavent magnetic surface. Using these, the safety factor in Eq. (36) is approximated to
| (510) |
EAST has 14 superconducting poloidal field (PF) coils (only 12 of them are independently powered). The layout is shown in Fig. 34.
All the PF coils can be considered as shaping coils since they all have effects in shaping the plasmas. In practice, they are further classified according to their main roles. PF1 to PF6 form a solenoid in the center of the torus and thus called Central Solenoide (CS) coils. Their main role is to induce electric field to drive current in the plasma and heat the plasma. As a result, they are often called “Ohm heating coils”. PF13 and PF14 are mainly used to control (slow) vertical plasma displacement and thus are often called “vertical field coils” or “position control coils”. PF11 and PF12 are used to triangularize the plasma and thus is called “shaping coils”. In order to squeeze the plasma to form desied triangularity, their currents need to be in the opposite direction of plamsa current (since two opposite currents repel each other). PF7+PF9 and PF8+PF10 are often called (by EAST operators) as “big coils” or “divertor coils” since they have the largest number of turns and current and are used to elongate the plasma to diverter configurations.
Besides the 16 superconducting PF coils outside vaccum vessel, EAST has two small copper coils within the vaccum vessel (2turn/coil), which are connected in anti-series and thus have opposite currents. They are closer to the plasma (than other PF coils) and are used to control fast plasma displacements, specifically VDEs (vertical displacement events). They are often called “fast control coils”.
Using Ampere’s circuital law
| (511) |
along the toroidal direction and assuming perfect toroidal symmetry, we obtain
| (512) |
which gives
| (513) |
Neglecting the poloidal current contributed by the plasma, the poloidal current is determined solely by the current in the TF coils. The EAST tokamak has 16 groups of TF coils with 132turns/coil (I got to know the number of turns from ZhaoLiang Wang: φ × R = 12 × 11 = 132). Denote the current in a single turn by Is, then Eq. (513) is written
| (514) |
Using this formula, the strength of the toroidal magnetic field at R = 1.8m for Is = 104A is calculated to be Bϕ = 2.34T. This was one of the two scenarios often used in EAST experiments (another scenario is Is = 8 × 103A). (The limit of the current in a single turn of the TF coils is 14.5kA (from B. J. Xiao’s paper [30]).
Note that the exact equilibrium toroidal magnetic field Bϕ is given by Bϕ = g(Ψ)∕R. Compare this with Eq. (513), we know that the approximation made to obtain Eq. (514) is equivalent to g(Ψ) ≈ μ0ITF∕2π, i.e. assuming g is a constant. The poloidal plasma current density jpol is related to g by jpol = g′(Ψ)Bp∕μ0. The constant g corresponds to zero plasma poloidal current, which is consistent to the assumption used to obtain Eq. (514).
Let us estimate the safety factor value near the plasma edge using the total plasma current and the current in a single turn of TF coils Is. For divertor magnetic configuration, the plasma edge is at the saperatrix, where q →∞. To get a characteristic safety factor value that is finite, one often chooses the edge to be the magnetic surface that encloses 95% of the poloidal magnetic flux. Denote this surface by S95 and the value of q at this surface by q95, which is given by
| (515) |
where a is the minor radius of the surface S95, and Raxis the major radius of the magnetic axis, Bϕ,axis is the the magnitude of toroidal magnetic field at the magnetic axis, and Bp is the average poloidal magnetic field on the surface, Bp ≈ μ0Ip∕(2πa). Using Eq. (514), Eq. (515) is written as
| (516) |
For EAST, tipically Raxis = 1.85m and a = 0.45m. Using this, we obtain
| (517) |
The so-called resonant magnetic perturbation (RMP) coils are 3D coils that are used to suppress or mitigate edge localized modes. The shape and location of RMP coils of EAST tokamak are plotted in Fig. 35.
The size of EAST is similar to that of DIII-D tokamak. The main parameters are summarized in Table. 1. A significant difference between EAST and DIII-D is that DIII-D has a larger minor radius, which makes DIII-D able to operate with a larger toroidal current than that EAST can do for the same current density. Another significant difference between EAST and DIII-D is that the coils of EAST are supper-conducting while the coils of DIII-D are not. The supper-conducting coils enable EAST to operate at longer pulse.
EAST | DIII-D[20] | KSTAR[18] | SPARC | WEST | JET | |
Major radius R0 | 1.85m | 1.67m | 1.8m | 1.85m | 2.5m | 2.96m |
minor radius a | 0.45m | 0.67m | 0.5m | 0.57m | 0.5m | 0.9m |
elongation | ||||||
Plasma volume | 20m3 | |||||
No. of TF coils, turns, current | 16, 130, 14.5kA | 24, 6, 126kA | 16, 56, 35.2kA | |||
Bt at R0 | 3.26T | 2.17T | 3.5T | 12.2T | 3.7T | 3.45T |
CS coil module×turn×current | 6×120×14.5kA | |||||
No. of independent PF coils | 6+6 | ?+18 | ||||
Available solenoid magnetic flux | 12Vs | 10.5Vs | 17Vs | |||
Maximum plasma current | 1.0MA | 3.0MA | 2MA | 8.7MA | 1MA | 5MA |
Pulse length | 400s | 10s | 300s | |||
superconducting? | Yes | No | Yes | Yes | No | |
ITER[1] | CFETR(old version) | CFETR (new) | BEST | |
Major radius R0 | 6.2m | 5.7m | 7.2m | 3.6m |
minor radius a | 2.0m | 1.6m | 2.2m | |
elongation | ||||
No. of TF coils, turns, current | 18, 134, 68kA | 16, 132, 67.5kA | 16, ?, ? | 16, 152, 45.6kA |
Bt at R0 | 5.29T | 5.00T | 6.5T | |
CS coil module×turn×current | ||||
No. of independent PF coils | ||||
Available solenoid magnetic flux | ||||
Maximum plasma current | 15MA | 10MA | 14MA | |
Pulse length | 400s | |||
superconducting? | Yes | Yes | Yes | Yes |
ASDEX-U | HL-2M | NSTX | MAST | |
Major radius R 0 | 1.65m | 1.78m | 0.85m | 0.9m |
minor radius a | 0.7m | 0.65m | 0.68m | 0.6m |
elongation | ||||
No. of TF coils, turns, current | 16,?,? | 20,7,190kA | ||
Bt at R0 | 2.99T | 0.3T | 0.55T | |
CS coil module×turn×current | 1,?,? | |||
No. of independent PF coils | 1+16 | |||
Available solenoid magnetic flux | 14Vs | |||
typical plasma current | 1.6MA | 2.5MA | ||
Pulse length | 5s | |||
superconducting? | No | No | No | |
DIII-D has 24 groups of TF coils with 6turns/coil, i.e., total turns are 24 × 6 = 144, with a maximum current of Is = 126kA in a single turn[20]. Using formula (513), the toroidal filed at R = 1.67m can be calculated, giving 2.17T.
DIII-D is special in that its poloidal field (PF) coils are located inside of the TF-coils, which makes the PF-coils more close to the plasma and thus more efficient in shaping the plasma. However, this nested structure is difficult to assemble. In superconducting tokamaks (e.g., EAST, KSTAR, ITER), PF coils are all placed outside of the TF-coils.
I noticed that HL-2M also has the PF coils located within the TF-coils, similar to DIII-D. This remind me that this layout may apply to all non-superconducting tokamaks (to be confirmed, No, non-superconducting tokamak ASDEX-U has PF coils outside of TF coils).
KSTAR has 16 TF coils and 14 PF coils. Both of the TF and PF coil system use internally cooled superconductors. The nominal current in TF coils is 35.2kA∕turn with 56turns∕coil and all coils connected in series[24]. Using these information and formula (513), the toroidal filed at R = 1.8m can be calculated, giving 3.5T. The PF coil system consists of 8 Central Solenoide (CS) coils and 6 outer PF coils and can provide 17 V-sec.
ITER has 18 TF coils with number of turns in one coil being 134 and current per turn 68kA[5]. Using these information and formula (513), the toroidal filed at R = 6.2m can be calculated, giving 5.29T
According to Refs. [8, 21], Miller’s formula for a series of shaped flux surfaces is given by
| (518) |
| (519) |
where κ(r) and δ(r) are elongation and triangularity profile, R0(r) is the Shafranov shift profile, which is given by
| (520) |
where R0′ is a constant, R0(a) is the major radius of the center of the boundary flux surface. The triangularity profile is
| (521) |
and the elongation profile is
| (522) |
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. 36.
An analytic expression for the pressure profile of double (inner and external) transport barriers is given by
| (523) |
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.
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:
| (524) |
If we use the above sum to define a function
| (525) |
then it is obvious that
| (526) |
i.e., z(𝜃) is a periodic function about 𝜃 with period of 2π.
If we use the right-hand-side of Eq. (525) to represent z(𝜃), then we do not need to worry about the periodic property of z(𝜃) (the periodic property is guaranteed by the representation)
[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.,
| (527) |
where A2 is the covariant toroidal component of A. To obtain A2, we take scalar product of Eq. (527) with ∂r∕∂ϕ and use the orthogonality relation (102), which gives
| (528) |
In cylindrical coordinates (R,ϕ,Z), the location vector is written as
| (529) |
where , , and are unit vectors along ∂r∕∂R, ∂r∕∂Z, and ∂r∕∂ϕ, respectively, i.e.
| (530) |
Using this, we obtain
| (531) |
Use Eq. (531) in Eq. (528) giving
| (532) |
with Aϕ defined by Aϕ = A ⋅. Equation (532) indicates that Ψ = AϕR is the covariant toroidal component of the vector potential.]
For most choices of P(Ψ) and g(Ψ), the GS equation (66) has to be solved numerically. For the particular choice of P and g profiles given by
| (533) |
| (534) |
analytical solution to the GS equation can be found, which is given by[16]
| (535) |
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 (66).] A useful choice for tokamak application is to set c0 = B0∕(R02κ0q0), c1 = B0(κ02 + 1)∕(R02κ0q0), and c2 = 0. Then Eq. (535) is written
| (536) |
which can be solved analytically to give the explicit form of the contour of Ψ on (R,Z) plane:
| (537) |
which indicates the magnetic surfaces are up-down symmetrical. Using Eq. (533), i.e.,
| (538) |
the pressure is written
| (539) |
where P0 is a constant of integration. Note Eq. (536) indicates that that Ψ = 0 at the magnetic axis (R = R0,Z = 0). Therefore, Eq. (539) 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 (536), I found numerically that the value of the safety factor at the magnetic axis (R = R0,Z = 0) is equal to q0g∕(R0B0). This 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
Define Ψ0 = B0R02, and Ψ = Ψ∕Ψ0, then Eq. (536) is written as
where R = R∕R0, Z = Z∕R0. From Eq. (541), we obtain
| (542) |
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. 39.
The minor radius of a magnetic surface of the Solovev equilibrium can be calculated by using Eq. (537), which gives
| (543) |
| (544) |
and thus
| (545) |
where A = 8R02q0∕(B0κ0). In my code of constructing Solovev magnetic surface, the value of a is specified by users, and then Eq. (545) 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 Ψ = R02B0κ0∕(8q0) corresponds to Rin = 0. Therefore, the reasonable value of Ψ of a magnetic surface should be in the range 0 ≤ Ψ < R02B0κ0∕(8q0). This range is used as the interval bracketing a root in the bisection root finder.
Using Eq. (545), the inverse aspect ratio of a magnetic surface labeled by Ψ can be approximated as[16]
| (546) |
Therefore, the value of Ψ of a magnetic surface with the inverse aspect ratio 𝜀 is approximately given by
| (547) |
In deriving the Grad-Shafranov equation, we have assumed that there is no plasma flow. Next, let us examine whether this assumption is justified for plasmas in EAST tokamak.
The complete momentum equation is given by
| (548) |
where ρqE term can be usually neglected due to either ρq ≈ 0 or E ≈ 0, ℙ is a pressure tensor, which is different from the scalar pressure considered in this note. The equilibrium with pressure tensor can be important for neutral beam heating plasma, where pressure contributed by NBI fast ions can be a tensor. With plasma flow and scalar pressure and neglecting electric force term, the steady state momentum equation is written
| (549) |
where the term on the left-hand side is the contribution of plasma flow to the force balance. Let us estimate the magnitude of this term. Macroscopic flows in tokamak are usually along the toroidal direction (the poloidal flow is usually heavily damped). The toroidal flow usually has the same toroidal angular frequency on a magnetic surface, i.e., the flow can be written as
| (550) |
where ωT = ωT(ψ) is the toroidal angular frequency of the flow, which can have radial variation. Using this expression, the left-hand side of Eq. (549) is written as
As is discussed in Sec. (), to satisfy the force balance, g ≡ RBϕ must be a magnetic surface function, i.e., g = g(Ψ). Using this, expression (49) and (50) are written
| (552) |
and
| (553) |
respectively. The above two equations imply that
| (554) |
which implies that the projections of B lines and J lines in the poloidal plane are identical to each other. This indicates that the J surfaces coincide with the magnetic surfaces.
The poloidal plasma current density is usually small (compared with the toroidal plasma current density) but is important for some cases of interest and thus could not be safely neglected. Many model equilibria (e.g., Solovev equilibria, DIII-D cyclone base cases) frequently used in simulations assume that g is a spatial constant, i.e., neglecting the poloidal plasmas current. The conclusions drawn from these simulations could be misleading.
Using this and ∇⋅ J = 0, and following the same steps in Sec. 2.7, we obtain
| (555) |
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 (555) indicates that the difference of g between two magnetic surface is proportional to the poloidal current. For this reason, g is usually call 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 following differential relations:
The poloidal plasma current density Jp can be further written as
Using g = g(Ψ), Eq. (556) can also be written asTo characterize the efficiency of the magnetic field of tokamaks in confining plasmas, define the plasma β, which is the ratio of the thermal pressure to the magnetic pressure, i.e.,
| (558) |
Since the pressure in tokamak plasmas is not uniform, 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
| (559) |
| (560) |
where ⟨…⟩ is the volume averaging, ⟨…⟩s is the surface averaging over the plasma boundary, Bt0 is the vacuum toroidal magnetic field at the magnetic axis (or geometrical center of the plasma). 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 is proportional to an important current, the so-called bootstrap current, which is important for tokamak steady state operation. Alternatively, βp can be understood as characterizing the efficiency of the plasma current in confining the plasma. This can be seen by using Ampere’s law to approximately write the average poloidal magnetic field Bpa ≈ μ0Ip∕(2πa). Then βp is written
| (561) |
which is the ratio of the pressure to the plasma current, and thus characterizes the efficiency of the plasma current in confining the plasma.
Tokamak experiments have 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 decreasing function of the magnitude of the magnetic field.
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∕(106aBt0), where all quantities are in SI units. This scaling relation βt max = CTIp∕(106aBt0) is often called Troyon scaling, where the coefficient CT was determined numerically by Troyon to 0.028. Often CT is expressed in percent, in which case CT = 2.8. This motivates us to define
| (562) |
which is called “normalized beta”. 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.
As mentioned above, βN calculated by Troyon is 2.8. Empirical evaluation from the data of different tokamaks raises this value slightly to 3.5, although significantly higher values, e.g., βN = 7.2, have been achieved in the low aspect ratio tokamak NSTX[23].
The value of βN indicates how close one is to the onset of deleterious instability . The ability to increase the value of βN can be considered to be the ability of controlling 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** The tearing mode, specifically the neoclassical tearing mode (NTM) is expected to set the beta limit in a reactor.)
(**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. (561) and Eq. (), respectively, we recognize that pressure limit should have a scaling of ⟨p⟩∝ Ipα with 1 < α < 2. )
As is mentioned in Sec. A.4, 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.,
| (563) |
The total plasma energy is given by E ≈⟨p⟩2πRπa2, where R is the major radius of the device. Using Eq. (563), we obtain
| (564) |
Since fusion power is proportional to the plasma energy, the above relation indicates, to obtain larger fusion power, we need bigger tokamaks with larger plasma current.
The reason why larger plasma current is desired can also be appreciated by examining an empirical scaling of the the energy confinement time τE given by
| (565) |
which is proportional to I2.
Another fundamental reason for building larger tokamaks is that the energy confinement time τE ∼ a2∕χ increases with the machine size, where χ is the heat diffusitivity. In addition, the heat diffusitivity χ decreases with increasing machine size if the diffusitivity satisfies the gyro-Bohm scaling, which is given by
| (566) |
which is inverse proportional to the machine size a. However, if the diffusitivity satisfies the Bohm scaling, which is given by
| (567) |
then, the diffusitivity is independent of the machine size. The Bohm diffusitivity χB is a∕ρs times larger than the gyro-Bohm diffusitivity χGB, where ρs is the gyro-radius. Heat diffusitivity scaling in the low confinement operation (L mode) in present-day tokamaks is observed to be Bohm or worse than Bohm.
The maximum density that can be obtained in stable plasma operations (without disruption) is empirically given by
| (568) |
where nG is the Greenwalt density, which is given by
| (569) |
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 achieved for a tokamak operation scenario 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. Equation (569) 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-balance 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 is determined by the equilibrium.
Due to the force balance condition, the plasma current is related to the plasma pressure. Using the equilibrium constraint in the R direction, the toroidal current density Jϕ given by Eq. (53) can be written as
The parallel (to the magnetic field) current density is written asAnother useful quantity is μ0⟨J ⋅ B⟩, which is written as
In the vacuum region that is between the plasma and the first wall, there is no current, i.e.,
| (576) |
Next, let us examine what constraint this condition imposes on the magnetic field. Using expression (10), the above equation is written as
| (577) |
It is not obvious how to draw useful information from the above equation.
In the above, we use the vector potential approach. Next, let us try the scalar potential approach:
| (578) |
then the constraint ∇⋅ B = 0 is written as
| (579) |
[check***As discussed in Sec. (), 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
| (580) |
and inside the another, we use
| (581) |
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 (580) and (581) 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]
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). Consider a field f that satisfies B⋅∇f = 0, the value f is a constant along any one of the magnetic field lines. Now comes the question: whether the values of f 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 ⋅∇f equals zero or not, where k is the chosen direction. For axsiymmetric magnetic surfaces, it is ready to see that k = is a direction in the magnetic surface and it is usually not identical with B∕B. Then we obtain
| (582) |
If f is independent of ϕ, then k ⋅∇Ψ = 0. Then the fact that B ⋅∇f = 0 and the fact that B and k are two different directions on the magnetic surface, indicates that f is constant on the surface, i.e., the values of f on different field lines are equal to each other. If f is non-axisymmetric, then we know the values of f on different magnetic field lines on the same magnetic surface are not equal to each other. This is the case for the α coordinates discussed in Sec. ().
This reasoning is for the case of axsiymmetric magnetic surfaces. It is ready to do the same reasoning for non-axisymmetrica magnetic surface after we find a convenient direction k on the magnetic surface.
(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. (177) is always positive. It follows that qglobal should be also positive. Next, let us examine whether this property is correctly preserved by Eq. (183). Case 1: The radial coordinate ψ is chosen as Ψ′≡ dΨ∕dψ > 0. Then the factor before the integration in Eq. (183) is negative. We can further verify that 𝒥 is always negative for either the case that ∇Ψ is pointing inward or outward. Therefore the .r.h.s. of Eq. (183) 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. (183) is positive. We can further verify that 𝒥 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)
| (583) |
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. 66). The magnetic flux through the toroidal surface S2 is given by
i.e.
| (584) |
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. (583) 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. 66).
Also note the difference between Ψp and Ψp1 defined in Sec. 2.7: Ψ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.
We know that the toroidal flux ψt, safety factor q, and the Ψ in the GS equation are related by the following equations:
| (585) |
| (586) |
Define:
| (587) |
(In the Toray_ga code, the radial coordinate ρ is defined as
| (588) |
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. (587) to define ρ. Then we have
| (589) |
| (590) |
| (591) |
| (592) |
| (593) |
Eq. (593) is used to transform between ψ and ρ.
dρ = dΦ = 2πqdψ = qdψ |
⇒ dψ = dρ(πa2) |
If (ψ,𝜃,ϕ) are magnetic surface coordinates, i.e., ∂Ψ∕∂𝜃 = 0, then the toroidal elliptic operator in Eq. (414) is reduced to
| (594) |
and the GS equation, Eq. (417), is reduced to
| (595) |
Define (r,𝜃,ϕ) coordinates by
| (596) |
| (597) |
where (R,ϕ,Z) are the cylindrical coordinates and R0 is a constant. The above transformation is shown graphically in Fig. 41.
The Jacobian of (r,𝜃,ϕ) coordinates can be calculated using the definition. Using x = R cosϕ, y = R sinϕ, and z = Z, the Jacobian (with respect to the Cartesian coordinates (x,y,z)) is written as
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
| (599) |
| (600) |
| (601) |
| (602) |
The GS equation in (R,Z) coordinates is given by
| (603) |
The term ∂Ψ∕∂Z is written as
Using Eq. (604), ∂2Ψ∕∂Z2 is written as
| (606) |
sin𝜃 = . |
cos𝜃 = −Z |
| (607) |
cos𝜃 = |
| (608) |
Summing the the right-hand-side of Eq. (605) and the expression on line (609) yields
| (611) |
Using these, the GS equation is written as
++− = −μ0(R0+r cos𝜃)2−g(Ψ), |
which can be arranged in the form
| (612) |
which agrees with Eq. (3.6.2) in Wessson’s book[28], where f is defined by f = RBϕ∕μ0, which is different from g ≡ RBϕ by a 1∕μ0 factor.
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 𝜀 = r∕R0 → 0. Expanding Ψ in the small parameter 𝜀,
| (613) |
where Ψ0 ∼ O(𝜀0), Ψ1 ∼ O(𝜀1). Substituting Eq. (613) into Eq. (612), we obtain
r+r++−− = −μ0(R0+r cos𝜃)2P′(Ψ 0+Ψ1)−g′(Ψ0+Ψ1)g(Ψ0+Ψ1) |
Multiplying the above equation by R02, we obtain
| (614) |
Further assume the following orderings (why?)
| (615) |
and
| (616) |
Using these orderings, the order of the terms in Eq. (614) can be estimated as
| (617) |
| (618) |
| (619) |
| (620) |
| (621) |
| (622) |
| (623) |
| (624) |
| (625) |
The leading order (𝜀−2 order) balance is given by the following equation:
| (626) |
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. (626) is written
| (627) |
(My remarks: The leading order equation (627) does not corresponds strictly to a cylinder equilibrium because the magnetic field B = ∇Ψ0 ×∇ϕ + g∇ϕ depends on 𝜃.) The next order (𝜀−1 order) equation is
R02r+R02−R0cos𝜃 = −μ0R022R 0r cos𝜃P′(Ψ0)−μ0R04P′′(Ψ 0)Ψ1−R02[g′(Ψ 0)g(Ψ0)]′Ψ1 |
| (628) |
| (629) |
It is obvious that the simple poloidal dependence of cos𝜃 will satisfy the above equation. Therefore, we consider Ψ1 of the form
| (630) |
where Δ(r) is a new function to be determined. Substitute this into the Eq. (), we obtain an equation for Δ(r),
| (631) |
| (632) |
| (633) |
| (634) |
Using the identity
= −, |
equation () is written as
| (635) |
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
| (636) |
| (637) |
Using the identity
| (638) |
equation (637) is written
| (639) |
| (640) |
Using
| (641) |
equation (640) is written
| (642) |
| (643) |
which agrees with equation (3.6.7) in Wessson’s book[28].
The normalized pressure gradient, α, which appears frequently in tokamak literature, is defined by[3]
| (644) |
which can be further written
| (645) |
where p = p∕(B02∕2μ0). Equation (645) can be further written as
| (646) |
where 𝜀a = a∕R0, r = r∕a, and a is the minor radius of the boundary flux surface. (Why is there a q2 factor in the definition of α?)
The global magnetic shear s is defined by
| (647) |
which can be written
| (648) |
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
| (649) |
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. (649) can be solved to give
| (650) |
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
| (651) |
| (652) |
The necessary condition for the existence of TAEs with frequency near the upper tip of the gap is given by[3]
| (653) |
which is used in my paper on Alfvén eigenmodes on EAST tokamak[15]. Equations (651) and (652) are used in the GTAW code to calculate s and α.
Magnetic field (e.g., equilibrium poloidal field, RMP field, ripple field) and vector potential generated by coils can be calculated in the following way.
The Biot-Savart law for a zero-thinkness wire is given by
Given a current source J(r,t), the vector potential can be calculated using
| (655) |
where
| (656) |
is called the retarded time. For a steady-state source, J(r′,t′) = J(r). Then Eq. (655) is simplified as
| (657) |
For a current flowing in a thin wire, the above equation is written as
| (658) |
where dS is a surface element perpendicular to the wire and dl is a line element along the wire. Using J(r′)dS(r′) = I(r′), the above eqaution is written as
| (660) |
(Aϕ is needed in several applications. In solving the free-boundy equilibrium problem, we need to calculate Aϕ generated by the PF coils. In studying the effects of RMP on particles, we need to calculate Pϕ, the canonical toroidal angular momentum, whose defintion involves Aϕ. Then we need to calculate Aϕ generated by the RMP coils.)
For a curve along the toroidal direction, the line element dl in terms of the cylindrical basis is written as dl′ = R′dϕ′ϕ′. Using Cartesian coordinate basis vectors, dl′ is written as
| (661) |
and
| (662) |
where a global Cartesian coordinates with x axis in ϕ = 0 plane is assumed.
Let us consider a full toroidal coil at (R′,Z′)with current I (a filamentary current loop). Since the problem is symmetric, the magnetic field/potential is independent of ϕ. For calculation ease, we select ϕ = 0 plane and calculate A and B values in this plane. Then
| (663) |
| (664) |
Using these, we obtain
| (665) |
and Eq. (660) is written as
| (666) |
Sine Aϕ is axsymmetric, the above formula applies to all values of ϕ. Multiply Aϕ by R and set I = 1, we get Green’s function of Ψ:
This expression can be directly used in numerical codes to compute the Green function table. One can also write the above integration to the elipitic integrals and use library to compute these inegreals. Let write the above expresion in this form. Define 𝜃 = (π − ϕ)∕2, then cosϕ′ = cos(π − 2𝜃) = −cos(2𝜃) = 2sin2𝜃 − 1. Using this Eq. (667) is written as
| (669) |
Then
E(k) = ∫ 0π∕2d𝜃 |
K(k) = ∫ 0π∕2d𝜃, |
are the eliptic integrals of the first and second kind.
Similarly, we can calculate the magnetic field:
where the cross product is written asR ⋅ dl′× (r − r′) = R′(Z − Z′)sinϕ′dϕ′ |
Z ⋅ dl′× (r − r′) = dϕ′ |
Using these in Eq. (670), BR(r) and BZ(r) are written as
For a curve in the poloidal plane, the line element dl in terms of the cylindrical basis is written as dl = dRR(ϕ) + dZz. Using Cartesian coordinate basis vectors, dl is written as
| (673) |
Using Eq. (673) and (), we obtain
| (674) |
This document initially contains notes I took when learning tokamak equilibrium theory. As a result of the on-going learning, the document is evolving. I enjoy seeing the continuous improvement of this document over a long time scale (10 years). Most of the content is elementary but I still found I got something totally wrong in the first version. Let me know if you spot something specious.
This document was written by using TeXmacs[26], a structured wysiwyw (what you see is what you want) editor for scientists. The HTML version is generated by first converting the TeXmacs file to TeX format and then using htlatex to convert the TeX to HTML.
[1] R Aymar, P Barabaschi, and Y Shimomura. The ITER design. Plasma Physics and Controlled Fusion, 44(5):519–565, apr 2002.
[2] 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.
[3] 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.
[4] Allen H. Boozer. Physics of magnetically confined plasmas. Rev. Mod. Phys., 76:1071–1141, Jan 2005.
[5] R. Gallix, C. Jong, J. Knaster, N. Mitchell C. Sborchia, Y. Fu. Design and specifications of the iter tf coils. IEEE TRANSACTIONS ON APPLIED SUPERCONDUCTIVITY,, 18(2):463, 2008.
[6] Yang Chen and Scott E. Parker. A delta-f particle method for gyrokinetic simulations with kinetic electrons and electromagnetic perturbations. Journal of Computational Physics, 189(2):463–475, 2003.
[7] Yang Chen and Scott E. Parker. Electromagnetic gyrokinetic δf particle-in-cell turbulence simulation with realistic equilibrium profiles and geometry. Journal of Computational Physics, 220(2):839–855, 2007.
[8] 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.
[9] Fu Peng, Gao Ge Chen Yuan-Yang, Bao Xiao-Hua. Plasma shape optimization for east tokamak using orthogonal method. Chinese Physics B, 28(1):15201, 2019.
[10] 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.
[11] 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.
[12] A. M. Dimits. Fluid simulations of tokamak turbulence in quasiballooning coordinates. Phys. Rev. E, 48:4070–4079, Nov 1993.
[13] T. Görler, N. Tronko, W. A. Hornsby, A. Bottino, R. Kleiber, C. Norscini, V. Grandgirard, F. Jenko, and E. Sonnendrücker. Intercode comparison of gyrokinetic global electromagnetic modes. Physics of Plasmas, 23(7):72503, 2016.
[14] J. van der Hoeven et al. GNU TeXmacs. https://www.texmacs.org, 1998.
[15] 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.
[16] Stephen C. Jardin. Computational methods in plasma physics. CRC Press, 2010.
[17] L.L. Lao, H. St. John, R.D. Stambaugh, A.G. Kellman, and W. Pfeiffer. Reconstruction of current profile parameters and plasma shapes in tokamaks. Nucl. Fusion, 25(11):1611, 1985.
[18] G.S. Lee, M. Kwon, C.J. Doh, B.G. Hong, K. Kim, M.H. Cho, W. Namkung, C.S. Chang, Y.C. Kim, J.Y. Kim, H.G. Jhang, D.K. Lee, K.I. You, J.H. Han, M.C. Kyum, J.W. Choi, J. Hong, W.C. Kim, B.C. Kim, J.H. Choi, S.H. Seo, H.K. Na, H.G. Lee, S.G. Lee, S.J. Yoo, B.J. Lee, Y.S. Jung, J.G. Bak, H.L. Yang, S.Y. Cho, K.H. Im, N.I. Hur, I.K. Yoo, J.W. Sa, K.H. Hong, G.H. Kim, B.J. Yoo, H.C. Ri, Y.K. Oh, Y.S. Kim, C.H. Choi, D.L. Kim, Y.M. Park, K.W. Cho, T.H. Ha, S.M. Hwang, Y.J. Kim, S. Baang, S.I. Lee, H.Y. Chang, W. Choe, S.G. Jeong, S.S. Oh, H.J. Lee, B.H. Oh, B.H. Choi, C.K. Hwang, S.R. In, S.H. Jeong, I.S. Ko, Y.S. Bae, H.S. Kang, J.B. Kim, H.J. Ahn, D.S. Kim, C.H. Choi, J.H. Lee, Y.W. Lee, Y.S. Hwang, S.H. Hong, K.-H. Chung, D.-I. Choi, and KSTAR Team. Design and construction of the KSTAR tokamak. Nuclear Fusion, 41(10):1515–1523, oct 2001.
[19] G Q Li, Q L Ren, J P Qian, L L Lao, S Y Ding, Y J Chen, Z X Liu, B Lu, and Q Zang. Kinetic equilibrium reconstruction on east tokamak. Plasma Phys. Controlled Fusion, 55(12):125008, 2013.
[20] J.L. Luxon. A design retrospective of the DIII-D tokamak. Nuclear Fusion, 42(5):614–633, may 2002.
[21] 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.
[22] M. Ottaviani. An alternative approach to field-aligned coordinates for plasma turbulence simulations. Physics Letters A, 375(15):1677–1685, 2011.
[23] 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.
[24] I. Song, C. Choi, and M. Cho. Quench protection system for the superconducting coil of the kstar tokamak. IEEE Transactions on Applied Superconductivity, 17(1):1–6, March 2007.
[25] Youwen Sun. Tokamak geometry and equilibrium. http://theory.ipp.ac.cn/~yj/other/TOKAMAK_geometry_and_equilibrium_Youwen_Sun_201208.pdf, 2012. [Online; Institute of Plasma Physics, Chinese Academy of Sciences].
[26] Joris van der Hoeven. Gnu texmacs, a structured wysiwyw (what you see is what you want) editor for scientists. http://www.texmacs.org/, 2007. [Online].
[27] W. X. Wang, Z. Lin, W. M. Tang, W. W. Lee, S. Ethier, J. L. V. Lewandowski, G. Rewoldt, T. S. Hahm, and J. Manickam. Gyro-kinetic simulation of global turbulent transport properties in tokamak experiments. Physics of Plasmas, 13(9):92505, 2006.
[28] John Wesson. Tokamaks. Oxford University Press, 2004.
[29] R. B. White and M. S. Chance. Hamiltonian guiding center drift orbit calculation for plasmas of arbitrary cross section. The Physics of Fluids, 27(10):2455–2467, 1984.
[30] B J Xiao, D A Humphreys, and M L Walker. East plasma control system. Fusion Engineering and Design, 83:181, 2008.
[31] B. J. Xiao. The first diverted plasma on east tokamak. 34th EPS Conference on Plasma Phys, 2007.