1. Introduction
The geometry of stellarators can be optimized to achieve properties such as low neoclassical transport and good magnetohydrodynamic (MHD) stability. In the design of recent experiments such as W7-X (Beidler et al. Reference Beidler, Grieger, Herrnegger, Harmeyer, Kisslinger, Lotz, Maassberg, Merkel, Nührenberg and Rau1990), HSX (Anderson et al. Reference Anderson, Almagri, Anderson, Matthews, Talmadge and Shohet1995) and NCSX (Zarnstorff et al. Reference Zarnstorff, Berry, Brooks, Fredrickson, Fu, Hirshman, Hudson, Ku, Lazarus and Mikkelsen2001), this optimization was done by wrapping a three-dimensional (3D) MHD equilibrium code with a standard numerical minimization algorithm. This approach typically yields a single local minimum in the objective function without providing information about the possible existence of other local minima. Weights are chosen to combine multiple objectives into a single objective function, and one is left wondering whether a different choice of weights might lead to promising magnetic configurations in a different region of parameter space. An older approach for relating stellarator geometry to physics properties is to make an asymptotic expansion in large local aspect ratio (Mercier Reference Mercier1964; Solov'ev & Shafranov Reference Solov'ev and Shafranov1970; Mercier & Luc Reference Mercier and Luc1974; Lortz & Nührenberg Reference Lortz and Nührenberg1976; Garren & Boozer Reference Garren and Boozer1991b). Such an expansion is accurate in the core of any stellarator, even those for which the aspect ratio of the boundary is low (Landreman Reference Landreman2019). We have argued recently (Landreman & Sengupta Reference Landreman and Sengupta2019; Landreman, Sengupta & Plunk Reference Landreman, Sengupta and Plunk2019; Jorge, Sengupta & Landreman Reference Jorge, Sengupta and Landreman2020a) that this asymptotic approach deserves further attention, as it complements numerical optimization. The asymptotic approach allows equilibria to be evaluated orders of magnitude faster, and it provides a practical way to generate new initial conditions for numerical optimization (Landreman & Sengupta Reference Landreman and Sengupta2019; Landreman et al. Reference Landreman, Sengupta and Plunk2019; Plunk, Landreman & Helander Reference Plunk, Landreman and Helander2019). In the present paper, we extend our asymptotic approach, which has focused previously on neoclassical confinement, to MHD stability. Focusing on interchange modes, we show how stability can be computed directly from a solution of the reduced near-axis equations. These results enable more comprehensive design within the near-axis approximation.
A condition for stability of radially localized ideal-MHD interchange modes, known as ‘Mercier's criterion’, was derived by Mercier (Reference Mercier1962, Reference Mercier1964) and Greene & Johnson (Reference Greene and Johnson1961, Reference Greene and Johnson1962b). An important related quantity is the ‘magnetic well’. In the absence of a pressure gradient, the magnetic well is
$\textrm {d}^2 V / \textrm {d} \psi ^2$, where
$V(\psi )$ is the volume enclosed by a flux surface and
$2\pi \psi$ is the toroidal flux. When the pressure is non-uniform, several generalized expressions for the magnetic well can be defined (Greene Reference Greene1998). As shown by Mercier (Reference Mercier1964), the magnetic well is the largest term in Mercier's criterion if one expands in large aspect ratio and makes a subsidiary expansion in
$2 \mu _0 p / B^2 \ll 1$ (this ratio is not assumed to be small in our calculations here). Mercier stability and the magnetic well are both commonly used in stellarator design (Anderson et al. Reference Anderson, Almagri, Anderson, Matthews, Talmadge and Shohet1995; Drevlak et al. Reference Drevlak, Beidler, Geiger, Helander and Turkin2019). Mercier's criterion can be generalized to the case of non-zero plasma resistivity, giving a stricter stability condition (Glasser, Greene & Johnson Reference Glasser, Greene and Johnson1975).
Already from Mercier's original work on the ideal stability criterion, the limit of the criterion near the magnetic axis has been examined. However, such previous work has generally employed the ‘direct’ expansion, in which the function
$\psi (\rho )$ is expanded, with
$\rho$ the Euclidean distance from the axis (Mercier Reference Mercier1964; Solov'ev & Shafranov Reference Solov'ev and Shafranov1970; Jorge, Sengupta & Landreman Reference Jorge, Sengupta and Landreman2020b). We instead follow the ‘inverse’ expansion of Garren & Boozer (Reference Garren and Boozer1991a,Reference Garren and Boozerb), in which the flux coordinates are the independent variables, and the position vector is expanded as a function of these variables. The direct and indirect expansions each have advantages and disadvantages. Here we focus on Garren & Boozer's expansion because interchange stability has not previously been analysed in this approach, and because it is convenient for obtaining configurations with omnigenity and high-order quasisymmetry (Landreman & Sengupta Reference Landreman and Sengupta2019; Plunk et al. Reference Plunk, Landreman and Helander2019).
Following Mercier's original work on near-axis stability, many researchers examined the stability criterion near the axis in axisymmetry (Laval et al. Reference Laval, Luc, Maschke, Mercier and Pellat1971; Küppers & Tasso Reference Küppers and Tasso1972; Lortz & Nührenberg Reference Lortz and Nührenberg1973; Mikhailovskii Reference Mikhailovskii1974; Weimer, Frieman & Johnson Reference Weimer, Frieman and Johnson1975). These results for axisymmetry have been reviewed by Greene (Reference Greene1998) and Freidberg (Reference Freidberg2014). In non-axisymmetric geometry, the magnetic well near the axis in vacuum was examined by Whiteman, McNamara & Taylor (Reference Whiteman, McNamara and Taylor1965). Later work on stellarator Mercier stability near the axis, reviewed by Pustovitov & Shafranov (Reference Pustovitov and Shafranov1984), has mostly examined special cases such as that of constant elongation (Shafranov & Yurchenko Reference Shafranov and Yurchenko1968), circular cross-section (Mikhailovskii & Aburdzhaniya Reference Mikhailovskii and Aburdzhaniya1979) or a planar axis (Rizk Reference Rizk1981).
It should be acknowledged that Mercier stability may not be critical experimentally. The LHD, W7-AS and TJ-II stellarator experiments all have operated in Mercier-unstable regimes, without obvious strong experimental signatures when stability boundaries are crossed (Geiger et al. Reference Geiger, Weller, Zarnstorff, Nührenberg, Werner and Kolesnichenko2004; Watanabe et al. Reference Watanabe, Sakakibara, Narushima, Funaba, Narihara, Tanaka, Yamaguchi, Toi, Ohdachi and Kaneko2005; Weller et al. Reference Weller, Sakakibara, Watanabe, Toi, Geiger, Zarnstorff, Hudson, Reiman, Werner and Nührenberg2006; de Aguilera et al. Reference de Aguilera, Castejon, Ascasibar, Blanco, de la Cal, Hidalgo, Liu, Lopez-Fraguas, Medina and Ochando2015). These studies provide some indications that turbulence may increase in Mercier-unstable regimes. These observations also suggest that Mercier instabilities in stellarators may saturate at low amplitude. Nonetheless, one may still wish to include Mercier stability as a condition in new designs to minimize any possible turbulent transport associated with this class of instability.
The remainder of this paper is organized as follows. We begin the detailed calculations in the next section by defining variables and reviewing the asymptotic expansion. Then in § 3 we compute several variants of the magnetic well. Mercier's criterion is evaluated in § 4. For each of these last two sections, we present expressions for both a general and a quasisymmetric stellarator, as a number of simplifications occur in quasisymmetry. Sections 3 and 4 also include demonstrations that our near-axis expressions agree with finite-aspect-ratio calculations using the VMEC code (Hirshman & Whitson Reference Hirshman and Whitson1983) in the appropriate limit. Then in § 5, resistive interchange stability is examined, and it is shown that the criterion of Glasser et al. (Reference Glasser, Greene and Johnson1975) coincides with Mercier's condition near the axis. Previously published expressions for Mercier stability have often been derived assuming that quantities such as the toroidal flux and/or Jacobian are positive; in the appendix we show how these expressions generalize to allow other signs.
2. Notation
We use the expansion developed by Garren & Boozer (Reference Garren and Boozer1991b) and the notation of Landreman & Sengupta (Reference Landreman and Sengupta2019). The notation and expansion are summarized here for convenience. Let
$\theta$ and
$\varphi$ denote the Boozer poloidal and toroidal angles, respectively, and let
$2 \pi \psi$ be the toroidal flux. Then the magnetic field can be written
where
$I$ and
$G$ are constant on flux surfaces. In case one wishes to consider quasi-helical symmetry, it is convenient to introduce a helical angle
$\vartheta = \theta - N \varphi$ where
$N$ is a constant integer;
$N$ can be set to zero if not considering quasi-helical symmetry. Defining
$\iota _N = \iota - N$, then
By using these expressions we are assuming that magnetic surfaces exist, which is not always the case for non-axisymmetric fields. This assumption is reasonable for the stability calculations here because surfaces always exist in some neighbourhood of the magnetic axis, and surface quality would be addressed separately by, for example, design of the
$\iota$ profile.
At any location in the plasma we can express the position vector
$\boldsymbol {r}$ as
Here
$\boldsymbol {r}_0(\varphi )$ is the position vector along the magnetic axis,
$r(\psi )$ is an effective minor radius defined by
$2 \pi \psi = \pi r^2 \bar {B}$ and
$\bar {B}$ is a constant reference field strength of the same sign as
$\psi$. The Frenet–Serret frame of the axis
$(\boldsymbol {t},\boldsymbol {n},\boldsymbol {b})$ is a set of orthonormal vectors satisfying
$\boldsymbol {t}\times \boldsymbol {n}=\boldsymbol {b}$ and
Here
$\ell$ is the arclength along the axis,
$\kappa (\varphi )$ is the axis curvature and
$\tau (\varphi )$ is the axis torsion. (The opposite sign convention for torsion is used by Garren and Boozer.)
Let
$\mathcal {R}$ denote the scale length of the axis, i.e.
$\mathcal {R} \sim 1/\kappa \sim 1/\tau$, and let
$\epsilon = r/\mathcal {R}$. We now expand in
$\epsilon \ll 1$. The coefficients
$X$,
$Y$, and
$Z$ are expanded in the following way:
We expand
$B$ and
$\beta$ in the same way, but with an
$r^0$ term:
The radial profile functions
$G(r)$,
$I(r)$,
$p(r)$ and
$\iota _N(r)$ must be symmetric under
$r \to -r$, so only even powers of
$r$ are included in their expansions:
The profile
$I(r)$ is proportional to the toroidal current inside the surface
$r$, so
$I_0 = 0$. The magnetic field must be smooth, so as discussed in appendix A of Landreman & Sengupta (Reference Landreman and Sengupta2018), the expansion coefficients must have the form
\begin{equation} \left. \begin{array}{c@{}} X_1(\vartheta,\varphi) = X_{1s}(\varphi) \sin(\vartheta) + X_{1c}(\varphi) \cos(\vartheta), \\ X_2(\vartheta,\varphi) = X_{20}(\varphi) + X_{2s}(\varphi) \sin(2\vartheta) + X_{2c}(\varphi) \cos(2\vartheta), \\ X_3(\vartheta,\varphi) = X_{3s3}(\varphi) \sin(3\vartheta) + X_{3s1}(\varphi) \sin(\vartheta) + X_{3c3}(\varphi) \cos(3\vartheta) + X_{3c1}(\varphi) \cos(\vartheta). \end{array}\right\} \end{equation}
The same form applies to the expansion coefficients of
$Y$,
$Z$,
$B$ and
$\beta$.
The vectors
$\boldsymbol {\nabla } r$,
$\boldsymbol {\nabla }\vartheta$ and
$\boldsymbol {\nabla }\varphi$ are obtained from derivatives of the position vector (2.4) using the dual relations. The results are substituted into (2.2)
$=$ (2.3) and
$\boldsymbol {J}\times \boldsymbol {B} = \boldsymbol {\nabla } p$, where
$\mu _0 \boldsymbol {J} = \boldsymbol {\nabla }\times \boldsymbol {B}$. The quasisymmetry condition
$B(r,\vartheta ,\varphi )=B(r,\vartheta )$ can also be imposed if desired. The result is a set of equations at each order in
$\epsilon \ll 1$. These equations are displayed in Garren & Boozer (Reference Garren and Boozer1991a) and appendix A of Landreman & Sengupta (Reference Landreman and Sengupta2019).
For the calculations that follow, it is useful to introduce symbols for the signs of two quantities:
$s_G = \mathrm {sgn}(G) = \pm 1$ and
$s_\psi = \mathrm {sgn}(\psi ) = \mathrm {sgn}(\bar {B}) = \pm 1$. Each of these signs can be flipped individually by reversing the signs of the poloidal or toroidal angle, as discussed in the appendix.
In the case of quasisymmetry,
$d B_0/\textrm {d}\varphi =0$ so it is convenient to choose the reference field as
$\bar {B} =s_\psi B_0$. In addition, the poloidal angle can be chosen so
$B_{1s}=0$, and we use Garren & Boozer's symbol
$\bar {\eta }=B_{1c}/B_0$. We can understand
$\bar {\eta }$ as a measure of the field strength variation,
$B = B_0[ 1 + r \bar {\eta } \cos \vartheta + O(\epsilon ^2)]$.
3. Magnetic well
In stellarator optimization, the magnetic well (Greene Reference Greene1998; Freidberg Reference Freidberg2014) is often included as a fast-to-evaluate proxy for MHD stability (Anderson et al. Reference Anderson, Almagri, Anderson, Matthews, Talmadge and Shohet1995; Drevlak et al. Reference Drevlak, Beidler, Geiger, Helander and Turkin2019). For completeness, here we consider three expressions for the magnetic well that appear in the literature:
$V''=\textrm {d}^2 V/\textrm {d} \psi ^2$,
and
Here
$\langle \ldots \rangle$ denotes a flux surface average, and
$V(\psi )$ is the volume enclosed by the surface
$\psi$. Throughout this paper, we consider
$V$ to be non-negative, hence
with
$\sqrt {g} = (G+\iota I)/B^2$. For any quantity
$Q$, the flux surface average is
where
$V'=dV/\textrm {d} \psi = s_\psi |G+\iota I| \int _0^{2\pi } \textrm {d} \vartheta \int _0^{2\pi }\textrm {d} \varphi \; B^{-2}$. Using
$\langle B^2 \rangle = 4 \pi ^2 s_\psi |G+\iota I|/V'$, the first two definitions of magnetic well are related by
Negative
$V''$ is favourable for stability, as is positive
$\hat {W}$ or positive
$W$.
Note that, in vacuum,
$W=\hat {W}$ and the last term in (3.5) vanishes, leaving the ratio
$\hat {W}/V''$ equal to the negative-definite quantity
$-V/(V')^2$. Therefore, the three measures of the magnetic well provide equivalent information in the limit of small plasma pressure.
3.1. First form of magnetic well
The first quantity we consider is
$V''$. To evaluate this quantity, we begin with (3.3). We insert the near-axis expansions and apply
$\textrm {d}^2/\textrm {d} \psi ^2$, noting
$\textrm {d}/\textrm {d} \psi = (r \bar {B})^{-1} \textrm {d}/\textrm {d} r$,
$\mathrm {sign}(\bar {B})=s_\psi$, and (A 50) of Landreman & Sengupta (Reference Landreman and Sengupta2019). We thereby obtain
Here,
$B_{1s}$,
$B_{1c}$,
$B_{20}$ and
$B_0$ are functions of
$\varphi$, except where
$B_0$ is evaluated at
$\hat \varphi$ as noted. This formula applies to any toroidal plasma, not only quasisymmetric plasmas. Note that the leading-order magnetic well depends on the
$O(\epsilon ^2)$ variation of
$B$, so a
$O(\epsilon ^1)$ solution is not accurate enough to compute the well.
In the special case of quasisymmetry,
$B_0$ becomes independent of
$\varphi$, and we take
$\bar {B} = s_\psi B_0$. In addition,
$B_{1s}=0$ and
$B_{1c} = \bar {\eta } B_0$. Although
$B_{20}$ is independent of
$\varphi$ in quasisymmetry, it is convenient to relax this requirement for practical construction of quasisymmetric configurations, as described in Landreman & Sengupta (Reference Landreman and Sengupta2019). The elimination of the requirement
$d B_{20}/\textrm {d} \varphi =0$ makes it possible to obtain solutions for any shape of the magnetic axis. Therefore, here we do not demand that
$B_{20}$ be independent of
$\varphi$. We thus obtain the following expression for the magnetic well in quasisymmetry:
where
$\bar {B}_{20} = (2\pi )^{-1} \int _0^{2\pi }\textrm {d} \varphi B_{20}$.
3.2. Second form of magnetic well
The alternative magnetic well quantity
$\hat {W}$ in (3.5) can be evaluated in the near-axis expansion by substituting the series for
$B$ into
\begin{equation} \langle B^2\rangle = 4\pi^2 \left( \int_0^{2\pi}\textrm{d} \vartheta \int_0^{2\pi}\textrm{d} \varphi \frac{1}{B^2}\right)^{-1}, \end{equation}
keeping terms through
$O(\epsilon ^2)$. Then substituting the result into (3.5), one obtains
\begin{equation} \hat{W} = 2 r^2 \left(\int_0^{2\pi}\frac{\textrm{d}\varphi}{B_0^2}\right)^{-1} \int_0^{2\pi} \frac{\textrm{d}\varphi}{B_0^4} \left[-\frac{3}{4}(B_{1s}^2+B_{1c}^2)+ B_{20}B_0\right],\end{equation}for a general toroidal plasma. In the special case of quasisymmetry, this expression reduces to
3.3. Third form of magnetic well
Evaluating
$(2\mu _0 V/\langle B^2\rangle ) \textrm {d} p/\textrm {d} V$ near the axis and adding the result to (3.9) gives an expression for (3.2):
\begin{equation} W = 2 r^2 \left(\int_0^{2\pi}\frac{\textrm{d}\varphi}{B_0^2}\right)^{-1} \int_0^{2\pi} \frac{\textrm{d}\varphi}{B_0^4} \left[-\frac{3}{4}(B_{1s}^2+B_{1c}^2)+ B_{20}B_0\right] +\frac{\mu_0 r^2 p_2}{\pi} \int_0^{2\pi}\frac{\textrm{d}\varphi}{B_0^2}. \end{equation}This result applies to a general toroidal plasma. In quasisymmetry, (3.11) reduces to
3.4. Numerical verification
The preceding near-axis approach to evaluating magnetic well can be compared with the magnetic well of finite-aspect-ratio MHD solutions. Figure 2 shows such a comparison for five families of magnetic configuration, the five cases considered in § 5 of Landreman & Sengupta (Reference Landreman and Sengupta2019). For convenience, these configurations are shown in figure 1. This set includes both quasi-axisymmetric and quasi-helically symmetric configurations, and includes both vacuum fields and configurations with plasma pressure and current. Each family is based upon a single solution of the near-axis equations. Substituting several finite values
$a$ into the effective minor radius
$r$ then yields a set of boundary toroidal surfaces, which are each provided as input to fixed-boundary MHD solutions using the VMEC code (Hirshman & Whitson Reference Hirshman and Whitson1983). In figure 2, triangles show the magnetic well evaluated from (3.7) for the underlying near-axis solution, whereas dots show
$\textrm {d}^2 V / \textrm {d} \psi ^2$ evaluated on the magnetic axis from the corresponding VMEC solutions. For the example of § 5.5, values are divided by 100 in order to fit on the same axes. For all five examples, as the boundary minor radius
$a$ is reduced, the VMEC results converge to the near-axis results as desired. The code and data for these calculations can be obtained online (Landreman Reference Landreman2020a,Reference Landremanb).
The five magnetic configurations considered in this paper. Section numbers refer to Landreman & Sengupta (Reference Landreman and Sengupta2019), where the axis shape and other parameters of each configuration are detailed. Colour indicates the magnetic field strength, and black curves indicate field lines.

Verification of the magnetic well calculation. The five colours indicate the five quasisymmetric configurations detailed in § 5 of Landreman & Sengupta (Reference Landreman and Sengupta2019), also shown in figure 1. Triangles show
$\textrm {d}^2 V / \textrm {d} \psi ^2$ evaluated from (3.7). Points connected by lines show
$\textrm {d}^2 V / \textrm {d} \psi ^2$ computed on the magnetic axis of VMEC configurations constructed with various values of the boundary effective minor radius
$a$, all with mean major axis radius
$R = 1$ m. As
$a/R \to 0$, the VMEC results converge to (3.7), verifying the calculations.

4. Mercier criterion
The Mercier criterion (Mercier Reference Mercier1964; Mercier & Luc Reference Mercier and Luc1974) is a geometrical quantity that, in the context of ideal MHD, allows us to assess the stability of the plasma to radially localized perturbations around a rational surface. Using the present notation, the criterion can be written as
$D_{\mathrm {Merc}}>0$ where
and
$\boldsymbol {\varXi }=\mu _0 \boldsymbol { J} - I'(\psi ) \boldsymbol { B}$. The coefficients
$s_G=\pm 1$ and
$s_\psi =\pm 1$ correspond to the signs of
$G$ and
$\psi$, respectively, and ensure invariance under certain changes of coordinates (see appendix A). We note that
$D_{\mathrm {Merc}}$ corresponds to (37) in Mercier & Luc (Reference Mercier and Luc1974) multiplied by
$\iota ^6$, and the integrals are performed along a surface of constant
$\psi$ such that
$\textrm {d} S=|\boldsymbol {\nabla }\psi ||\sqrt {g}|\textrm {d} \vartheta \textrm {d} \varphi$ with
$\sqrt {g}$ the Jacobian in
$(\psi , \vartheta , \varphi )$ coordinates.
Our goal is to evaluate (4.1) using the near-axis expansion based on the Garren–Boozer formalism. We focus on the leading-order terms of the Mercier criterion, which in our expansion amounts to computing the
$O(\epsilon ^{-2})$ component for each term in (4.1). As shown in the following, a comparison with numerical results is made using an equivalent form of the Mercier criterion appearing in Bauer et al. (Reference Bauer, Betancourt, Garabedian and Bauer1984); Ichiguchi et al. (Reference Ichiguchi, Nakajima, Okamoto, Nakamura and Wakatani1993).
4.1. Computation of the criterion at lowest order
We start by ordering the terms appearing in (4.1). In the first brackets, the term proportional to the magnetic shear
$\textrm {d} \iota /\textrm {d} \psi$ is
$O(\epsilon ^0)$. The term proportional to
$\boldsymbol { B} \boldsymbol {\cdot } \boldsymbol {\varXi }$ is also
$O(\epsilon ^0)$. To show this we first note from (2.3) that
Using this result, we obtain
To evaluate the denominator,
$\boldsymbol {\nabla }\psi =\sqrt {g}^{-1}\partial \boldsymbol {r}/\partial \vartheta \times \partial \boldsymbol {r}/\partial \varphi$ with (2.4)–(2.6) gives
where
Therefore,
$|\boldsymbol {\nabla } \psi |^2\simeq O(\epsilon ^2)$, and the overall
$O(\epsilon ^{-1})$ contribution to (4.3) vanishes upon integration over
$\vartheta$, leaving the
$\boldsymbol {B}\boldsymbol {\cdot }\boldsymbol {\varXi }$ term in (4.1) as
$O(\epsilon ^0)$.
Next, we evaluate the term in (4.1) proportional to
$|\boldsymbol {\varXi }|^2$. Using
$|\boldsymbol { J}|^2=(\boldsymbol { J} \boldsymbol {\cdot } \boldsymbol {B})^2/B^2+(\textrm {d} p/\textrm {d} \psi )^2|\boldsymbol {\nabla } \psi |^2/B^2$, we obtain
\begin{align} |\boldsymbol{\varXi}|^2 & = \left(\mu_0 \frac{\textrm{d} p}{\textrm{d} \psi}\right)^2 \frac{|\boldsymbol{\nabla}\psi|^2}{B^2}\nonumber\\ &\quad +\frac{r^2 B_0^2}{2}[ \beta_{1s}^2 + \beta_{1c}^2 + (\beta_{1s}^2-\beta_{1c}^2)\cos 2\vartheta - 2 \beta_{1s} \beta_{1c}\sin 2\vartheta ] + O(\epsilon^3). \end{align}
Carrying out the integrations over
$\vartheta$, the term in (4.1) is found to be
where
Finally, the integral at the end of (4.1) is
where
$V_1 \sqrt {1-a^2-b^2}=2|X_{1s}Y_{1c}-X_{1c}Y_{1s}|=2|\bar {B}|/B_0$ was used, and
$L=|G_0|\int _0^{2\pi } \textrm {d} \varphi /B_0>0$ is the axis length.
We thereby obtain the following form for the Mercier criterion at lowest order in
$\epsilon$:
In this expression,
$V''$ can be evaluated using (3.6).
Mercier (Reference Mercier1964) and Mercier & Luc (Reference Mercier and Luc1974) observed that the quantity in the first pair of square brackets in (4.1) is smaller than the second near the axis, consistent with our calculation here. In addition, noting that
$\beta _1 \propto p_2$ (see (A 52) in Landreman & Sengupta Reference Landreman and Sengupta2019), (4.12) shows that as the pressure gradient becomes small (
$p_2 \to 0$), the magnetic well
$V''$ becomes the dominant term in
$D_{\mathrm {Merc}}$. (If the limit of a vacuum field is taken before the near-axis limit, the result is different,
$D_{\mathrm {Merc}} \to (d\iota /\textrm {d} \psi )^2/(16 \pi ^2)$.)
In the case of quasisymmetry, a number of simplifications are possible. In this case, as shown in appendix A.3 of Landreman & Sengupta (Reference Landreman and Sengupta2019),
$B_0=\textrm {constant}$,
$\bar {B} = s_\psi B_0$,
$|X_{1c}Y_{1s}|=1$,
$\beta _{1c}=0$ and
Therefore, (4.10) reduces to
\begin{align} I_\beta &= \frac{16 \mu_0^2 p_2^2 G_0^2 \bar{\eta}^2}{B_0^8 \iota_{N0}^2} \int_0^{2\pi} \textrm{d} \varphi \frac{X_{1c}^2 +Y_{1c}^2+ 1}{X_{1c}^2 + Y_{1c}^2+Y_{1s}^2 + 2}\nonumber\\ &=\frac{16 \mu_0^2 p_2^2 G_0^2 \bar{\eta}^2}{B_0^8 \iota_{N0}^2} \int_0^{2\pi} \textrm{d} \varphi \frac{\bar{\eta}^4 + \kappa^4 \sigma^2 + \bar{\eta}^2 \kappa^2}{\bar{\eta}^4 +\kappa^4(1+\sigma^2) + 2\bar{\eta}^2\kappa^2}, \end{align}
where
$\sigma = Y_{1c}/Y_{1s}$ is the quantity appearing in (A 6) of Garren & Boozer (Reference Garren and Boozer1991a) and (2.14) of Landreman & Sengupta (Reference Landreman and Sengupta2019). Then (4.12) becomes
\begin{align} D_{\mathrm{Merc}} &= \frac{ |G_0| \mu_0 p_2}{8 \pi^4 r^2 B_0^3} \left[ \frac{\textrm{d}^2 V}{\textrm{d} \psi^2} - \frac{8 \pi^2 |G_0| \mu_0 p_2}{B_0^5} \right. \nonumber\\ &\quad \left. - \frac{ 16 \pi |G_0|^3 \mu_0 p_2 \bar{\eta}^2}{B_0^7 \iota_{N0}^2} \int_0^{2\pi} \textrm{d} \varphi \frac{\bar{\eta}^4 + \kappa^4 \sigma^2 + \bar{\eta}^2 \kappa^2}{\bar{\eta}^4 +\kappa^4(1+\sigma^2) + 2\bar{\eta}^2\kappa^2} \right], \end{align}and (3.7) can be applied.
4.2. Alternative form of the Mercier criterion
An equivalent form of the Mercier criterion in (4.1) is given in Bauer et al. (Reference Bauer, Betancourt, Garabedian and Bauer1984) and Ichiguchi et al. (Reference Ichiguchi, Nakajima, Okamoto, Nakamura and Wakatani1993):
where
These same quantities are reported by VMEC (Hirshman & Whitson Reference Hirshman and Whitson1983). (Again, we have included factors of
$s_G$ and
$s_\psi$, as discussed in the appendix.) The equivalence between (4.1) and (4.16) can be shown using the identity
$(\boldsymbol {J} \boldsymbol {\cdot } \boldsymbol {B})^2/B^2 =J^2-p'(\psi )^2|\boldsymbol {\nabla } \psi |^2/B^2$.
We now evaluate each term appearing in (4.16) at lowest order in
$\epsilon$. Recall that the scaling of
$D_{\mathrm {Curr}}$ with
$\epsilon$ was evaluated following (4.3). We note that the
$D_{\mathrm {Shear}}$ and
$D_{\mathrm {Curr}}$ terms are
$O(\epsilon ^0)$, whereas the
$D_{\mathrm {Well}}$ and
$D_{\mathrm {Geod}}$ terms are
$O(\epsilon ^{-2})$ so we only need to evaluate the latter two. These are given by
and
with
$I_\beta$ given by (4.10). To obtain
$D_{\mathrm {Geod}}$, it is convenient to subtract (4.21) from (4.12).
In the case of quasisymmetry, these last expressions reduce to
4.3. Numerical verification
We now verify the analytic results of the previous section by comparing them with computations using the VMEC equilibrium code. As with figure 2, we first compute a numerical solution of the near-axis equations to
$O(\epsilon ^2)$, then use the procedure of Landreman & Sengupta (Reference Landreman and Sengupta2019) to construct a magnetic surface surrounding this axis for
$r$ equal to a small finite value
$a$. This surface is then used as the prescribed boundary for a fixed boundary VMEC calculation, with uniform toroidal current density and with pressure profile
$p=p_0 + r^2 p_2$ for
$p_0 = -a^2 p_2$. (The configuration remains a solution of the MHD equilibrium equations if any constant is added to
$p$, as one would do if this configuration were considered to be the core of a lower-aspect-ratio one.)
VMEC reports all the individual quantities in (4.16) (with the same normalization used here) as a standard diagnostic. VMEC's calculation of
$D_{\mathrm {Geod}}$ converges extremely slowly with the number of radial surfaces NS, so all calculations shown here use NS
$\ge 801$, and results from the innermost VMEC grid points are dropped. The code and data for these calculations can be obtained online (Landreman Reference Landreman2020a,Reference Landremanb).
For a first verification scenario we use the quasi-helically symmetric configuration of § 5.4 of Landreman & Sengupta (Reference Landreman and Sengupta2019), with two minor modifications. The field strength
$B_0$ has been doubled to 2 T to provide test coverage for the
$B_0$ factors in the analytic expressions. In addition, a non-zero
$p_2 = -2$ MPa/m
$^2$ is introduced because otherwise
$D_{\mathrm {Merc}}=0$. The complete set of near-axis parameters is therefore given by the axis shape
\begin{equation} \left.\begin{array}{c@{}} \begin{aligned} R_0(\phi) \mathrm{[m]} & = 1 + 0.1700 \cos(4\phi) + 0.01804 \cos(8\phi) + 0.001409 \cos(12\phi) \\ & \quad + 0.00005877 \cos(16\phi), \end{aligned}\\ \begin{aligned} z_0(\phi) \mathrm{[m]} & = 0.1583 \sin(4\phi) + 0.01820 \sin(8\phi) + 0.001548 \sin(12\phi) \\ & \quad + 0.00007772 \sin(16\phi), \end{aligned} \end{array} \right\} \end{equation}
with
$\bar {\eta }=1.569$ m
$^{-1}$,
$\sigma (0)=0$,
$I_2=0$,
$B_{2c}=0.2696$ T/m
$^2$ and
$B_{2s}=0$.
Figure 3 shows a comparison of VMEC's evaluation of (4.16) to the analytic expressions for this quasi-helically symmetric configuration. For this figure, results are shown for
${A=8}$ and
$A=20$, where
$A=R/a$ is the boundary aspect ratio, and
$R = 1$ m is the mean of the axis major radius over the standard toroidal angle. As predicted by theory,
$D_{\mathrm {Shear}}$ and
$D_{\mathrm {Curr}}$ are far smaller than the other terms in Mercier's criterion. Equations (4.15) and (4.23) are evaluated using (3.7). At
$A=20$, excellent agreement is seen between the asymptotic expressions (4.15), (4.23) and (4.24) and VMEC's finite-aspect-ratio evaluations of
$D_{\mathrm {Merc}}$,
$D_{\mathrm {Well}}$ and
$D_{\mathrm {Geod}}$. At
$A=8$, the agreement is naturally not as good, but the asymptotic formulae remain qualitatively correct.
Numerical verification of (4.15), (4.23) and (4.24) for the terms in Mercier's criterion, by comparison with the VMEC code. The magnetic configuration is the quasi-helically symmetric example in § 5.4 of Landreman & Sengupta (Reference Landreman and Sengupta2019), also described near (4.25), with boundary minor radius (a)
$a=0.125$ m or (b)
$a=0.05$ m.

