Next Article in Journal
The Influence of the Ionic Core on Structural and Thermodynamic Properties of Dense Plasmas
Previous Article in Journal / Special Issue
Energy Efficiency of Plasma Jets: Electrical Modeling Based on Experimental Results
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Control-Oriented Free-Boundary Equilibrium Solver for Tokamaks

Department of Mechanical Engineering and Mechanics, Lehigh University, Bethlehem, PA 18015, USA
*
Author to whom correspondence should be addressed.
Plasma 2024, 7(4), 842-857; https://doi.org/10.3390/plasma7040045
Submission received: 22 July 2024 / Revised: 26 September 2024 / Accepted: 16 October 2024 / Published: 23 October 2024
(This article belongs to the Special Issue New Insights into Plasma Theory, Modeling and Predictive Simulations)

Abstract

:
A free-boundary equilibrium solver for an axisymmetric tokamak geometry was developed based on the finite difference method and Picard iteration in a rectangular computational area. The solver can run either in forward mode, where external coil currents are prescribed until the converged magnetic flux function ψ ( R , Z ) map is achieved, or in inverse mode, where the desired plasma boundary, with or without an X-point, is prescribed to determine the required coil currents. The equilibrium solutions are made consistent with prescribed plasma parameters, such as the total plasma current, poloidal beta, or safety factor at a specified flux surface. To verify the mathematical correctness and accuracy of the solver, the solution obtained using this numerical solver was compared with that from an analytic fixed-boundary equilibrium solver based on the EAST geometry. Additionally, the proposed solver was benchmarked against another numerical solver based on the finite-element and Newton-iteration methods in a triangular-based mesh. Finally, the proposed solver was compared with equilibrium reconstruction results in DIII-D experiments.

1. Introduction

Plasma equilibrium is a fundamental state in magnetic confinement fusion devices, such as stellarators and tokamaks. Plasma equilibrium models, which are based on the force balance equation, are frequently used to explore various aspects of plasma operations. These models are essential for determining optimal plasma shapes; studying physics issues such as magnetohydrodynamic (MHD) instabilities, turbulence, and transport; and assessing nominal plasma scenarios.
Plasma equilibrium problems in an axisymmetric tokamak geometry can be broadly classified into two categories. One is the fixed-boundary equilibrium (FXBE) problem, where the plasma boundary is prescribed, and only the internal distributions of plasma profiles are of interest. The fixed-boundary equilibrium assumption is widely adopted in MHD and transport analysis because this equilibrium problem can be solved quickly, both analytically and numerically. The other type is the free-boundary equilibrium (FBE) problem, where the plasma boundary is unknown and is identified by the resulting poloidal magnetic flux distribution. This distribution is determined by the external coil currents and the current flowing toroidally within the plasma. The FBE problem is widely used to design plasma shape control strategies and to reconstruct plasma equilibrium profiles using diagnostic measurements in tokamak experiments.
Many equilibrium solvers that address the FXBE problem rely on analytical approaches with simplified assumptions, though there are also numerical solvers, such as TEQ [1], that handle the FXBE problem in a more complex manner. The typical analytic FXBE solvers, using a linear or constant distribution of plasma current density, are based on an up–down symmetric plasma boundary prescribed by either four points [2] or parameters with X-points [3]. Recently, a more general fixed-boundary equilibrium solver [4] was proposed. It is compatible with both vertically symmetric and asymmetric plasma boundaries and uses a smoothed and monotonic plasma profile, i.e., the toroidal plasma current density. However, to accurately consider realistic plasma dynamics with respect to poloidal field (PF) systems in tokamaks, especially for magnetic control, developing an FBE solver where external coils serve as actuators is of high priority. Unlike FXBE solvers, solvers for the FBE problem can only be tackled numerically in an iterative manner due to the nonlinearity of the plasma current density. There are two dominant approaches in the literature for addressing the FBE problem on different computational grids. One approach is based on the finite element method (FEM) and Newton-type iteration on a triangular-based grid, as seen in the codes for the C++ version of CEDRES++ [5] and the MATLAB version of FEEQS.M [6], which have been used to design plasma operational scenarios for WEST [7] and ITER [8]. These FEM-based FBE solvers can find numerical solutions with high accuracy (iterative error less than 10 10 ) and handle nonlinear issues, such as iron permeability. In tokamaks, like JET [9] and WEST, areas with nonlinear magnetic permeability, such as those containing iron, are used to extend the pulse length. However, this introduces additional complexity for the solver to address. Moreover, the large and complicated computational mesh usually makes them computationally intensive. The other approach is performed on a simple and small-sized rectangular grid and is solved by Picard iteration, e.g., the TSC [10] and TES [11] codes. These simplified mesh constructions and fast computations make them more attractive, especially for fast integrated scenario predictions.
In this work, a numerical FBE solver named the Control-Oriented Tokamak Equilibrium Solver (COTES) is introduced. It is based on the finite difference method (FDM) and operates fully within MATLAB/SIMULINK©, which is considered the standard platform for control design. Unlike previous approaches [11,12], COTES employs a sophisticated vertical shift of the plasma current density to address the numerical issues, e.g., vertical instability problem, during iterations in asymmetric plasma shapes, rather than adding fictitious coil currents to feedback vertical excursions. Various dedicated numerical simulations were conducted through COTES for superconducting (EAST) and conventional (DIII-D) tokamak geometries. These simulations were cross-checked with a fixed-boundary solver and the finite-element and Newton-iteration FEEQS.M solver to address benchmarks between different FBE solvers that were seldom undertaken in previous studies. Dedicated COTES simulations were also conducted to verify different approaches for the control of vertical instability based on experimental equilibrium reconstruction data with the EFIT code [13].
This paper is organized as follows. In Section 2, the FBE equations and the numerical approach used in COTES are introduced in detail. Section 3 covers the benchmarks and verifications, including the mathematical accuracy and correctness against a fixed-boundary solution, numerical comparisons with FEEQS.M, and experimental reconstruction data. Finally, conclusions and possible future work are presented in Section 4.

2. Numerical Approach in COTES

The main FBE equation and approach implemented in COTES follow the previous works of [11,12]. This section emphasizes the new treatments developed in COTES and the details that were missed in previous approaches.

