Hostname: page-component-848d4c4894-pftt2 Total loading time: 0 Render date: 2024-05-21T19:59:26.741Z Has data issue: false hasContentIssue false

Magnetohydrodynamic stability and the effects of shaping: a near-axis view for tokamaks and quasisymmetric stellarators

Published online by Cambridge University Press:  17 April 2023

Eduardo Rodríguez*
Affiliation:
IPP Max Planck Institute for Plasma Physics, Greifswald, Germany
*
Email address for correspondence: eduardor@princeton.edu
Rights & Permissions [Opens in a new window]

Abstract

How much does the cross-section of a toroidal magnetic field configuration tell us about its magnetohydrodynamic (MHD) stability? It is generally believed that positive triangularity (typically leading to bean-shaped cross-sections with their indentation on the inboard side in stellarators) contributes positively to MHD stability. In this paper, we explore the basis of this statement within a near-axis description for axisymmetric and quasisymmetric magnetic configurations. In agreement with the existing literature, we show that positive triangularity stabilises vertically elongated tokamaks. In quasisymmetric stellarators, the toroidal asymmetry of flux surfaces modifies this relation. The behaviour of stellarator-symmetric, quasisymmetric stellarators can still be described in terms of the shape of one of their up–down symmetric cross-sections. However, we show that for a sample of quasisymmetric configurations, the positive-bean-shaped cross-sections do not contribute positively to stability. Unlike in the axisymmetric case, we also learn that finite $\beta$ can improve stability even without magnetic shear.

Keywords

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
Copyright © The Author(s), 2023. Published by Cambridge University Press

1. Introduction

The quest for controlled thermonuclear fusion has seen renewed interest over the last decade. This has led to a revival of concepts other than the tokamak. The latter relies on toroidal magnetic fields with a spatial toroidal symmetry to confine a hot plasma within (Mukhovatov & Shafranov Reference Mukhovatov and Shafranov1971; Wesson Reference Wesson2011). It is useful to consider devices in which this symmetry requirement is relaxed, i.e. stellarators (Spitzer Reference Spitzer1958; Boozer Reference Boozer1998; Helander Reference Helander2014). The three-dimensional nature of stellarators provides them with a freedom necessary to avoid many limiting features of axisymmetric magnetic fields. Most importantly, large currents are no longer needed to hold the plasma, thus minimising the possibility of violent disruptions (Schuller Reference Schuller1995).

Finding attractive forms of stellarators that serve as magnetic confinement devices requires a dedicated effort. At the most basic level, the fields must be capable of confining collisionless charged particles for long enough (Mynick Reference Mynick2006). This requirement significantly restricts the space of stellarators, singling out a particular class of fields labelled omnigeneous (Hall & McNamara Reference Hall and McNamara1975; Bernardin, Moses & Tataronis Reference Bernardin, Moses and Tataronis1986; Cary & Shasharina Reference Cary and Shasharina1997; Landreman & Catto Reference Landreman and Catto2012; Helander Reference Helander2014). In this paper, we consider a particular group of omnigeneous stellarators, a most immediate generalisation of axisymmetry, known as quasisymmetric stellarators (Boozer Reference Boozer1983; Nührenberg & Zille Reference Nührenberg and Zille1988b; Burby, Kallinikos & MacKay Reference Burby, Kallinikos and MacKay2020; Rodríguez, Helander & Bhattacharjee Reference Rodríguez, Helander and Bhattacharjee2020). The defining property of this class is a particular form of hidden symmetry, which makes the magnitude of the magnetic field, $|\boldsymbol {B}|$, symmetric, but not necessarily $\boldsymbol {B}$. By Noether's theorem, such partial symmetry is sufficient to prevent rapid loss of particles in the small-gyroradius limit.

Confinement of single particles is not the only property desired of the stellarator: plasma stability, coil complexity, turbulent transport, etc., are also aspects of importance. This list of properties, alongside advances in computation, have naturally led to optimisation as the primary approach to the design of stellarators. This approach has proven to yield practical results (Beidler et al. Reference Beidler, Grieger, Herrnegger, Harmeyer, Kisslinger, Lotz, Maassberg, Merkel, Nührenberg and Rau1990; Anderson et al. Reference Anderson, Almagri, Anderson, Matthews, Talmadge and Shohet1995; Zarnstorff et al. Reference Zarnstorff2001; Garabedian Reference Garabedian2008; Najmabadi et al. Reference Najmabadi, Raffray, Abdel-Khalik, Bromberg, Crosatti, El-Guebaly, Garabedian, Grossman, Henderson and Ibrahim2008). However, it is not entirely satisfactory. The complexity of optimisation is prohibitive when attempting to comprehend the origin of the obtained designs (Rodríguez, Paul & Bhattacharjee Reference Rodríguez, Paul and Bhattacharjee2022a). This is partly a result of the space of optimisation having many local minima (Bader et al. Reference Bader, Drevlak, Anderson, Faber, Hegna, Likin, Schmitt and Talmadge2019; Henneberg, Helander & Drevlak Reference Henneberg, Helander and Drevlak2021). Some fundamental insight is necessary to interpret results and guide optimisation in such a space.

Understanding the relation between the properties imposed on stellarators is crucial. If two properties require similar or opposite magnetic field features, we should know it and perform optimisation accordingly. Intuition on these property trade-offs has developed over years of optimisation efforts. It is, for instance, believed that bean shapes (i.e. sizeable positive triangularity) favour magnetohydrodynamic (MHD) stability. This general wisdom accrued over years of stellarator optimisation (Nührenberg Reference Nührenberg2010) which regularly found these features, as well as more dedicated works (Lortz & Nührenberg Reference Lortz and Nührenberg1976; Nührenberg & Zille Reference Nührenberg and Zille1986). We put this observation to the test in this paper for axisymmetric and quasisymmetric stellarators.

To explore the question, we use two main ingredients. First, as a measure of MHD stability, we employ the Mercier criterion. We present the basics of this measure in § 2, together with the main theoretical framework for the paper: the near-axis expansion in inverse coordinates. The latter provides a simplifying description of the geometry and governing equations asymptotically in the distance from the centre of the stellarator. This framework becomes an ideal basis for analysing the problem. Section 3 considers the case of axisymmetry, which is often taken as reference to develop intuition on property trade-offs. We show that there is indeed a positive link between positive triangularity and stability in this scenario, reproducing the results of existing literature. That enables us to treat the case of quasisymmetric stellarators in § 4 analogously. Conventional shaping-stability intuition generally fails there, with negative triangularity being stabilising in practical examples. We close with some concluding remarks.

2. Mercier criterion and near-axis framework

For the purpose of this paper we consider static equilibria with isotropic pressure (Wesson Reference Wesson2011; Freidberg Reference Freidberg2014), in which magnetic field lines live on nested toroidal magnetic flux surfaces (Grad Reference Grad1967; Helander Reference Helander2014), labelled by the variable $\psi$ ($1/2{\rm \pi}$ the toroidal magnetic flux). Given such an equilibrium, we are interested in knowing whether it is MHD-unstable or not. Although stellarators have proven certain nonlinear resilience to instability, an unstable configuration still represents a physically unattainable configuration. Knowing this is important at least to understand if the stellarator properties carefully designed will reliably hold or not.

There is not a single way to study MHD stability. In this paper we turn to two scalar criteria for instability: the magnetic well, $V''>0$ (Greene Reference Greene1997), and the Mercier criterion, $D_{\rm Merc}<0$ (Greene & Johnson Reference Greene and Johnson1962; Mercier Reference Mercier1962, Reference Mercier1974; Bauer, Betancourt & Garabedian Reference Bauer, Betancourt and Garabedian2012; Freidberg Reference Freidberg2014). The latter is a sufficient condition for the occurrence of an interchange instability, namely an instability that displaces the plasma without significantly bending field lines. A configuration is necessarily unstable if $D_{\rm Merc}<0$ (but $D_{\rm Merc}>0$ does not guarantee stability, as it does not negate ballooning instability; Connor, Hastie & Taylor Reference Connor, Hastie and Taylor1978; Correa-Restrepo Reference Correa-Restrepo1978; Dewar & Glasser Reference Dewar and Glasser1983; Nührenberg & Zille Reference Nührenberg and Zille1988a; Freidberg Reference Freidberg2014). The scalar $D_{\rm Merc}$ involves multiple integrals over the fields and geometry of the configuration and can be found in the literature (Greene & Johnson Reference Greene and Johnson1962; Correa-Restrepo Reference Correa-Restrepo1978; Nührenberg & Zille Reference Nührenberg and Zille1988a; Bauer et al. Reference Bauer, Betancourt and Garabedian2012; Zocco, Aleynikova & Xanthopoulos Reference Zocco, Aleynikova and Xanthopoulos2018) (we include it in Appendix A for completeness). The magnetic well criterion (Greene Reference Greene1997) is nothing but the small-plasma-$\beta$, zero-magnetic-shear limit of the Mercier criterion. The complexity of both expressions in these stability criteria naturally requires a simplified framework in which to understand their underlying structure and relation to field properties.

We adopt for that purpose the so-called near-axis framework, pioneered by Mercier (Reference Mercier1962) and Solov'ev & Shafranov (Reference Solov'ev and Shafranov1970), in which the stellarator is considered asymptotically near its magnetic axis, where the stellarator is particularly simple. This way of approaching the problem has seen a recent revival for theoretical and practical stellarator design (Garren & Boozer Reference Garren and Boozer1991b; Landreman & Sengupta Reference Landreman and Sengupta2019; Jorge, Sengupta & Landreman Reference Jorge, Sengupta and Landreman2020; Landreman Reference Landreman2022; Rodríguez, Sengupta & Bhattacharjee Reference Rodríguez, Sengupta and Bhattacharjee2022b). In its original form, often referred to as the direct-coordinate approach, one expands all the equations governing the magnetic field in the distance from the axis involving the shape of flux surfaces directly. That way, shaping and stability were related, through the Mercier criterion, by the works of Solov'ev & Shafranov (Reference Solov'ev and Shafranov1970), Lortz & Nührenberg (Reference Lortz and Nührenberg1976), Mikhailovskii & Aburdzhaniya (Reference Mikhailovskii and Aburdzhaniya1979), Shafranov (Reference Shafranov1983) and Freidberg (Reference Freidberg2014), and most recently of Jorge & Landreman (Reference Jorge and Landreman2020) and Kim, Jorge & Dorland (Reference Kim, Jorge and Dorland2021). The emphasis on the geometry of the stellarator in this asymptotic description does not, however, lend itself straightforwardly to describing stability and guiding centre dynamics. The latter naturally involves $|\boldsymbol {B}|$, which is a quantity not readily accessible in this framework. In particular, this complication makes the description of optimised stellarators, such as omnigeneous (Hall & McNamara Reference Hall and McNamara1975; Bernardin et al. Reference Bernardin, Moses and Tataronis1986; Cary & Shasharina Reference Cary and Shasharina1997; Landreman & Catto Reference Landreman and Catto2012) or quasisymmetric (Boozer Reference Boozer1983; Nührenberg & Zille Reference Nührenberg and Zille1988b; Rodríguez et al. Reference Rodríguez, Helander and Bhattacharjee2020) ones, challenging.

To bypass these limitations and describe axisymmetric and quasisymmetric stellarators in this paper, we adopt the inverse-coordinate near-axis expansion (Garren & Boozer Reference Garren and Boozer1991b; Landreman & Sengupta Reference Landreman and Sengupta2018, Reference Landreman and Sengupta2019). Its main difference from the direct-coordinate approach is that it involves $|\boldsymbol {B}|$ explicitly in the problem, rather than the geometry of flux surfaces. It does so by treating Boozer coordinates (Boozer Reference Boozer1981) $\{\psi,\theta,\phi \}$ as an independent set, enabling the use of $\epsilon =\sqrt {2\psi /\bar {B}_0}$ (a pseudo-radial coordinate) as an expansion parameter. Here $\bar {B}_0$ is the average magnetic field magnitude along the magnetic axis and $\psi =0$ on it. In terms of this $\epsilon$, in the near-axis expansion all fields are expanded in power series of the form

(2.1)\begin{equation} f(\psi,\theta,\phi)=\sum_{n=0}^\infty\epsilon^n\sum_m^n{}' [f_{nm}^c(\phi)\cos m\theta+f_{nm}^s(\phi)\sin m\theta], \end{equation}

where the sum $\sum '$ is over even or odd positive numbers (including 0) up to $n$ depending on the parity of $n$ (Garren & Boozer Reference Garren and Boozer1991b). As the paper focuses on axisymmetric and quasisymmetric configurations, the magnetic field magnitude has expansion parameters independent of the toroidal angle:

(2.2)\begin{equation} |\boldsymbol{B}|=B_0(1+\epsilon\eta\cos\chi)+\epsilon^2(B_{20} +B_{22}^C\cos2\chi+B_{22}^S\sin2\chi)+\cdots.\end{equation}

Here the helical angle $\chi =\theta -N\phi$ takes the place of $\theta$, where $N\in \mathbb {N}$ is the self-linking number of the magnetic axis (Rodríguez et al. Reference Rodríguez, Sengupta and Bhattacharjee2022b). This form allows us to include quasihelical configurations in the formalism (quasisymmetric stellarators in which the contours of $|\boldsymbol {B}|$ close helically for $N\neq 0$).

Using the inverse-coordinate approach relegates the shaping of magnetic flux surfaces to a secondary role. Flux surfaces are nevertheless described around the magnetic axis, using the Frenet–Serret vectors of the axis (see Landreman & Sengupta Reference Landreman and Sengupta2019) as a basis, as

(2.3)\begin{equation} \boldsymbol{x}-\boldsymbol{r}_0=X(\psi,\chi,\phi)\hat{\kappa} +Y(\psi,\chi,\phi)\hat{\tau}+Z(\psi,\chi,\phi) \hat{\boldsymbol{b}},\end{equation}

for all $\chi$ and $\phi$ (at constant $\psi$), where $\boldsymbol {r}_0$ represents the magnetic axis, $\hat {\kappa }$ is the normal to the curve, $\hat {\tau }$ the binormal and $\hat {\boldsymbol {b}}$ its tangent. In any plane normal to the axis (and disregarding the function $Z$), $X$ and $Y$ describe the shape of the cross-sections. Our task in this paper is then to interpret the shaping through $X$, $Y$ and $Z$, and relate it to the Mercier criterion.

Details of the near-axis expansion in the so-called inverse-coordinate approach may be found in the original paper by Garren & Boozer (Reference Garren and Boozer1991b), or later applications and extensions (Landreman & Sengupta Reference Landreman and Sengupta2018, Reference Landreman and Sengupta2019; Rodríguez & Bhattacharjee Reference Rodríguez and Bhattacharjee2021a). Here we do not rederive these results but rather apply them; the reader may refer to these if necessary. The magnetic well on axis (Landreman & Jorge Reference Landreman and Jorge2020) is

(2.4)\begin{equation} V''=\frac{8{\rm \pi}^2 G_0}{B_0^3}\left[\frac{3\eta^2}{2}- \frac{2B_{20}}{B_0}-\frac{p_2}{B_0^2}\right], \end{equation}

where the pressure gradient (to leading order) is given by $p_2$ (from $p=p_0+\epsilon ^2 p_2+\cdots$, which includes for simplicity a factor of $\mu _0$) and $G_0$ is the poloidal current linked to the torus. As we have hinted, the expression is simple and involves $|\boldsymbol {B}|$ quite directly. Here the parameter $B_{20}$ may be interpreted as a measure of the depth of the magnetic well (Freidberg Reference Freidberg2014).