Figure 4 shows the same comparison repeated for several values of boundary aspect ratio. Again the agreement between the asymptotic expressions and VMEC calculations is excellent, particularly as
$A$ increases. The quantities in the core of the
$A=8$ configuration can be seen to not exactly overlap those from the
$A=20$ configuration. This is because the boundary surface is constructed by extrapolating out from the axis approximately, but then VMEC computes the equilibrium inside that boundary without a near-axis approximation, leading to a slightly different axis shape than the original.
Numerical verification of (4.15), (4.23) and (4.24) for the terms in Mercier's criterion, by comparison with the VMEC code. The magnetic configuration is the quasi-helically symmetric example in § 5.4 of Landreman & Sengupta (Reference Landreman and Sengupta2019) and (4.25).

Figure 5 presents a similar comparison to figure 4, but now using the example quasi-helically symmetric configuration of § 5.5 of Landreman & Sengupta (Reference Landreman and Sengupta2019). This configuration provides a comprehensive test covering all effects, including departure from stellarator symmetry, and non-zero quasisymmetry number
$N$, pressure
$p_2$ and plasma current
$I_2$. The field strength
$B_0$ has once more been doubled to 2 T to provide test coverage for the
$B_0$ factors in the analytic expressions. Thus, the complete set of parameters is given by the axis shape
\begin{equation} \left.\begin{array}{c@{}} R_0(\phi) \mathrm{[m]}= 1 + 0.3 \cos(5\phi), \\ z_0(\phi) \mathrm{[m]}= 0.3 \sin(5\phi), \end{array}\right\} \end{equation}
with
$\bar {\eta }=2.5$ m
$^{-1}$,
$\sigma (0)=0.3$,
$I_2=3.2$ T m
$^{-1}$,
$p_2=-2\times 10^7$ Pa m
$^{-2}$,
$B_{2c}=2$ T m
$^{-2}$ and
$B_{2s}=6$ T m
$^{-2}$. This configuration is limited to quite high aspect ratio owing to large
$O(\epsilon ^2)$ coefficients, making the expansion only accurate at quite small
$r$. Again, the VMEC results are seen to converge to the expressions (4.15), (4.23) and (4.24) as the boundary aspect ratio increases.
Numerical verification of (4.15), (4.23) and (4.24) for the terms in Mercier's criterion, by comparison with the VMEC code. The magnetic configuration is the quasi-helically symmetric example in § 5.5 of Landreman & Sengupta (Reference Landreman and Sengupta2019) and (4.26).