2.1. Free-Boundary Equilibrium Problem in Tokamak Geometry

In the cylindrical coordinate system ( R , ϕ , Z ), the ϕ component is considered negligible due to the assumption of toroidal axisymmetry in tokamaks. The FBE equation, derived from the force balance equation for an air-core tokamak, is written as follows:
Δ * ψ ( R , Z ) = μ 0 R J ϕ ( R , Z ) ,
Δ * R R 1 R R + 2 Z 2 ,
where the poloidal flux function ψ , known as the poloidal magnetic flux per radian, is defined as ψ ( R , Z ) R A ϕ from B = × A , and μ 0 is the permeability in a vacuum. The right-hand side (RHS) of Equation (1a) is the toroidal current density, which is dependent on different factors:
J ϕ ( R , Z ) = R p ( ψ ) + f f ( ψ ) μ 0 R in plasma area Ω p l I c S c in coil number c 0 elsewhere ,
in which p represents the plasma kinetic pressure, f is the diamagnetic function defined as f ( ψ ) R B ϕ , B ϕ is the toroidal magnetic field, I c and S c are the current and cross-section of the external conductor coil c, and the prime sign represents the derivative with regard to ψ . The toroidal plasma current density, J ϕ , p l ( R , Z ) , is derived from the well-known Grad–Shafranov (G-S) equation [14,15]. It is important to note that currents on possible passive plates and vacuum vessel, induced by plasma vertical excursions and disruptions, can also be treated as having similar current densities to those in the external coils. These induced currents are very important to reduce the growth rate of plasma vertical events (VDEs) due to a loss of control in the vertical position, disruption, and MHD instabilities [16].
The J ϕ , p l ( R , Z ) is parameterized from [17] as
J ϕ , p l ( R , Z ) = λ β 0 R R 0 ( 1 ψ N α m ) α n + ( 1 β 0 ) R 0 R ( 1 ψ N β m ) β n ,
p ( ψ ) λ β 0 R 0 ( 1 ψ N α m ) α n , f f ( ψ ) λ μ 0 R 0 ( 1 β 0 ) ( 1 ψ N β m ) β n ,
where R 0 is the major radius, and ψ N [ 0 , 1 ] is the normalized ψ defined as ψ N ( ψ ψ a x ) / ( ψ b d ψ a x ) , where ψ a x and ψ b d are the ψ along the plasma axis and at the boundary, respectively. The parameters λ and β 0 can be tuned to constrain the specified equilibrium, which are discussed further below, while α m , α n , β m , and β n are user-defined input constants.
When solving the FBE equation through numerical methods, certain plasma quantities can be prescribed. Two unknowns, i.e., λ and β 0 in Equation (3), can be determined to satisfy two constrained parameters. These parameters could be imposed on plasma quantities, such as I p and the poloidal plasma beta ( β p ):
I p = Ω p l J ϕ , p l ( λ , β 0 ) d Ω ,
β p = 2 μ 0 p ( λ , β 0 ) B p 2 ,
where B p = 1 R ψ × e ^ ϕ (toroidal unit vector) is the poloidal magnetic field. The bracket · denotes the flux-averaging operation [18] for arbitrary term A with
A = V V A d V = D A d V D d V = Ω p l A R d S Ω p l R d S
or A = ψ N A B p d l ψ N 1 B p d l ,
in which D and V are the 3D plasma area and the volume inside a specified ψ surface, and l is a closed flux contour.
Additionally, these two plasma parameters can also be I p and q ( ψ N ) (safety factor) at a specified ψ N , such as q 95 at ψ N = 0.95 . The safety factor q is defined by
q ( ψ N ) = 1 2 π ψ N B ϕ R B p d l = 1 2 π ψ N f ( λ , β 0 ) R 2 B p d l ,
in which f = R B ϕ is used.
The continuous flux-averaged plasma quantities above can be estimated by discrete approximates, e.g., I p (similarly for β p ) in the plasma area based on Equations (3) and (4) or (6) as
I p = λ β 0 · m = 1 N o d e p l R m R 0 ( 1 ψ N , m α m ) α n · δ R δ Z , + λ ( 1 β 0 ) · m = 1 N o d e p l R 0 R m ( 1 ψ N , m β m ) β n · δ R δ Z ,
where N o d e p l is a plasma element.
Similarly, q ( ψ N ) on closed contour points ( R k , Z k ) can be approximated with Equation (6) as follows:
q ( ψ N ) = 1 2 π f ( ψ N ) · x = 1 k 1 1 R x 2 B p , x 2 · ( R x + 1 R x ) 2 + ( Z x + 1 Z x ) 2 ,
where f ( ψ N ) on a given ψ N is calculated from [18] as
f ( ψ N ) = ( B ϕ , 0 R 0 ) 2 2 ( ψ b d ψ a x ) λ μ 0 R 0 ( 1 β 0 ) · ψ N 1 ( 1 ψ N β m ) β n d l .
By combining Equations (7)–(9), specified λ and β 0 values can be determined.

2.2. Numerical Approximations on a Rectangular Grid

The FBE Equation (1) is a 2D partial differential equation (PDE) with a nonlinear source. A typical treatment to solve this continuous PDE is to discretize the 2D operator using a 1D approximation with a known source term. A rectangular computational domain ( R i , Z j ) is constructed as
R i = R m i n + δ R × ( i 1 ) , δ R = ( R m a x R m i n ) / ( N R 1 ) , Z j = Z m i n + δ Z × ( j 1 ) , δ Z = ( Z m a x Z m i n ) / ( N Z 1 ) ,
where i = 1 , , N R and j = 1 , , N z are the total number of grid points in the R and Z coordinates, respectively.
The 2D derivatives in the Shafranov operator Δ * from Equation (1b) can be approximated as
ψ R | i ψ i + 1 ψ i 1 2 δ R , ψ Z | j ψ j + 1 ψ j 1 2 δ Z ,
2 ψ R 2 | i ψ i + 1 2 ψ i + ψ i 1 ( δ R ) 2 , 2 ψ Z 2 | j ψ j + 1 2 ψ j + ψ j 1 ( δ Z ) 2 .
Therefore, Equation (1) is rewritten as
1 ( δ Z ) 2 ψ j 1 , i + 1 ( δ R ) 2 + 1 2 R i ( δ R ) ψ j , i 1 2 1 ( δ R ) 2 + 1 ( δ Z ) 2 ψ j , i + 1 ( δ R ) 2 1 2 R i ( δ R ) ψ j , i + 1 + 1 ( δ Z ) 2 ψ j + 1 , i = μ 0 R i J ϕ j , i ,
where ψ j , i and J ϕ j , i denote ψ ( R i , Z j ) and J ϕ ( R i , Z j ) , respectively. If the RHS of J ϕ j , i is known, then the equation above resembles a set of linear algebraic equations Ax = b that can be solved using various methods [19], such as Jacobi’s Method, the Gauss–Seidel Method, and the Successive Over-Relaxation Method (SOR).