The pressure gradient in (2.4) is somewhat deceptive. We remind ourselves that using $V''$ as a criterion is sensible only in the vacuum limit of the Mercier criterion. Thus, for a finite-$\beta$ equilibrium, the Mercier criterion reads, following Landreman & Jorge (Reference Landreman and Jorge2020) and taking $B_0=1$ for simplicity,

(2.5)\begin{equation} D_{\rm Merc}=\frac{G_0^2p_2}{{\rm \pi}^2\epsilon^2} \left\{\frac{3\eta^2}{2}-2B_{20}-2p_2\left(1+ \frac{2G_0^2\eta^2}{\bar{\iota}_0^2}\mathcal{I} \left[\frac{\eta}{\kappa},\sigma\right]\right)\right\},\end{equation}

where

(2.6)\begin{equation} \mathcal{I}\left[\bar{\eta}=\frac{\eta}{\kappa},\sigma\right]= \frac{1}{2{\rm \pi}}\int_0^{2{\rm \pi}}\frac{\bar{\eta}^4+\bar{\eta}^2 +\sigma^2}{\bar{\eta}^4+2\bar{\eta}^2+(1 +\sigma^2)}\,\mathrm{d}\phi, \end{equation}

$\kappa$ is the curvature of the magnetic axis (a function of the toroidal angle $\phi$), $\sigma =Y_{11}^c/Y_{11}^s$ (see the notation of (2.1)) is related to the shaping of flux surfaces and $\bar {\iota }_0$ is the rotational transform on axis (in the quasihelical, case $\iota _0-N$). The structure of the leading-order Mercier criterion is, up to the dependence on the pressure gradient, of the same form as the magnetic well, depending critically on $B_{20}$.

3. Case of axisymmetry

In the previous section we presented the Mercier criterion in its near-axis form following Landreman & Jorge (Reference Landreman and Jorge2020). Our goal now is to interpret (2.5) meaningfully in terms of the shaping of cross-sections. To do so, we must consider two essential points. First, we must know which choice of parameters within the near-axis description serves as a minimal, consistent parametrisation of our near-axis equilibrium. In this section, we focus on these choices for axisymmetry, leaving quasisymmetry for the next section. Second, given such a set, we need to connect them within the near-axis expansion to the most common notions of cross-section shapes such as triangularity. Once this has been achieved, we will be in a position to discuss MHD stability and its relation to the shape of the plasma cross-sections.

3.1. Parametrisation of configurations

Let us describe axisymmetric configurations uniquely within the near-axis framework. We present the most conventional choice of parameters, which we must, however, point out is not unique.

The shape of the magnetic axis is the primary ingredient in the expansion, but in the case of axisymmetry it must be a circle. We normalise its radius to $R_0=1$, as we do with the magnetic field on axis, $B_0=1$, leading by Ampère's law to a poloidal current $G_0=1$. At first order, the parameters $\eta$ (leading-order $|\boldsymbol {B}|$ mirror ratio; see (2.2)) and $\sigma$ (measure of the up–down asymmetry) describe rather explicitly elliptical flux surfaces (as we will later see). The choice of the toroidal current density on axis, $I_2$, then provides a finite rotational transform on axis.

Finally, at second order, four parameters are necessary: the pressure gradient, $p_2$, and the second-order harmonics of $|\boldsymbol {B}|$, $B_{20}$, $B_{22}^C$ and $B_{22}^S$. Not all choices of these natural parameters constitute valid equilibria, though. The force balance condition imposes a linear constraint, (E6), making only three of them truly independent. Different choices of independent parameters are suitable for studying different equilibrium properties. In our case, we must find the combination of natural parameters $p_2$ and $|\boldsymbol {B}|$ harmonics that directly relates to the shaping of cross-sections, so that we may use them as the independent set. That is the next task. One may ask why the direct-coordinate near-axis approach was chosen if the geometry was wanted explicitly. The answer is that we want to have the capacity to constrain $|\boldsymbol {B}|$ directly and simply, and, within these constraints, see how the geometry arises.

3.2. Shapes within the inverse-coordinate near-axis framework

We must thus construct geometric notions for the cross-sections within the near-axis framework. These include concepts such as ellipticity, triangularity and up–down symmetry breaking. Although the description in this section is concerned with axisymmetry, the description of shaping presented generalises straightforwardly to the quasisymmetric case.

3.2.1. First-order shaping: ellipticity

As is well known, near the magnetic axis, flux surfaces have elliptic cross-sections. In the near-axis expansion these are described at first order in the expansion in terms of the parameters $\eta$ and $\sigma$. The shapes in the plane normal to the axis (in our tokamak, slices at constant cylindrical angle) are described as

(3.1)\begin{equation} \boldsymbol{x}={-}\epsilon\eta\cos\chi\hat{R}+ \frac{\epsilon}{\eta}(\sin\chi+\sigma\cos\chi)\hat{z}, \end{equation}

where $\hat {R}$ is the unit vector in the major radius direction, $\hat {z}$ is the unit vector in the vertical cylindrical direction, $X_{11}^c=\eta$ and $Y_{11}^s=1/\eta$ (Landreman & Sengupta Reference Landreman and Sengupta2019). In terms of the elongation (defined as the ratio of the major to the minor radius of the ellipse, $\mathcal {E}$) and the rotation angle $\vartheta$ with respect to $\hat {\kappa }$, and defining the angle $\mathcal {E}=\tan e$ (see figure 1),

(3.2a)$$\begin{gather} \sin 2e=\frac{2\eta^2}{1+\sigma^2+\eta^4}, \end{gather}$$
(3.2b)$$\begin{gather}\tan 2\vartheta=\frac{2\sigma\eta^2}{\eta^4-1-\sigma^2}. \end{gather}$$

For the details of how one arrives at (3.2), see Appendix B. From the above, it is clear that $\sigma$ rotates the ellipse with respect to the $(\hat {\kappa },\hat {\tau })$Frenet–Serret frame, in the small-$\sigma$ limit linearly, and thus is a measure of up–down asymmetry. However, it also affects elongation through the denominator in (3.2a). Only in the limit of $\sigma =0$, for which $\vartheta =0, {\rm \pi}/2$, $\mathcal {E}=\eta ^2, 1/\eta ^2$ respectively, and elongation just depends on $\eta$. This limit allows us to interpret $\eta$ as a measure (approximate) of elongation, rigorously true in the up–down symmetric limit.

Figure 1. Elliptical shapes and angles. Diagram showing an ellipse framed in the normal Frenet–Serret frame where the ellipse rotation angle $\vartheta$ and elongation angle $e$ are defined. These two angles uniquely characterise ellipses (up to a scale).

In an up–down asymmetric scenario, the distortion of $\eta$ as a measure of elongation makes $\vartheta$ and $e$ become the natural shaping parameters. Expressing the near-axis expansion in terms of these parameters yields, however, highly complicated and nonlinear expressions that necessarily require numerical tools to handle. Thus, we use $\eta$ and $\sigma$ as our parameters, capitalising on their approximate geometric meaning for interpretation.

3.2.2. Second-order shaping: triangularity

In increasing order of complexity, the next family of shapes after ellipses is triangularity. Figure 2 shows cross-sections with non-zero triangularity, formally arising at second order in the near-axis expansion through $X_2=X_{20}+X_{22}^C\cos 2\chi +X_{22}^S\sin 2\chi$, and equivalently for $Y_2$. Before constructing a quantitative measure of triangularity, let us first familiarise ourselves with each of these shaping coefficients at second order considering a frame-aligned ellipse at first order.

Figure 2. Examples of triangular cross-sections. The diagram shows two examples of triangular cross-sections (in black), constructed with second-order shaping with $X_{22}^C<0$ (left) and $Y_{22}^S>0$ (right), for the same underlying elliptical shape. The stellarator literature refers to these shapes as bean and D shapes (often clearer for less elongated cross-sections), respectively. The grey contour shows how excessive shaping can lead to a pathological cross-section in which the surface self-intersects.

Take first the $X_{22}^C\cos 2\chi$ term (see the leftmost cross-section in figure 2). The magnitude of $X_{22}^C$ gives the ‘bean shape’ of the cross-section, becoming ever ‘more triangular’ as its magnitude is increased, eventually developing a characteristic dimple or indentation. Geometrically, the indentation of the bean shape appears (see figure 2) upon crossing the threshold $\epsilon X_{22}^C/X_{11}^C\geq 1/4$.Footnote 1 The strength of the shaping is thus measured by $\epsilon X_{22}^C/X_{11}^C$, and increases away from the axis.

The meaning of $Y_{22}^S$ is not dissimilar and is also related to what is commonly perceived as triangularity. However, it manifests as a more D-looking shape (see the rightmost plot in figure 2). As $\epsilon Y_{22}^S$ becomes larger, the shape becomes more and more triangular until it reaches a critical value beyond which the cross-section self intersects (see figure 2). The critical point, i.e. the first instance in which the cross-section crosses the $Y=0$ line thrice, corresponds to $\epsilon Y_{22}^S=Y_{11}^S/2$. The strength of the shaping is then $\epsilon Y_{22}^S/Y_{11}^S$, which limits the near-axis description to $\epsilon <\epsilon _{\max }=Y_{11}^S/2Y_{22}^S$. A similar limit exists for $X_{22}^c$ to prevent the indentation of the bean shape from being too large so that nested surfaces touch and eventually cross each other. Both of these are a geometric interpretation of the measure $r_c$ introduced by Landreman (Reference Landreman2021).

Although in different flavours, both of these components bring in triangularity. So far, we have been vague on what we mean by triangularity, and we must invoke a more rigorous definition for a quantitative consideration. We define triangularity as the relative displacement of the vertical tips of the cross-section from the cross-section mid-point divided by the width of the cross-section. It is a measure of left–right asymmetry of the cross-sections. We choose a positive value to indicate a relative displacement in the direction of $\hat {\kappa }$ (in the tokamak $-\hat {R}$). Following this definition (calculation details may be found in Appendix C), the asymptotic form of triangularity, $\delta _{\rm tok}$, may be written as

(3.3)\begin{equation} \delta_{\rm tok}\approx2\epsilon\left(\frac{Y_{22}^S}{Y_{11}^S} -\frac{X_{22}^C}{X_{11}^C}\right),\end{equation}

which involves the shaping strength fractions previously obtained, with the negative sign being consistent with the picture in figure 2.

The same way that this notion of triangularity, $\delta _{\rm tok}$, measures the degree of left–right asymmetry, we define another geometric parameter that we call vertical triangularity, $\delta _y$, which measures the degree of up–down asymmetry. In this case, in terms of the shaping parameters $X_{22}^s$ and $Y_{22}^c$,

(3.4)\begin{equation} \delta_y\approx2\epsilon\left(\frac{Y_{22}^C}{Y_{11}^S} +\frac{X_{22}^S}{X_{11}^C}\right). \end{equation}

Note the sign difference from (3.3) (in fact, one can see a similar sign in (5.1) and (5.2) of Rhodes (Reference Rhodes2017)). We have taken the convention that a positive $\delta _y$ indicates an upwards bulging (meaning in the direction of the binormal to the axis).

When the underlying elliptic shape is not frame-aligned, the description of the shaping becomes significantly more complex, as the components of $X_2$ and $Y_2$ mix together. Appendix C briefly describes how to deal with this situation by defining effective measures $\delta _{\rm tok}$ and $\delta _y$ in the rotated frame. We give a numerical example of what this means later.

3.2.3. Second-order shaping: Shafranov shift

So far, we have said little regarding the relative position of flux surfaces, of which the Shafranov shift (Shafranov Reference Shafranov1963; Wesson Reference Wesson2011) is a measure. Classically, this is defined as the relative shift of the centres of circular cross-sections in the large-aspect-ratio limit of an axisymmetric configuration. In a more general stellarator, the shift becomes ambiguous, as the centre of generally shaped cross-sections (other than ellipses and circles) is non-unique. We opt to define it as

(3.5a)$$\begin{gather} \varDelta_x=X_{20}+X_{22}^C, \end{gather}$$
(3.5b)$$\begin{gather}\varDelta_y=Y_{20}+Y_{22}^C, \end{gather}$$

where the near-axis expansion parameters have been directly used. In an up–down symmetric configuration, $\varDelta _x$ describes the displacement of the cross-section midpoint along the up–down symmetry line from one surface to the next. The vertical portion, $\varDelta _y$, has a similar interpretation along the binormal ($Y$). Appendix D motivates the form of this definition of Shafranov shift beyond its simple geometric interpretation, following the work in Rodríguez, Sengupta & Bhattacharjee (Reference Rodríguez, Sengupta and Bhattacharjee2022c). This form of the Shafranov shift reduces to the correct tokamak definition (see Landreman Reference Landreman2021). As we are primarily concerned with the up–down symmetric form of the problem, we refer to $\varDelta _x$ as the Shafranov shift.

3.3. Magnetohydrodynamic stability and cross-section shapes

The geometry parameters in the previous subsection constitute the appropriate shaping-related parameters in terms of which we ought to express the near-axis expansion. For simplicity, at lowest order, we choose to use parameters $\eta$ and $\sigma$ explicitly. Unless otherwise stated, we focus on up–down symmetric configurations, and so take $\sigma =0$ and $\delta _y=0$. Having the magnitude of the pressure gradient, $p_2$, explicitly involved is often convenient, as it allows us to study the effect of other parameters on a configuration that needs to support a prescribed ‘pressure profile’. This leaves one of the two geometric measures, either the Shafranov shift, $\varDelta _x$, or the triangularity, $\delta =\delta _{\rm tok}/\epsilon$, to complete the parametrisation of the near-axis configuration. Choosing one explicitly will make the other adjust self-consistently in a concealed way so that it complies with equilibrium.

To express everything in terms of these parameters, we must relate them to $|\boldsymbol {B}|$ components through $\{X_2,Y_2\}$ coefficients. These relations form part of the near-axis expansion, and are given explicitly in Appendix E. Although algebraically involved, computational algebra may handle them straightforwardly. That way, we first present three equivalent forms of $B_{20}$ in terms of different relevant second-order parameters, each with a different physical interpretation:

(3.6a)\begin{align} B_{20}&={-}\left[1+\frac{(1+\eta^4)^2}{(3+\eta^4)I_2^2} \right]p_2+\frac{3\eta}{2}\frac{1-\eta^4}{3+\eta^4}\delta +\eta^2\left(\frac{4+\eta^4}{3+\eta^4} -\frac{I_2^2}{1+\eta^4}\right), \end{align}
(3.6b)\begin{align} &={-}\left[1+\frac{(1+\eta^4)^2}{4\eta^4I_2^2}\right]p_2 +\frac{3}{2}\frac{\eta^4-1}{\eta^4}\varDelta_x +\eta^2\left(\frac{1+4\eta^4}{4\eta^4} -\frac{I_2^2}{1+\eta^4}\right), \end{align}
(3.6c)\begin{align} &=2\varDelta_x\left[1+\frac{(3+\eta^4)I_2^2}{(1 +\eta^4)^2}\right]+\frac{\eta}{2}\left[1 +\frac{4\eta^4I_2^2}{(1+\eta^4)^2}\right]\delta +\eta^2\left(1-\frac{(2+\eta^4)I_2^2}{(1 +\eta^4)^2}\right). \end{align}

Following this, the Mercier criterion, (2.5), can be written as

