1. Introduction
To operate a functional nuclear fusion reactor, the high-temperature plasma must be confined in a stable equilibrium against various fluctuations over extended periods of time. Small perturbations in the plasma can lead to instabilities that ultimately can cause the release of large bursts of energy and heat to the vessel's wall (Freidberg Reference Freidberg2007). In tokamaks, the plasma is confined via a strong magnetic field generated using axisymmetric coils and an externally driven longitudinal current. This makes steady-state operation in tokamaks challenging to achieve. Stellarator devices, however, circumvent this problem by using asymmetric coils carefully designed to produce an equilibrium magnetic field without the need for an additional solenoid or plasma current. Such magnetic fields are usually obtained using reduced plasma models such as the ideal magnetohydrodynamic (MHD) equilibrium equation (Freidberg Reference Freidberg2014)
where $\boldsymbol {B}$
is the magnetic field vector, $\boldsymbol {J} = \boldsymbol {\nabla } \times \boldsymbol {B}$
is the plasma current and $p$
is the plasma pressure. Owing to the breaking of axisymmetry, the number of degrees of freedom needed to describe the equilibrium magnetic field in a stellarator increases by approximately an order of magnitude compared with those of tokamaks (Boozer Reference Boozer2015). This has paved the way for stellarator optimization techniques to obtain good plasma confinement properties such as low neoclassical transport and MHD stability (Helander Reference Helander2014). For this purpose, modern optimized stellarators, such as W7-X (Geiger et al. Reference Geiger, Beidler, Feng, Maaßberg, Marushchenko and Turkin2015) and HSX (Anderson et al. Reference Anderson, Almagri, Anderson, Matthews, Talmadge and Shohet1995), were designed using computationally expensive numerical optimization algorithms that are highly dependent on the initial point of the parameter space and the particular set of weights used for the objective functions. Owing to the high dimensionality of the available parameter space, it is often too numerically intensive to ensure that a global minimum of the objective function was found (Boozer Reference Boozer2015). Furthermore, it is easier to gain physical insight from analytical formulations, such as the near-axis one used here, than from numerical tools.
One of the most commonly employed conditions for MHD stability used in stellarator optimization studies is Mercier's criterion (Mercier Reference Mercier1964; Beidler et al. Reference Beidler, Grieger, Herrnegger, Harmeyer, Kisslinger, Lotz, Maassberg, Merkel, Nuehrenberg and Rau1990; Anderson et al. Reference Anderson, Almagri, Anderson, Matthews, Talmadge and Shohet1995; Drevlak et al. Reference Drevlak, Beidler, Geiger, Helander and Turkin2019). This criterion is often simplified using the fact that in the limit of large aspect ratio and small pressure $p$
compared with the magnetic pressure $B^2/2$
, i.e. $\beta = 2p/B^2 \ll 1$
, the dominant term in the criterion is given by $p'(\psi )V''(\psi )$
, where $V$
is the volume enclosed by a toroidal magnetic flux surface and $\psi$
is the toroidal magnetic flux. When $p'(\psi ) < 0$
and $V''(\psi ) < 0$
, the equilibrium is said to possess a magnetic well, and is approximately stable against interchange-like perturbations. For this reason, the magnetic well is often used as the main proxy for ideal MHD stability (Beidler et al. Reference Beidler, Grieger, Herrnegger, Harmeyer, Kisslinger, Lotz, Maassberg, Merkel, Nuehrenberg and Rau1990; Anderson et al. Reference Anderson, Almagri, Anderson, Matthews, Talmadge and Shohet1995; Drevlak et al. Reference Drevlak, Beidler, Geiger, Helander and Turkin2019). Additionally, the lowest order Mercier's criterion in the distance to the axis for ideal modes coincides with the lowest order Glasser, Greene and Johnson's stability criterion for resistive modes (Glasser, Greene & Johnson Reference Glasser, Greene and Johnson1975; Landreman & Jorge Reference Landreman and Jorge2020).
In this work, we derive an analytical expression for Mercier's criterion (and hence the magnetic well) on the magnetic axis of a stellarator. One of the main advantages to using an analytical expression for optimization quantities near the magnetic axis is that such expressions can quickly produce several sets of reasonable initial parameters that may allow expensive optimization codes to avoid the same local minimum. As shown by Landreman (Reference Landreman2019), an expansion near the magnetic axis can accurately describe the inner core of optimized experimental devices using only a reduced number of free parameters. In the near-axis formulation, an expansion in terms of powers of the inverse aspect ratio is employed
where $a$
is the maximum perpendicular distance from the magnetic axis to a particular flux surface and $1/R$
is the minimum curvature of the magnetic axis. In this work, we follow the direct coordinate approach pioneered by Mercier (Reference Mercier1964) and Solov'ev & Shafranov (Reference Solov'ev and Shafranov1970), and extended to arbitrary order by Jorge, Sengupta & Landreman (Reference Jorge, Sengupta and Landreman2020b). In the direct approach, $\psi$
is expressed in terms of the Mercier coordinates $(\rho ,\theta ,s)$
, with $\theta$
being the polar angle in the plane normal to the axis and $s$
is the arc length of the axis. We note that in comparison to the method of Jorge et al. (Reference Jorge, Sengupta and Landreman2020b), there is no subsidiary expansion for small $\beta$
and the calculations are performed at arbitrary values of $\beta$
. This formulation is applied to Mercier's criterion to find its lowest order component. The near-axis expansions have already been used in the past to study MHD stability. While the first derivation of Mercier's criterion is presented by Mercier (Reference Mercier1964), in the paper by Solov'ev & Shafranov (Reference Solov'ev and Shafranov1970), the specific volume $V'(\psi )$
is calculated in a vacuum, while its non-vacuum counterpart is derived by Lortz & Nührenberg (Reference Lortz and Nührenberg1977). Most recently, in the report by Landreman & Jorge (Reference Landreman and Jorge2020), Mercier's criterion is derived using the inverse-coordinate approach in Garren–Boozer coordinates, where the spatial position vector $\boldsymbol {r}$
is expressed in terms of magnetic coordinates including $\psi$
. While Landreman & Jorge (Reference Landreman and Jorge2020) derives a formula for arbitrary geometries, i.e. both quasisymmetric and non-quasisymmetric geometries, owing to the relation between this approach and Boozer coordinates, a numerical method using this approach has only been developed for quasisymmetric stellarators. Therefore, when compared with the work of Landreman & Jorge (Reference Landreman and Jorge2020), this work provides an independent derivation of the on-axis magnetic well and Mercier's criterion for both vacuum and non-vacuum cases, and verifies it against non-quasisymmetric devices. Furthermore, the designs used to calculate the magnetic wells by Mercier (Reference Mercier1964), Solov'ev & Shafranov (Reference Solov'ev and Shafranov1970) and Lortz & Nührenberg (Reference Lortz and Nührenberg1977) are limited to simpler stellarator geometries, such as those with circular axis shapes or circular surface cross-sections. Such works also employ older notation and are not the subject of independent verification efforts. In this work, we intend to put the expressions for the on-axis magnetic well and Mercier's criterion on a firmer footing using modern notation and employing a more streamlined approach. Finally, we perform the first verification of Mercier's formulation for arbitrary stellarator geometries by evaluating the magnetic well for W7-X and two quasisymmetric stellarator designs from Landreman & Sengupta (Reference Landreman and Sengupta2019).
This paper is organized as follows. In § 2, we describe the direct coordinate near-axis framework to express the toroidal flux, as well as the current density and magnetic field in terms of geometric quantities related to the magnetic axis and toroidal flux surface. Then, in § 3, we derive the on-axis magnetic well. The lowest order component of Mercier's criterion is derived in § 4, while in § 5, the expression for the magnetic well is compared with its inverse approach counterpart for the case of a tokamak with circular cross-sections. Finally, in § 6, we numerically verify our expression for the magnetic well and the lowest order Mercier's criterion. The conclusions follow in § 7.
2. Near-axis expansion
In this section, we introduce the near-axis expansion using the direct coordinate approach first derived by Mercier (Reference Mercier1964). We denote the magnetic axis as the curve $\boldsymbol {r}_0(s)$
having total length $L$
, with $s$
as the arclength. The tangent $\boldsymbol {t}(s) = \boldsymbol {r}_0'(s)$
, the normal $\boldsymbol {n}(s) = \boldsymbol {t}'(s)/\kappa$
and the binormal $\boldsymbol {b}(s) = \boldsymbol {t} \times \boldsymbol {n}$
unit vectors form the orthogonal Frenet–Serret frame (Spivak Reference Spivak1999), which satisfy the first-order Frenet–Serret equations $\boldsymbol {t'}(s) = \kappa \boldsymbol {n}$
, $\boldsymbol {n'}(s) = -\kappa \boldsymbol {t} + \tau \boldsymbol {b}$
and $\boldsymbol {b'}(s) = -\tau \boldsymbol {n}$
. The curvature $\kappa$
and the torsion $\tau$
are found using
and
with $t$
as any quantity that parameterizes $\boldsymbol {r}_0$
. Finally, we note that the triad $(\boldsymbol {t},\boldsymbol {n},\boldsymbol {b})$
is uniquely determined by the Frenet–Serret equations above.
To describe a point outside the magnetic axis, we consider a plane between an arbitrary point $\boldsymbol {r}$
and a point on the magnetic axis $\boldsymbol {r}_0$
such that the axis is normal to that plane. The position vector $\boldsymbol {r}$
can then be written as
with $\rho$
as the distance between $\boldsymbol {r}$
and $\boldsymbol {r}_0$
, and $\theta$
is the angle between the normal and $\boldsymbol {r}-\boldsymbol {r}_0$
. Alternatively, this plane can be visualized as a Cartesian plane mapped onto the $(\boldsymbol {n},\boldsymbol {b})$
plane with $x = \rho \cos \theta$
and $y = \rho \sin \theta$
. We now introduce the angle $\omega = \theta + \gamma (s)$
, where $\gamma$
is the integrated torsion $\gamma (s) = \int _0^s \tau (s') \,\textrm {d}s'$
, which renders the coordinates $(\rho ,w,s)$
orthogonal. The Jacobian in $(\rho ,\omega ,s)$
coordinates is then given by $\sqrt {g} = \rho h_s = \rho (1-\kappa \rho \cos ({\omega - \gamma (s)})$
.
We decompose the magnetic field as $\boldsymbol {B} = B_\rho \boldsymbol {e}_\rho + B_\omega \boldsymbol {e}_\omega + B_s\boldsymbol {e}_s$
, with $\boldsymbol {e}_\rho = \cos \theta \boldsymbol {n} + \sin \theta \boldsymbol {b}$
, $\boldsymbol {e}_\omega = -\sin \theta \boldsymbol {n} + \cos \theta \boldsymbol {b}$
, and $\boldsymbol {e}_s = \boldsymbol {t}$
, and similarly for the current density $\boldsymbol {J} = \boldsymbol {\nabla } \times \boldsymbol {B}$
. Each scalar function is then expanded in a power series in terms of $\epsilon \rho$
, i.e.

We note that in a vacuum, as the current density vanishes, $\boldsymbol {B}$
is a curl-free field, i.e. $\boldsymbol {\nabla } \times \boldsymbol {B} = 0$
. In this case, a scalar potential function $\phi$
with $\boldsymbol {B} = \boldsymbol {\nabla }\phi$
satisfying Laplace's equation can be used. In orthogonal Mercier's coordinates $(\rho , \omega , s)$
, Laplace's equation can be written as
A more detailed treatment of (2.5) can be found in the paper by Jorge et al. (Reference Jorge, Sengupta and Landreman2020b).
To simplify the derivation and reduce the number of scalar functions to compute, we write the magnetic field using a Clebsch representation (Helander Reference Helander2014)
where $\alpha$
is a field line label and $\psi$
is the magnetic toroidal flux
Both $\psi$
and $\alpha$
are expanded in powers of $\epsilon \rho$
similarly to (2.4). An equation for the toroidal flux $\psi$
can be found by writing the constraint $\boldsymbol {B} \boldsymbol {\cdot } \boldsymbol {\nabla } \psi = 0$
in Mercier's coordinates, which yields
Assuming that $\psi$
is analytic close to the magnetic axis (see Kuo-Petravic & Boozer (Reference Kuo-Petravic and Boozer1987) and Jorge et al. (Reference Jorge, Sengupta and Landreman2020b) equations (2.12)–(2.14) for more details on the Fourier series expansion of analytic functions near the axis in the Frenet–Serret frame), we write each component of $\psi$
as

where the angle $\theta =\omega -\gamma (s)$
is used as all physical quantities must be periodic in $\theta$
(but not necessarily in $\omega$
). Noting that $\psi = O(\rho ^2)$
from the constraint in (2.7), we write its lowest order components as
and
where $B_0$
is the on-axis magnetic field, $u = \theta + \delta (s)$
, and $\delta (s)$
is chosen such that there is no $\sin 2u$
term in (2.10). In (2.10), $\mu$
represents the eccentricity (Solov'ev & Shafranov Reference Solov'ev and Shafranov1970). We remark that the analyticity condition in (2.9) also applies for non-vacuum cases, so the forms of $\psi _2$
and $\psi _3$
are the same for finite $\beta$
.
The divergence-free condition associated with the plasma current, $\boldsymbol {\nabla } \boldsymbol {\cdot } \boldsymbol {J} = 0$
, allows us to write $\boldsymbol {J}$
using a Clebsch representation similar to (2.6),
where $k$
is the current field line label, which is expanded in powers of $\epsilon \rho$
similar to $\psi$
and $\alpha$
. To obtain the lowest order coefficients of $\alpha$
and $k$
, we start by noting that, to the lowest order in $\epsilon$
, the magnetic field and the current density vectors are tangent to the magnetic axis, which yields
and
where $J_0$
is the on-axis current density.
We now set the lowest order components of $\boldsymbol {B}$
and $\boldsymbol {J}$
equal to their equivalent Clebsch representations, which yields
and
where dots represent derivatives with respect to $\omega$
. Similarly, setting the lowest order component of $\boldsymbol {J} = \boldsymbol {\nabla } \times \boldsymbol {B}$
equal to (2.14), we find that

where primes denote derivatives with respect to $s$
.
Next, we write the fields $\boldsymbol {B}$
and $\boldsymbol {J}$
in the ideal MHD equation (1.1) using the Clebsch representation together with (2.15) and (2.16). This allows us to determine a set of equations for $k_0'$
and $\alpha _1$
needed to find the on-axis magnetic well. Additionally, we express the pressure gradient as $\boldsymbol {\nabla } p = p'(\psi ) \boldsymbol {\nabla } \psi$
, where $p'(\psi )$
is expanded as $p'(\psi ) \simeq p_2$
and it is assumed that the higher order terms are small. This yields
The same procedure using the expression $\boldsymbol {J} = \boldsymbol {\nabla } \times \boldsymbol {B}$
instead of the Clebsch representation for $\boldsymbol {J}$
yields
We note that because the on-axis magnetic field and current density are parallel to the axis, they are related by $J_0 = \lambda B_0$
for some $\lambda = \lambda (s)$
. Furthermore, because $\boldsymbol {\nabla } \boldsymbol {\cdot } \boldsymbol {J} = 0$
, this implies that $\partial \lambda /\partial s = 0$
, which shows that $\lambda$
is a constant. Consequently, from (2.18), we find that $k_0 = \lambda \alpha _0 - p_2\int \textrm {d}s/B_0$
.
3. Magnetic well
The magnetic well, written as $V''(\psi )$
, is a commonly employed metric for stability against interchange modes in magnetic confinement fusion devices. A more detailed analysis of the role of $V''(\psi )$
in Mercier's criterion is discussed in Appendix A. To derive an expression for the magnetic well in Mercier's coordinates, we start by expressing the volume $V$
enclosed by a toroidal surface in a $(\rho ,\theta ,s)$
coordinate system as
where $\boldsymbol {\nabla }\rho \times \boldsymbol {\nabla }\theta \boldsymbol {\cdot }\boldsymbol {\nabla } s = 1/[\rho (1-\kappa \rho \cos \theta )]$
is the inverse of the Jacobian. Assuming the existence of nested flux surfaces, we can express $V$
in terms of $\psi$
by moving from Mercier's coordinates to $(\psi ,\theta ,s)$
coordinates, which yields
The magnetic well can then be written as
We now compute the lowest order component of the integrand in (3.2). Starting with the power series of $\psi$
in terms of $\rho$
we can then find the inverse series for $\rho$
, which yields
We then substitute (3.5) into (3.3). Taylor expanding the denominator of (3.3), simplifying and keeping only the terms linear with $\psi$
yield the lowest order magnetic well
This expression is equivalent to equation (56) in Chapter 3 of Mercier & Luc (Reference Mercier and Luc1974). However, we note that Mercier & Luc (Reference Mercier and Luc1974) denotes the poloidal flux as $\psi$
, which yields extra conversion factors between the toroidal and poloidal fluxes described in the same chapter.
To simplify (3.6) and rewrite it in terms of $\psi _2$
and $\psi _3$
only, we subtract the $\rho$
component of the ideal MHD equation in the form $\boldsymbol {J} \times \boldsymbol {B} - \boldsymbol {\nabla } p = 0$
from (3.6) together with the total derivatives $\partial /\partial \omega (\alpha _2/B_0\psi _2)$
, $-\partial /\partial s(\alpha _0'\dot {\psi _2}/4B_0\psi _2^2)$
, $-\partial /\partial \omega (\alpha _1\psi _3/2B_0\psi _2^2)$
and $\partial /\partial s(\psi _2'/\psi _2^3)$
. Because these terms are derivatives of functions that are either periodic over $\theta$
or $s$
, their integrals over $\theta$
and $s$
in (3.6) vanish. Using the integral formulas derived in Appendix B to perform the integration over $\theta$
, our expression for the magnetic well reads

where $\psi _c = \psi ^c_{31} + \psi ^c_{33}$
, $\psi _s = -\psi ^s_{31} + \psi ^s_{33}$
, $\psi _{3\delta } = \psi _{31}^c \cos \delta +\psi _{31}^s \sin \delta$
, and $\psi _{3\kappa } = -\kappa [ (\psi _{31}^c+3 \psi _{33}^c)\cos \delta - (\psi _{31}^s-3 \psi _{33}^s)\sin \delta ] +{\rm \pi} ^2 p_2$
.
We note that $\psi _3$
and $\psi _4$
, which are are higher order terms in the near-axis expansion, both appear in (3.6). However, only $\psi _3$
is needed in the final expression for the magnetic well as $\psi _4$
can be expressed in terms of $\psi _2$
and $\psi _3$
using the ideal MHD equation (1.1). As shown by Jorge et al. (Reference Jorge, Sengupta and Landreman2020b), the differential equation for $\psi _3$
has source terms proportional to the lower order quantities $\mu$
, $\delta$
and $\psi _{20}$
. Therefore, we conclude that although lower order $\psi _2$
components are sufficient to describe the surfaces near the axis, we need higher order $\psi _3$
terms to accurately compute the magnetic well.
Finally, we mention here a separate way of deriving the magnetic well for the vacuum case, i.e. when the magnetic field is obtained using Laplace's equation, (2.5), and the surface shapes are obtained using $\boldsymbol {\nabla } \phi \boldsymbol {\cdot }\boldsymbol { \nabla } \psi = 0$
. While the on-axis magnetic well is still given by (3.6) for both vacuum and non-vacuum cases, the term proportional to $\psi _4$
is cast in terms of $\psi _2$
and $\psi _3$
differently, namely, using the definition for the toroidal flux in (2.7). Indeed, replacing the magnetic field with $\boldsymbol {B} = \boldsymbol {\nabla } \phi$
with (Jorge, Sengupta & Landreman Reference Jorge, Sengupta and Landreman2020a; Jorge et al. Reference Jorge, Sengupta and Landreman2020b)
and $\mu =\tanh \eta$
, the third-order component of (3.6) yields

Using the integration rules derived in Appendix B, we can integrate (3.9) over $s$
and $\theta$
, which retrieves the vacuum ($\lambda =p_2=0$
) form of the magnetic well expression in (3.7).
We note that, with respect to Solov'ev & Shafranov (Reference Solov'ev and Shafranov1970), we have generalized the formula for the magnetic well to the realistic case of finite current density. Additionally, we have derived the formula for the magnetic well in terms of surface quantities $\psi _2$
and $\psi _3$
, while the final criterion derived by Mercier & Luc (Reference Mercier and Luc1974) does not isolate the magnetic well and is not explicitly written in terms of surface quantities.
4. Mercier's criterion
Mercier's criterion states that the plasma will be approximately stable against interchange perturbations around rational surfaces if the following criterion is satisfied
where $\iota$
is the rotational transform, $I = (1/L)[\int (\boldsymbol {J} \boldsymbol {\cdot } \boldsymbol {\nabla } s)\,\textrm {d}V]$
is the total toroidal current and
with $I'(\psi ) = \lambda + O(\epsilon )$
. As discussed in Appendix A, to the lowest order, the Mercier criterion reduces to the sum of the magnetic well term and the surface integral of $\varXi ^2$
We first note that the zeroth-order $\boldsymbol {\varXi }$
vector vanishes as $\boldsymbol {\varXi }_0 = (J_0 - \lambda B_0)\boldsymbol {e}_s = 0$
. To simplify its first-order component and write it using Mercier's coordinates, because $\boldsymbol {\nabla }\boldsymbol {\cdot } \boldsymbol {\varXi } = 0$
, we rewrite $\boldsymbol {\varXi }$
as
where $G$
is defined as
We additionally expand $G$
as a power series in $\epsilon \rho$
similar to (2.4). To the lowest order, we find that $G_0 = -p_2\int \,\textrm {d}s/B_0$
. To the first order, $G_1$
is given by
We use as an ansantz for $G_1$
, the following expression (Mercier & Luc Reference Mercier and Luc1974)
where $\mu = \tanh \eta$
. We note that the parameters $G_{1c}$
and $G_{1s}$
are related to the first-order parallel plasma current $J_{1s}$
via

Substituting (4.7) into the $\omega$
component of the ideal MHD equation and equating the resulting coefficients of the $\cos u$
and $\sin u$
terms, we obtain the first-order ordinary differential equations for $G'_{1c}(s)$
and $G'_{1s}(s)$

and

We find that the same differential equations as (4.9) and (4.10) are obtained by equating $\cos 3u$
and $\sin 3u$
. This suggests that the third harmonics do not yield any additional information, and our ansantz is indeed a solution of $\boldsymbol {J} \times \boldsymbol {B} = \boldsymbol {\nabla } p$
. The first-order solution of $\boldsymbol {\varXi }$
can then be written as
and
where $G_{1cs} = \textrm {e}^{\eta } G_{1s} \cos u-G_{1c} \sin u$
. The resulting $\varXi ^2$
quantity entering Mercier's criterion is given by
Noting that $\textrm {d}S = |\boldsymbol {\nabla } \psi |\sqrt {g} \,\textrm {d}\theta \,\textrm {d}s$
, the surface integral of $\varXi ^2$
in (4.1) can be written as
The quantities in (4.15) can be evaluated for a particular toroidal current $\lambda$
, pressure gradient $p_2$
and elliptical surface $\psi _2$
by solving the system of equations in (4.9) and (4.10). We note that when we set $p_2 = 0$
, solving (4.9) and (4.10) with periodic boundary conditions yields $G_{1c} = G_{1s} = 0$
. Therefore, in the limit of vanishing pressure gradient, (4.15) evaluates to $0$
, and the magnetic well becomes the dominant term in the criterion.
Finally, following similar reasoning, but using the on-axis magnetic field, it can be shown that, to the lowest order,
5. Tokamak with a circular cross-section
We now apply (3.7) for the case of a tokamak with a circular cross-section. The resulting expression is compared with its counterpart in the inverse coordinate approach as derived by Landreman & Jorge (Reference Landreman and Jorge2020).
5.1. Direct approach
For an axisymmetric design with a circular cross-section, the quantities $\mu$
, $\delta$
and $\tau$
, together with the derivatives with respect to $s$
(primed quantities) in (3.7) are 0. However, $\psi _3$
may still be finite owing to the presence of a Shafranov shift. An equation for $\psi _3$
is obtained by first noting that, in this case, (4.9) and (4.10) simplify to
and
respectively. Plugging (5.1) and (5.2) into the the Clebsch representation of $\boldsymbol {J}$
, and equating its $\boldsymbol {e}_s$
component to $\boldsymbol {J} = \boldsymbol {\nabla } \times \boldsymbol {B}$
, we find that
together with $\psi ^s_{31} = \psi ^c_{33} = \psi ^s_{33} = 0$
. Using (2.15) and (2.17), in addition to (5.6) of Jorge et al. (Reference Jorge, Sengupta and Landreman2020b), it can also be shown that in axisymmetry with circular cross-sections, $\lambda = 2\iota _0\kappa$
with $\iota _0$
as the rotational transform on-axis. Substituting this expression and (5.3) into (3.7), integrating over a circular axis with $\kappa = 1/R$
, where R is the major radius, and taking a low $\beta$
limit so that the remaining terms proportional to $p_2$
can be neglected, yields
Therefore, this configuration is stable if $\iota < 1$
. For tokamaks, the safety factor $q = 1/\iota$
is more commonly used, recovering the Kruskal–Shafranov limit $q > 1$
(Freidberg Reference Freidberg2014).
5.2. Inverse approach
The magnetic well in the inverse approach for quasisymmetry reads (Landreman & Jorge Reference Landreman and Jorge2020)
where, in axisymmetry (which is a special case of quasisymmetry), $G_0=B_0R$
. In axisymmetry, $B_{20}$
is found from (A27) and (A28) of Garren & Boozer (Reference Garren and Boozer1991), and can be written as

where $F=\bar {\eta }^4 R_{00}^4 + \sigma ^2+1$
, $I_2 = \iota _0B_0\kappa$
and $p_{2I} = B_0p_2/2$
. Furthermore, in up-down symmetric geometries, $\sigma = 0$
, and for circular cross-sections, $\bar {\eta }=1/R$
. Finally, in the low $\beta$
limit, $B_{20}/B_0$
reduces to
The magnetic well is then given by
which is equivalent to (5.4).
6. Numerical results
Numerical verification for a near-axis analytical expression for Mercier's criterion and the magnetic well has only been done very recently using the inverse coordinate approach (Landreman & Jorge Reference Landreman and Jorge2020), albeit for only quasisymmetric devices. A numerical study is a crucial step needed to verify the formula for Mercier's criterion on-axis. In this work, we perform a preliminary analysis for the magnetic well and the lowest order criterion. We note that near the axis of low $\beta$
systems, the magnetic well becomes the dominant term. Indeed, previous stellarator optimization studies have mainly focused on the magnetic well as a proxy for MHD stability (Beidler et al. Reference Beidler, Grieger, Herrnegger, Harmeyer, Kisslinger, Lotz, Maassberg, Merkel, Nuehrenberg and Rau1990; Anderson et al. Reference Anderson, Almagri, Anderson, Matthews, Talmadge and Shohet1995; Drevlak et al. Reference Drevlak, Beidler, Geiger, Helander and Turkin2019). However, we numerically verify the lowest order Mercier's criterion for a case where the $\varXi ^2$
term is also significant.
To verify the expression for the magnetic well, (3.7), we apply it to the optimized stellarator design of Wendelstein 7-X, as well as two quasisymmetric stellarators of Landreman & Sengupta (Reference Landreman and Sengupta2019). In particular, for W7-X, we choose the A configuration of Geiger et al. (Reference Geiger, Beidler, Feng, Maaßberg, Marushchenko and Turkin2015) in a vacuum. For the quasisymmetric stellarators, we choose the quasi-axisymmetric hybrid tokamak–stellarator of § 5.3 of Landreman & Jorge (Reference Landreman and Jorge2020) in finite $\beta$
and the quasi-helical symmetric stellarator of § 5.4 in a vacuum. For both quasisymmetric configurations, we specifically choose to focus on a surface with $\psi \sim 0.002\ \textrm {T}\ \textrm {m}^{2}$
, $\bar {B} = 1$
T and $R = 1$
m, which renders the expansion parameter $\epsilon \rho \sim \sqrt {\psi /\bar {B}R^2} \sim 0.04$
. For W7-X, we focus on a surface with $\psi \sim 0.001\ \textrm {T}\ \textrm {m}^{2}$
, $\bar {B} \sim 3 \ \textrm {T}$
and $R \sim 5.5 \ \textrm {m}$
, which renders $\epsilon \rho \sim 0.01$
.
To generate the equilibria, we use the VMEC code (Hirshman Reference Hirshman1983). The VMEC code uses a cylindrical coordinate system, with the position vector given by
where $(R,\varPhi ,Z)$
are the standard cylindrical coordinates and $(\boldsymbol {e}_R,\boldsymbol {e}_\varPhi ,\boldsymbol {e}_Z)$
are the corresponding unit basis vectors. The VMEC surfaces are parametrized by a poloidal angle $\theta _v$
and the standard toroidal angle $\varPhi$
. In a stellarator-symmetric configuration such as those used here, $R$
and $Z$
can be written as
and
The magnetic axis is parametrized via $\varPhi _a$
, with $0 \leqslant \varPhi _a < 2{\rm \pi}$
. For W7-X, we write its magnetic axis as
which is the same axis as in (7.4) in Jorge et al. (Reference Jorge, Sengupta and Landreman2020a). The magnetic axis of the quasi-axisymmetric and quasi-helical symmetric stellarators are
and
respectively. We note that terms in (6.6) with coefficients less than $10^{-3}$
are neglected in this text, but are included in the numerical calculations. Finally, we perform a change of variables from $s$
in Mercier's coordinates to $\varPhi _a$
in VMEC coordinates using the fact that $\textrm {d}s/\textrm {d}\varPhi _a = \lvert \textrm {d}\boldsymbol {r}_0/\textrm {d}\varPhi _a\rvert$
.
Using the SENAC code (Jorge Reference Jorge2019), we perform a nonlinear least-squares fit to derive the Fourier coefficients for $\mu$
, $\delta$
, $B_0$
and $\psi _3$
. Using these coefficients, we write the magnetic field on-axis as $B_0 = \sum _{n} B_{0n}\cos (nN_{fp}\varPhi _a)$
, $\mu = \sum _{n} \mu _n\cos (nN_{fp}\varPhi _a)$
and $\delta = -N_{fp}\varPhi _a/2 + \sum _{n} \delta _n\sin (nN_{fp}\varPhi _a)$
, with $N_{fp}$
as the number of field periods of the device. For W7-X, $N_{fp} = 5$
. For the quasi-axisymmetric and quasi-helical symmetric stellarators, $N_{fp} = 2$
and 4, respectively. To satisfy stellarator symmetry, $\psi _3$
is written as
which can be expanded to calculate $\psi _{31}^c$
, $\psi _{31}^s$
, $\psi _{33}^c$
and $\psi _{33}^s$
. The Fourier coefficients for these functions obtained from the W7-X fit are shown in table 1. We note that a fitting algorithm is used here because we are using equilibria generated by VMEC. Because VMEC uses a cylindrical coordinate system to represent the boundary surface in a discrete set of points, there is no exact elliptical or triangular representation of the surface. Therefore, we need a fitting algorithm to an elliptical or triangular function to calculate values of $\mu$
or $\psi _3$
.
Fitting results of the W7-X surface $\psi \sim 0.01\ \textrm {T}\ \textrm {m}^{-2}$
to the values in (3.7). Only the parameters with an absolute value greater than $0.01$
are shown.

The resulting magnetic wells as a function of the normalized toroidal flux $\psi _N$
calculated for the quasisymmetric stellarators and W7-X are shown in figure 1. In particular, the lines shown are the magnetic wells calculated using VMEC. Because VMEC uses a uniform radial grid in terms of $\psi$
, it is typically most accurate at the boundary surface. Owing to the fact that the quasisymmetric stellarators have small expansion parameters at the boundary, we choose to make fits at the boundary to calculate the magnetic well. Because the boundary surface is near the axis, there is little variation of the magnetic well. However, because the W7-X VMEC file has a boundary surface far from the axis, we choose the innermost surface. In all cases, we calculate a near-axis magnetic well within a few hundredths in magnitude of the VMEC magnetic well, thereby verifying (3.7) for both quasisymmetric and arbitrary stellarator designs.
The magnetic wells calculated from (3.7) and VMEC for a quasi-axisymmetric, quasi-helical symmetric and W7-X stellarators with $\psi _b$
as the value of $\psi$
at the plasma boundary. The quasisymmetric stellarators are fitted at the boundary, while W7-X is fitted at its innermost surface.

The accuracy of the fit is evident from the plot of the poloidal cross-sections. As seen in figure 2, there are only very slight differences between the VMEC and fitted cross-sections. These differences are negligible for the plots of the poloidal cross-sections of the quasisymmetric stellarators shown in figure 3.
The poloidal cross-sections of W7-X. There are dashed and solid lines for the near-axis and VMEC cross-sections, respectively, but the differences are nearly indistinguishable.

(a) The poloidal cross-sections of the fitted quasi-axisymmetric stellarator. (b) The poloidal cross-sections of the fitted quasi-helically symmetric stellarator. There are dashed and solid lines for the near-axis and VMEC cross-sections, respectively, but the differences are almost indistinguishable.

While there are very few visual discrepancies between the VMEC surfaces and the near-axis fits, we again note that near the axis, only $\psi _2$
is needed to accurately describe the surface (Jorge et al. Reference Jorge, Sengupta and Landreman2020b). Because $\psi _3$
is in (3.7), slight visual discrepancies in the third-order fit may lead to larger discrepancies in the magnetic well. This motivates the need for a more direct way to calculate higher order surface coefficients.
In figure 4, we plot the quantity $V_N'' = V''/V_0''$
as a function of the normalized toroidal flux, where $V''$
is the magnetic well calculated by VMEC and $V_0''$
is the magnetic well calculated from (3.7). The W7-X equilibrium is the same, but for the two quasisymmetric stellarators, we choose boundary surfaces further from the axis, with $\psi _b \sim 0.003\ \textrm {T} \ \textrm {m}^{2}$
. For the quasisymmetric stellarators, even further from the axis ($\psi _N = 0.5$
), the near-axis magnetic well remains approximately within 20 % of the VMEC magnetic well. We note that these surfaces represent a minor radius of approximately 0.1 m, and that similar discrepancies are found in figure 1 of Landreman & Jorge (Reference Landreman and Jorge2020). The discrepancies are larger for the W7-X equilibrium because its boundary surface is significantly further from the axis. Finally, the first several VMEC surfaces for each design were excluded because the magnetic well calculated by VMEC changed very rapidly near the axis and so are more inaccurate.
The ratio of the VMEC and near-axis magnetic well $V_N'' = V''/V_0''$
plotted over the normalized toroidal flux. The W7-X equilibrium is the same as in figure 1, but the quasisymmetric equilibria have boundary surfaces further from the axis.

Finally, after fitting the plasma parameters describing the quasi-axisymmetric stellarator equilibrium from figure 1 for several of its surfaces, we numerically solve the system of equations in (4.9) and (4.10), and then evaluate the integral in (4.15). We then calculate the magnetic well and use (4.16) to sum all the terms to calculate Mercier's criterion to the lowest order. In figure 5, we compare our results for the lowest order criterion to the value of $D_{\textrm {Merc}}$
from VMEC. We can see that at smaller minor radii, the two results are very similar, but they diverge at larger radii. We note that at the largest radii $a = 0.1\ \textrm {m}$
, the expansion parameter $\epsilon \sim 0.18$
.
The lowest order criterion calculated from the near-axis expansion and the value of $D_{\textrm {Merc}}$
from VMEC. Each point represents a configuration evaluated at the boundary at different aspect ratios.

7. Conclusion
In this work, we derive an expression for the on-axis magnetic well and lowest order Mercier's criterion using a direct coordinate near-axis approach. Although this derivation is inspired by the work originally presented by Mercier (Reference Mercier1964), we are able to simplify its calculations to a few essential steps, such as the cancellation of higher order terms using a particular form of $\boldsymbol {J} \times \boldsymbol {B} - \boldsymbol {\nabla } p = 0$
. Furthermore, we compute the on-axis magnetic well using the SENAC code (Jorge Reference Jorge2019), and verify it against several stellarator designs obtained using the code VMEC, which includes W7-X. We also numerically verify our expression for the lowest order criterion for the quasi-axisymmetric stellarator design from Landreman & Sengupta (Reference Landreman and Sengupta2019). Additionally, we compare the expressions for the magnetic well in direct and inverse coordinate approaches in the case of a tokamak. Because it has been shown that the direct coordinate approach is equivalent to the inverse approach to the lowest order (Jorge et al. Reference Jorge, Sengupta and Landreman2020b), both formulations can be used to probe the stability of a variety of stellarator designs. In particular, we note that while we have used SENAC to fit VMEC equilibria for verification purposes, it is possible to use SENAC to generate equilibria near the axis and then calculate the magnetic well using the input parameters. Using this approach, a search of the parameter space for stellarator designs with optimized confinement properties, including for non-quasisymmetric geometries, is left for future work. However, we remark that higher order quantities (such as $\psi _3$
) made substantial contributions to the magnetic well. As the values for $\psi _3$
depend on lower order quantities, an efficient search of the parameter space would require directly calculating $\psi _3$
from lower order quantities rather than from a fit. Therefore, future work will address more direct methods to calculate this quantity without the need for fitting large parameter spaces.
Acknowledgements
We wish to thank W. Sengupta and M. Landreman for many fruitful discussions about the contents of this manuscript. This work was supported by a grants from the United States Department of Energy (DE-FG02-93ER-54197) and the Simons Foundation (560651, ML).
Editor Troy Carter thanks the referees for their advice in evaluating this article.
Declaration of interests
The authors report no conflict of interest.
Appendix A. Mercier's criterion near the magnetic axis
We now show that the lowest order terms in Mercier's criterion are those containing the magnetic well and the integral of $\varXi ^2$
, i.e. it reduces to only the terms in the second bracket of (4.1). In the first brackets of the Mercier's criterion in (4.1), the shear term $\textrm {d}\iota /\textrm {d}\psi$
is of zeroth order in $\rho$
. The $\boldsymbol {B} \boldsymbol {\cdot } \boldsymbol {\varXi }$
term is also zeroth order in $\rho$
. This is evident from our expression for $\varXi _{s}$
in (4.13). Because, to the lowest order, $\boldsymbol {B}$
is aligned with the axis, $\boldsymbol {B} \boldsymbol {\cdot } \boldsymbol {\varXi }$
can be written as
As $\textrm {d}S/|\boldsymbol {\nabla } \psi |^3 \sim \textrm {d}\theta \,\textrm {d}s /[(\psi _2)^2\rho ]$
is proportional to $1/\psi _2^2$
, the resulting integrals of $\cos u/\psi _2^2$
and $\sin u/\psi _2^2$
over $\theta$
vanish over a full period. Because $\varXi _1$
is of order $\rho$
and $\textrm {d}S/|\boldsymbol {\nabla } \psi |^3$
is of order $1/\rho ^2$
, the $\boldsymbol {B} \boldsymbol {\cdot } \boldsymbol {\varXi }$
term is 0 at order $1/\rho$
.
Using a similar argument, the final two terms in (4.1) containing $V''$
and $\varXi ^2$
are of order $1/\rho ^2$
, and so are the lowest order terms. As stated after (4.15), the integral of $\varXi ^2$
is proportional to $p_2^2$
, while the magnetic well term is only proportional to $p_2$
in (4.1). Therefore, in the limit of vanishing pressure gradient, the $\varXi ^2$
integral will vanish faster, and the magnetic well becomes the dominant term.
Appendix B. Solving integrals with Cauchy's residue theorem
To integrate (3.6) over $\theta$
, we evaluate the integrals $\int _0^{2{\rm \pi} } \cos 4u/(1+\mu \cos 2u)^3 \,\textrm {d}u$
, $\int _0^{2{\rm \pi} } \cos 2u/(1+\mu \cos 2u)^3 \,\textrm {d}u$
and $\int _0^{2{\rm \pi} } 1/(1+\mu \cos 2u)^3 \,\textrm {d}u$
using Cauchy's residue theorem, which states that if a function $f(z)$
is analytic, then its integral over a contour $\gamma$
is (Ahlfors Reference Ahlfors1979)
where $A$
is the set of all the poles of $f(z)$
enclosed by $\gamma$
. To solve the integral of $\int _0^{2{\rm \pi} } \cos 4u/(1+\mu \cos 2u)^3 \,\textrm {d}u$
, we first convert all the cosine functions into their complex exponential forms. We then define the complex valued parameter $z=\textrm {e}^{2iu}$
. An integral over a full period of $u$
is equivalent to a contour integral over the unit circle defined by $\textrm {e}^{2iu}$
. A change of variables results in

where $\gamma$
is the contour defined by $\textrm {e}^{2\textrm {i}u}$
. The denominator of (B2) is quadratic with roots $z_1 = (-1+\sqrt {1-\mu ^2})/\mu$
and $z_2 = (-1-\sqrt {1-\mu ^2})/\mu$
. We note that $z_1z_2 = 1$
. As a result, $z_1$
and $z_2$
cannot both be outside or inside the unit circle. Because $z_1 < z_2$
, only $z_1$
is enclosed by the contour. Thus, we only consider the residue at $z = z_1$
. From the residue theorem, the value of the contour integral of (B2) is then

where the summation arises from the complex parameter $z$
going twice around the pole. We take a similar approach to evaluate the other two integrals, which yields

and