Finally, figures 6 and 7 present comparisons between our analytic expressions and VMEC's results as we scan the input parameters
$p_2$ and
$\bar {\eta }$, respectively. For these figures, the VMEC results are taken from the outermost VMEC grid point. Good agreement is seen across both parameter scans, providing comprehensive verification.
Numerical verification of (4.15), (4.23) and (4.24) for the terms in Mercier's criterion, by comparison with the VMEC code, showing a scan in pressure. The magnetic configuration is the quasi-helically symmetric example in § 5.5 of Landreman & Sengupta (Reference Landreman and Sengupta2019) and (4.26), for
$A=320$. On the horizontal axis,
$p_2$ is the quadratic-in-
$r$ term in the pressure profile, and the on-axis pressure is
$-p_2 a^2$.

Numerical verification of (4.15), (4.23) and (4.24) for the terms in Mercier's criterion, by comparison with the VMEC code, showing a scan in the input parameter
$\bar {\eta }$. The magnetic configuration is the quasi-helically symmetric example in § 5.5 of Landreman & Sengupta (Reference Landreman and Sengupta2019) and (4.26), for
$A=320$.

5. Necessary condition for resistive MHD stability
We next consider whether the stability of radially localized interchange modes near the axis is substantially different for resistive MHD compared with ideal MHD. In Glasser et al. (Reference Glasser, Greene and Johnson1975), assuming
$D_{\mathrm {Merc}}>0$, a necessary condition for the plasma stability under the conditions with which the resistive MHD equations are valid was derived. The criterion is given by
where
\begin{equation} E= \frac{1}{(2\pi)^6} \left[\varLambda \frac{\displaystyle\int \mu_0 \boldsymbol{ J} \boldsymbol{\cdot} \boldsymbol{ B} \, \textrm{d} S/|\boldsymbol{\nabla} \psi|}{\displaystyle\int B^2 \, \textrm{d} S/|\boldsymbol{\nabla} \psi|}\int \frac{B^2 \, \textrm{d} S}{|\boldsymbol{\nabla} \psi|^3}-\left(s_\psi V'' \mu_0 p'+\varLambda I'\right)\int \frac{B^2 \, \textrm{d} S}{|\boldsymbol{\nabla} \psi|^3}\right], \end{equation}
\begin{align} F&=\frac{1}{(2\pi)^6} \left[\int \frac{B^2 \, \textrm{d} S}{|\boldsymbol{\nabla} \psi|^3} \int \frac{(\mu_0\boldsymbol{ J} \boldsymbol{\cdot} \boldsymbol{ B})^2}{B^2|\boldsymbol{\nabla} \psi|^3} \, \textrm{d} S \right. \nonumber\\ & \quad \left.+ \mu_0^2 p'^2 \int \frac{B^2 \, \textrm{d} S}{|\boldsymbol{\nabla} \psi|^3}\int \frac{\textrm{d} S}{B^2|\boldsymbol{\nabla} \psi|} - \left(\int \frac{\mu_0 \boldsymbol{ J} \boldsymbol{\cdot} \boldsymbol{ B}}{|\boldsymbol{\nabla} \psi|^3} \, \textrm{d} S \right)^2 \right], \end{align}
and
$\varLambda = s_G 4 \pi ^2 \iota '$. Primes denote
$d/\textrm {d} \psi$. We note that (5.1) corresponds to (16) of Glasser et al. (Reference Glasser, Greene and Johnson1975) multiplied by
$(\iota ')^2 /(4 \pi ^2)$.
We now show that, to lowest order in
$\epsilon$, that is, at
$O(\epsilon ^{-2})$,
$D_R \simeq -D_{\mathrm {Merc}}$. We first note that the criterion in (5.1) can be related to the Mercier criterion
$D_{\mathrm {Merc}}$ by rewriting
$D_{\mathrm {Merc}}$ as
The functions
$D_R$ and
$D_{\mathrm {Merc}}$ are then related via
\begin{equation} D_R=-D_{\mathrm{Merc}}+\frac{4 \pi^2}{(\iota')^2} \left[ H -\frac{(\iota')^2}{8\pi^2}\right]^2. \end{equation}
We have already seen that
$\iota '(\psi )$ is
$O(\epsilon ^0)$. Using (4.2), the function
$H$ turns out to have a rather compact form when written in terms of Boozer coordinates:
The
$\epsilon \ll 1$ expansion has not yet been employed. As the integral over
$\vartheta$ of the
$O(\epsilon ^{-1})$ component of (5.7) vanishes and
$I=O(\epsilon ^2)$, we conclude that
$H=O(\epsilon ^0)$ and thus
$D_{\mathrm {Merc}}\simeq -D_R+O(\epsilon ^0)$. Therefore, the distinction between ideal and resistive interchange stability (for the radially localized modes of Mercier and Glasser) becomes insignificant near the axis. A special case of this result, for circular-cross-section axisymmetric equilibria, was noted in Glasser, Greene & Johnson (Reference Glasser, Greene and Johnson1976).
6. Discussion and conclusions
In our analysis, we have shown that the magnetic well and Mercier stability can be computed directly from a solution of the near-axis equilibrium equations in Garren and Boozer's expansion. As demonstrated by the agreement between our analytic formulae and finite-aspect-ratio VMEC calculations in the figures, it is therefore possible to assess the Mercier stability of the constructed configurations without running a finite-aspect-ratio equilibrium code. These results contribute to the goal of carrying out stellarator design in part within the near-axis approximation, which may help resolve the problem of numerical optimizations getting stuck in local minima, as follows. In the near-axis approximation, the equilibrium equations can be solved many orders of magnitude faster than the full 3D equilibrium equations, enabling global surveys of the landscape of possible configurations that are not limited to the vicinity of a single optimum. In such a survey, the results in the present paper let us immediately exclude Mercier-unstable configurations. The most promising configurations from a high-aspect-ratio survey can then be provided as new initial conditions for traditional local optimization with a finite-aspect-ratio 3D equilibrium code.
The key results from our analysis are as follows. Near the magnetic axis, the magnetic well is given by (3.6), (3.9) and (3.11), depending on the definition used. In the special case of quasisymmetry, these expressions simplify to (3.7), (3.10) and (3.12). In Mercier's criterion, the terms
$D_{\mathrm {Shear}}$ and
$D_{\mathrm {Curr}}$ scale as
$\propto r^0$, whereas the terms
$D_{\mathrm {Well}}$ and
$D_{\mathrm {Geod}}$ scale as
$r^{-2}$. Therefore,
$D_{\mathrm {Shear}}$ and
$D_{\mathrm {Curr}}$ are negligible near the axis, and overall
$D_{\mathrm {Merc}}\propto r^{-2}$. The dominant terms near the axis can be computed from (4.12), (4.21) and (4.22), with (4.10). In the case of quasisymmetry, these expressions simplify to (4.15), (4.23) and (4.24). Finally, Glasser's criterion for resistive interchange stability coincides with Mercier's ideal criterion to leading order near the axis.
The dependence of these formulae on pressure must be interpreted carefully. If specific coils are considered fixed, then a change to the plasma pressure profile would affect the magnetic well and Mercier stability not only through the explicit
$p_2$ terms in the expressions here. In such a free-boundary scenario the axis shape would also generally change, causing changes to
$B_{1c}$,
$B_{1s}$,
$B_{20}$ and other quantities in these formulae.
One question arising from this work is whether it is possible to calculate the maximum minor radius at which the expressions in this paper are accurate. An estimate of this bound could perhaps be derived by computing the next terms in the
$\epsilon \ll 1$ expansion of Mercier's criterion, and identifying the value of
$r$ at which these corrections are comparable with the leading-order terms. Calculation of these correction terms would require substantial work, and we do not attempt to do so here. A cruder estimate of the maximum accurate
$r$ can be obtained from the ratio of the surface shape functions
$(X_1,Y_1)$ compared with
$(X_2,Y_2)$. One meaningful combination of these quantities is the value of
$r$ at which the surface shapes would acquire a cusp or other singularity if the expansions of
$(X,Y,Z)$ are truncated after
$(X_2,Y_2,Z_2)$. This calculation will be presented in a separate publication.
Acknowledgements
We acknowledge valuable conversations about this research with S. Henneberg, C. Hegna, J. Schmitt and A. Glasser. This work was supported by the U.S. Department of Energy, Office of Science, Office of Fusion Energy Science, under award number DE-FG02-93ER54197. This work was also supported by a grant from the Simons Foundation (560651, ML).
Editor Per Helander thanks the referees for their advice in evaluating this article.
Declaration of interests
The authors report no conflict of interest.
Appendix A. Signs in Mercier's criterion
Typically two possible transformations exist in which the signs of certain flux coordinates are flipped while physical quantities such as
$\boldsymbol {B}$ are unchanged. Some expressions for Mercier stability in the literature are not invariant under these transformations, owing to assumptions about signs made during their derivation. Here we show how to generalize these forms of Mercier's criterion so they are invariant.
A.1. Parity transformations
Let us first precisely state the two coordinate transformations under which physical phenomena should be invariant. The magnetic field is represented in Boozer coordinates as
where
$\varPsi$ and
$\varPhi$ are the toroidal and poloidal fluxes (not divided by
$2\pi$), and the angles
$\theta$ and
$\varphi$ are periodic with period
$2\pi$. The rotational transform is
$\iota = d\varPhi / d \varPsi$.
In ‘parity transformation 1’, the signs of
$\varPsi$,
$\theta$,
$\beta$,
$I$ and
$\iota$ are flipped, whereas
$\varphi$,
$G$ and
$\varPhi$ are unchanged. This transformation leaves
$\boldsymbol {B}$ unchanged in both (A 1) and (A 2). In ‘parity transformation 2’, the signs of
$\varphi$,
$G$,
$\varPhi$ and
$\iota$ are flipped, whereas
$\varPsi$,
$\theta$,
$\beta$ and
$I$ are unchanged. This transformation again leaves
$\boldsymbol {B}$ unchanged in both (A 1) and (A 2).
As
$\boldsymbol {B}$ is unchanged by these transformations, physical consequences such as stability should be unaltered. Expressions for Mercier stability in approaches such as Mercier (Reference Mercier1964), Mercier & Luc (Reference Mercier and Luc1974) and Bauer et al. (Reference Bauer, Betancourt, Garabedian and Bauer1984), however, appear to have sign changes in at least some terms. In the remainder of this section we show how these expressions for Mercier stability should be modified to handle these coordinate transformations.
A.2. Greene and Johnson form
It is convenient to begin with a form of the criterion developed by Greene & Johnson (Reference Greene and Johnson1961, Reference Greene and Johnson1962a,Reference Greene and Johnsonb), because they explicitly stated their assumption about the coordinate signs. They used Hamada coordinates
$(V,\theta _H,\varphi _H)$, with angles that are periodic with period 1, which are required to form a right-handed system:
We require the flux surface volume
$V$ to be
$\ge 0$. The magnetic field satisfies
where we have included the
$H$ subscript to emphasize that the toroidal and poloidal fluxes
$\varPsi _H$ and
$\varPhi _H$ must have signs compatible with those of
$(\theta _H,\varphi _H)$ in (A 4), which must, in turn, be consistent with (A 3). Note
$\varPsi = \pm \varPsi _H$ and
$\varPhi = \pm \varPhi _H$ are possible. Neither of the two parity transformations is allowed by itself in Greene and Johnson's coordinates (e.g. we cannot replace
$(\varPsi _H, \theta _H) \to (-\varPsi _H, -\theta _H)$) because (A 3) would be violated. However, applying both transformations simultaneously is allowed.
The stability criterion in Greene & Johnson (Reference Greene and Johnson1961), also (40) in Greene & Johnson (Reference Greene and Johnson1962b), is
$D_{GJ}>0$ where
\begin{align} D_{GJ} &= \left[\oint \frac{B\, \textrm{d}\ell}{|\boldsymbol{\nabla} V|^2}\right]^{-1} \left[ \left( \frac{\textrm{d} \varPsi_H}{\textrm{d} V} \frac{\textrm{d}^2 \varPhi_H}{\textrm{d} V^2} -\frac{\textrm{d}^2 \varPsi_H}{\textrm{d} V^2} \frac{\textrm{d}\varPhi_H}{\textrm{d} V}\right) \oint \frac{\textrm{d}\ell}{2B} -\oint \frac{\mu_0\boldsymbol{J}\boldsymbol{\cdot}\boldsymbol{B}\, \textrm{d}\ell}{B |\boldsymbol{\nabla} V|^2}\right]^2\nonumber\\ &\quad -2 \oint \frac{\textrm{d}\ell \, \mu_0\boldsymbol{J}\times\boldsymbol{\nabla} V \boldsymbol{\cdot} (\boldsymbol{B}\boldsymbol{\cdot}\boldsymbol{\nabla})\boldsymbol{\nabla} V}{B |\boldsymbol{\nabla} V|^4}, \end{align}
and here
$\ell$ denotes arclength along a closed field line on the rational surface. (Greene & Johnson (Reference Greene and Johnson1961), Mercier (Reference Mercier1964), Bauer et al. (Reference Bauer, Betancourt, Garabedian and Bauer1984), Ichiguchi et al. (Reference Ichiguchi, Nakajima, Okamoto, Nakamura and Wakatani1993) and Glasser et al. (Reference Glasser, Greene and Johnson1975) all set
$\mu _0 \to 1$; we restore
$\mu _0$ by replacing
$\boldsymbol {J} \to \mu _0 \boldsymbol {J}$ and
$p \to \mu _0 p$.) Note the factor of
$-2$ in the last term of (A 5) is missing in Greene & Johnson (Reference Greene and Johnson1962b), as noted in Greene & Johnson (Reference Greene and Johnson1962a), but correct in Greene & Johnson (Reference Greene and Johnson1961).
In our Boozer coordinates (A 1)–(A 2), the quantity
could have either sign. Here,
$s_\psi = \mathrm {sgn}(\varPsi )=\mathrm {sgn}(\bar {B})=\pm 1$ and
$s_G=\mathrm {sgn}(G)=\pm 1$, and we have used
$\textrm {d} V/\textrm {d} r>0$. Therefore, we cannot necessarily take the poloidal and toroidal fluxes from the Boozer coordinate system and insert them into (A 5), setting
$\varPsi _H=\varPsi$ and
$\varPhi _H=\varPhi$. This is only allowed if
$s_G s_\psi = +1$. If
$s_G s_\psi = -1$, we must perform transformation 1 or 2 (not both) before substituting the fluxes into (A 5). In this case, we would have either
$(\varPsi _H,\varPhi _H)=(-\varPsi ,\varPhi )$ or
$(\varPsi ,-\varPhi )$. This effect can be achieved by inserting a factor
$s_G s_\psi$ into Greene and Johnson's expression:
\begin{align} D_{GJ} &= \left[\oint \frac{B\, \textrm{d}\ell}{|\boldsymbol{\nabla} V|^2}\right]^{-1} \left[\frac{s_G s_\psi}{2} \left( \frac{\textrm{d}\varPsi}{\textrm{d} V}\right)^2 \frac{\textrm{d}\iota}{\textrm{d} V} \oint \frac{\textrm{d}\ell}{B} -\oint \frac{\mu_0\boldsymbol{J}\boldsymbol{\cdot}\boldsymbol{B}\, \textrm{d}\ell}{B |\boldsymbol{\nabla} V|^2}\right]^2\nonumber\\ &\quad -2 \oint \frac{\textrm{d}\ell \, \mu_0\boldsymbol{J}\times\boldsymbol{\nabla} V \boldsymbol{\cdot} (\boldsymbol{B}\boldsymbol{\cdot}\boldsymbol{\nabla})\boldsymbol{\nabla} V}{B |\boldsymbol{\nabla} V|^4}. \end{align}This statement of the stability condition is now in a form invariant under either transformation.
The same argument can be applied to expressions in Glasser et al. (Reference Glasser, Greene and Johnson1975), who use the same Hamada coordinates with positive Jacobian. By this reasoning, the expressions for
$E$ and
$H$ in (13) of Glasser et al. (Reference Glasser, Greene and Johnson1975) are made parity invariant by including a factor
$s_G s_\psi$;
$F$ does not acquire this factor. The results, multiplied by
$(d\iota /\textrm {d} \psi )^2/(4\pi ^2)$, give (5.2)–(5.4).
Following Mercier & Luc (Reference Mercier and Luc1974), the line integrals in (A 7) can be approximately converted to area integrals by
where
$Q$ is any quantity. Noting
$\int \textrm {d} S/|\boldsymbol {\nabla }\varPhi | = s_\psi s_\iota \textrm {d} V/\textrm {d} \varPhi$ (which follows from (3.3)), we find the stability condition can be written as
$D_{M} \ge 0$ where
Here, Mercier's unit vector
$\boldsymbol {n}=|\boldsymbol {\nabla }\varPhi |^{-1}\boldsymbol {\nabla }\varPhi$ has been introduced. The expression (A 9) generalizes (35) on page 60 of Mercier & Luc (Reference Mercier and Luc1974) to be properly invariant under the two parity transformations.
A.3. Mercier's form
To obtain the form of the stability criterion favoured by Mercier, we can follow page 61 of Mercier & Luc (Reference Mercier and Luc1974) (also the appendix of Mercier Reference Mercier1964), beginning with
where
$\chi = (\varphi - \theta /\iota )/(2\pi )$. The derivation of this identity by Mercier & Luc (Reference Mercier and Luc1974) in their appendix 6 makes no assumptions about signs, so (A 10) is already invariant. Other expressions on page 61 of Mercier & Luc (Reference Mercier and Luc1974), however, require modification to account for signs, including
and
where
$s_\iota = \mathrm {sgn}(\iota ) = \pm 1$. From (2.7) in Landreman & Sengupta Reference Landreman and Sengupta2019) we find
instead of the last equation on page 61 of Mercier & Luc (Reference Mercier and Luc1974). Combining (A10)–(A13) gives
which corrects the first equation on page 62 of Mercier & Luc (Reference Mercier and Luc1974). Using this result in (A 9), we obtain Mercier's form of the stability criterion,
$D_{M} \ge 0$ with
where
$\boldsymbol {\varXi }=\mu _0\boldsymbol {J} - \boldsymbol {B} \,\textrm {d} I/\textrm {d} \psi = \mu _0 (\boldsymbol {J} - \boldsymbol {B}\, \textrm {d} I_t/\textrm {d}\varPsi )$, and
$I_t = 2\pi I / \mu _0$ is the toroidal current. This result, analogous to (37) of Mercier & Luc (Reference Mercier and Luc1974), is properly invariant under either parity transformation.
A.4. Geodesic curvature form
In more recent publications (Bauer et al. Reference Bauer, Betancourt, Garabedian and Bauer1984) and in the VMEC code, the stability criterion is expressed in a different form, which we now derive. Using
$J^2 = (\boldsymbol {J}\boldsymbol {\cdot }\boldsymbol {B})^2/B^2 + (\textrm {d} p/\textrm {d} \varPsi )^2|\boldsymbol {\nabla }\varPsi |^2/B^2$ (which follows from the square of
$\boldsymbol {J}\times \boldsymbol {B}=\boldsymbol {\nabla } p$) and defining
$D_{\mathrm {Merc}} = \iota ^6 D_{M}$, (A 15) may be expressed as
$D_{\mathrm {Merc}} \ge 0$ with
\begin{align} D_{\mathrm{Merc}} &= \frac{1}{4}\left( \frac{\textrm{d}\iota}{\textrm{d}\varPsi}\right)^2 -s_G \frac{\textrm{d}\iota}{\textrm{d}\varPsi} \iint \frac{\textrm{d}\theta \, \textrm{d} \varphi |\sqrt{\hat{g}}| \boldsymbol{B}\boldsymbol{\cdot}\boldsymbol{\varXi}}{|\boldsymbol{\nabla}\varPsi|^2}\nonumber\\ &\quad + \mu_0 \frac{\textrm{d} p}{\textrm{d}\varPsi} \left[ s_\psi \frac{\textrm{d}^2 V}{\textrm{d}\varPsi^2} - \mu_0 \frac{\textrm{d} p}{\textrm{d}\varPsi} \iint \frac{\textrm{d}\theta \, \textrm{d} \varphi |\sqrt{\hat{g}}|}{B^2} \right] \iint \frac{\textrm{d}\theta \, \textrm{d} \varphi |\sqrt{\hat{g}}| B^2}{|\boldsymbol{\nabla}\varPsi|^2} \nonumber\\ &\quad + \left[ \iint \frac{\textrm{d}\theta\, \textrm{d} \varphi |\sqrt{\hat{g}}|\mu_0\boldsymbol{J}\boldsymbol{\cdot}\boldsymbol{B}}{|\boldsymbol{\nabla}\varPsi|^2}\right]^2 -\left[ \iint \frac{\textrm{d}\theta\, \textrm{d} \varphi |\sqrt{\hat{g}}| B^2}{|\boldsymbol{\nabla}\varPsi|^2}\right]\nonumber\\ & \quad \times \left[\iint \frac{\textrm{d}\theta\, \textrm{d} \varphi |\sqrt{\hat{g}}| (\mu_0\boldsymbol{J}\boldsymbol{\cdot}\boldsymbol{B})^2}{|\boldsymbol{\nabla}\varPsi|^2 B^2} \right], \end{align}
where
$\sqrt {\hat {g}}=(\boldsymbol {\nabla }\varPsi \boldsymbol {\cdot }\boldsymbol {\nabla }\theta \times \boldsymbol {\nabla }\varphi )^{-1}$, and
$\theta$ and
$\varphi$ range over
$[0,2\pi ]$ in the integrals. This expression is proportional to the stability criterion stated in Bauer et al. (Reference Bauer, Betancourt, Garabedian and Bauer1984) except for the absolute values around
$\sqrt {\hat {g}}$ and for the
$s_G$ and
$s_\psi$ factors that appear here. Equation (A16) rigorously generalizes this form of the stability criterion in to be invariant under both parity transformations.
Finally, we note that the Mercier criterion as stated on page 1201 of Carreras et al. (Reference Carreras, Dominguez, Garcia, Lynch, Lyon, Cary, Hanson and Navarro1988) is parity invariant and equivalent to (A 16) if one uses the following sign conventions (using notation from that paper):
$s \ge 0$,
$g = 1/(\boldsymbol {\nabla } s \boldsymbol {\cdot } \boldsymbol {\nabla } \theta \times \boldsymbol {\nabla }\zeta )$ is allowed to have either sign, and
$V$ is allowed to have either sign, with
$V = \int _0^s \textrm {d} s' \int _0^{2\pi } \, \textrm {d} \theta \int _0^{2\pi } \, \textrm {d} \zeta g$. This definition of
$V$ differs from ours by a factor
$s_G s_\psi$.




