(3.7a)\begin{align} \frac{\epsilon^2{\rm \pi}^2 D_{\rm Merc}}{|p_2|G_0^2} &=\frac{(\eta^2-1)^2(1+\eta^4)^2}{(1+\eta^2)(3 +\eta^4)I_2^2}p_2+3\eta\delta\frac{1-\eta^4}{3 +\eta^4}+\frac{\eta^2}{2}\left(\frac{7+\eta^4}{3 +\eta^4}-\frac{4I_2^2}{1+\eta^4}\right), \end{align}
(3.7b)\begin{align} &=\frac{(\eta^2-1)(2\eta^2+1)(1+\eta^4)^2}{2\eta^4(1 +\eta^2)I_2^2}p_2+3\varDelta_x\frac{\eta^4-1}{\eta^4} +\frac{1}{2\eta^2}\left(1+\eta^4-\frac{4\eta^4I_2^2}{1 +\eta^4}\right). \end{align}

The effects of shaping are buried in each of the terms of these expressions, especially their sign. If the factor multiplying a particular parameter in the Mercier criterion is positive, then the geometric or physical property represented by the parameter can be said to have a stabilising effect.

Consider first (3.6c), which describes the direct effect of cross-section shaping on $B_{20}$. Because the factors multiplying both $\delta$ and $\varDelta _x$ are positive, this means that positive triangularity and Shafranov shift contribute positively to $B_{20}$, and thus we would expect MHD stability. There is a simple geometric explanation for this behaviour. Picture an increase of $\varDelta _x$ as a bunching of cross-sections on the outboard side of the configuration. As one goes from the magnetic axis outwards, each cross-section acquires more area on the inboard side compared to the outboard side. There $|\boldsymbol {B}|$ is larger, therefore $B_{20}$ grows, and so does the magnetic well. Similarly, a positive triangularity brings the vertical turning points of the cross-section towards the inboard side, gathering a larger area on the high-field side. Following this logic, any shaping that does not break left–right symmetry should not affect stability.

Although this geometric picture is simple, its link to stability is not as clear-cut as it may seem. When we deform the cross-sections by changing $\delta$ and $\varDelta _x$ directly, the resulting equilibrium generally supports a different pressure gradient; formally, $p_2$ adjusts self-consistently in the background to satisfy $p_2/2I_2^2=-(3+\eta ^4)\varDelta _x/ (1+\eta ^4)^2 -\eta ^5\delta /(1+\eta ^4)^2+\cdots$. To discuss stability most straightforwardly we keep $p_2$ constant, and thus make it explicit as in (3.6a) and (3.6b). In such a scenario the expressions for $B_{20}$, (3.6a) and (3.6b), and those for the Mercier criterion, (3.7a) and (3.7b), are (up to a factor of $1/2$) the same as far as the effects of second-order shaping are concerned. The clear geometric picture we had for (3.6c) is, however, lost. Positive triangularity and Shafranov shift no longer lead to an unequivocal increase in the magnetic well. Only vertically elongated cross-sections preserve the benefit of positive triangularity ($\eta <1$), while horizontally elongated ones do so for the Shafranov shift. The reason for this difference is the hidden response of the shaping in each one of these cases. To keep the pressure constant (see before), if one increases triangularity in a configuration, then the Shafranov shift should go in the negative direction to hold the same pressure gradient (in a sense counteracting the triangular shaping). This opposite contribution to $B_{20}$ makes (de)stabilising triangularity or Shafranov shift dominate in different situations. The stabilising effect of triangularity, for $\eta <1$, overcomes any destabilising influence of the Shafranov shift, which dominates when $\eta >1$. The exact balance results in (3.6a) and (3.6b).

The form of (3.7a) is consistent with (12.89) of Freidberg (Reference Freidberg2014). We have learnt, though, that one must be careful at offering a simple picture to explain the behaviour of stability. The simple geometric view offered by Freidberg for (3.6c) breaks down.Footnote 2 As most relevant cross-sections are elongated vertically in practice, positive triangularity (bean shaping) contributes favourably to stability. This aligns with the common wisdom of how shaping affects stability.

As is well known, increasing the pressure in a configuration leads to a deepening of the magnetic well. Here, formally, this is described by the unavoidable increase of $B_{20}$ with $|p_2|$, (3.6a) and (3.6b). The effect of pressure on stability is, even if $B_{20}$ increases, destabilising in the usual scenario in which triangularity is kept constant, (3.7a). This leads to the well-known (Lortz & Nührenberg Reference Lortz and Nührenberg1978; Freidberg Reference Freidberg2014) equilibrium $\beta$ stability limit.Footnote 3 The Shafranov shift plays a central role in setting this limit, as can be seen by the avoidance of the $\beta$ limit for $\eta <1$ when fixing $\varDelta _x$, (3.7b).

The significance of any of the effects described is only relative to the effect of other terms in the Mercier criterion. This comparison depends on lower-order parameter choices. This is especially true for what we call the ‘intrinsic contribution’ to stability, a term that does not involve any second-order parameters directly. Its stabilising contribution grows with elongation in the horizontal direction, but it is deteriorated by current (opposite to the contribution by the pressure gradient). The behaviour with current can be understood considering the limit of very large $I_2$. In this limit, the tokamak effectively becomes a $Z$-pinch, whose instability grows like $I_2^2$ (see chapter 11 in Freidberg Reference Freidberg2014), a classic result that in the circular-cross-section-limit becomes $D_{\rm Merc}\propto 1-\iota _0^2$ (Freidberg Reference Freidberg2014, chapter 12).

We pointed that any effect that did not break left–right symmetry at second order, namely $\delta _y$, could not affect $B_{20}$. But we had not touched upon the effect of up–down symmetry breaking through $\sigma$. We spare the reader from the expressions one obtains in that case, which are not particularly illuminating. The procedure is, however, no different from the one we have adopted, as long as $\sigma$ is kept explicitly in the expressions. As pointed out in Appendix C, for a straightforward definition of shaping in that scenario, we redefine $\delta$, $\delta _y$ and $\varDelta _x$ in the frame of the rotated ellipse. An example of how the effect of triangularity on stability changes with the up–down symmetry breaking is shown in figure 3. As the ellipse rotates, the effect of triangularity $\delta$ shrinks, to the point of vanishing for $\vartheta ={\rm \pi} /2$. At that point, $\delta$ represents vertical triangularity; and as we have seen, this has no effect on stability. The behaviour of $\delta _y$ in figure 3 is the reverse of that of $\delta$. It goes from having no effect to having an effect which in this case surpasses the effect of $\delta$ at $\vartheta =0$. This difference in magnitude arises because the $\vartheta =0, {\rm \pi}/2$ cases are geometrically different. The major or minor axes are aligned with $X$ in each case, respectively.

Figure 3. Change in the stabilising triangularity effect with up–down symmetry breaking. The plots show (left) the influence of regular and up–down triangularity on $B_{20}$ and (right) the $\eta$ and $\sigma$ parameters as a function of the rotation of the ellipse, $\theta$. The elongation of the ellipse is kept constant, $\mathcal {E}=2$, and at $\theta =0$ is aligned with the vertical.

4. Quasisymmetric stellarators

The discussion of MHD stability and shaping above is a renewed outlook at a problem that has long been studied (Mercier Reference Mercier1962; Solov'ev & Shafranov Reference Solov'ev and Shafranov1970; Lortz & Nührenberg Reference Lortz and Nührenberg1976). We confirmed that the behaviour in a tokamak aligns with the conventional wisdom of positive triangularity (in common elongated shapes) favouring stability, but the results are otherwise not new. The discussion above is, however, a valuable stepping stone towards dealing with the quasisymmetric problem. In quasisymmetry, like in axisymmetry, the Fourier coefficients of $|\boldsymbol {B}|$ in the near-axis expansion are constant, making most of the analysis the same.

4.1. Constancy of parameters

Let us start by carefully considering the description of quasisymmetric configurations in the near-axis framework. By definition, the magnitude of the magnetic field in an equilibrium, quasisymmetric configuration (expressed in Boozer coordinates) is $|\boldsymbol {B}|=B(\psi,\chi =\theta -N\phi )$ (Boozer Reference Boozer1983; Helander Reference Helander2014; Rodríguez, Sengupta & Bhattacharjee Reference Rodríguez, Sengupta and Bhattacharjee2021). That is, the near-axis expansion of $|\boldsymbol {B}|$ is precisely analogous to that of axisymmetry. Thus, we expect to find a natural parametrisation of quasisymmetric configurations analogous to that of tokamaks.

To leading order, the shape of a magnetic axis should be chosen. For a quasisymmetric stellarator, any regular (i.e. with no vanishing curvature), closed space curve is valid, a priori, beyond a circle. The choice of axis fixes $N$, the direction of the symmetry, which corresponds to the self-linking number of the axis (Rodríguez et al. Reference Rodríguez, Sengupta and Bhattacharjee2022b). The poloidal current is then $G_0=L/2{\rm \pi}$, where $L$ is the total length of the axis.

At first order, elliptical shapes are described through $\eta$ and $\sigma$, like for the tokamak. However, in general $\sigma =\sigma (\phi )$ is a function of the toroidal angle; it is the solution to a periodic first-order Riccati equation (see (A6) in Garren & Boozer (Reference Garren and Boozer1991a) or (2.14) in Landreman & Sengupta Reference Landreman and Sengupta2019) with a choice of initial condition $\sigma (0)$ (vanishing in stellarator symmetry). Although this makes the shape of cross-sections in a quasisymmetric stellarator depend on $\phi$, the freedom at first order truly resides on two parameters, $\eta$ and $\sigma (0)$. This underlines the special nature of quasisymmetric stellarators.

At second order in the distance from the magnetic axis we have the four parameters $p_2$, $B_{20}$, $B_{22}^C$ and $B_{22}^S$, the same number of constant parameters as in a tokamak. This is true in the ideal quasisymmetryic limit, which we assume for the analysis in this section. However, in practice, one should not forget the limitations that arise through what has come to be known as the Garren–Boozer overdetermination problem (Garren & Boozer Reference Garren and Boozer1991a). Not every axis shape and parameter choice can consistently support quasisymmetry and equilibrium simultaneously through second order. Generally one is forced to relax the strict quasisymmetric requirement on, following Landreman & Sengupta (Reference Landreman and Sengupta2019), $B_{20}$, which becomes for consistency a function of the toroidal angle. Only a subset of near-axis choices (Landreman Reference Landreman2022; Rodríguez et al. Reference Rodríguez, Sengupta and Bhattacharjee2022c) have approximately constant $B_{20}$.Footnote 4 Thus, in practice, we can expect to find deviations between our idealised analysis and a more consistent one, driven by ‘errors’ in quasisymmetry. For deviations in the range of $\varDelta B_{20}\sim 0.01$, one may estimate deviations in ${\rm \Delta} V''\sim 1$. When illustrating the findings in this section with practical examples, we have to check that the idealised theory reproduces the actual near-axis configuration (see Appendix G).

4.2. Choosing a characteristic cross-section

Although quasisymmetric configurations may be parametrised (for a given axis shape) by the same amount of parameters as a tokamak, flux surfaces are naturally asymmetric. That is, the cross-section at each angle $\phi$, described analogously to the axisymmetric caseFootnote 5 , will be generally different. This makes the notions of ellipticity, triangularity and Shafranov shift functions of $\phi$. However, following the parametrisation of the axisymmetric scenario, we must be able to parametrise the whole configuration through the description of a single cross-section (and the axis shape). Given a cross-section and the axis shape, the remainder of the configuration then follows from the fulfilment of quasiymmetry and equilibrium. This simplicity is particular to quasisymmetric stellarators, but other optimised stellarators will also impose constraints on the shaping of their surfaces.

In principle, one could consider the geometric features of any of the cross-sections as parameters. In stellarator-symmetric stellarators, though, one cross-section is particularly simple: the up–down symmetric one. There are two such distinct cross-sections per field period, by stellarator symmetry occurring at $\phi =0, {\rm \pi}/N$, where $N$ is the number of field periods. For simplicity we focus on the cross-section at $\phi =0$. In common quasisymmetric configurations (see later section), this often corresponds to a characteristic bean-shaped cross-section, and thus it is reasonable to consider it as representative in our discussion. For such a cross-section, the normal vector of the Frenet–Serret frame points inwards along the major radius by constructionFootnote 6 , and the configuration presents a high degree of symmetry (curvature and torsion are even functions of $\phi$, and $\sigma$ is odd). The task is then to connect the features of this cross-section to stability.

4.3. Shaping and MHD stability in a quasisymmetric stellarator

We relate the shaping of the up–down symmetric cross-section to stability in a form similar (conceptually) to how we approached the problem in the axisymmetric case. That is, we must first find a relation between $X_2$ and $Y_2$ (in this case at $\phi =0$) and typical shaping concepts, relate them to natural parameters of the near-axis framework and finally draw the connection to the Mercier criterion. We will, for now, ignore the changes in shape of the cross-section that occur from the projection from the plane normal to the axis to the cylindrical coordinate system. We spare the reader from the algebra, and write the Mercier criterion in the following form:

(4.1)\begin{equation} \frac{\epsilon^2{\rm \pi}^2 D_{\rm Merc}}{|p_2|G_0^2}=\mathcal{T}_{|p|}|p_2|+\mathcal{T}_\delta \delta+\varLambda, \end{equation}

where all the interesting information lies in the forms of $\mathcal {T}$ and $\varLambda$. Term $\varLambda$, which includes the effects of the axis, $\eta$ and $\sigma$, and is important in determining the total stability of the configuration, is, however, not very illuminating (see Appendix F). Instead, we focus on the effect of triangularity, and see how the tokamak intuition and common wisdom claim holds.

Using the appropriate relations, we obtain after significant algebra

(4.2)\begin{equation} \mathcal{T}_\delta=3\eta\frac{(1-\alpha)+\bar{F}(1 +\alpha)}{(3+\alpha)-\bar{F}(1+\alpha)}, \end{equation}

where $\alpha =\eta ^4/\kappa (0)^4$ and

(4.3)\begin{equation} \bar{F}=2\left[\frac{(I_2-\tau(0))/\kappa(0)^2}{\displaystyle \int_0^{2 {\rm \pi}}\,\mathrm{d}\varphi(I_2-\tau)/\kappa^2} \frac{\displaystyle \int_0^{2{\rm \pi}}\,\mathrm{d}\varphi(1+\sigma^2 +\eta^4/\kappa^4)}{1+\eta^4/\kappa(0)^4}-1\right],\end{equation}

with $\tau$ the torsion of the axis. The expression in (4.3) compares local quantities with their global average, acting as a measure of asymmetry in the stellarator. Readers familiar with the near-axis framework will recognise the averages as part of the expression for the rotational transform on axis, $\bar {\iota }_0=2G_0\eta ^2\int [(I_2-\tau )/\kappa ^2]/\int (1+\sigma ^2+\eta ^4/\kappa ^4)$. In the axisymmetric limit, where the average and local quantities are the same, $\bar {F}\rightarrow 0$, and $\mathcal {T}_\delta$ in (4.2) reduces to (3.7a), with $\alpha$ generalising $\eta \rightarrow \eta /\kappa (0)$. Thus, in this limit, the tokamak intuition holds: for a cross-section that is elongated in the vertical direction ($\alpha <1$), positive triangularity favours MHD stability. In contrast, negative triangularity contributes positively for $\alpha >1$.