2.3. Initial Guess and Picard Iteration

In order to solve Equation (12), it is essential to pre-define the RHS of J ϕ j , i , which is nonlinear and depends on the solution ψ j , i . This nonlinearity can only be addressed through an iterative scheme, starting from a guess of J ϕ j , i . A typical initial guess of J ϕ j , i 0 with a circular plasma current density [12] is given by
J ϕ j , i 0 = λ 0 R 1 A 2 a i n i t 2 if A 2 < a i n i t 2 0 if A 2 a i n i t 2 ,
where A 2 = ( R i R i n i t ) 2 + ( Z j Z i n i t ) 2 , with R i n i t , Z i n i t , and a i n i t being the user-defined plasma center coordinates and minor radius for the initial plasma current distribution. The constant λ 0 is adjusted to match the total plasma current. An initial guess of J ϕ j , i 0 with I p = 250 kA is shown in Figure 1. In practice, J ϕ j , i from a converged solution is typically employed as an initial guess to expedite the iterations.
By utilizing an initial guess of J ϕ j , i 0 , the FBE in Equation (12) can thus be solved by the well-known Picard iteration [20]. The Picard iteration is very effective for numerically solving the PDE, where the provided initial guess is close to the converged solution. The next iteration’s solution is calculated based on the current iteration in a recursive manner, which is described in detail in the following paragraph. The ψ j , i n ( 1 < i < N R , 1 < j < N Z ) on the given grid, except boundary nodes, based on Equation (12) is expressed as
1 ( δ Z ) 2 ψ j 1 , i n + 1 ( δ R ) 2 + 1 2 R i ( δ R ) ψ j , i 1 n 2 1 ( δ R ) 2 + 1 ( δ Z ) 2 ψ j , i n + 1 ( δ R ) 2 1 2 R i ( δ R ) ψ j , i + 1 n + 1 ( δ Z ) 2 ψ j + 1 , i n = μ 0 R i J ϕ j , i n ( ψ j , i n 1 ) ,
in which n ( n 1 ) represents the n- t h iteration. It can be seen that J ϕ j , i n , the toroidal plasma current distribution in the n- t h iteration, is determined by ψ j , i n 1 , precisely specifying ψ a x n 1 and ψ b d n 1 . With the assumed initial J ϕ j , i 0 , ψ j , i 0 is obtained by solving Equation (14). In the next iteration, J ϕ j , i 1 is updated based on ψ j , i 0 . Following this recursive iteration, the numerical solutions of J ϕ j , i n ( ψ j , i n 1 ) and ψ j , i n are obtained until a given criterion, i.e., ψ j , i n ψ j , i n 1 < ϵ (typically 10 4 ), is satisfied. The detailed block diagram for this Picard iteration is depicted in Figure 3.

2.4. Boundary Condition for the Free-Boundary Equilibrium Solver