The presence of $\bar {F}$ does not guarantee this behaviour in a general quasisymmetric stellarator. To understand the implications of this measure of asymmetry, we consider the representation of $\mathcal {T}_\delta /3\eta$ in $(\alpha, \bar {F})$ space (see figure 4).Parameter $\bar {F}$ changes the stabilising implications of triangularity drastically, especially in the $\bar {F}<0$ region. Any value $\bar {F}<(\alpha -1)/(1+\alpha )$ (of course, $\bar {F}<-1$) gives $\mathcal {T}_\delta <0$, and makes negative triangularity have a stabilising effect, contrary to common wisdom. In this region, though, $0>\mathcal {T}_d>-1$, and thus the effects of triangularity are moderate. To picture the meaning of negative $\bar {F}$, consider the limit of $\eta \sim 0$. In that case, the first fraction in the square brackets of (4.3) dominates $\bar {F}$, which for no toroidal current requires $\tau /\kappa ^2$ to have a local minimum.

Figure 4. Sign of $\mathcal {T}_\delta /3\eta$ and $\mathcal {T}_{|p|}\bar {\iota }_0^2/4\kappa ^2$ in $(\alpha, \bar {F})$ space. The plots show $\mathcal {T}_\delta /3\eta$ (left) and $\mathcal {T}_{|p|}\bar {\iota }_0^2/4\kappa ^2$ (right) in $(\alpha, \bar {F})$ space. The shaded region in the left-hand plot represents the space for which $\mathcal {T}_\delta <0$, and thus positive triangularity is detrimental to the stability of the configuration. The shadow region for $\mathcal {T}_{|p|}$ also represents a negative sign corresponding to the destabilising effect of a pressure gradient. The dotted line in the left-hand plot represents the case of the tokamak explored in the previous section, which shows the possibility of both triangularity signs being stabilising. The dashed and dotted lines in the right-hand plot correspond to the changing lower limit of the positively signed region as the magnitude of the geodesic contribution (the term with the integral $I$) is changed from maximal (dotted line) to half its magnitude from the axisymmetric limit (labelled 0.5).

If this had a local maximum, then $\bar {F}>0$ and $\mathcal {T}_d$ would live in the upper portion of figure 4. In that case, we see that positive triangularity will benefit stability for moderate values of $\bar {F}$. Beyond $\bar {F}>(3+\alpha )/(\alpha +1)$ negative triangularity becomes once again stabilising, and in this case, strongly so. Triangularity $\mathcal {T}_d$ shows a divergence at the boundary, corresponding to an unphysical Shafranov shift, indicating the breakdown of the parametrisation chosen for the configuration. In the limit $|\bar {F}|\rightarrow \infty$, $\mathcal {T}_\delta \rightarrow -3\eta$.

In summary, the common perspective on the contribution of triangularity (or bean shaping) to stability does not generally apply to quasisymmetric stellarators. For a significant asymmetry $|\bar {F}|$ the opposite is actually true. This is not a claim on the full MHD stability of a configuration, which we cannot make simply based on triangularity. Instead, it is a statement on the partial contribution of triangularity to the total MHD stability; that is, how a change in triangularity keeping the pressure, elliptic shaping, up–down symmetry and axis shape unchanged helps or worsens the stability of a configuration. Within the near-axis description this thought experiment has a precise formulation, and suggests that positive-triangularity, bean-shaped cross-sections do not necessarily improve stability.Footnote 7

What does this imply in practice? Are most of the existing cases aligning or misaligning with the common wisdom? From the analytic perspective, a definitive answer should explore the value of $\bar {F}$ in quasisymmetric configurations, but we content ourselves by presenting some examples of optimised near-axis quasisymmetric configurations (see figure 5 and table 1).Footnote 8 For all the cases analysed, remarkably, $\mathcal {T}_\delta <0$, a result that merits further investigation. As a result of this behaviour, the triangularity of the bean cross-section (see cross-sections in figure 5) is detrimental to MHD stability in most scenarios. Shaping contributes favourably only as an exception, of which the ‘new QH’ (Rodríguez et al. Reference Rodríguez, Sengupta and Bhattacharjee2022c) and ‘QH N4 Mercier’ (Landreman Reference Landreman2022) configurations are two examples. The author in Landreman (Reference Landreman2022) obtained the latter by optimising for quasisymmetry and a favourable Mercier criterion. Thus, finding the favourable contribution of triangular shaping is not surprising. The work here sheds some light on what appeared as a rarity in that paper. The ‘QH N4 well’ (Landreman Reference Landreman2022) presents a different scenario. This configuration presents a magnetic well, yet, according to our theory, it has the ‘wrong’ triangular shaping. This is of course not inconsistent, as the triangularity contribution can be detrimental, yet the configuration remain stable. What is more surprising is the fact that the triangularity of this configuration is stronger compared with a similar configuration that was not optimised for a magnetic well. Optimising for stability seems to drive, in this case, the wrong shaping from the perspective of our theory. The disagreement is resolved by realising that on top of triangularity the axis shape was also modified. The change in the latter is sufficient to overcome the detrimental contribution of triangularity in this case. This scenario is reminiscent of the behaviour observed in optimisation of equilibrium boundaries such as in Nührenberg & Zille (Reference Nührenberg and Zille1986) and Nührenberg (Reference Nührenberg2010), examples on which the intuition on stability and shaping was built. Once again, the variation of the surface ‘triangularity’ induces changes on the axis shape as well as other features in the equilibrium, explaining the potential disagreement. In the latter case a comparison with our theory is further complicated because of the variation of MHD stability properties throughout the volume and the necessary search for a near-axis description that adequately captures the behaviour of the global equilibrium near the axis. In any form, from the perspective of the near-axis analysis, the bean shaping we observe in most of the configurations in figure 5 is detrimental and thus cannot be directly driven by the stability requirement, as it opposes it. It is natural to believe that it is the requirement of quasisymmetry or some other property that pushes the configuration to develop such bean-like feature.

Figure 5. Effect of triangularity and pressure on MHD stability for some quasisymmetric stellarators. The plot shows as scatter points the factors regulating the effect of the triangularity ($\mathcal {T}_\delta$) and pressure gradient ($\mathcal {T}_{\vert p \vert }$) for several optimised quasisymmetric near-axis stellarators. The ‘precise’ QA and QH are from Landreman & Paul (Reference Landreman and Paul2022), the new QH corresponds to the new optimised stellarator example from Rodríguez et al. (Reference Rodríguez, Sengupta and Bhattacharjee2022c), while all others are from a recent publication (Landreman Reference Landreman2022). We chose those configurations with reduced $B_{20}$ variation so that the magnetic well computation, using a constant $B_{20}$, showed good agreement with the full $V''$. The cross-sections shown correspond to the $\phi =0$ cross-sections in each configuration.

Table 1. Details of the configurations in figure 5. The table includes the values of $\bar {F}$, the triangularity $\delta$, the effect of triangularity $\mathcal {T}_\delta$ and the magnetic well $V''$ for the configurations represented in figure 5. The short labels on top refer to: PQA, precise QA; PQH, precise QH (from Landreman & Paul Reference Landreman and Paul2022); NQH, new QH (from Rodríguez et al. Reference Rodríguez, Sengupta and Bhattacharjee2022c); 22QA, 2022 Qa; N3V, N3 vacuum; N4LA, N4 long axis; N4W, N4 well; N4M, N4 Mercier; N7 and N3B, N3 beta (all these from Landreman (Reference Landreman2022)). For the latter instead of the magnetic well we show the $\epsilon ^2 D_{\rm Merc}$, which shows that this finite-$\beta$ configuration is unstable.

Besides triangularity, the effect of pressure on stability is also modified in quasisymmetric configurations from that in tokamaks. In the latter, we unavoidably encountered the equilibrium stability $\beta$ limit (see (3.7a)). For a quasisymmetric stellarator, we may write the following two equivalent forms:

(4.4a)\begin{align} \frac{\bar{\iota}_0^2\mathcal{T}_{|p|}}{4\kappa^2} &= \frac{2\alpha}{(3+\alpha)-\bar{F}(1+\alpha)}- \sqrt{\alpha}\mathcal{I}[\sqrt{\alpha},\sigma] \end{align}
(4.4b)\begin{align} &={-}\frac{\alpha[(1-\sqrt{\alpha})^2-(1+\alpha) \bar{F}]}{(1+\sqrt{\alpha})[(3+\alpha)-(1+\alpha) \bar{F}]}-\sqrt{\alpha}\left(\mathcal{I}[\sqrt{\alpha}, \sigma]-\frac{\sqrt{\alpha}}{1+\sqrt{\alpha}}\right), \end{align}

where $\mathcal {I}$ is the function introduced in (2.6), and we have written the latter in a form in which the axisymmetric limit, (3.7a), is straightforward (namely $\bar {F}\rightarrow 0$ and $\mathcal {I}=\sqrt {\alpha }/(1+\sqrt {\alpha })$). The contribution of $\mathcal {I}$ is important, as it is negative and thus contributes to destabilising the stellarator for a finite plasma $\beta$. Its magnitude is bounded between $0<[\sqrt {\alpha }/(1+\sqrt {\alpha })]_{\min }\leq \mathcal {I}<1$, and thus one may take as orientative the case in which only the first fraction in (4.4b) contributes to $\mathcal {T}_{|p|}$.

The effect of $\bar {F}$, the measure of asymmetry, is shown in the right-hand plot of figure 4. The factor $\mathcal {T}_{|p|}$ is no longer necessarily negative. Thus, an increase in the pressure gradient that improves stability is possible; naively, there would be no $\beta$ limit. This lack of a stability limit at zero magnetic shear in a stellarator is not a new concept (see Hudson, Hegna & Nakajima Reference Hudson, Hegna and Nakajima2005). It could for instance lead to a configuration that is unstable at small plasma $\beta$, but becomes stable above some critical value, introducing the concept of a second stability regime. This would make reaching the finite $\beta$ equilibrium in practice difficult, but it is an attractive concept nonetheless. To picture $\mathcal {T}_{|p|}$, the integral $\mathcal {I}$ was largely simplified. Changing its contribution leads to changes in the region that satisfies $\mathcal {T}_{|p|}>0$. That region narrows when $\mathcal {I}$ is larger (tending towards the ‘Max’ curve in the plot, which assumes $\mathcal {I}=1$) and widens when it becomes weaker (in the limit $I\sim 0$ the lower bound going towards $\bar {F}\rightarrow -\infty$). In practice, the behaviour is more complex, as $\mathcal {I}$ and $\bar {F}$ (and even $\alpha$) are not completely independent. Figure 5 shows $\mathcal {T}_{|p|}$ for some quasisymmetric designs, showing that in all cases there appears to be a $\beta$ stability limit.

5. Discussion and conclusions

In this paper, we have addressed how the shaping of poloidal cross-sections is related to the MHD stability of toroidal plasmas in order to assess the common conception of positive triangularity bean shapes being favourable. We investigated axisymmetric tokamaks and quasisymmetric stellarators through a near-axis framework.

The analysis required constructing and defining conventional shaping notions such as triangularity and Shafranov shift within the inverse-coordinate near-axis-expansion framework. The work builds on Landreman & Sengupta (Reference Landreman and Sengupta2019) and differs from the so-called direct approach by Mikhailovskii & Aburdzhaniya (Reference Mikhailovskii and Aburdzhaniya1979) (or more recent efforts like that of Kim et al. (Reference Kim, Jorge and Dorland2021)). The direct involvement of the magnetic field magnitude in our framework is convenient for discussing MHD stability beyond axisymmetry.

In the tokamak limit, we reproduce and more systematically explain existing results (Freidberg Reference Freidberg2014) on how shaping (especially triangularity) affects MHD stability through the Mercier criterion. Only for vertically elongated cross-sections is positive triangularity MHD-stabilising. This dependence on elongation is a consequence of the contribution from the Shafranov shift, which wins over the destabilising effect of negative triangularity when cross-sections are horizontally elongated. The worsening of stability with increased pressure gradients and, thus, the appearance of a $\beta$ limit were also proven.

We then explored the effects of shaping and pressure in stellarator-symmetric, quasisymmetric stellarators. We expressed the stability criterion in terms of the shape of a representative up–down symmetric cross-section, which together with an axis shape is sufficient to parametrise the whole configuration. The change of stability as one changes the shape of such cross-section was then studied. In practice, when the asymmetry in the problem is taken into consideration, we show that in most cases (including all the particular examples considered) negative triangularity is stabilising, contrary to current belief. The positive triangularity bean shapes most commonly encountered in quasisymmetric stellarators thus appear to oppose stability (see figure 5), even when the configurations may be overall stable. The presence of these characteristic shapes must then correspond to a different property. Note that although we show this to hold for many existing optimised near-axis configurations, the behaviour is not necessary, and it is possible to change it by tweaking the asymmetry measure $\bar {F}$; see (4.3).

This added flexibility also exists for the effect of the pressure gradient. Unlike in the axisymmetric case, finite $\beta$ corrections can lead to a more MHD-stable configuration. Such behaviour requires particular choices of magnetic axis shapes and parameters, but is not seen in the examples considered. A deeper understanding of their feasibility requires future work on $\bar {F}$ and its relation to quasisymmetry and axis shapes.

This work suggests that the relation between cross-sections and stability in a quasisymmetric stellarator is complicated and does not conform necessarily to the need of a bean-shaped cross-section for stability. Making a general statement regarding the benefit of bean-shaped cross-sections to MHD stability in a general stellarator appears to be misleading. This is worth further exploration beyond quasisymmetry.

Figure 6. Definition of the slant angle $\nu$. Diagram showing the definition of the angle $\nu$ measuring the inclination of the magnetic axis at the origin ($\phi =0$) with the ‘laboratory’ cylindrical coordinate system. The symbols have their usual meaning.

Acknowledgements

The author would like to acknowledge fruitful discussions with C. Nührenberg, W. Sengupta, P. Helander, G. Plunk, G.R. Clark and R. Mackenbach.

Editor Peter Catto thanks the referees for their advice in evaluating this article.

Declaration of interest

The authors report no conflict of interest.

Appendix A. Mercier criterion

The Mercier criterion scalar $D_{\rm Merc}$ used in this paper can be written as $D_{\rm Merc}=D_s+D_w+D_d$ (p. 23 in Bauer et al. (Reference Bauer, Betancourt and Garabedian2012) or Landreman & Jorge (Reference Landreman and Jorge2020)):

(A1a)$$\begin{gather} D_s=\frac{1}{16{\rm \pi}^2}\left(\frac{\mathrm{d}\iota}{\mathrm{d}\psi}\right)^2 -\frac{1}{(2{\rm \pi})^4}\frac{\mathrm{d}\iota}{\mathrm{d}\psi} \int\mathrm{d}S\frac{\mu_0\boldsymbol{j}-I' \boldsymbol{B}}{|\boldsymbol{\nabla}\psi|^3}, \end{gather}$$
(A1b)$$\begin{gather}D_w=\frac{\mu_0}{(2{\rm \pi})^6}\frac{\mathrm{d}p}{\mathrm{d}\psi} \left(\frac{\mathrm{d}^2V}{\mathrm{d}\psi^2}-\mu_0 \frac{\mathrm{d}p}{\mathrm{d}\psi} \int\frac{{\rm d}S}{B^2|\boldsymbol{\nabla}\psi|}\right) \int\mathrm{d}S\frac{B^2}{|\boldsymbol{\nabla}\psi|^3}, \end{gather}$$
(A1c)$$\begin{gather}D_d=\frac{1}{(2{\rm \pi})^6}\left(\int\mathrm{d}S\frac{\mu_0 \boldsymbol{j}\boldsymbol{\cdot}\boldsymbol{B}}{|\boldsymbol{\nabla}\psi|^3}\right)^2- \frac{1}{(2{\rm \pi})^6}\left(\int\mathrm{d}S \frac{B^2}{|\boldsymbol{\nabla}\psi|^3}\right)\int\mathrm{d}S \frac{(\mu_0\boldsymbol{j}\boldsymbol{\cdot}\boldsymbol{B})^2}{B^2 |\boldsymbol{\nabla}\psi|^3}. \end{gather}$$

We reproduce this form for the sake of reference, as different forms of the Mercier criterion exist in the literature. In this case the instability criterion is $D_{\rm Merc}<0$.

Appendix B. Elliptic shaping

In this appendix, we derive in some more detail the expressions in § 3.2.1 which relate the parameters $\eta$ and $\sigma$ of the near-axis framework to the geometric properties of the elliptic cross-sections to leading order. Let us start by writing down the ellipse equation in the canonical form of a second-order polynomial. To do so we define for the leading cross-section $X=\eta \cos \chi$ and $Y=(\sin \chi +\sigma \cos \chi )/\eta$, following (3.1). To construct the ellipse equation we seek expressions for $\sin \chi$ and $\cos \chi$, so that using the fundamental trigonometric relation of $\cos ^2\chi +\sin ^2\chi =1$,

(B1)\begin{equation} X^2(1+\sigma^2)-2\eta^2\sigma XY+\eta^4Y^2=\eta^2. \end{equation}

From this form, one may then construct the rotation angle and ellipticity of the ellipse:

(B2a)$$\begin{gather} \mathcal{E}=\frac{F}{2\eta^2}\left[1+\sqrt{1- \frac{4\eta^4}{F^2}}\right], \end{gather}$$
(B2b)$$\begin{gather}\tan\vartheta=\frac{F-2\eta^4}{2\sigma\eta^2} \left[1+\sqrt{1+\frac{4\sigma^2\eta^4}{(F -2\eta^4)^2}}\right], \end{gather}$$

and $F=1+\sigma ^2+\eta ^4$. Here elongation is defined as the ratio of the major to the minor radius, and $\vartheta$ is the angle between the major radius and the positive $X$ direction.

The form of these expressions is reminiscent of a solution to a quadratic equation. In fact, one may rearrange (B2) in the following form:

(B3a)$$\begin{gather} \mathcal{E}^2-\frac{1+\sigma^2+\eta^4}{\eta^2}\mathcal{E}+1=0, \end{gather}$$
(B3b)$$\begin{gather}\varTheta^2+\frac{\eta^4-1-\sigma^2}{\sigma\eta^2}\varTheta-1=0, \end{gather}$$

where $\varTheta =\tan \vartheta$. Rearranging the latter and using the double-angle formula, we obtain

(3.2b)\begin{equation} \tan 2\vartheta=\frac{2\varTheta}{1-\varTheta^2} =\frac{2\sigma\eta^2}{\eta^4-1-\sigma^2}, \end{equation}

as used in the text. In an analogous way, and defining $\mathcal {E}=\tan e$,

(3.2a)\begin{equation} \sin 2e=\frac{2\mathcal{E}}{1+\mathcal{E}^2}= \frac{2\eta^2}{1+\sigma^2+\eta^4}. \end{equation}

We give the geometric interpretations of the angles $\vartheta$ and $e$ in figure 1.

We may also invert these relations to obtain a form for $\eta$ and $\sigma$ in the geometric $\vartheta$ and $e$. Using (3.2a) and (3.2b):

(B4a)$$\begin{gather} \sigma^2=\left(\frac{\sin 2\vartheta}{\tan 2e}\right)^2, \end{gather}$$
(B4b)$$\begin{gather}\eta^2=\frac{1+\cos2\vartheta\cos2e}{\sin2e}. \end{gather}$$

Note that these expressions agree with what we know in the up–down symmetric limit, namely that in the limit of the major radius being aligned with the curvature direction ($\vartheta \sim 0$ and $\eta >1$), then $\eta ^2=1/\mathcal {E}$, and when aligned along the binormal, $\eta ^2=\mathcal {E}$.

We remind the reader that the above is a description of the shape of the cross-section to leading order in the plane normal to the magnetic axis. In the tokamak case, this is what we call cross-sections in the ‘laboratory frame’, namely poloidal cross-sections that result from cuts of the configuration at a constant cylindrical angle. In a more general stellarator, this shape in the normal plane is not the same as in the laboratory frame. This difference reduces to a projection factor that modifies the shape of the cross-section. These changes are important to consider in the context of, for instance, quasisymmetric stellarators. With this in mind, we must consider the reinterpretation of $\eta$ as $\eta \rightarrow \eta /\kappa$ and the projection factor. Some attempts to describe the latter have been made by Landreman & Sengupta (Reference Landreman and Sengupta2018) and Rodríguez et al. (Reference Rodríguez, Sengupta and Bhattacharjee2022c), but the geometric meaning is generally obscure and complicated. In a forthcoming paper, we will present a rigorous geometric form that describes these changes. For now, we content ourselves with understanding its primary consequences, focusing on the stellarator-symmetric, quasisymmetric stellarator, particularly the cross-section at $\phi =0$. The axis at this point has, by construction, its normal aligned with the major radius. However, generally, the magnetic axis is rotated about $\hat {R}$ by an angle $\nu$ (i.e. the angle between the binormal and the vertical $\hat {z}$). From this inclination, the cross-section in the plane normal to the axis is re-scaled $Y\rightarrow Y/\cos \nu$ in the laboratory frame. The ellipse thus shrinks in the vertical direction. For the most part, this is a simple adjustment that leaves $\eta$ and $\sigma$ with most of their geometric interpretation.

Appendix C. Details of triangularity in the near-axis framework

In the main text, we assessed the effect of the shaping through second-harmonic modulation of the cross-sections. We did so in a geometrically intuitive form to motivate the relevant measure of the shaping strength and the final form of $\delta _{\rm tok}$. We did not, however, provide a derivation for the final expression for triangularity, (3.3). Filling that gap is the purpose of this appendix.

Let us commence by defining triangularity in an up–down symmetric tokamak. We write this definition as $\delta _{\rm tok}=(R_{\rm geo}-R_{{\rm upper}})/a$, where $R_{\rm geo}=(R_{\min }+R_{\max })/2$, $a=(R_{\max }-R_{\min })/2$, $R_{{\rm upper}}$ is the position of the turning point in the vertical direction and $R_{{\min }/{\max }}$ are the leftmost and outermost points of the cross-section along the symmetry line.Footnote 9 See the diagram in figure 7 for a depiction of these measures. Triangularity is the relative displacement of the vertical tips of the cross-section from the mid-point along the symmetry line.

Figure 7. Basic definitions for triangularity. The diagram defines the length scales needed to compute the triangularity of an up–downsymmetric cross-section indicated for the outermost surface. The evolution of the geometric centre $R_{\rm geo}$ from one flux surface to another defines the Shafranov shift, $\varDelta _X$, with the negative sign indicating displacement outwards.

To make rigorous contact with the near-axis modulation, consider $X$ and $Y$ (the normal and binormal directions of the cross-section) to coincide with the ‘laboratory frame’. In the tokamak context, this is, in fact, correct (taking into consideration the minus sign $X\rightarrow -R$ following the direction in which the major radius points), a notion that needs some adjustment in the more general quasisymmetric case, which we briefly touch upon at the end of this appendix. Assuming up–down symmetry, and first only keeping $X_{22}^C$ and $X_{20}$ shaping, we may find the various geometric quantities in $\delta _{\rm tok}$ straightforwardly. The points $R_{\min }$ and $R_{\max }$ are $R_{\min /\max }=1\mp \epsilon X_{11}^C-\epsilon ^2(X_{20}+X_{22}^C)$. The turning point $R_{\rm upper}$ can simply be found by requiring $\partial _\chi Y=0$, which occurs at $\chi ={\rm \pi} /2$ asymptotically, and thus $R_{\rm upper}=1-\epsilon ^2(X_{20}-X_{22}^C)$. With these results, it then follows that

(C1)\begin{equation} \delta_{\rm tok}={-}2\epsilon\frac{X_{22}^C}{X_{11}^C} \end{equation}

for a positive $X_{11}^C$. A positive value of $X_{22}^C$ then corresponds to what is known as negative triangularity (end-points of the cross-section pointing in the direction of larger $R$). We see the direct relation between $X_{22}^C$ and triangularity through the measure of strength motivated in the main text.

The effect of $Y_{22}^S$ on tokamak triangularity is analogous to that of $X_{22}^C$. In that case, we may once again compute $R_{\rm upper}$ as the position for the turning point $\partial _\chi Y=0$. Doing so yields an expression for $\cos \chi$ for the turning point, which may be expanded asymptotically in $\epsilon$, as $\cos \chi \sim 2\epsilon Y_{22}^S/Y_{11}^S$. In this limit, $R_{\rm upper}\approx 1+2\epsilon ^2X_{11}^CY_{22}^S/Y_{11}^S$. With this and the symmetry line being unaffected, $\delta _{\rm tok}\sim 2\epsilon Y_{22}^S/Y_{11}^S$. Importantly, the term is analogous to $X_{22}^C$, but with the opposite sign.

Of course, in general, these two forms of ‘triangular’ shaping coincide and thus will interact in some form to result in a net triangularity. Here the asymptotic nature of the approach becomes highly valuable. In the limit $\epsilon \rightarrow 0$, each of these contributes to the total triangularity independently:Footnote 10

(3.3)\begin{equation} \delta_{\rm tok}\approx 2\epsilon\left(\frac{Y_{22}^S}{Y_{11}^S} -\frac{X_{22}^C}{X_{11}^C}\right). \end{equation}

Before concluding this appendix, we consider the case of triangularity in quasisymmetric stellarators. The derivation above holds at every toroidal angle $\phi$ in which the cross-sections are up–down symmetric.

C.1. Projection to ‘laboratory frame’

We expect the deformation of cross-sections when going from the plane normal to the axis to the cylindrical laboratory frame to affect triangularity. After careful consideration of geometry and asymptotics, we find that the triangularity in the laboratory frame of the up–down symmetric cross-section at the origin of a quasisymmetric stellarator is

(C2)\begin{equation} \delta_{\rm lab}=\delta_{\rm tok}+\frac{\epsilon}{R_0} \left[\frac{1}{2}\left(\frac{\kappa}{\eta}\right)^3 \left(1+3\frac{\partial_\phi^2 R_0}{R_0}\right)- \frac{\eta}{\kappa}\right]\sin^2\nu, \end{equation}

where $\phi$ represents the cylindrical coordinate, $R_0$ is the radial position of the magnetic axis, $\nu$ the angle defined previously denoting the deviation of the axis binormal from $\hat {z}$ and all quantities are evaluated at the origin $\phi =0$. Of course, in the limit of $\nu =0$, the triangularity is precisely that computed before, $\delta _{\rm tok}$.

The critical realisation is that the only difference is in an order $\sin ^2\nu$ term that shifts the value of $\delta _{\rm tok}$. The difference depends solely on the shape of the axis and $\eta$, but no other higher-order quantity. A change of triangularity in the normal plane thus directly leads to an equivalent change in the laboratory frame. No rescaling occurs because triangularity is a quantity normalised to the underlying ellipse shape, which we also learnt to be deformed. The ratio remains unchanged. Thus, with this caveat, we may mostly ignore this difference when discussing the effects of increasing or decreasing triangularity, understood as a consequence of second-order choices.

C.2. Triangularity and up–down asymmetry

We constructed the notion of triangularity in the context of an up–down symmetric cross-section. Breaking this symmetry needs some adjustments in the analysis. The symmetry in the near-axis framework may be broken in two different ways. On the one hand, asymmetry could arise purely at second order from the modulation of $X_{22}^S$ and $Y_{22}^C$. As the main text argues, their effect is analogous to triangularity but in the vertical direction. Thus one may define $\delta _y$ (the vertical triangularity) as a measure of asymmetry.

The up–down symmetry may also be broken at first order whenever the elliptical cross-sections are not aligned with the Frenet–Serret basis. In that case, regular and up–down triangularity will no longer correspond to the expressions for $\delta _{\rm tok}$ and $\delta _y$. The rotation of the underlying ellipse mixes the shaping harmonics into a new linear combination. A reasonable way to define the geometry of such shapes is to define $\delta _{\rm tok}$ and $\delta _y$ not in the Frenet frame but rather in the frame of the ellipse. This change requires a mapping of the shape coefficients that takes the rotation of the ellipse $\vartheta$ into account. Defining $X'$ and $Y'$ as the rotated coordinates, and $\mathbb {C}=\cos \vartheta$ and $\mathbb {S}=\sin \vartheta$, where $\vartheta$ is the rotation angle of the ellipse as given by (3.2b), we rotate the original ellipse and define a new poloidal angle $\chi '$ so that

(C3)\begin{equation} \begin{pmatrix} X'\\ Y' \end{pmatrix}=\frac{1}{\eta}\begin{pmatrix} \sqrt{\mathbb{S}^2+(\eta^2\mathbb{C}+\sigma\mathbb{S})^2}\cos\chi' \\ \sqrt{\mathbb{C}^2+(\eta^2\mathbb{S}+\sigma\mathbb{C})^2}\sin\chi' \end{pmatrix}. \end{equation}

This expression describes a frame-aligned ellipse, a baseline we used to define triangularity in this appendix. Here $\chi '=\chi -\varTheta$, where $\tan \varTheta =-\mathbb {S}/(\eta ^2\mathbb {C}+\sigma \mathbb {S})$. We get a similar transformation for the higher order. That is, we rotate the $X_2$ and $Y_2$ components by $-\vartheta$ and re-express the harmonics in $\chi =\chi '-\varTheta$ to obtain $X_2'$ and $Y_2'$. Then we define using (3.3) and (3.4), $\delta '$ and $\delta _y'$, which will involve generally complicated linear combinations of second-order parameters. Doing so is algebraically untidy but may be accomplished using computational algebra. We do not write down the expressions here, as they do not provide much insight other than showcasing the mixing effect of the ellipse rotation. We only use some numerical examples of it in the main text.

Appendix D. Details of the generalised Shafranov shift

We introduced in the main text a definition of a generalised Shafranov shift that describes the relative displacement of cross-section centres. This generalised form was originally presented in Rodríguez et al. (Reference Rodríguez, Sengupta and Bhattacharjee2022c). The expression reduces to the axisymmetric limit as shown by Landreman & Jorge (Reference Landreman and Jorge2020). As emphasised, the arbitrariness to the centre of cross-sections extends to the definition of the Shafranov shift. This appendix will motivate the form in (3.5) taken as the definition of the Shafranov shift.

Consider a coordinate map that maps the cross-sections in the plane normal to the axis (however complicated) into circular shapes (a sort of normal form of the cross-section). Once we have performed such a mapping, we end up with circles, which have a unique centre. The transformation will generally be complicated, but it must exist, as the cross-sections are, after all, an embedding of $S^1$ in the plane.

Let us state how to achieve this at first order. The main idea will be to cast the equations describing $X$ and $Y$ in a form that explicitly gives $\cos \chi$ and $\sin \chi$. In matrix form,

(D1)\begin{equation} \begin{pmatrix} X \\ Y \end{pmatrix}=\epsilon\begin{pmatrix} X_{11}^C\cos\chi \\ Y_{11}^S(\sin\chi+\sigma\cos\chi) \end{pmatrix}=\epsilon\underbrace{\begin{pmatrix} X_{11}^C & 0 \\ \sigma Y_{11}^S & Y_{11}^S \end{pmatrix}}_{\mathcal{M}_{(1)}}\begin{pmatrix} \cos\chi \\ \sin\chi \end{pmatrix}. \end{equation}

Inverting this,

(D2)\begin{equation} \epsilon\begin{pmatrix} \cos\chi \\ \sin\chi \end{pmatrix}=\begin{pmatrix} 1/X_{11}^C & 0 \\ -\sigma/X_{11}^C & 1/Y_{11}^S \end{pmatrix}\begin{pmatrix} X \\ Y \end{pmatrix}, \end{equation}

and computing the norm provide the equation of a circle $(X')^2+(Y')^2=\epsilon ^2$, where

(D3)$$\begin{gather} X' = \frac{X}{X_{11}^C}=\bar{X}, \end{gather}$$
(D4)$$\begin{gather}Y' = \frac{Y}{Y_{11}^S}-\sigma\frac{X}{X_{11}^C}=\bar{Y}-\sigma\bar{X}. \end{gather}$$

Note that this is the same as before when defining the ellipticity and rotation angles in the previous appendix. The ellipses become circles in the transformed space $(X',Y')$.

With this leading-order procedure in mind, we may construct the ‘circles’ for the second-order shaping. To do so, we use trigonometric relations of the form $\cos 2\chi =1-2\sin ^2\chi$, to $O(\epsilon ^2)$. With that, and multiplying through $\mathcal {M}^{(1)}$,

(D5)\begin{align} &\begin{pmatrix} X' \\ Y' \end{pmatrix}-\epsilon^2\begin{pmatrix} \bar{X}_{20}+\bar{X}_{22}^C \\ \bar{Y}_{20}(1-\sigma)+\bar{Y}_{22}^C-\sigma\bar{X}_{22}^C \end{pmatrix}\nonumber\\ &\quad =\epsilon\begin{pmatrix} 1+2\epsilon\bar{X}_{22}^S\sin\chi & -2\epsilon\bar{X}_{22}^C\sin\chi \\ 2\epsilon(\bar{Y}_{22}^S-\sigma\bar{X}_{22}^S)\sin\chi & 1+2\epsilon(\sigma\bar{X}_{22}^C-\bar{Y}_{22}^C)\sin\chi \end{pmatrix}\begin{pmatrix} \cos\chi \\ \sin\chi \end{pmatrix}, \end{align}

where the overline indicates normalisation with respect to $X_{11}^C$ or $Y_{11}^S$ respectively. Inverting the matrix and keeping the relevant orders in $\epsilon$, we can define a circle $(X^*)^2+(Y^*)^2=\epsilon ^2$:

(D6)\begin{align} \begin{pmatrix} X^* \\ Y^* \end{pmatrix}&= \frac{1}{1+2\epsilon(\bar{X}_{22}^S+\sigma\bar{X}_{22}^C -\bar{Y}_{22}^C)}\nonumber\\ &\quad \begin{pmatrix} 1-2\epsilon\bar{Y}_{22}^C\sin\chi & 2\epsilon\bar{X}_{22}^C\sin\chi \\ -(\sigma+2\epsilon\bar{Y}_{22}^S\sin\chi) & 1+2\epsilon\bar{X}_{22}^S\sin\chi \end{pmatrix}\begin{pmatrix} \bar{X}-\epsilon^2(\bar{X}_{20}+\bar{X}_{22}^C) \\ \bar{Y}-\epsilon^2(\bar{Y}_{20}+Y_{22}^C) \end{pmatrix}. \end{align}

Figure 8 shows an example of this transformation. The transformation matrix reduces to the ellipse map to leading order $\epsilon$. However, it is clear from this map that cross-sections have a relative shift. From that, we may read off the Shafranov shift:

(3.5a)$$\begin{gather} \varDelta_x=X_{20}+X_{22}^C, \end{gather}$$
(3.5b)$$\begin{gather}\varDelta_y=Y_{20}+Y_{22}^C. \end{gather}$$

We refer to these as generalised Shafranov shift. It satisfies the necessary circular cross-section axisymmetric limit and holds for any $\phi$ and second-order shaping. The quantity $\varDelta _x$ is directly related to the mid-point of the cross-section around the up–down symmetry line. The shift in the $Y$ direction has a similar meaning but in the perpendicular direction. We emphasise that the approach presented is not unique, and the transformation $(X,Y)\rightarrow (X^*,Y^*)$ could have been chosen in another way. However, those forms would not generally match the axisymmetric limit.Footnote 11

Figure 8. Example of the coordinate map to define the Shafranov shift. Example showing the coordinate map transformation of a second-order shape onto concentric circles. We can obtain and identify the cross-section shift from this mapping with the Shafranov shift. The deviation in $(X^*,Y^*)$ from a circle (broken line) results from higher-order effects.

To conclude this appendix, we must briefly touch on the effect of the projection to the ‘laboratory frame’ on the Shafranov shift. Focusing on the shift $\varDelta _x$, relevant for the up–down symmetric cross-section, one may show that it remains invariant. Although effectively $X_{20}$ and $X_{22}^C$ each have a shift from the projection, these are opposed, and thus the Shafranov shift is invariant. No scaling is involved because $X$ is aligned with the major radius. Thus we expect to find a change on $\varDelta _y$. These changes are particularly complex, as not only does the projection involve the $1/\cos \nu$ scaling, but the components of $Z_2$ are also involved. Thankfully we do not need to consider this.

Appendix E. Governing near-axis equations

In order to relate the near-axis shaping to $|\boldsymbol {B}|$ harmonics and other natural near-axis elements, it is necessary to know the expressions that relate them. These come from the asymptotic expansion in powers of the distance from the magnetic axis of the magnetic field and its governing equilibrium and magnetic equations. The original works by Garren & Boozer (Reference Garren and Boozer1991a,Reference Garren and Boozerb) and Landreman & Sengupta (Reference Landreman and Sengupta2019) are good places for reference of these equations, while Rodríguez & Bhattacharjee (Reference Rodríguez and Bhattacharjee2021a) gives a more general form of the description beyond equilibria with isotropic pressure. We here use the notation in Landreman & Sengupta (Reference Landreman and Sengupta2019).

For completeness, we write down the expressions for the quasisymmetric case (which includes axisymmetry as a particular case). Following the notation of (2.1), the expansion components of position functions have the form

(E1)\begin{equation} X = \epsilon X_{11}^C\cos\chi+\epsilon^2(X_{20}+ X_{22}^C\cos2\chi+X_{22}^S\sin2\chi), \end{equation}

and similarly for $Y$ and $Z$.

The $X_2$ components come from the requirements on $|\boldsymbol {B}|$ and the Jacobian (see (A34) and (A36) in Landreman & Sengupta (Reference Landreman and Sengupta2019) or Appendix C in Rodríguez & Bhattacharjee (Reference Rodríguez and Bhattacharjee2021a)):

(E2a) \begin{align} X_{2,0}&=\frac{1}{4l' \kappa }[l' \kappa ^2 X_{1,1}^C{}^2 +(l'\tau^2+\iota _0^2/l') (X_{1,1}^C{}^2+Y_{1,1}^C{}^2 +Y_{1,1}^S{}{}^2)-2 \tau Y_{1,1}^C X_{1,1}^C{}'\nonumber\\ &\quad +2 \tau X_{1,1}^C Y_{1,1}^C{}'+2 (\iota _0/l') (2l' \tau X_{1,1}^C Y_{1,1}^S{}+Y_{1,1}^S{} Y_{1,1}^C{}'-Y_{1,1}^C Y_{1,1}^S{}')\nonumber\\ &\quad +X_{1,1}^C{}'{}^2+Y_{1,1}^C{}'{}^2+Y_{1,1}^S{}'{}^2 +4 Z_{20}']\nonumber\\ &\quad +\frac{1}{ B_0^3 (l')^2 \kappa } \left[G_0^2 \left(B_{20}-\frac{3}{4} B_0 \eta ^2\right) - B_0 G_0 (G_1+\iota_0I_1)\right],\end{align}
(E2b) \begin{align} X_{2,2}^C&=\frac{1}{4\kappa}\left[4\frac{B_{22}^C}{B_0} -3\eta^2+\kappa^2(X_{11}^C)^2+(\tau^2-(\bar{\iota}_0/l')^2) ((X_{11}^C)^2+(Y_{11}^C)^2-(Y_{11}^S)^2)\right.\nonumber\\ &\quad +\frac{1}{(l')^2}({(X_{11}^C)'}^2+{(Y_{11}^C)'}^2 -{(Y_{11}^S)'}^2)-\frac{2\tau}{l'} Y_{11}^C{X_{11}^C}' +\frac{2\tau}{l'} X_{11}^C{Y_{11}^C}'\nonumber\\ &\quad +\left.\frac{2\bar{\iota}_0}{(l')^2}(Y_{11}^S{Y_{11}^C}' +Y_{11}^C{Y_{11}^S}')+\frac{8\bar{\iota}_0}{l'}Z_{22}^S +\frac{4}{l'}{Z_{22}^C}'\right],\end{align}
(E2c)\begin{align} X_{2,2}^S&=\frac{1}{2\kappa}\left[2\frac{B_{22}^S}{B_0} +(\tau^2-(\bar{\iota}_0/l')^2)Y_{11}^CY_{11}^S-\frac{\tau}{l'} (Y_{11}^S{X_{11}^C}'-X_{11}^C{Y_{11}^S}')\right.\nonumber\\ &\quad +\left.\frac{1}{(l')^2}{Y_{11}^S}'{Y_{11}^C}'- \frac{\bar{\iota}_0}{(l')^2}(X_{11}^C{X_{11}^C}'+Y_{11}^Y{Y_{11}^C}' -Y_{11}^S{Y_{11}^S}')+\frac{4\bar{\iota}_0}{l'}Z_{22}^C +\frac{2}{l'}{Z_{22}^S}'\right], \end{align}

where we define the pressure gradient to include the constant factor $\mu _0=4{\rm \pi} \times 10^{-7}$ often shown explicitly, and we use the shorthand $l'=\mathrm {d}l/\mathrm {d}\phi$. Here (see (A27)–(A29) in Landreman & Sengupta (Reference Landreman and Sengupta2019) or (24) in Rodríguez & Bhattacharjee (Reference Rodríguez and Bhattacharjee2021a)),

(E3a)$$\begin{gather} {Z}_{20}=\frac{1}{4\eta^2\kappa^3l'} [\eta^4\kappa'-\kappa^4(\kappa'(1+\sigma^2)+\kappa\sigma\sigma')], \end{gather}$$
(E3b)$$\begin{gather}Z_{2,2}^S=\frac{1}{4\eta^2\kappa^2l'}[\eta^4\bar{\iota}_0 +\kappa^3(\bar{\iota}_0\kappa(\sigma^2-1)-2\sigma\kappa' -\kappa\sigma')], \end{gather}$$
(E3c)$$\begin{gather}Z_{2,2}^C=\frac{1}{4\eta^2\kappa^3l'}[{-}2\bar{\iota}_0 \kappa^5\sigma+\eta^4\kappa'-\kappa^4(\kappa'(\sigma^2-1) +\kappa\sigma\sigma')], \end{gather}$$

which follow from the divergenceless and flux surface nature of the field. The shapes $\{X_2\}$ and the magnetic field harmonics $\{B_2\}$ are intimately related.

Then (see (A25) and (A26) in Garren & Boozer (Reference Garren and Boozer1991a) or (27) and (28) in Rodríguez & Bhattacharjee (Reference Rodríguez and Bhattacharjee2021a)),

(E4a)$$\begin{gather} \tilde{Y}_{2,2}^C=\frac{\kappa^2}{\eta^2} [(X_{2,2}^C-\tilde{X}_{2,0})\sigma+X_{2,2}^S], \end{gather}$$
(E4b)$$\begin{gather}Y_{2,2}^S={-}\frac{\kappa}{2}-\frac{\kappa}{\eta^2} [(X_{2,2}^C+\tilde{X}_{2,0})-X_{2,2}^S\sigma], \end{gather}$$

where $Y_{2,2}^C=Y_{2,0}+\tilde {Y}_{2,2}^C$ and (see Rodríguez & Bhattacharjee (Reference Rodríguez and Bhattacharjee2021a,Reference Rodríguez and Bhattacharjeeb) in the isotropic limit)

(E5)\begin{align} Y_{20}&=\frac{1}{2 \bar{\iota}_0 \kappa^2} \left[4l'\eta^2 (\tilde{Y}_{22}^C Z_{22}^S+Y_{22}^S ({Z}_{20}-Z_{22}^C))+\eta ^2 \tilde{Y}_{22}^C \left(2\frac{I_2}{B_0}-\tau\right) l'\right.\nonumber\\ &\quad +\eta ^2 {X_{22}^C}' -\kappa l'Z_{20} (\eta ^2-4 \kappa (X_{22}^C-\sigma X_{22}^S))-4l' \kappa^2 \sigma X_{22}^C Z_{22}^S-4l'\kappa^2 X_{20} Z_{22}^C\nonumber\\ &\quad+4l' \kappa^2 \sigma X_{20} Z_{22}^S+2 \eta ^2 \iota _0 X_{22}^S +4l'\kappa^2 \sigma X_{22}^S Z_{22}^C+\eta ^2 \kappa l' Z_{22}^C- \eta ^2 X_{20}{}'\nonumber\\ &\quad+\left.\kappa^2 \left((\sigma X_{20} - \sigma X_{22}^C- X_{22}^S) \left(2\frac{I_2}{B_0}-\tau\right)l'+ \sigma \tilde{Y}_{22}^C{}'-2 \iota _0 (\tilde{Y}_{22}^C-\sigma Y_{22}^S) + Y_{22}^S{}'\right)\right]. \end{align}

Finally we have the self-consistent equilibrium condition which in an ideally quasisymmetric case reads (see Rodríguez Reference Rodríguez2022), using the shorthand $\tilde {\tau }=\tau -I_2/B_0$,

(E6)\begin{equation} 4\mathcal{C}\left(-\frac{B_{20}}{B_0}+\frac{3\eta^2}{4}\right) +\mathcal{D}=0,\end{equation}

where

(E7a)$$\begin{gather} \mathcal{C}={-}\frac{1}{G_0\eta^3\kappa^2} [\bar{\iota}_0(\kappa^4(1+\sigma^2)-3\eta^4) -4l'\eta^2\kappa^2\tilde{\tau}], \end{gather}$$
(E7b)$$\begin{gather}\mathcal{D}= \frac{\mathcal{D}_{{-}1}}{\bar{\iota}_0} +\mathcal{D}_0+\bar{\iota}_0 \mathcal{D}_1+\bar{\iota}_0^2 \mathcal{D}_2+\bar{\iota}_0^3 \mathcal{D}_3, \end{gather}$$

where

(E8a) \begin{align} \mathcal{D}_{{-}1}&={-}\frac{8\kappa^2}{G_0\eta} \frac{\mathrm{d}}{\mathrm{d}\phi}\left\{\frac{1}{\kappa^2} \frac{\mathrm{d}}{\mathrm{d}\phi}\left[\tilde{\tau}^2+ \frac{1}{(l')^2}\left(\frac{\kappa'}{\kappa}\right)^2 +\frac{\kappa^2}{4}\right]\right\},\end{align}
(E8b) \begin{align} \mathcal{D}_0&=\frac{48B_{22}^S}{B_0^2}\left(\frac{\sigma\tilde{\tau}}{\eta} +\frac{\eta\kappa'}{l'\kappa^3}\right)+\frac{48\tilde{\tau}}{B_0\eta} \left(-\frac{B_{22}^C}{B_0}+\frac{3\eta^2}{4}\right) +\frac{16B_{\alpha1}\tilde{\tau}}{\eta B_{\alpha0}B_0}\nonumber\\ &\quad+\frac{8\eta}{\kappa^4B_0}\left[{-}4\kappa^4 \tilde{\tau}+3\kappa^2\tilde{\tau}^3+8\tilde{\tau} \left(\frac{\kappa'}{l'}\right)^2-\frac{\kappa}{(l')^2} ({-}9\kappa'\tilde{\tau}'+5\tilde{\tau}\kappa'')\right.\nonumber\\ &\quad \left.-2\kappa^2 \frac{\tilde{\tau}''}{(l')^2}\right]+\frac{4\sigma}{G_0\eta\kappa^4}\left[{-}3\kappa^5\kappa' +24\kappa\frac{(\kappa')^3}{(l')^2}-10\kappa^4\tilde{\tau}\tilde{\tau}'\right.\nonumber\\ &\quad \left.-30\kappa^2\kappa'\frac{\kappa''}{(l')^2}-2\kappa^3 \left(\tilde{\tau}^2\kappa'-2\frac{\kappa^{(3)}}{(l')^2}\right)\right]\nonumber\\ &\quad +\frac{2I_2^2}{B_0 \eta\kappa^2} \left(-\eta^2 \tilde{\tau} +\sigma \kappa \frac{\kappa'}{l'}\right)+\frac{4\eta I_2}{B_0 \kappa^4} \left(- \kappa^4 + 2 \kappa^2 \tilde{\tau}^2 + 2 \frac{(\kappa')^2}{(l')^2}\right),\end{align}
(E8c) \begin{align} G_0\mathcal{D}_1&=12\left(-\frac{B_{22}^C}{B_0}+\frac{3\eta^2}{4}\right) \left(\frac{3\eta}{\kappa^2}+\frac{\kappa^2}{\eta^3}(1-\sigma^2) \right)+\frac{4B_{\alpha1}}{G_0}\left(\frac{3\eta}{\kappa^2}- \frac{\kappa^2}{\eta^3}(1+\sigma^2)\right)\nonumber\\ &\quad +\frac{24\kappa^2\sigma}{\eta^3}\frac{B_{22}^S}{B_0}- \frac{1}{\eta\kappa^6}\left[4\kappa^4 (2\kappa^4+5\eta^4)+4\kappa^2\tilde{\tau}^2 (\kappa^4+6\eta^4)\right.\nonumber\\ &\quad +\left.12\left(\frac{\kappa'}{l'}\right)^2 (8\eta^4-5\kappa^4)+8\kappa\frac{\kappa''}{(l')^2} (\eta^4+4\kappa^4)\right]-\frac{16\sigma\eta}{l'\kappa^3}(8\tilde{\tau} \kappa'+\kappa\tilde{\tau}')\nonumber\\ &\quad +\frac{8\sigma^2}{\eta\kappa^2} \left(2\kappa^4+\kappa^2\tilde{\tau}^2+6 \left(\frac{\kappa'}{l'}\right)^2+\kappa \frac{\kappa''}{(l')^2}\right)\nonumber\\ &\quad -\frac{I_2^2}{ \eta \kappa^4} [2 \eta^4 + \kappa^4 ({-}1 + 2 \sigma^2)]-\frac{16\eta I_2}{\kappa^4} \left(- \eta^2 \tilde{\tau} + \sigma\kappa \frac{\kappa'}{l'}\right),\end{align}
(E8d) \begin{align} l'G_0\mathcal{D}_2&={-}\frac{16\eta\tilde{\tau}}{\kappa^2} \left(\frac{3\eta^4}{\kappa^4}+5\right)- \frac{32\sigma\kappa'}{l'\kappa\eta}\left(\frac{\eta^4}{\kappa^4}+1\right)- \frac{16\eta\tilde{\tau}\sigma^2}{\kappa^2}- \frac{64\kappa'\sigma^3}{l'\eta\kappa}\nonumber\\ &\quad +\frac{8\eta I_2}{\kappa^6} (\eta^4 + \kappa^4 \sigma^2), \end{align}
(E8e) \begin{align} \mathcal{D}_3G_0(l')^2&={-}\frac{4}{\eta}\left(4+\frac{4\eta^8}{\kappa^8} +\frac{11\eta^4}{\kappa^4}\right)-\frac{4\sigma^2}{\eta} \left(7+\frac{4\eta^4}{\kappa^4}\right). \end{align}

The expressions for the quasisymmetric limit can be found in Landreman & Jorge (Reference Landreman and Jorge2020) explicitly.

Appendix F. Extra terms for Mercier stability in a quasisymmetric stellarator

If one was to write the form of the Mercier criterion in an ideal quasisymmetric stellarator using the pressure gradient and the triangularity shaping on the up–down symmetric cross-section at the origin as free parameters, then we may write

(4.1)\begin{equation} \frac{\epsilon^2{\rm \pi}^2 D_{\rm Merc}}{|p_2|G_0^2}=\mathcal{T}_{|p|}|p_2|+\mathcal{T}_\delta \delta+\varLambda, \end{equation}

where $\varLambda =\varLambda _2+\varLambda _0+\varLambda _{-2}$:

(F1) \begin{align} \varLambda_2&=\frac{1}{\eta^2\iota_0\kappa^6(3\eta^4 + 5\kappa^4) - 4\eta^4\kappa^8(I_2-\tau)}[\iota_0^3(\eta^4 + \kappa^4)(32\eta^8 + 11\eta^4\kappa^4-3\kappa^8) \nonumber\\ &\quad +4\eta^2\kappa^6\tau(I_2-\tau)( 20\eta^4I_2-3(5\eta^4 + \kappa^4)\tau) -2\eta^2\iota_0^2\kappa^2(4(16\eta^8 + 8\eta^4\kappa^4 - 3\kappa^8)I_2 \nonumber\\ &\quad -(75\eta^8 + 50\eta^4\kappa^4 - 9\kappa^8)\tau) + \iota_0\kappa^4((201\eta^8 + 20\eta^4\kappa^4 + 3\kappa^8)\tau^2 \nonumber\\ &\quad + 20\eta^4({-}17\eta^4 + \kappa^4)\tau I_2 + 16\eta^4(8\eta^4 - 3\kappa^4)I_2^2)], \end{align}
(F2) \begin{align} \varLambda_0&=\frac{\eta^4\iota_0^2\kappa^3({-}5\eta^4 + \kappa^4) + 4\eta^6\iota_0\kappa^5(\tau +3I_2)}{\eta^2\iota_0\kappa^3(\iota_0(3\eta^4 + 5\kappa^4) + 4\eta^2\kappa^2(\tau - I_2))} \nonumber\\ &\quad +\frac{\iota_0({-}11\eta^8 + 46\eta^4\kappa^4 - 3\kappa^8) + 4\eta^2\kappa^2(11\eta^4 - 3\kappa^4)(\tau - I_2)}{\eta^2\kappa^3(\iota_0(3\eta^4 + 5\kappa^4) + 4\eta^2\kappa^2(\tau - I_2))}\kappa'' \nonumber\\ &\quad -\frac{32\eta^2[-\eta^2\iota_0 - \kappa^2(\tau - I_2)]}{\iota_0(\iota_0(3\eta^4 + 5\kappa^4) + 4\eta^2\kappa^2(\tau - I_2))}\tau'', \end{align}
(F3) \begin{align} \varLambda_{{-}2}&= \frac{8\eta^2\kappa''(\kappa^3 + 4\kappa'')}{\iota_0(\iota_0(3\eta^4 + 5\kappa^4) + 4\eta^2\kappa^2(\tau - I_2))}, \end{align}

and the subscript denotes the scaling with rotational transform (or similar elements such as $\tau$ and $I_2$). We write these expressions using a normalised and scaled-out version of the equations, which eases notation. In this notation, to convert to their full explicit form, $\kappa$ and $\tau$ should be divided and $\eta$ multiplied by a factor of $\mathrm {d}l/\mathrm {d}\phi$. The current $I_2$ should be divided by $\mathrm {d}l/\mathrm {d}\phi$, as we assume $G_0=\mathrm {d}l/\mathrm {d}\phi$. The expression for $\varLambda$ should be then divided by $(\mathrm {d}l/\mathrm {d}\phi )^2$ to express it in a form consistent with the other terms in (4.1). All quantities are evaluated at $\phi =0$, the location of the up–down symmetric cross-section of choice in our stellarator-symmetric configuration. Note that whenever the denominators are small, the near-axis model will be very sensitive to change.

If, instead of triangularity, we were to express the Shafranov shift explicitly, then we obtain

(F4)\begin{equation} \mathcal{T}_\varDelta=3\kappa\frac{(\alpha-1) +\bar{F}(1+\alpha)}{\alpha-\bar{F}(1+\alpha)}, \end{equation}

which reduces to the axisymmetric limit when $\bar {F}\rightarrow 0$. Note that the tendency of the configuration will be for $\mathcal {T}_\varDelta <0$, as this is the limit for a significant asymmetry $\bar {F}$. Unlike in the case of triangularity, this is the typical behaviour in a tokamak with vertical elongation. Bunching of surfaces on the inboard side (that is, $\varDelta <0$) increases stability. Of course, there is a region in $(\alpha, \bar {F})$ space in which $\mathcal {T}_\varDelta >0$. Thus, the behaviour of a tokamak for a horizontally elongated cross-section may also be, in principle, achieved with the appropriate axis and parameter combination.

Appendix G. Validity of ideal quasisymmetric assumption

To construct our analytic measure of stability, and understand the contribution of triangularity in quasisymmetric configurations, we took the simplifying assumption of ideal quasisymmetry. That is, we assumed $B_{20}$ to be constant. In practice, optimised quasisymmetric configurations such as those in figure 5 are not ideal. That is to say, they all have a finite variation in $B_{20}(\phi )$. As presented in the main text, this means that there will be a mismatch between the estimate of stability from the ideal analysis and the full approach.

To back the validity of figure 5 we should thus provide evidence of the ideal consideration being a fair descriptor of the stability. We present in figure 9 a comparison between the magnetic well evaluated using the full near-axis form and the idealised scenario representing the stellarator by its up–down cross-section at $\phi =0$ (the cross-sections shown in figure 5, at $\phi =0$ as defined in the relevant papers). Only cases that showed agreement were kept, as only in those cases do we expect the analysis to be trustworthy.

Figure 9. Comparison of the magnetic well criterion between the full near-axis and idealised evaluation. The plot compares the magnetic well criterion $V''$ for the configurations in figure 5 assessed using the full near-axis description ($V''$) and the idealised quasisymmetric limit ($V''_{\rm ideal}$). The plot shows excellent agreement (within 30 % in all cases).

Footnotes

1 This condition follows from assessing the existence of turning points in $X$, $\partial _\chi (X_{11}^C\cos \chi +\epsilon X_{22}^C\cos 2\chi )\stackrel {!}{=}0$, so that $\cos \chi =-X_{11}^C/4\epsilon X_{22}^C$ will only have real solutions for $\epsilon X_{22}^C/X_{11}^C\geq 1/4$. Note that the dimple may appear on either the inboard or outboard side, depending on the sign of $X_{22}^c$ and, thus, the sense of the bean shape.

2 In Freidberg (Reference Freidberg2014), the author uses a different notation from that presented here. For reference, $q_0=1/\iota _0$, $\kappa =1/\eta ^2$, $\epsilon _{\rm Freid}=\eta \epsilon$ and $\beta _p=\kappa |p_2|/\iota _0^2(1+\kappa ^2)$. The qualitative argument for the stability behaviour is related to the field lines spending longer on the good curvature region. That may be related to the growth in $|\boldsymbol {B}|$, as the good curvature region is the high-field side. However, as we have seen, stability results from balancing the opposing behaviour of triangularity and Shafranov shift.

3 The $\beta$ limit occurs when increasing the pressure gradient and keeping triangularity fixed. This is a limit that is independent of the aspect ratio of the configuration.

4 The lack of a unifying theory on the set of choices that conforms to quasisymmetry makes us refer to the axis shapes and their properties in most generality here. Only through some illustrating examples will the behaviour for the quasisymmetric subset be explored.

5 To draw the analogy, some elements need to be amended, such as $\eta \rightarrow \eta /\kappa$. It is important to realise that there is, however, an additional geometric effect that deforms cross-sections further in this more general case compared with the axisymmetric one. That deformation comes from the plane normal to a general magnetic axis, where cross-sections are particularly simple, not matching constant cylindrical angle planes (what may be referred to as the ‘laboratory frame’) where cross-sections are generally defined. The effect is a deformation of shapes, as described partially in Appendices B, C and D. The details will appear in a future publication, but they do not affect in any significant way the discussion to follow.

6 Under stellarator symmetry, $\phi \rightarrow -\phi$ and $z\rightarrow -z$, which requires the axis at the origin $\phi =0$ to be normal to $\hat {R}$.

7 Note that in practice, one must also keep quasisymmetry, and thus the thought experiment can only be performed approximately. One may still talk about the contribution of triangularity to stability formally, as one may think of the limiting effect of a small change in $\delta$ (i.e. the derivative).

8 The configurations are described in the respective work, and we are here considering the cross-sections at $\phi =0$, stellarator symmetry points as defined in those. The cross-sections are shown in figure 5.

9 Note that these are not the same as the minimum and maximum radial positions when the triangularity is large enough to form a bean shape. In that case, we consider the positions along the symmetry line. This choice is unnecessary in most of the tokamak literature, as it rarely considers bean shapes.

10 The change to the vertical turning point is of order $\epsilon$, and thus $X_{22}^C$ effects would only be affected at order $\epsilon ^3$ (one order too high). Similarly, in reverse.

11 An example of this occurs if we express the matrix representing the linear transformation in terms of sines. To do so, we must use the corresponding form of the double-angle formulas, and we end up getting a shift $X_{20}-X_{22}^C$, which makes no geometric sense.

References

Anderson, F.S., Almagri, A.F., Anderson, D.T., Matthews, P.G., Talmadge, J.N. & Shohet, J.L. 1995 Helically symmetric experiment, (HSX) goals, design and status. Fusion Technol. 27.CrossRefGoogle Scholar
Bader, A., Drevlak, M., Anderson, D.T., Faber, B.J., Hegna, C.C., Likin, K.M., Schmitt, J.C. & Talmadge, J.N. 2019 Stellarator equilibria with reactor relevant energetic particle losses. J. Plasma Phys. 85 (5), 905850508.CrossRefGoogle Scholar
Bauer, F., Betancourt, O. & Garabedian, P. 2012 Magnetohydrodynamic Equilibrium and Stability of Stellarators. Springer Science & Business Media.Google Scholar
Beidler, C., Grieger, G., Herrnegger, F., Harmeyer, E., Kisslinger, J., Lotz, W., Maassberg, H., Merkel, P., Nührenberg, J., Rau, F., et al. 1990 Physics and engineering design for wendelstein VII-X. Fusion Technol. 17 (1), 148168.CrossRefGoogle Scholar
Bernardin, M.P., Moses, R.W. & Tataronis, J.A. 1986 Isodynamical (omnigenous) equilibrium in symmetrically confined plasma configurations. Phys. Fluids 29 (8), 26052611.CrossRefGoogle Scholar
Boozer, A.H. 1981 Plasma equilibrium with rational magnetic surfaces. Phys. Fluids 24 (11), 19992003.CrossRefGoogle Scholar
Boozer, A.H. 1983 Transport and isomorphic equilibria. Phys. Fluids 26 (2), 496499.CrossRefGoogle Scholar
Boozer, A.H. 1998 What is a stellarator? Phys. Plasmas 5 (5), 16471655.CrossRefGoogle Scholar
Burby, J.W., Kallinikos, N. & MacKay, R.S. 2020 Some mathematics for quasi-symmetry. J. Math. Phys. 61 (9), 093503.CrossRefGoogle Scholar
Cary, J.R. & Shasharina, S.G. 1997 Omnigenity and quasihelicity in helical plasma confinement systems. Phys. Plasmas 4 (9), 33233333.CrossRefGoogle Scholar
Connor, J., Hastie, R. & Taylor, J. 1978 Shear, periodicity, and plasma ballooning modes. Phys. Rev. Lett. 40 (6), 396.CrossRefGoogle Scholar
Correa-Restrepo, D. 1978 Ballooning modes in three-dimensional mhd equilibria with shear. Z. Naturforsch. A 33 (7), 789791.CrossRefGoogle Scholar
Dewar, R.L. & Glasser, A. 1983 Ballooning mode spectrum in general toroidal systems. Phys. Fluids 26 (10), 30383052.CrossRefGoogle Scholar
Freidberg, J.P. 2014 Ideal MHD. Cambridge University Press.CrossRefGoogle Scholar
Garabedian, P.R. 2008 Three-dimensional analysis of tokamaks and stellarators. Proc. Natl Acad. Sci. 105 (37), 1371613719.CrossRefGoogle ScholarPubMed
Garren, D.A. & Boozer, A.H. 1991 a Existence of quasihelically symmetric stellarators. Phys. Fluids B: Plasma Phys. 3 (10), 28222834.CrossRefGoogle Scholar
Garren, D.A. & Boozer, A.H. 1991 b Magnetic field strength of toroidal plasma equilibria. Phys. Fluids B: Plasma Phys. 3 (10), 28052821.CrossRefGoogle Scholar
Grad, H. 1967 Toroidal containment of a plasma. Phys. Fluids 10 (1), 137154.CrossRefGoogle Scholar
Greene, J.M. 1997 A brief review of magnetic wells. Comments on Plasma Phys. Control. Fusion 17, 389402.Google Scholar
Greene, J.M. & Johnson, J.L. 1962 Stability criterion for arbitrary hydromagnetic equilibria. Phys. Fluids 5 (5), 510517.CrossRefGoogle Scholar
Hall, L.S. & McNamara, B. 1975 Three-dimensional equilibrium of the anisotropic, finite-pressure guiding-center plasma: theory of the magnetic plasma. Phys. Fluids 18 (5), 552565.CrossRefGoogle Scholar
Helander, P. 2014 Theory of plasma confinement in non-axisymmetric magnetic fields. Rep. Prog. Phys. 77 (8), 087001.CrossRefGoogle ScholarPubMed
Henneberg, S.A., Helander, P. & Drevlak, M. 2021 Representing the boundary of stellarator plasmas. J. Plasma Phys. 87 (5).CrossRefGoogle Scholar
Hudson, S., Hegna, C. & Nakajima, N. 2005 Influence of pressure-gradient and shear on ballooning stability in stellarators. Nucl. Fusion 45 (4), 271.CrossRefGoogle Scholar
Jorge, R. & Landreman, M. 2020 The use of near-axis magnetic fields for stellarator turbulence simulations. Plasma Phys. Control. Fusion 63 (1), 014001.CrossRefGoogle Scholar
Jorge, R., Sengupta, W. & Landreman, M. 2020 Near-axis expansion of stellarator equilibrium at arbitrary order in the distance to the axis. J. Plasma Phys. 86 (1).CrossRefGoogle Scholar
Kim, P., Jorge, R. & Dorland, W. 2021 The on-axis magnetic well and mercier's criterion for arbitrary stellarator geometries. J. Plasma Phys. 87 (2).CrossRefGoogle Scholar
Landreman, M. 2021 Figures of merit for stellarators near the magnetic axis. J. Plasma Phys. 87 (1), 905870112.CrossRefGoogle Scholar
Landreman, M. 2022 Mapping the space of quasisymmetric stellarators using optimized near-axis expansion. Preprint, arXiv:2209.11849.Google Scholar
Landreman, M. & Catto, P.J. 2012 Omnigenity as generalized quasisymmetry. Phys. Plasmas 19 (5), 056103.CrossRefGoogle Scholar
Landreman, M. & Jorge, R. 2020 Magnetic well and mercier stability of stellarators near the magnetic axis. J. Plasma Phys. 86 (5), 905860510.CrossRefGoogle Scholar
Landreman, M. & Paul, E. 2022 Magnetic fields with precise quasisymmetry for plasma confinement. Phys. Rev. Lett. 128 (3), 035001.CrossRefGoogle ScholarPubMed
Landreman, M. & Sengupta, W. 2018 Direct construction of optimized stellarator shapes. Part 1. Theory in cylindrical coordinates. J. Plasma Phys. 84 (6), 905840616.CrossRefGoogle Scholar
Landreman, M. & Sengupta, W. 2019 Constructing stellarators with quasisymmetry to high order. J. Plasma Phys. 85 (6), 815850601.CrossRefGoogle Scholar
Lortz, D. & Nührenberg, J. 1976 Equilibrium and stability of a three-dimensional toroidal mhd configuration near its magnetic axis. Z. Naturforsch. A 31 (11), 12771288.CrossRefGoogle Scholar
Lortz, D. & Nührenberg, J. 1978 Ballooning stability boundaries for the large-aspect-ratio tokamak. Phys. Lett. A 68 (1), 4950.CrossRefGoogle Scholar
Mercier, C. 1962 Critère de stabilité d'un système toroïdal hydromagnétique en pression scalaire. Nucl. Fusion Suppl. 2, 801.Google Scholar
Mercier, C. 1974 Lectures in Plasma Physics: The Magnetohydrodynamic Approach to the Problem of Plasma Confinement in Closed Magnetic Configurations. Luxembourg Commission European Communities.Google Scholar
Mikhailovskii, A. & Aburdzhaniya, K.D. 1979 Mercier criterion for a finite-pressure plasma in arbitrary-shaped magnetic axis configurations. Plasma Phys. 21 (2), 109.CrossRefGoogle Scholar
Mukhovatov, V. & Shafranov, V. 1971 Plasma equilibrium in a tokamak. Nucl. Fusion 11 (6), 605.CrossRefGoogle Scholar
Mynick, H.E. 2006 Transport optimization in stellarators. Phys. Plasmas 13 (5), 058102.CrossRefGoogle Scholar
Najmabadi, F., Raffray, A., Abdel-Khalik, S., Bromberg, L., Crosatti, L., El-Guebaly, L., Garabedian, P., Grossman, A., Henderson, D., Ibrahim, A., et al. 2008 The ARIES-CS compact stellarator fusion power plant. Fusion Sci. Technol. 54 (3), 655672.CrossRefGoogle Scholar
Nührenberg, J. 2010 Development of quasi-isodynamic stellarators. Plasma Phys. Control. Fusion 52 (12), 124003.CrossRefGoogle Scholar
Nührenberg, J. & Zille, R. 1986 Stable stellarators with medium $\beta$ and aspect ratio. Phys. Lett. A 114 (3), 129132.CrossRefGoogle Scholar
Nührenberg, J. & Zille, R. 1988 a Proceedings of the International School of Plasma Physics on Theory of Fusion Plasmas, Varenna, 1987.Google Scholar
Nührenberg, J. & Zille, R. 1988 b Quasi-helically symmetric toroidal stellarators. Phys. Lett. A 129 (2), 113117.CrossRefGoogle Scholar
Rhodes, D.J. 2017 Shaping Effects on Magnetohydrodynamic Instabilities in a Tokamak Plasma Surrounded by a Resistive Wall. Columbia University.Google Scholar
Rodríguez, E. 2022 Quasisymmetry. PhD thesis.Google Scholar
Rodríguez, E. & Bhattacharjee, A. 2021 a Solving the problem of overdetermination of quasisymmetric equilibrium solutions by near-axis expansions. I. Generalized force balance. Phys. Plasmas 28 (1), 012508.CrossRefGoogle Scholar
Rodríguez, E. & Bhattacharjee, A. 2021 b Solving the problem of overdetermination of quasisymmetric equilibrium solutions by near-axis expansions. II. Circular axis stellarator solutions. Phys. Plasmas 28 (1), 012509.CrossRefGoogle Scholar
Rodríguez, E., Helander, P. & Bhattacharjee, A. 2020 Necessary and sufficient conditions for quasisymmetry. Phys. Plasmas 27 (6), 062501.CrossRefGoogle Scholar
Rodríguez, E., Paul, E. & Bhattacharjee, A. 2022 a Measures of quasisymmetry for stellarators. J. Plasma Phys. 88 (1), 905880109.CrossRefGoogle Scholar
Rodríguez, E., Sengupta, W. & Bhattacharjee, A. 2021 Generalized boozer coordinates: a natural coordinate system for quasisymmetry. Phys. Plasmas 28 (9), 092510.CrossRefGoogle Scholar
Rodríguez, E., Sengupta, W. & Bhattacharjee, A. 2022 b Phases and phase-transitions in quasisymmetric configuration space. Plasma Phys. Control. Fusion 64 (10), 105006.CrossRefGoogle Scholar
Rodríguez, E., Sengupta, W. & Bhattacharjee, A. 2022 c Topology-mediated approach to the design of quasisymmetric stellarators. Preprint, arXiv:2204.10234.Google Scholar
Schuller, F. 1995 Disruptions in tokamaks. Plasma Phys. Control. Fusion 37 (11A), A135.CrossRefGoogle Scholar
Shafranov, V. 1963 Equilibrium of a toroidal pinch in a magnetic field. Sov. At. Energy 13 (6), 11491158.CrossRefGoogle Scholar
Shafranov, V. 1983 Magnetohydrodynamic theory of plasma equilibrium and stability in stellarators: survey of results. Phys. Fluids 26 (2), 357364.CrossRefGoogle Scholar
Solov'ev, L.S. & Shafranov, V.D. 1970 Reviews of Plasma Physics 5. Consultants Bureau.Google Scholar
Spitzer, L. 1958 The stellarator concept. Phys. Fluids 1 (4), 253264.CrossRefGoogle Scholar
Wesson, J. 2011 Tokamaks, 4th edn. International Series of Monographs on Physics. Oxford University Press.Google Scholar
Zarnstorff, M.C., et al. 2001 Physics of the compact advanced stellarator NCSX. Plasma Phys. Control. Fusion 43 (12A), A237A249.CrossRefGoogle Scholar
Zocco, A., Aleynikova, K. & Xanthopoulos, P. 2018 Strongly driven surface-global kinetic ballooning modes in general toroidal geometry. J. Plasma Phys. 84 (3).CrossRefGoogle Scholar
Figure 0

Figure 1. Elliptical shapes and angles. Diagram showing an ellipse framed in the normal Frenet–Serret frame where the ellipse rotation angle $\vartheta$ and elongation angle $e$ are defined. These two angles uniquely characterise ellipses (up to a scale).

Figure 1

Figure 2. Examples of triangular cross-sections. The diagram shows two examples of triangular cross-sections (in black), constructed with second-order shaping with $X_{22}^C<0$ (left) and $Y_{22}^S>0$ (right), for the same underlying elliptical shape. The stellarator literature refers to these shapes as bean and D shapes (often clearer for less elongated cross-sections), respectively. The grey contour shows how excessive shaping can lead to a pathological cross-section in which the surface self-intersects.

Figure 2

Figure 3. Change in the stabilising triangularity effect with up–down symmetry breaking. The plots show (left) the influence of regular and up–down triangularity on $B_{20}$ and (right) the $\eta$ and $\sigma$ parameters as a function of the rotation of the ellipse, $\theta$. The elongation of the ellipse is kept constant, $\mathcal {E}=2$, and at $\theta =0$ is aligned with the vertical.

Figure 3

Figure 4. Sign of $\mathcal {T}_\delta /3\eta$ and $\mathcal {T}_{|p|}\bar {\iota }_0^2/4\kappa ^2$ in $(\alpha, \bar {F})$ space. The plots show $\mathcal {T}_\delta /3\eta$ (left) and $\mathcal {T}_{|p|}\bar {\iota }_0^2/4\kappa ^2$ (right) in $(\alpha, \bar {F})$ space. The shaded region in the left-hand plot represents the space for which $\mathcal {T}_\delta <0$, and thus positive triangularity is detrimental to the stability of the configuration. The shadow region for $\mathcal {T}_{|p|}$ also represents a negative sign corresponding to the destabilising effect of a pressure gradient. The dotted line in the left-hand plot represents the case of the tokamak explored in the previous section, which shows the possibility of both triangularity signs being stabilising. The dashed and dotted lines in the right-hand plot correspond to the changing lower limit of the positively signed region as the magnitude of the geodesic contribution (the term with the integral $I$) is changed from maximal (dotted line) to half its magnitude from the axisymmetric limit (labelled 0.5).

Figure 4

Figure 5. Effect of triangularity and pressure on MHD stability for some quasisymmetric stellarators. The plot shows as scatter points the factors regulating the effect of the triangularity ($\mathcal {T}_\delta$) and pressure gradient ($\mathcal {T}_{\vert p \vert }$) for several optimised quasisymmetric near-axis stellarators. The ‘precise’ QA and QH are from Landreman & Paul (2022), the new QH corresponds to the new optimised stellarator example from Rodríguez et al. (2022c), while all others are from a recent publication (Landreman 2022). We chose those configurations with reduced $B_{20}$ variation so that the magnetic well computation, using a constant $B_{20}$, showed good agreement with the full $V''$. The cross-sections shown correspond to the $\phi =0$ cross-sections in each configuration.

Figure 5

Table 1. Details of the configurations in figure 5. The table includes the values of $\bar {F}$, the triangularity $\delta$, the effect of triangularity $\mathcal {T}_\delta$ and the magnetic well $V''$ for the configurations represented in figure 5. The short labels on top refer to: PQA, precise QA; PQH, precise QH (from Landreman & Paul 2022); NQH, new QH (from Rodríguez et al.2022c); 22QA, 2022 Qa; N3V, N3 vacuum; N4LA, N4 long axis; N4W, N4 well; N4M, N4 Mercier; N7 and N3B, N3 beta (all these from Landreman (2022)). For the latter instead of the magnetic well we show the $\epsilon ^2 D_{\rm Merc}$, which shows that this finite-$\beta$ configuration is unstable.

Figure 6

Figure 6. Definition of the slant angle $\nu$. Diagram showing the definition of the angle $\nu$ measuring the inclination of the magnetic axis at the origin ($\phi =0$) with the ‘laboratory’ cylindrical coordinate system. The symbols have their usual meaning.

Figure 7

Figure 7. Basic definitions for triangularity. The diagram defines the length scales needed to compute the triangularity of an up–downsymmetric cross-section indicated for the outermost surface. The evolution of the geometric centre $R_{\rm geo}$ from one flux surface to another defines the Shafranov shift, $\varDelta _X$, with the negative sign indicating displacement outwards.

Figure 8

Figure 8. Example of the coordinate map to define the Shafranov shift. Example showing the coordinate map transformation of a second-order shape onto concentric circles. We can obtain and identify the cross-section shift from this mapping with the Shafranov shift. The deviation in $(X^*,Y^*)$ from a circle (broken line) results from higher-order effects.

Figure 9

Figure 9. Comparison of the magnetic well criterion between the full near-axis and idealised evaluation. The plot compares the magnetic well criterion $V''$ for the configurations in figure 5 assessed using the full near-axis description ($V''$) and the idealised quasisymmetric limit ($V''_{\rm ideal}$). The plot shows excellent agreement (within 30 % in all cases).