Equation (14) determines ψ j , i in the core region of the grid, where 1 < i < N R and 1 < j < N Z . Dirichlet boundary conditions [21] are applied at the grid boundaries ( i = 1 , N R and j = 1 , N Z ). Figure 2 illustrates the rectangular grid used to discretize the 2D computational domain ( R i , Z j ) for solving the FBE Equation (1), where the spatial coordinates R i and Z j are discretized with uniform step sizes δ R and δ Z , respectively. The red ’x’s mark the boundary nodes of the mesh, defining the limits of the domain, while the black dots represent the interior nodes. The boundary ψ ( R , Z ) is computed using the Green’s function formulation [22]:
ψ ( R , Z ) = G ( R , Z ; R , Z ) J ϕ ( R , Z ) d R d Z / ( 2 π ) ,
where G ( R , Z ; R , Z ) is the Green’s function for a unit toroidal current source at ( R , Z ) , given by
G ( R , Z ; R , Z ) = μ 0 2 π R R k [ ( 2 k 2 ) K ( k ) 2 E ( k ) ] , k 2 4 R R ( R + R ) 2 + ( Z Z " ) 2 ,
with K ( k ) and E ( k ) being the elliptic integrals of the first and second kinds, respectively:
K ( k ) = 0 π 2 d θ 1 k 2 s i n 2 θ ; E ( k ) = 0 π 2 1 k 2 s i n 2 θ d θ .
In a tokamak, the boundary ψ ( R b d , Z b d ) depends on the induced ψ by the toroidal plasma current and conductor coil currents:
ψ n ( R b d , Z b d ) = ( Ω p l G ( R b d , Z b d ; R , Z ) J ϕ , p l n ( R , Z ) d Ω + c = 1 N c o i l G ( R b d , Z b d ; R c , Z c ) · I c n ) / ( 2 π ) .
Here J ϕ , p l n ( R , Z ) changes in each Picard iteration, while I c n ( R c , Z c ) may either change or remain constant depending on the computational mode (forward vs. inverse), as discussed in Section 2.6.

2.5. Identification of Plasma Axis and Boundary

The determination of ψ a x and ψ b d in each Picard iteration is crucial since the nonlinear RHS of J ϕ j , i strongly relies on ψ a x and ψ b d . In a tokamak, the plasma boundary is either in contact with the plasma-facing component, e.g., the so-called limited or circular plasma shape, or formed by the saddle point of the poloidal magnetic field as an X-point (diverted plasma shape). Identifying ψ a x is relatively straightforward because it has the largest absolute value of ψ inside the plasma area. On the other hand, determining ψ b d for a limited shape is also straightforward, as it is recognized by the existence of a closed contour, based on locating the maximum ψ on the first wall coordinates. However, for a diverted plasma shape with an X-point, where a null magnetic field exists, the plasma boundary is identified by computing | ψ | 2 .
Both the magnetic axis and X-points are characterized by local minima in | ψ | 2 . Therefore, it is necessary to find the possible X-points and magnetic axis by calculating the following term:
S ( R , Z ) 2 ψ R 2 2 ψ Z 2 2 ψ R Z 2 ,
along the magnetic axis, the maximum value of ψ ( R , Z ) holds the same sign as for ( 2 ψ / R 2 ) and ( 2 ψ / Z 2 ) , while they are opposite to each other when it is a saddle point (X-point) [23]. Therefore, the Hessian of S > 0 indicates a magnetic axis, and S < 0 indicates an X-point. The precise ( R , Z ) coordinates for ψ a x and the X-points are determined using a new ψ ( R , Z ) with small values of ( δ R , δ Z ). Although there may be multiple X-points, it is essential to identify the one that defines the plasma boundary and is closest to the plasma axis, as distinguished by having the maximum | ψ | .

2.6. Forward and Inverse Free-Boundary Equilibrium Modes

Within COTES, two computational modes are employed, namely, the forward and inverse modes. In the forward mode, the coil currents are known and remain fixed until a converged ψ ( R , Z ) map is achieved. In contrast, the inverse mode treats the external coil currents as unknowns, which can be determined by additional constraints, e.g., the prescribed plasma boundary and X-points. In this inverse COTES approach, potential coil currents are explored by solving the following optimal problem:
m i n Δ I c o i l [ e = 1 N b n d c = 1 N c o i l G ( R e r e f , Z e r e f ; R c , Z c ) · Δ I c o i l , c Δ ψ ( R e r e f , Z e r e f ) 2 + d = 1 N X p t c = 1 N c o i l G B R ( R d r e f , Z d r e f ; R c , Z c ) · Δ I c o i l , c B R ( R d r e f , Z d r e f ) 2 + d = 1 N X p t c = 1 N c o i l G B Z ( R d r e f , Z d r e f ; R c , Z c ) · Δ I c o i l , c B Z ( R d r e f , Z d r e f ) 2 + γ 2 c = 1 N c o i l Δ I c o i l , c 2 ] ,
where ( R e r e f , Z e r e f ) are the specified boundary points; G ( R e r e f , Z e r e f ; R c , Z c ) is the Green’s function of the unit coil current ( R c , Z c ) on the plasma boundary; Δ ψ ( R e r e f , Z e r e f ) = ψ b d ψ ( R e r e f , Z e r e f ) is the error of the poloidal flux function on the prescribed plasma boundary points; B R ( R d r e f , Z d r e f ) and B Z ( R d r e f , Z d r e f ) are the radial and vertical poloidal magnetic field on the given X-points ( R d r e f , Z d r e f ) , respectively; and γ is a Tikhonov parameter for the regularization term [24] in an ill-posed problem. If an X-point is specified, then B R ( R d r e f , Z d r e f ) and B Z ( R d r e f , Z d r e f ) at the X-points should be zero. This constraint is added as the second and third summed terms in Equation (20), with
G B R 1 R G Z G B Z 1 R G R .
The external coil currents for the next iteration are updated as
I c o i l , c ( n ) = I c o i l , c ( n 1 ) + Δ I c o i l , c ,
where I c o i l , c ( n 1 ) is the c- t h coil current from the ( n 1 ) t h Picard iteration. It is important to emphasize that the initial I c o i l 0 must be close to a real solution; otherwise, the Picard iteration will fail due to the absence of a possible plasma boundary and axis.
The solution to Equation (20) involves a least-squares regression with an L2 [25] penalty term, and the optimal coil currents are computed by
Δ I c o i l o p t = ( G ( R e r e f , Z e r e f ; R c , Z c ) T · G ( R e r e f , Z e r e f ; R c , Z c ) + G B R ( R d r e f , Z d r e f ; R c , Z c ) T G B R ( R d r e f , Z d r e f ; R c , Z c ) + G B Z ( R d r e f , Z d r e f ; R c , Z c ) T G B Z ( R d r e f , Z d r e f ; R c , Z c ) + γ 2 · d i a g ( I ) ) 1 × ( G ( R e r e f , Z e r e f ; R c , Z c ) T · Δ ψ ( R e r e f , Z e r e f ) + G B R ( R d r e f , Z d r e f ; R c , Z c ) T · B R ( R d r e f , Z d r e f ) + G B Z ( R d r e f , Z d r e f ; R c , Z c ) T · B Z ( R d r e f , Z d r e f ) ) .
In practical exercises, when the value of γ is fixed, the Picard iteration often encounters difficulty with convergence. It typically oscillates around a value significantly higher than the stop criterion ϵ b 10 4 . To address this issue, it becomes necessary to reduce the regularization term on coil currents in Equation (20) by using a sequence of values for γ [12]:
γ n + 1 = γ n ( ϵ b / ϵ n ) 1 / 2 ,
where
ϵ n | | c = 1 N c o i l G ( R e r e f , Z e r e f ; R c , Z c ) · Δ I c o i l , c Δ ψ ( R e r e f , Z e r e f ) | | / | ψ b d ψ a x | .
The iteration is stopped when ϵ n < = ϵ b , which usually takes less than twenty iterations.
The detailed block diagram for the Picard iteration is illustrated in Figure 3. The dashed box highlights the process of determining the coil currents within the inverse mode. The diagram illustrates the Picard iteration process in the COTES code for solving the free-boundary equilibrium in the axisymmetric tokamak geometry. The process begins with an initial guess of the current density, J ϕ , j , i 0 . This initial guess is used to calculate the boundary flux function, ψ 0 ( R b d , Z b d ) , and the core flux function, ψ 0 ( R c o r e , Z c o r e ) .
The iteration process starts with n = 1 . In each iteration, the values of ψ a x n 1 and ψ b d n 1 are identified. Then, the parameters λ and β 0 are calculated based on the specified equations. The current density J ϕ , i n is updated accordingly.
Next, the boundary flux, ψ n ( R b d , Z b d ) , and the core flux, ψ n ( R c o r e , Z c o r e ) , are recalculated using the updated current density. If the inverse mode is selected, the coil currents I c are updated based on additional constraints.
The iteration continues with n being incremented by one each time. The process checks whether n > 1 and whether the norm of the difference between the current and previous flux functions is within a specified tolerance ϵ . If the convergence criteria are met, the iteration ends; otherwise, it repeats.

2.7. Vertical Position Instability in Forward Mode

In the forward mode of COTES, the Picard iteration exhibits vertical instability, especially in cases where the plasma shape is asymmetric, such as the lower or upper single null (LSN or USN) X-point configuration. In previous work [12], a traditional approach to tackle this vertical excursion is to add a pair of fictitious feedback coils with currents:
I f e e d b a c k = - sign ( Z c o i l ) C 1 ( Z a x n Z d e s i r e d ) + C 2 ( Z a x n Z a x n 1 ) · I p ,
where Z c o i l is the vertical coordinate of the fictitious feedback coil and Z d e s i r e d is the target vertical position. This method works like a proportional and derivative (PD) controller, in which C 1 and C 2 are the P and D gains, respectively. However, a notable drawback of this technique is that the introduction of additional feedback coil currents inevitably alters the resulting ψ ( R , Z ) map. Furthermore, the determination of C 1 and C 2 typically relies on trial and error.
Another treatment [11] also relies on adjusting the feedback coil currents to control the radial magnetic field B R , which has a significant impact on the vertical instability. The corresponding feedback coil current is defined as follows:
I f e e d b a c k = g z B R , V a c B R , F B * | R c u r , Z c u r ,
where g z is an adjustable variable [ 2 , 2.5 ] ; B R , V a c and B R , F B * are the radial magnetic fields due to only the external coil currents and unit feedback coil current, respectively; and ( R c u r , Z c u r ) is the effective barycenter of the plasma current. By this approach, guessing the vertical desired position is not necessary, but additional coil currents can also change the converged ψ ( R , Z ) map.
In this work, a sophisticated approach without feedback coil currents was implemented. Instead of adding fictitious feedback coils, the current density J ϕ j , i was adjusted by
χ = K p ( Z d e s i r e d Z a x ) , J ϕ j , i n , n e w = ( 1 χ ) J ϕ j , i n , o l d + χ J ϕ j , i n , o l d d i a g ( I ) j , i Z ,
where J ϕ j , i n , o l d is the plasma current density in the n- t h Picard iteration in Figure 3 based on ψ j , i n 1 , χ [ 1 , 1 ] is a relaxing factor, and K p is an adjusted control parameter. On the other hand, J ϕ j , i n , n e w represents the modified current density used for the ψ j , i n calculation. The advantage is that no extra coil currents are needed to modify the final ψ ( R , Z ) map, although it does necessitate an initial guess for Z d e s i r e d prior to starting the Picard iteration. Similar methods are widely employed in the equilibrium reconstruction codes EFIT [13], CLISTE [26], and LIUQE [27].

3. Benchmarks and Numerical Verifications

This section discusses a series of benchmarks and verifications for COTES simulations. To ensure mathematical correctness and accuracy, COTES is directly compared against an analytical fixed-boundary equilibrium solution. Furthermore, additional benchmark tests are conducted using another numerical solver with a distinct computational grid and method. Finally, the numerical results obtained from COTES are verified by comparing them with the equilibrium reconstruction code EFIT, which is based on the DIII-D low (L) confinement experimental data.

3.1. Benchmark with Analytic Fixed-Boundary Equilibrium Solver

To assess the mathematical correctness and accuracy of the COTES simulation, a recently developed analytic fixed-boundary equilibrium solver [4] was applied as a benchmark. The pressure and toroidal current density in this analytic solver are defined as follows:
p ( ψ ) = p 0 ψ ψ 0 2 , f 2 ( ψ ) = R 0 2 B ϕ 0 2 1 + 2 δ B B ϕ 0 ψ ψ 0 2 ,
J ϕ , p l = R d p ( ψ ) d ψ + 1 2 μ 0 R d f 2 ( ψ ) d ψ ,
where ψ 0 is the poloidal flux function on the magnetic axis, p 0 is the kinetic pressure on the axis, and δ B / B ϕ 0 is a measure of the toroidal field diamagnetism on the axis. In this approach, all the plasma parameters, such as p, p , and f, as well as ψ , vanish on the plasma boundary surface, i.e., ψ ( surf ) = 0 .
The prescribed plasma boundary is defined by the Miller profile [28]. The fixed plasma boundary, ( R S , Z S ) , is given in terms of an angle-like parameter θ , θ [ 0 , 2 π ] , as
R S = R 0 + a c o s ( θ + δ ^ s i n θ ) , Z S = a κ s i n θ ,
in which κ is the elongation, δ is the triangularity, and δ ^ = s i n 1 δ .
The benchmark was carried out with the assumption that both the inverse mode of COTES and the analytic solver shared an identical plasma boundary, which was defined by κ = 1.45 , δ = 0.2 , R 0 = 1.81 m, and a = 0.4 m. The values I p = 0.68 M A , β p = 0.5 , and B ϕ 0 = 2.0 T were prescribed. Iso ψ N contours ranging from 0 to 1 with a step of 0.1 are shown in Figure 4.
A remarkable observation was that the iso ψ N contours aligned perfectly, which extended from the plasma boundary to the axis. This excellent agreement along the plasma axis can be attributed to the combined effects of β p + l i / 2 , referred to as the Shafranov shift. Here, l i denotes the plasma internal inductance, which characterizes the peaking of the current density distribution. The β p in both the analytic and inverse numerical solvers were forced to 0.5, resulting in l i with 0.9364 and 0.9462, respectively, which, in turn, yielded almost the same β p + l i / 2 . These well-matched iso ψ N contours between COTES and the analytic fixed-boundary solver underscore the high credibility of both solvers in terms of their mathematical correctness and accuracy.

3.2. Verifications with Numerical Free-Boundary Equilibrium Solver

A comparison analysis was undertaken between the COTES simulation results and those from the numerical FBE solver FEEQS.M to make sure that the COTES simulation was correct and accurate. FEEQS.M employs the finite element method and Newton-type iteration on a triangular-based grid. The simulations herein were carried out using the EAST [29] geometry.
The different computational grids for COTES and FEEQS.M are illustrated in Figure 5. In COTES, the rectangular domain spanned [ R m i n , R m a x ] [ 1.2 , 2.6 ] m and [ Z m i n , Z m a x ] [ 1.2 , 1.2 ] m, with N R = N Z = 65 , while for FEEQS.M, the computational domain was a semi-circular area with radius r = 3.5 m, and the sizes of the triangles in different areas were adjusted to reduce the total number of elements.
The verification process aligned with the benchmark described in Section 3.1, i.e., both numerical approaches were executed by inverse modes and shared the same plasma boundaries (limited and X-point diverted configurations). For simplicity, the J ϕ , p l in both codes applied the same polynomial functions as specified in Equation (3). The l i was tuned by trial and error with different α n and β n in Equation (3b).
The verified results, including the plasma parameters and internal profiles for the limited configuration, are shown in Figure 6. The overlapped iso ψ N contours signify that the numerical solutions obtained through different methods, encompassing variations in the computational grid, discrete approximations, and iterative processes, were in complete agreement. In addition to the ψ N contours, the plasma internal profiles, particularly q and J ϕ , p l computed by distinct numerical integrals, also exhibited a perfect overlap. This consistency underscored the correctness and accuracy of both numerical methods.
To further verify the agreement between these two numerical FBE solutions, inverse calculations with the LSN configuration were compared, and the results are presented in Figure 7. Once again, the iso ψ N contour plots displayed a flawless overlap. However, some slight discrepancies were observed in the plasma profiles, particularly for p , f , p , and f f . These minor variations suggest that in the asymmetric plasma configuration, differences between the two numerical methods can arise, though overall agreement is maintained.

3.3. Verification with Equilibrium Reconstruction Data

COTES FBE solutions can be compared with plasma equilibrium reconstructions from experiments based on diagnostic measurements. In the EFIT code [13], coil currents are given, but the toroidal plasma current density is unknown and must be determined. The toroidal current density can be inferred based on constraints from experimental measurements, such as the magnetic field and flux. The optimization objective to minimize is
χ 2 = k = 1 N m e a s M k C k σ k 2 ,
where M k , C k , and σ k are the experimental measurement, calculated value, and associated error for the k- t h term, respectively. The pressure and diamagnetic function for the calculation of J ϕ , p l for the equilibrium construction is defined as
p ( ψ N ) = n = 0 n p a n ψ N + ψ N Z δ Z n ; f f ( ψ N ) = n = 0 n f b n ψ N + ψ N Z δ Z n ,
where a n and b n are unknown constants, and δ Z is an approximated rigid vertical shift of the ψ N distribution used to adjust the vertical position.
The DIII-D [30] L mode shot 157952 at 1300 ms was selected as the case for comparison. This particular shot corresponds to an LSN X-point divertor configuration, which naturally experiences vertical instability during the Picard iteration in the forward mode. Consequently, all three approaches described in Section 2.6 were compared against the EFIT result, as it is shown in Figure 8. Generally, all three methods exhibited similar plasma boundaries when compared with the EFIT result. The alignment with the EFIT axis was particularly close for the approaches described in Equations (26) and (28), given that the EFIT axis served as the target in both cases.
However, there were also some discrepancies observed between the EFIT result and the forward mode of COTES, especially in terms of the X-point position. Several factors could contribute to these differences. First, the induced current on the vacuum vessel is not currently considered in COTES, whereas EFIT includes these currents in its reconstruction. Second, the EFIT result involves determining the constants a n and b n in Equation (32) to match the experimental measurements of magnetics, which may have associated error bars. Lastly, the plasma internal profiles (p and f) between EFIT and COTES are different, just as depicted in Figure 9.

4. Conclusions and Future Work

In this study, the free-boundary equilibrium problem in axisymmetric tokamak geometry was addressed using the COTES code by employing the finite difference method with Picard iteration. COTES discretizes the 2D partial differential equation over a rectangular domain through finite difference approximations. The nonlinear toroidal plasma current density starts from an initial guess and is then defined as a polynomial function based on the ψ a x and ψ b d from the previous iteration, as well as plasma quantities, such as I p and β p or q ( ψ N ) . COTES can run either in a forward mode, where the coil currents are fixed, or in an inverse mode, where the coil currents are calculated in every iteration based on a prescribed plasma boundary with an optimal control approach. To address the vertical instability issues that occurred in the forward mode for the asymmetric plasma shape, a vertical shift of J ϕ , p l instead of adding feedback coils, as used in previous work, was employed.
For benchmarking and verification, COTES simulations were initially compared with an analytic fixed-boundary solver to verify the mathematical correctness and accuracy. The results demonstrate excellent agreement in the internal flux surface profiles. Subsequently, the COTES simulations were cross-checked with another numerical solver, FEEQS.M, which employs different approximations and computational grids. The findings show that COTES yielded consistent solutions in the limiter configuration and similar plasma internal profiles in the X-point plasma boundary when compared with the FEEQS.M simulations. Finally, the COTES simulations were verified against the equilibrium reconstruction code EFIT using experimental data to assess its capability to handle vertical instability through different approaches. The discrepancies between the COTES and EFIT results were also explained through potential interpretations.
Future work on COTES involves coupling it with circuit equations for external coil systems, encompassing a vacuum vessel and passive plates, to tackle the FBE problems in time evolution rather than static modes. Another direction for advancing COTES is exploring surrogate models for the toroidal current density derived from experimental measurements or other transport solvers, instead of using given polynomials.

Author Contributions

X.S.: conceptualization, conducting—simulation, writing—original draft; B.L., Z.W. and S.T.P.: providing—preliminary work (equal); T.R. and E.S.: writing—review and supervising (equal). All authors read and agreed to the published version of this manuscript.

Funding

This work was supported by the U.S. Department of Energy, Office of Science, under award no. DE-SC0010537.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data that support the findings of this study are available from the corresponding author upon reasonable request.

Acknowledgments

The authors are grateful for the help provided by M. Walker and W. Choi from General Atomics in supplying the DIII-D geometry and EFIT data, Z. Luo from ASIPP for checking the EAST simulation results, and H. Heumann for authorizing the use of the FEEQS.M code.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. LoDestro, L.L.; Pearlstein, L.D. On the Grad–Shafranov equation as an eigenvalue problem, with implications for q solvers. Phys. Plasma 1994, 1, 90. [Google Scholar] [CrossRef]
  2. Zheng, S.B.; Wootton, A.J.; Solano, E.R. Analytical tokamak equilibrium for shaped plasmas. Phys. Plasma 1996, 3, 1176. [Google Scholar] [CrossRef]
  3. Cerfon, A.J.; Freidberg, J.P. “One size fits all” analytic solutions to the Grad–Shafranov equation. Phys. Plasma 2010, 17, 032502. [Google Scholar] [CrossRef]
  4. Guazzotto, L.; Freidberg, J.P. Simple, general, realistic, robust, analytic tokamak equilibria. Part 1. Limiter and divertor tokamaks. J. Plasma Phys. 2021, 87, 905870303. [Google Scholar] [CrossRef]
  5. Heumann, H.; Blum, J.; Boulbe, C.; Faugeras, B.; Selig, G.; Ané, J.-M.; Brémond, S.; Grandgirard, V. Quasi-static free-boundary equilibrium of toroidal plasma with CEDRES++: Computational methods and applications. J. Plasma Phys. 2015, 81, 905810301. [Google Scholar] [CrossRef]
  6. Blum, J.; Heumann, H.; Nardon, E.; Song, X. Automating the design of tokamak experiment scenarios. J. Comp. Phys. 2019, 394, 594–614. [Google Scholar] [CrossRef]
  7. Nardon, E.; Heumann, H. Magnetic configuration and plasma start-up in the WEST tokamak. In Proceedings of the 45th EPS Conference on Plasma Physics, Prague, Czech Republic, 26 October 2018. [Google Scholar]
  8. Song, X.; Nardon, E.; Heumann, H.; Faugeras, B. Automatic identification of the plasma equilibrium operating space in tokamaks. Fusion Eng. Des. 2019, 146, 1242. [Google Scholar] [CrossRef]
  9. JET Team. Fusion energy production from a deuterium-tritium plasma in the JET tokamak. Nucl. Fusion 1992, 32, 187. [Google Scholar] [CrossRef]
  10. Jardin, S.C.; Bell, M.G.; Pomphrey, N. TSC simulation of Ohmic discharges in TFTR. Nucl. Fusion 1993, 33, 371. [Google Scholar] [CrossRef]
  11. Jeon, Y.M. Development of a Free-boundary Tokamak Equilibrium Solver for Advanced Study of Tokamak Equilibria. J. Korean Phys. Soc. 2015, 67, 843–853. [Google Scholar] [CrossRef]
  12. Johnson, J.L.; Dalhed, H.E.; Greene, J.M.; Grimm, R.C.; Hsieh, Y.Y.; Jardin, S.C.; Manickam, J.; Okabayashi, M.; Storer, R.G.; Todd, A.M.; et al. Numerical Determination of Axisymmetric Toroidal Magnetohydrodynamic Equilibria. J. Comp. Phys. 1979, 32, 212–234. [Google Scholar] [CrossRef]
  13. Ferron, J.R.; Walker, M.L.; Lao, L.L.; John, H.E.S.; Humphreys, D.A.; Leuer, J.A. Real time equilibrium reconstruction for tokamak discharge control. Nucl. Fusion 1998, 38, 1055. [Google Scholar] [CrossRef]
  14. Shafanov, V.D. On magnetohydrodynamical equilibrium configurations. Sov. Phys. JETP 1958, 8, 494. [Google Scholar]
  15. Grad, H.; Rubin, H. Hydromagnetic equilibria and force-free fields. In Proceedings of the 2nd UN Conference on the Peaceful Uses of Atomics Energy, Geneva, Switzerland, 1 September–13 September 1958; Volume 31, p. 190. [Google Scholar]
  16. Lazarus, E.A.; Lister, J.B.; Neilson, J.H. Control of the vertical instability in tokamaks. Nucl. Fusion 1990, 30, 111. [Google Scholar] [CrossRef]
  17. Albanese, R.; Villone, F. The linearized CREATE-L plasma response model for the control of current, position and shape in tokamaks. Nucl. Fusion 1998, 38, 012001. [Google Scholar] [CrossRef]
  18. Blum, J.; Boulbe, C.; Faugeras, B. Reconstruction of the equilibrium of the plasma in a Tokamak and identification of the current density profile in real time. J. Comp. Phys. 2012, 231, 960–980. [Google Scholar] [CrossRef]
  19. William, H.P. Numerical Recipes; The Art of Scientific Computing, 3rd ed.; Cambridge University Press: New York, NY, USA, 2007. [Google Scholar]
  20. Kreyszig, E. Advanced Engineering Mathematics, 8th ed.; John Wiley & Sons Press: Hoboken, NJ, USA, 1998. [Google Scholar]
  21. Jardin, S. Computational Methods in Plasma Physics, 1st ed.; Taylor & Francis CRC Press: New York, NY, USA, 2010. [Google Scholar]
  22. Miyamoto, K. Plasma Physics for Nuclear Fusion, revised ed.; The MIT Press: Cambridge, MA, USA, 1989. [Google Scholar]
  23. Quarteroni, A.; Sacco, R.; Fausto, S. Numerical Mathematics; Springer Science & Business Media: New York, NY, USA, 2010; Volume 37. [Google Scholar]
  24. Tikhonov, A.N.; Arsenin, V.Y. Solutions of Ill-Posed Problems; Winston & Sons: Washington, DC, USA, 1977. [Google Scholar]
  25. Thrampoulidis, C.; Oymak, S.; Hassibi, B. Regularized linear regression: A precise analysis of the estimation error. In Proceedings of the Machine Learning Theory (PMLR), Lille, France, 3–6 July 2015; pp. 1683–1709. [Google Scholar]
  26. McCarthy, P.J.; Martin, P.; Schneider, W. The CLISTE Interpretive Equilibrium Code; Tech. Rep. IPP 5/85; Max Planck Institute for Plasma Physics: Greifswald, Germany, 1999. [Google Scholar]
  27. Moret, J.M.; Duval, B.P.; Le, H.B.; Coda, S.; Felici, F.; Reimerdes, H. Tokamak equilibrium reconstruction code LIUQE and its real time implementation. Fusion Eng. Des. 2015, 91, 1–15. [Google Scholar] [CrossRef]
  28. Miller, R.L.; Chu, M.S.; Greene, J.M.; Lin-Liu, Y.R. Noncircular, finite aspect ratio, local equilibrium model. Phys. Plasma 1998, 5, 973. [Google Scholar] [CrossRef]
  29. Wu, S.T.; The EAST Team. An overview of the EAST project. Fusion Eng. Des. 2007, 82, 463–471. [Google Scholar] [CrossRef]
  30. Luxon, J.L. A design retrospective of the DIII-D tokamak. Nucl. Fusion 2002, 42, 614. [Google Scholar] [CrossRef]
Figure 1. Initial guess of J ϕ j , i 0 [ A / m 2 ] with I p = 250 kA.
Figure 1. Initial guess of J ϕ j , i 0 [ A / m 2 ] with I p = 250 kA.
Plasma 07 00045 g001
Figure 2. Illustration of a rectangular grid, where the red ‘x’s denote the boundary of the mesh while the black dots represents the core region.
Figure 2. Illustration of a rectangular grid, where the red ‘x’s denote the boundary of the mesh while the black dots represents the core region.
Plasma 07 00045 g002
Figure 3. Block diagram of the Picard iteration in the COTES code. The diagram provides a representation of the iterative procedure and the conditions for updating the flux functions and current densities until convergence is achieved.
Figure 3. Block diagram of the Picard iteration in the COTES code. The diagram provides a representation of the iterative procedure and the conditions for updating the flux functions and current densities until convergence is achieved.
Plasma 07 00045 g003
Figure 4. Iso ψ N (0:0.1:1) contour comparisons between the inverse of COTES (yellow plain) and the analytic (black dashed) fixed-boundary equilibrium solver with an EAST geometry.
Figure 4. Iso ψ N (0:0.1:1) contour comparisons between the inverse of COTES (yellow plain) and the analytic (black dashed) fixed-boundary equilibrium solver with an EAST geometry.
Plasma 07 00045 g004
Figure 5. (Left): rectangular grid in COTES. (Right): triangular grid with finite element method in FEEQS.M code.
Figure 5. (Left): rectangular grid in COTES. (Right): triangular grid with finite element method in FEEQS.M code.
Plasma 07 00045 g005
Figure 6. (Left): iso ψ N (0:0.1:1) contour plots comparisons between inverse of COTES (yellow plain) and FEEQS.M (black dashed) solutions. (Right): plasma internal profiles of p , f , p , f f , q , and J ϕ , p l in COTES (plain) and FEEQS.M (dashed).
Figure 6. (Left): iso ψ N (0:0.1:1) contour plots comparisons between inverse of COTES (yellow plain) and FEEQS.M (black dashed) solutions. (Right): plasma internal profiles of p , f , p , f f , q , and J ϕ , p l in COTES (plain) and FEEQS.M (dashed).
Plasma 07 00045 g006
Figure 7. (Left): iso ψ N (0:0.1:1) contour plot comparisons between the inverse of COTES (yellow plain) and FEEQS.M (black dashed) solutions. (Right): plasma internal profiles of p , f , p , f f , q , and j ϕ , p l in COTES (plain) and FEEQS.M (dashed).
Figure 7. (Left): iso ψ N (0:0.1:1) contour plot comparisons between the inverse of COTES (yellow plain) and FEEQS.M (black dashed) solutions. (Right): plasma internal profiles of p , f , p , f f , q , and j ϕ , p l in COTES (plain) and FEEQS.M (dashed).
Plasma 07 00045 g007
Figure 8. The plasma boundary between EFIT (cyan dashed) and the forward of COTES (red plain) with three vertical instability approaches.
Figure 8. The plasma boundary between EFIT (cyan dashed) and the forward of COTES (red plain) with three vertical instability approaches.
Plasma 07 00045 g008
Figure 9. (Left): profiles of p and f between EFIT (dashed) and COTES (plain) simulations. (Right): profile of q between EFIT (dashed) and COTES (plain) simulations.
Figure 9. (Left): profiles of p and f between EFIT (dashed) and COTES (plain) simulations. (Right): profile of q between EFIT (dashed) and COTES (plain) simulations.
Plasma 07 00045 g009
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Song, X.; Leard, B.; Wang, Z.; Paruchuri, S.T.; Rafiq, T.; Schuster, E. Control-Oriented Free-Boundary Equilibrium Solver for Tokamaks. Plasma 2024, 7, 842-857. https://doi.org/10.3390/plasma7040045

AMA Style

Song X, Leard B, Wang Z, Paruchuri ST, Rafiq T, Schuster E. Control-Oriented Free-Boundary Equilibrium Solver for Tokamaks. Plasma. 2024; 7(4):842-857. https://doi.org/10.3390/plasma7040045

Chicago/Turabian Style

Song, Xiao, Brian Leard, Zibo Wang, Sai Tej Paruchuri, Tariq Rafiq, and Eugenio Schuster. 2024. "Control-Oriented Free-Boundary Equilibrium Solver for Tokamaks" Plasma 7, no. 4: 842-857. https://doi.org/10.3390/plasma7040045

APA Style

Song, X., Leard, B., Wang, Z., Paruchuri, S. T., Rafiq, T., & Schuster, E. (2024). Control-Oriented Free-Boundary Equilibrium Solver for Tokamaks. Plasma, 7(4), 842-857. https://doi.org/10.3390/plasma7040045

Article Metrics

Back to TopTop