Hostname: page-component-cb9f654ff-mx8w7 Total loading time: 0 Render date: 2025-08-18T17:50:41.960Z Has data issue: false hasContentIssue false

Near-axis measures of quasi-isodynamic configurations

Published online by Cambridge University Press:  01 August 2025

Eduardo Rodríguez*
Affiliation:
Max Planck Institute for Plasma Physics, Greifswald 17491, Germany
Gabriel Plunk
Affiliation:
Max Planck Institute for Plasma Physics, Greifswald 17491, Germany
*
Corresponding author: Eduardo Rodríguez, eduardo.rodriguez@ipp.mpg.de

Abstract

We present a number of measures and techniques to characterise and effectively construct quasi-isodynamic stellarators within the near-axis framework, without the need to resort to the computation of global equilibria. These include measures of the reliability of the model (including aspect-ratio limits and the appearance of ripple wells), quantification of omnigeneity through $\epsilon _{\mathrm{eff}}$, measure and construction of MHD-stabilised fields, and the sensitivity of the field to the pressure gradient. The paper presents, discusses and gives examples of all of these, for which expansions to second order are crucial. This opens the door to the exploration of how key underlying choices of the field design govern the interaction of desired properties (‘trade-offs’) and provides a practical toolkit to perform efficient optimisation directly within the space of near-axis quasi-isodynamic configurations.

Keywords

Information

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 (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press

1. Introduction

The range of stellarator magnetic confinement fields is broad (Spitzer Jr Reference Spitzer1958; Boozer Reference Boozer1998; Helander Reference Helander2014), making it a daunting task both to understand and design them. This is true even when one restricts attention to particular subsets, known to have certain key properties such as omnigeneity (Hall & McNamara Reference Hall and McNamara1975; Bernardin, Moses & Tataronis Reference Bernardin, Moses and Tataronis1986; Cary & Shasharina Reference Cary and Shasharina1997; Helander Reference Helander2014). Omnigenous fields are capable of confining, by definition, all collisionless charged particle orbits (Northrop Reference Northrop1961; Littlejohn Reference Littlejohn1983; Wesson Reference Wesson2011; Blank Reference Blank2004); hence, the particular interest in them. Even though the magnetic field magnitude $|\boldsymbol{B}|$ on their nested flux surfaces requires careful consideration (Boozer Reference Boozer1983; Nührenberg & Zille Reference Nührenberg and Zille1988; Cary & Shasharina Reference Cary and Shasharina1997; Parra et al. Reference Parra, Calvo, Helander and Landreman2015), there remains a wide range of choices to be made. This is true whether the problem is attacked from the optimisation perspective (Mynick Reference Mynick2006) or a more controlled analytical approach.

One prominent case of the latter, with which this paper shall be concerned, is the near-axis description of the field (Mercier Reference Mercier1964; Solov’ev & Shafranov Reference Solov’ev and Shafranov1970; Lortz & Nührenberg Reference Lortz and Nührenberg1976; Garren & Boozer Reference Garren and Boozer1991b ). Consisting of an asymptotic description of the equilibrium field in the distance (described by $r$ ) from its centre (called the magnetic axis), the fields reduce to being represented by only a few functions and parameters. These constitute a model for the field that has proved powerful in advancing the theoretical understanding of optimised omnigeneous stellarators (Mercier Reference Mercier1964; Lortz & Nührenberg Reference Lortz and Nührenberg1976; Jorge & Landreman Reference Jorge and Landreman2020; Landreman & Jorge Reference Landreman and Jorge2020; Landreman Reference Landreman2021; Rodríguez et al. Reference Rodríguez, Sengupta and Bhattacharjee2022b , Reference Rodríguez, Helander and Goodman2024) as well as providing a practical tool in stellarator design (Camacho Mata, Plunk & Jorge Reference Camacho Mata, Plunk and Jorge2022; Jorge et al. Reference Jorge, Plunk, Drevlak, Landreman, Lobsien, Camacho Mata and Helander2022; Landreman & Sengupta Reference Landreman and Sengupta2019; Landreman Reference Landreman2022; Rodríguez et al. Reference Rodríguez2023). The latter has however been restricted for the most part to a particularly mature subclass of omnigeneous stellarators: namely, quasisymmetric stellarators (Boozer Reference Boozer1983; Burby, Kallinikos & MacKay Reference Burby, Kallinikos and MacKay2020; Nührenberg & Zille Reference Nührenberg and Zille1988; Rodríguez et al. Reference Rodríguez, Helander and Bhattacharjee2020). Only recently (Camacho Mata et al. Reference Camacho Mata, Plunk and Jorge2022; Camacho Mata & Plunk Reference Camacho Mata and Plunk2023; Jorge et al. Reference Jorge, Plunk, Drevlak, Landreman, Lobsien, Camacho Mata and Helander2022; Plunk, Landreman & Helander Reference Plunk, Landreman and Helander2019; Rodríguez & Plunk Reference Rodríguez and Plunk2023; Rodriguez, Plunk & Jorge Reference Rodriguez, Plunk and Jorge2025) has the near-axis framework of quasi-isodynamic (QI) fields (Cary & Shasharina Reference Cary and Shasharina1997; Helander & Nührenberg Reference Helander and Nührenberg2009; Nührenberg Reference Nührenberg2010), the other big class of optimised stellarators, been sufficiently developed. The lateness of this development has been a consequence of the complex treatment that these fields demand; while QS fields possess a direction of symmetry in $|\boldsymbol{B}|$ (either toroidal or helical), the QI fields do not (although they have closed poloidal contours).

The objective of this work is to help enable full use of the recent advances in the near-axis description of QI stellarators. In particular, although Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025) verified the construction of approximately QI fields to second order, it left open the issue of how to go about obtaining ‘good’ solutions, i.e. how to best select input parameters, how to evaluate candidate fields and how to navigate the extremely large design space that the near-axis construction opens up. To address this, we develop a set of measures and techniques using second-order near-axis expansion to incorporate notions of neoclassical transport, magnetohydrodynamic (MHD) stability and equilibrium sensitivity into the construction of QI stellarators. With these tools in hand, we are in a position to construct and more thoroughly evaluate stellarator design candidates, and conduct systematic studies exploring things like optimisation trade-offs.

The paper is organised as follows. In § 2, essential definitions and notation of near-axis theory are provided. The rest of the paper is divided into sections describing different types of measures. In § 3, we introduce the measure of field error $\delta {\kern-1pt}B$ that quantifies the deviation of a finite aspect ratio consistent equilibrium from its asymptotic near-axis description, following Landreman (Reference Landreman2021). This does however not qualify the physical impact of such deviations. Thus, in § 4, we present calculations of the neoclassical $\epsilon _{\mathrm{eff}}$ effective ripple (Nemov et al. Reference Nemov, Kasilov, Kernbichler and Heyn1999) within the near-axis expansion, a form to quantify the lack of omnigeneity in which second order is central. In § 5, we study the appearance of localised ripple wells in the field, a feature that the near-axis description of $\epsilon _{\mathrm{eff}}$ cannot capture, focusing on finding at what aspect ratio these first appear. Some questions of MHD stability are addressed in § 6, where we explore the sensitivity of the magnetic well (Greene Reference Greene1997; Landreman & Jorge Reference Landreman and Jorge2020) of a near-axis field to the choice of second-order shaping. Finally, in § 7, we study the role played by the pressure gradient and quantify the sensitivity of a given field to changes in plasma $\beta$ . We conclude with some closing remarks.

2. Definitions and notation

This paper does not re-derive the inverse-coordinate near-axis framework (Garren & Boozer Reference Garren and Boozer1991b ; Landreman & Sengupta Reference Landreman and Sengupta2019), but the work is best understood with some familiarity with how the equilibrium equations for an approximately QI field are solved through second order in the expansion. A full detailed and pedagogical account may be found from Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025) and references within, but we provide some pointers on notation to help make the presentation as self-contained as possible.

In the vein of the near-axis expansion, all equilibrium quantities are expanded in a Taylor–Fourier series in powers of $r=\sqrt {2\psi /\bar {B}}$ (a pseudo-radial distance from the axis, where $\psi$ is $2\pi$ times the toroidal magnetic flux and $\bar {B}$ a reference magnetic field) and cosine (sine) harmonic in the poloidal, $\theta$ , (or helical, $\chi =\theta -N\varphi$ for $N\in \mathbb{Z}$ ) angle. Here, the angles are part of the Boozer coordinate system (Boozer Reference Boozer1981; D’haeseleer et al. Reference D’haeseleer, Hitchon, Callen and Shohet2012), which eases the description of the magnetic field. This way, any function $f$ is written as $f=\sum _{n=0}^\infty r^n f_n$ and $f_n=\sum _{m=0}^n (f_{nm}^c(\varphi )\cos m\chi +f_{nm}^s(\varphi )\sin m\chi )$ , where the latter sum is over even or odd numbers depending on the parity of $n$ .Footnote 1 This subscript notation (Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025, § 2.3) will be repeatedly used and we refer to $n$ as the order (first, second, etc.) of the expansion.

In the inverse-coordinate framework, a magnetic field is described by only a few functions. First, the $\varphi$ -functions involved in the expansion of the magnetic field strength, $B=|\boldsymbol{B}|$ . Second, because of the inverse-coordinate nature of the expansion, we describe flux surfaces of the magnetic field through the functions $X,\,Y$ and $Z$ , which define the relative position of flux surfaces with respect to the magnetic axis in the Frenet–Serret frame (normal, binormal and tangent, respectively) of the latter (Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025, (2.2)). Thus, the expansion of these functions also forms part of the description. Finally, the covariant components of the field, $\{G,I,B_\psi \}$ , are also explicitly involved (Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025, (2.1)), as is the rotational transform of the field, $\iota$ .

The governing equilibrium equations impose important relations between the components of all of these quantities, and that is on what solving the near-axis expansion is focused. Those relations are detailed in the context of QI fields by Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025). It is however important to emphasise which ingredients are required to uniquely define a field in this framework. An approximately QI near-axis field is uniquely defined to first order by the set $\{\kappa (\ell ),\tau (\ell ),B_0(\varphi ),\bar {d}(\varphi ),\alpha _1(\varphi )\}$ , where the first two are the curvature and torsion defining the shape of a magnetic axis (which must have vanishing curvature points (Plunk et al. Reference Plunk, Landreman and Helander2019; Camacho Mata & Plunk Reference Camacho Mata and Plunk2023; Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025), the third is the magnetic strength along the axis as a function of the toroidal Boozer angle (whose turning points must match the $\kappa =0$ points), and the latter two define $B_1$ (Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025, (2.4)),

(2.1) \begin{equation} B_1=\kappa (\varphi )B_0(\varphi )\bar {d}(\varphi )\cos \left [\chi -\alpha _1(\varphi )\right ]. \end{equation}

In an ideal QI field, $\kappa$ and $\bar {d}$ must be odd and even functions, respectively, with respect to $B_0$ about every trapping well minima. The function $\alpha _1$ may be defined as (if we take $\varphi =0$ to be the minimum of $B_0$ )

(2.2) \begin{equation} \alpha _1=(\iota _0-N)\varphi - \pi /2 + \alpha _{\mathrm{buf}}(\varphi ), \end{equation}

where in the ideal case, $\alpha _{\mathrm{buf}}=0$ . The periodicity constraint on $\alpha _1$ generally requires finite non-omnigeneous deviations close to $B_0$ maxima (i.e. buffers), which are captured by finite $\alpha _{\mathrm{buf}}$ (Plunk et al. Reference Plunk, Landreman and Helander2019; Rodríguez & Plunk Reference Rodríguez and Plunk2023; Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025). These first-order choices also uniquely determine the elliptical shaping of flux surfaces around the magnetic axis.

At second order, the key degrees of freedom (inputs) are $\{p_2,X_{2c}(\varphi ),X_{2s}(\varphi )\}$ , where the former parameter is the pressure gradient and the latter two are related to triangular shaping. The latter two are directly linked to the shaping of the field strength on the flux surfaces as well. For the detailed role played by each of these and a complete consistent description, we again refer the reader to Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025).

3. Field truncation error $\delta {\kern-1pt}B$

The construction of QI fields using the near-axis expansion is rather non-trivial already at first order in the expansion. Different choices of magnetic axis and the shaping of elliptical cross-sections require a careful balance. Unless actively sought, such fields will tend to present particularly elongated and twisted shapes (Camacho Mata et al. Reference Camacho Mata, Plunk and Jorge2022).

Even when suitable parameters are found, we must always remember that the field resulting from the near-axis description is approximate in nature. The study and design of a stellarator field requires, in practice, the full non-expanded equilibrium field. Thus, we generally need to construct a finite aspect ratio version of the near-axis field, which will show some deviations from the purely asymptotic description. Significant deviations can lead to the loss of those properties of the field carefully instilled in the near-axis field. This particularly concerns $|\boldsymbol{B}|$ , the field strength, which controls guiding centre dynamics of particles, and omnigeneity. When such deviations are limited, the near-axis description may be deemed good. This measure of goodness has been previously used (Camacho Mata et al. Reference Camacho Mata, Plunk and Jorge2022; Camacho Mata & Plunk Reference Camacho Mata and Plunk2023) to gauge the suitability of first-order near-axis QI fields as interesting candidates for optimised stellarators, and is thus of some interest. This focus on first order allows us to make a first assessment of the near-axis construction without having to explicitly go to higher order. Indeed, depending on the choice of first-order parameters, there is a strong degree of variation of truncation error, which has in the past lead to many unfeasible configurations that do not have the desired field at a reasonable aspect ratio.

To define this goodness more precisely, let us introduce the field strengths $B_{\mathrm{global}}$ and $B_{\mathrm{nae}}^{(1)}$ . Define $B_{\mathrm{global}}$ as the field strength of the global equilibrium at its outermost flux surface $\psi =\psi _a$ parametrised by $\theta$ and $\varphi$ , angular poloidal and toroidal Boozer coordinates (Boozer Reference Boozer1981). This global equilibrium is meant to be a finite aspect ratio representation of the near-axis field and we follow the prescription of Landreman & Sengupta (Reference Landreman and Sengupta2019). That is, given a first-order near-axis field, we calculate the shape of the elliptical flux surface at some radius $r=a$ (i.e. $a=\sqrt {2\psi _a/\bar {B}}$ ) and use it as the outer boundary of a global nested-flux surface, vacuum field. The solution then defines $\boldsymbol{B}_{\mathrm{global}}$ .

The comparison of this global field can then be made to the first-order near-axis one, evaluated at the edge, $B_{\mathrm{nae}}^{(1)}=B_0+a^2B_1$ . We define the field error as

(3.1) \begin{equation} \delta {\kern-1pt}B=\sqrt {\int (B_{\mathrm{global}}-B_{\mathrm{nae}}^{1\mathrm{st}})^2\,\mathrm{d}\varphi \,\mathrm{d}\theta }\Bigg /\sqrt {\int B_{\mathrm{global}}^2\,\mathrm{d}\varphi \,\mathrm{d}\theta }; \end{equation}

the normalised root-mean-square difference. Large values imply significant differences between the realised field and the near-axis model, and thus the expectation of them behaving quite differently.

Gauging the goodness of a near-axis expansion (NAE) field as defined in (3.1) requires us to solve a global equilibrium. Whether one uses VMEC (Hirshman & Whitson Reference Hirshman and Whitson1983), DESC (Dudt & Kolemen Reference Dudt and Kolemen2020), GVEC (Hindenlang et al. Reference Hindenlang, Maj, Strumberger, Rampp and Sonnendrücker2019) or any other nested flux surface solver, computing $\delta {\kern-1pt}B$ is numerically costly as compared with the near-axis field, impeding in addition its theoretical investigation. Can we make sense of this goodness of the field from within the near-axis framework?

3.1. Near-axis perspective on $\delta {\kern-1pt}B$

By definition, $\delta {\kern-1pt}B$ measures the discrepancy between the full- $B$ and the truncation of an asymptotic form. That is, $\delta {\kern-1pt}B$ is, in a sense, a measure of the truncation error of the asymptotic expansion. The truncation error of an asymptotic series (Bender & Orszag Reference Bender and Orszag2013, § 3.5) can be gauged by the next order in the expansion,Footnote 2 and thus the calculation to second order could possibly be used to estimate $\delta {\kern-1pt}B$ . There is however an important caveat: in the near-axis expansion, moving from order $N$ to order $N+1$ in the expansion brings new degrees of freedom. From first to second, we may shape the triangularity of surfaces in an infinite number of ways.

Amongst this myriad of possibilities, we should pick that which most closely corresponds to our particular scenario. This was dealt with by Landreman & Sengupta (Reference Landreman and Sengupta2019) and Landreman (Reference Landreman2021), who used the first-order near-axis field of interest at $r=a$ to impose the shape of the outermost boundary of a global equilibrium, which they then asymptotically described. Formally, the description of the global equilibrium field $\tilde {\boldsymbol{B}}$ requires a double expansion in $r$ (a near-axis expansion) and $a$ (a large aspect ratio expansion to deal with the ‘global’ nature of the field). Asymptotically computing this field and evaluating its difference with $B_{\mathrm{nae}}^{(1)}(r=a)=B_0+a B_1$ can be shown to be (Landreman Reference Landreman2021, § 5.2)Footnote 3

(3.2) \begin{equation} \tilde {B}_2 = a^2\tilde {B}_0^{(2)} + r^2(\tilde {B}_{20}^{(0)} + \tilde {B}_{2c}^{(0)}\cos 2\chi + \tilde {B}_{2s}^{(0)}\sin 2\chi ). \end{equation}

The first is a mirror term, (C24) of Landreman (Reference Landreman2021), and arises from the finite aspect ratio construction (expansion in $a$ ) and is necessary to guarantee a constant toroidal flux $\psi _a=\bar {B}a^2/2$ . As such, it is a perturbation on the near-axis input $B_0(\varphi )$ , the magnetic field on axis that sets the leading trapping well structure. The $r$ -dependent terms in (3.2) correspond to the second-order near-axis expansion of $\tilde {B}$ , whose shaping is chosen to match the outermost surface. They may therefore be found in a form analogous to the regular second-order construction, solving (A41)–(A42) of Landreman & Sengupta (Reference Landreman and Sengupta2019) using (C9)–(C12) of Landreman (Reference Landreman2021) and then applying (A34)–(A36) of Landreman & Sengupta (Reference Landreman and Sengupta2019).

The field error $\delta {\kern-1pt}B$ may therefore be estimated as

(3.3) \begin{equation} \delta{\kern-1pt} B_{\mathrm{ar}}=a^2\sqrt {\frac {1}{2\pi }\int _0^{2\pi }\left [(\tilde {B}_{20}^{(0)}+\tilde {B}_0^{(2)})^2+\frac {(\tilde {B}_{2c}^{(0)})^2}{2}+\frac {(\tilde {B}_{2s}^{(0)})^2}{2}\right ]\,\mathrm{d}\varphi }, \end{equation}

where all fields have been evaluated at the boundary $r=a$ .

3.2. Numerical implementation

We have implemented the computation of $\delta{\kern-1pt}B_{\mathrm{ar}}$ numerically in pyQIC,Footnote 4 following the original work of Landreman (Reference Landreman2021), and introducing all the appropriate generalisations that apply to QI fields, especially the non-uniform $B_0$ and correct handling of half-helicity axes (Camacho Mata & Plunk Reference Camacho Mata and Plunk2023; Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025). In practice, the resources devoted to finding $\tilde {B}$ quantities are analogous to those employed when solving the second-order equations of a near-axis equilibrium. In fact, the very equations involved are quite similar and more specific details may be found in the code itself.

To benchmark $\delta{\kern-1pt}B$ , we need a set of near-axis configurations and their associated finite aspect ratio equilibria. The latter are obtained running the global flux-surface equilibrium code VMEC (Hirshman & Whitson Reference Hirshman and Whitson1983), constructed using the near-axis surface at $r/R=0.07$ (roughly an aspect ratio of $A=14$ ). As for the benchmark set, we use a set of 1680 approximately QI, half-helicity near-axis fields (see some details in Appendix A and a fuller description in an upcoming publication). To compute $\delta{\kern-1pt}B$ as defined in (3.1), the field strength is computed in Boozer coordinates using BOOZXFORM (Sanchez et al. Reference Sanchez, Hirshman, Ware, Berry and Spong2000). The comparison of $\delta{\kern-1pt}B$ to the near-axis estimate $\delta{\kern-1pt}B_{\mathrm{ar}}$ is shown in figure 1.

Figure 1. Benchmark of the error field measure $\delta{\kern-1pt}B_{\mathrm{ar}}$ . The main plot compares the field error $\delta{\kern-1pt}B$ , (3.1), evaluated using the global equilibrium computed with VMEC, to the near-axis estimate $\delta{\kern-1pt}B_{\mathrm{ar}}$ for the QI near-axis configurations in the benchmark database of Appendix A.1. The black broken line represents $\delta{\kern-1pt}B=\delta{\kern-1pt}B_{\mathrm{nae}}$ and the dotted one is the moving average of the scatter. The colours for $\delta{\kern-1pt}B_{\mathrm{ar}}$ denote the number of field periods of the configurations (see legend). The inset plot shows the same data scaled by the field period number as $1/N^2$ .

The agreement is excellent (the correlation is in excess of 0.99), especially strong for the lowest $\delta{\kern-1pt}B$ values. At larger $\delta{\kern-1pt}B$ , there is a clear systematic deviation, with the near-axis $\delta{\kern-1pt}B_{\mathrm{ar}}$ overestimating the field discrepancy. This overestimation is a result of fields with larger $\delta{\kern-1pt}B$ having a tendency for increased shaping and sensitivity, and thus smaller radii of convergence. Evaluation at a finite aspect ratio thus tends to overestimate the magnitude of the field. However, $\delta{\kern-1pt}B_{\mathrm{ar}}$ retains a monotonic relation with $\delta{\kern-1pt}B$ .

The behaviour of the field error is clearly seen to depend on the number of field periods. They appear to form separate clusters, with the larger field period numbers leading to larger deviations (in agreement with the arguments before, with the exception of the special case $N=1$ ). Rescaling $\delta{\kern-1pt}B/N^2$ (see inset of figure 1) clusters all different fields together. This quadratic scaling follows the involvement of second derivatives in $\varphi$ in the construction of the second-order near-axis equilibrium expansion (see Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025) and approximate scaling symmetries in axis shapes as discussed by Plunk et al. (Reference Plunk2025).

Altogether, the error field near-axis measure $\delta{\kern-1pt}B_{\mathrm{ar}}$ is an excellent predictor of $\delta{\kern-1pt}B$ . The systematic deviation may lead to a failure of a qualitative agreement at larger errors, but even this departure could be refined by using a fit of the curve in figure 1 to map $\delta{\kern-1pt}B_{\mathrm{ar}}$ to $\delta{\kern-1pt}B$ .

4. Effective ripple: $\epsilon _{\mathrm{eff}}$

Although the simplicity of the field error $\delta{\kern-1pt}B$ makes it appealing as a measure of how ‘good’ a given first-order near-axis field is, it ignores the fact that not all field deviations (even if they may correspond to the same $\delta{\kern-1pt} B$ ) affect the behaviour of the field equally. In particular, some deviations will spoil omnigeneity more than others. The field error measure overlooks a second important point, namely that deviations from omnigeneity are unavoidable to a certain degree (Cary & Shasharina Reference Cary and Shasharina1997) even at first order (Plunk et al. Reference Plunk, Landreman and Helander2019; Rodríguez & Plunk Reference Rodríguez and Plunk2023), so it is important to separately evaluate such deviations at each order. Thus, we are in need of some way of measuring the departure from ideal omnigeneity, of which there are many (Mynick Reference Mynick2006; Nemov et al. Reference Nemov, Kasilov, Kernbichler and Leitold2008; Rodríguez et al. Reference Rodríguez, Paul and Bhattacharjee2022a ; Goodman et al. Reference Goodman2023; Dudt et al. Reference Dudt, Goodman, Conlin, Panici and Kolemen2024).

In this paper, we consider the effective ripple $\epsilon _{\mathrm{eff}}$ as the measure of deviations from omnegeneity or ‘omnigeneity error’. This is a geometric, dimensionless scalar quantity defined by Nemov et al. (Reference Nemov, Kasilov, Kernbichler and Heyn1999) whose magnitude (or more precisely, that of $\epsilon _{\mathrm{eff}}^{3/2}$ ) controls the neoclassical electron heat transport across a flux surface in a plasma that balances the radial losses with collisions; i.e. the so-called $1/\nu$ regime. Given its clear physical interpretation, the evaluation of $\epsilon _{\mathrm{eff}}$ is commonly used to assess modern optimised stellarators, which aim at values below a per cent. Here, we shall be interested in evaluating it within the near-axis framework. Doing so will: (i) avoid having to solve global equilibria and perform neoclassical calculations to assess fields; and (ii) provide insight on how near-axis choices affect it.

Following Nemov et al. (Reference Nemov, Kasilov, Kernbichler and Heyn1999, (29)), we express $\epsilon _{\mathrm{eff}}$ in our own notation as

(4.1) \begin{equation} \epsilon _{\mathrm{eff}}^{3/2}=\frac {\pi (\bar {R}\bar {B})^2}{8\sqrt {2}}\lim _{L\rightarrow \infty }F(L)\,\int _{1/B_{\mathrm{max}}}^{1/B_{\mathrm{min}}}\,\mathrm{d}\lambda \, \lambda \sum _{j=1}^{N_{\mathrm{well}}}\mathcal{E}_j(\lambda ), \end{equation}

where

(4.2a) \begin{align} \mathcal{E}_j(\lambda ) &=\frac {H_j(\lambda )^2}{I_j(\lambda )}, \end{align}
(4.2b) \begin{align} H_j(\lambda ) &= \frac {1}{\bar {B}^2}\int _{\ell _{j,L}}^{\ell _{j,R}}\mathcal{H}(\lambda ,B)\frac {\boldsymbol{B}\times \nabla B\boldsymbol{\cdot \nabla} \psi }{B}\, \mathrm{d}\ell , \end{align}
(4.2c) \begin{align} I_j(\lambda ) &= \int _{\ell _{j,L}}^{\ell _{j,R}}\frac {\sqrt {1-\lambda B}}{B}\,\mathrm{d}\ell , \end{align}
(4.2d) \begin{align} F(L) &= \left (\int _0^L\frac {\mathrm{d}\ell }{B}\right )\left (\int _0^L|\nabla \psi |\frac {\mathrm{d}\ell }{B}\right )^{-2}\\[20pt]\nonumber \end{align}

and

(4.3) \begin{equation} \mathcal{H}(\lambda ,B)=\frac {\sqrt {1-\lambda B}}{(B/\bar {B})^2}\left (\frac {4}{\lambda B}-1\right ). \end{equation}

The factors $\bar {R}$ and $\bar {B}$ are reference length (major radius) and magnetic field magnitudes that normalise $\epsilon _{\mathrm{eff}}$ to make it a dimensionless quantity. The effective ripple is then to be understood as a sum over all trapped particles, $\lambda$ , in all wells, labelled $j$ , along the field line, running from $0$ to $L$ (in the limit of $L\rightarrow \infty$ ). That is, on an irrational surface, over the whole flux surface. Note that this involves a sum over very different classes of trapped particles, including particles that travel over a fraction or many periods of the torus, which makes the calculation particularly hard.

Each of these classes of particles contributes to the total ripple through $\mathcal{E}_j(\lambda )\geqslant 0$ , defined in (4.2a ), which for the field to be omnigeneous, must vanish for all trapped particles. The non-omnigeneous drive comes through $H_j$ , an average between bounce points $\ell _{j,R/L}$ of the off-surface magnetic drift, $\boldsymbol{v}_d\boldsymbol{\cdot \nabla} \psi$ , weighted by the parallel velocity $\propto \sqrt {1-\lambda B}$ . The heat flux, $\varGamma$ , depends quadratically on $H_j$ . This dependence stems from having $\varGamma \sim \delta{\kern-1pt}f \,\boldsymbol{v}_d\boldsymbol{\cdot \nabla} \psi$ , where the perturbed particle distribution $\delta{\kern-1pt}f$ arises from a balance between the average drift and collisions. The competing mixing rate of collisions is related to the function $I_j$ , which is formally similar to the second adiabatic invariant. Finally, $F(L)$ is a geometric normalisation factor that plays the role of normalising the off-surface projection of the drift.

4.1. Identification of the expansion

Many of the complexities involved in evaluating $\epsilon _{\mathrm{eff}}$ , (4.1), disappear when its asymptotic near-axis form is considered. To see this, let us start by introducing the asymptotic form of the magnetic field strength, which defines trapped particle classes and determines the radial drift. Concerned with the description of a magnetic field that is approximately QI, we can write $B\approx B_0(\varphi )+rB_1(\chi ,\varphi )+r^2B_2(\chi ,\varphi )$ , where (Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025)

(4.4a) \begin{align} B_1 &= -B_0(\varphi )d(\varphi )\sin \left [\alpha -\alpha _{\mathrm{buf}}(\varphi )\right ]\!, \end{align}
(4.4b) \begin{align} B_2 &= B_{20}(\varphi ) + B_{2c}(\varphi )\cos 2\chi + B_{2s}(\varphi )\sin 2\chi .\\[10pt]\nonumber \end{align}

To zeroth order in $r$ , $B_0(\varphi )$ defines (by assumption) a single toroidal trapping well per field period. The higher order contributions in $r=\sqrt {2\psi /\bar {B}}$ then deform this underlying well to make distinct ones for different field lines, labelled by $\alpha =\theta -\iota \varphi$ . Asymptotically, they do not introduce additional wells. The particular form of $B_1$ in (4.4a ) corresponds to that of an omnigeneous field (when taking $d$ to be an odd function respect to $B_0$ , and $d=0$ at the bottom and top of the trapping well), except where $\alpha _{\mathrm{buf}}\neq 0$ , i.e. the buffer regions. These are for the most part unavoidable near the edges of the toroidal domain (Cary & Shasharina Reference Cary and Shasharina1997; Plunk et al. Reference Plunk, Landreman and Helander2019; Rodríguez & Plunk Reference Rodríguez and Plunk2023). The second-order field contribution is for now chosen simply to satisfy stellarator symmetry, so $B_{20}$ and $B_{2c}$ are even, and $B_{2s}$ odd.

As a result of the trapping wells becoming labelled by $\alpha$ , the infinite sum over trapping wells in the effective ripple, (4.1), becomes by Weyl’s lemma of equidistribution (Weyl Reference Weyl1916) (Stein & Shakarchi Reference Stein and Shakarchi2011, Lemma 2.2) (assuming an irrational rotational transform),

(4.5) \begin{equation} \sum _{j=1}^{N_{\mathrm{well}}}f_j\approx \frac {N_{\mathrm{well}}}{2\pi }\int _0^{2\pi }f(\alpha )\,\mathrm{d}\alpha , \end{equation}

where $N_{\mathrm{well}}$ is the number of wells within a field line portion of length $L$ . That is, the sum over wells simply corresponds to an average over $\alpha$ .

Changing variables from $\ell$ to $\varphi$ (with the appropriate Boozer Jacobian $\mathcal{J}=(G+\iota I)/B^2$ , D’haeseleer et al. Reference D’haeseleer, Hitchon, Callen and Shohet2012, (6.6.8b)) and writing flux surface averages in terms of $(\alpha ,\varphi )$ ,

(4.6) \begin{equation} \epsilon _{\mathrm{eff}}^{3/2}=\frac {\pi }{8\sqrt {2}}\frac {(\bar {R}\bar {B})^2}{\mathcal{G}^2}\,\int _{1/B_{\mathrm{max}}}^{1/B_{\mathrm{min}}}\lambda \hat {\mathcal{E}}(\lambda )\,\mathrm{d}\lambda , \end{equation}

where

(4.7) \begin{equation} \hat {\mathcal{E}}(\lambda ) = \frac {1}{\pi }\int _0^{2\pi }\frac {\hat {H}(\lambda ,\alpha )^2}{\hat {I}(\lambda ,\alpha )}\,\mathrm{d}\alpha , \end{equation}

and all remaining definitions can be found explicitly at the beginning of Appendix B. The functions $\hat {H}$ and $\hat {I}$ (directly linked to the previous $H_j$ and $I_j$ of Nemov et al. Reference Nemov, Kasilov, Kernbichler and Heyn1999), (B1a )–(B1b ), have been defined to be dimensionless, and $\mathcal{G}^2$ (directly related to $F$ ) has dimensions of $[L]^2$ , which matches the presence of the normalising $\bar {R}$ .

In this form, the asymptotic expansion in powers of $r$ can be carried out explicitly and we do so in Appendix B. The details may be found there, and we emphasise the importance of carefully considering bounce integrals and $1/\sqrt {1-\lambda B}$ factors (as in Rodríguez & Mackenbach Reference Rodríguez and Mackenbach2023 and Rodríguez et al. Reference Rodríguez, Helander and Goodman2024). In the main text, we summarise the resulting expressions in $\epsilon _{\mathrm{eff}}^{3/2}\approx \epsilon _{\mathrm{eff}}^{3/2,(0)}+r^2\epsilon _{\mathrm{eff}}^{3/2,(2)}+O(r^4)$ , and focus on their significance.

4.2. Contribution from buffer regions: $\epsilon _{\mathrm{eff}}^{3/2,(0)}$

The leading order contribution in the distance from the magnetic axis $r$ to $\epsilon _{\mathrm{eff}}^{3/2}$ is a constant offset that sets a lower bound to the effective ripple value in the limit of $r\rightarrow 0$ . The leading order asymptotic form can be written purely in terms of first- (and zeroth-) order quantities (see the details in Appendix B),

(4.8) \begin{equation} \epsilon _{\mathrm{eff}}^{3/2,(0)}=\frac {\pi }{8\sqrt {2}}\frac {(\bar {R}\bar {B})^2}{(\mathcal{G}^{(1)})^2}\int _{1/B_0^{\mathrm{max}}}^{1/B_0^{\mathrm{min}}}\lambda \frac {(h^{(1)})^2}{I^{(0)}}\,\mathrm{d}\lambda , \end{equation}

where

(4.9a) \begin{align} h^{(1)} &=\int _{\varphi _-}^{\varphi _+}\frac {B_0}{\bar {B}}\mathcal{H}(\lambda ,B_0)d\sin \alpha _{\mathrm{buf}}\,\mathrm{d}\varphi , \end{align}
(4.9b) \begin{align} I^{(0)} &= \int _{\varphi _-}^{\varphi _+}\frac {\sqrt {1-\lambda B_0}}{(B_0/\bar {B})^2}\,\mathrm{d}\varphi , \end{align}
(4.9c) \begin{align} (\mathcal{G}^{(1)})^2 &= 2\left (\frac {1}{2\pi }\int _0^{2\pi }\mathrm{d}\alpha \int _0^{2\pi /N}\mathrm{d}\varphi \frac {\varPsi ^{(1)}}{B_0}\right )^2\Bigg /\left (\int _0^{2\pi /N}\frac {\mathrm{d}\varphi }{B_0^2}\right ), \\[10pt]\nonumber\end{align}

where

(4.10) \begin{equation} \varPsi ^{(1)}=\left [(X_{1c}\sin \chi -X_{1s}\cos \chi )^2+(Y_{1c}\sin \chi -Y_{1s}\cos \chi )^2\right ]^{1/2}. \end{equation}

The expression $\epsilon _{\mathrm{eff}}^{3/2,(0)}$ , as can be seen by inspecting $h^{(1)}$ , measures the impact that buffer regions have on omnigeneity. If such buffers were not present (which may only happen if the rotational transform matches the helicity of the axis, $\iota _0=M$ (Plunk et al. Reference Plunk, Landreman and Helander2019; Camacho Mata & Plunk Reference Camacho Mata and Plunk2023; Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025), then $\alpha _{\mathrm{buf}}=0$ and $h^{(1)}=0$ , implying $\epsilon _{\mathrm{eff}}\rightarrow 0$ as $r\rightarrow 0$ . In general though, they will make a finite contribution, and the expression above allows us to gauge its magnitude. It is a measure of the level of non-omnigeneity of the first-order construction. Only if this is sufficiently small is it reasonable to proceed to the next order in the expansion (second order) to evaluate the omnigeneity at that order (Rodríguez & Plunk Reference Rodríguez and Plunk2023; Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025).

Figure 2. Benchmark of effective ripple calculation. The plots show, in log scale, a comparison of the effective ripple as calculated using the code NEO on global equilibria (scatter points) and calculated with the near-axis estimate (solid lines), for a number of different benchmark configurations (see Appendix A). The two detail plots on the right show the individual comparison for two of the cases, including the zeroth-order ripple offset $\epsilon _{\mathrm{eff}}^{(0)}$ as reference (dotted line). The ripple is normalised to a reference $\bar {B}=1\,\rm T$ and $\bar {R}=1\,\rm m$ .

The expression for $h^{(1)}$ , (4.9a ), is then a local measure: trapped particles that do not venture into buffer regions near the trapping well tops, such as deeply trapped ones, will not contribute by any amount. Thus, a smaller buffer results in a smaller fraction of contributing particles. Those trapped particles that do, contribute to $h^{(1)}$ only through their radial magnetic drift (proportional to $d$ ) in the buffer region. By construction, and to abide by the condition of pseudosymmetry that avoids losses at turning points of the magnetic field, $d=0$ is chosen to vanish at both the bottom and the top of the trapping well. Hence, we expect $d\approx 0$ near the trapping well tops and thus in the buffer regions, automatically limiting the magnitude of the effective ripple. To make this somewhat more quantitative, consider the buffer to have a toroidal extent $\delta$ about the well top. For a magnetic axis with a curvature $\kappa$ that has a zero of order $v$ (fixing the form of $d=\bar {d}\kappa$ , Plunk et al. Reference Plunk, Landreman and Helander2019; Rodríguez & Plunk Reference Rodríguez and Plunk2023) and a field $B_0$ with a first derivative of order $u-1$ , following (4.9a ), we expect a scaling $h^{(1)}\propto \delta ^{u/2}\times \delta ^v \times \delta \sim \delta ^{u/2+v+1}$ . The first factor comes from the slowing down of the particle speed near the tops; the second comes from the low radial drift linked to $d$ itself; and the latter is the size of the buffer domain. The natural impulse to take $\delta \rightarrow 0$ has, though, dire consequences on the shaping of the resulting field (Plunk et al. Reference Plunk, Landreman and Helander2019; Camacho Mata et al. Reference Camacho Mata, Plunk and Jorge2022). One could alternatively increase the order of the power of $\delta$ , for instance, by making the top of the trapping well flatter. Without the need to resort to any of these, the behaviour of $I^{(0)}$ helps reduce the buffer contribution even further. This second-adiabatic-invariant-like factor is largest for barely trapped particles, reducing the contribution of the buffer to the effective ripple. This physically corresponds to these particles being more strongly diffused by collisions in $\lambda$ space, to a large extent because they travel for a longer time, and thus their drift contribution is offset to some degree. All in all, the contribution of the buffer tends to be small (see figure 2), setting a negligible lower bound on $\epsilon _{\mathrm{eff}}$ in the limit of $r\rightarrow 0$ .

4.3. Omnigeneity to second order: $\epsilon _{\mathrm{eff}}^{3/2,(2)}$

Given the rather benign contribution to the effective ripple from first order, it is important to assess the next order contribution to $\epsilon _{\mathrm{eff}}$ . The evaluation of the order $r^2$ correction to the effective ripple is presented in detail in Appendix B. The calculation is significantly more involved than first order, requiring the next two order corrections of many terms and even involving third-order quantities formally. Many of those terms do not, in practice, contribute significantly, and it is a great convenience to retain only second-order contributions.Footnote 5 For this reason, we write a reduced, simplified form of these contributions (see Appendix B for a more detailed account of this) that focuses on the next order contribution to $H$ ,

(4.11) \begin{equation} \epsilon _{\mathrm{eff}}^{3/2,(2)}=\frac {\pi }{8\sqrt {2}}\frac {(\bar {R}\bar {B})^2}{(\mathcal{G}^{(1)})^2}\int _{1/B_0^{\mathrm{max}}}^{1/B_0^{\mathrm{min}}}\lambda \frac {(h^{(2)})^2}{I^{(0)}}\,\mathrm{d}\lambda , \end{equation}

where

(4.12a) \begin{align} h^{(2)} &= -2\int _{\varphi _-}^{\varphi _+}\mathcal{H}(\lambda ,B_0)\frac {\varDelta B_{2c}^{\mathrm{QI}}}{\bar {B}}\,\mathrm{d}\varphi ,\\[6pt]\nonumber \end{align}
(4.12b) \begin{align} \varDelta B_{2c}^{\mathrm{QI}} &= B_{2c}^{\mathrm{QI}}-\frac {1}{4}\partial _\varphi \left (\frac {B_0^2d^2}{B_0'}\cos 2\alpha _{\mathrm{buf}}\right )\!,\\[10pt]\nonumber \end{align}

and $B_{2c}^{\mathrm{QI}}=-(B_{2c}\cos 2\bar {\iota }\varphi +B_{2s}\sin 2\bar {\iota }\varphi )$ . The expression in (4.12b ) is equivalent to the omnigeneity condition at second order when it vanishes, as derived explicitly by Rodríguez & Plunk (Reference Rodríguez and Plunk2023 (32c)). Thus, this approximation to the asymptotic $O(r^2)$ behaviour of the effective ripple is driven by the second-order non-omnigeneous behaviour and will generally dominate $\epsilon _{\mathrm{eff}}^{3/2,(0)}$ at a finite aspect ratio.

Unlike to leading order, in this case, the non-omnigeneous contribution is spread over the entirety of the trapping well, wherever $\varDelta B_{2c}^{\mathrm{QI}}\neq 0$ , a local measure of radial drift imbalance. An imbalance at some point $\varphi$ will affect all trapped particles with $\lambda \lt 1/B_0(\varphi )$ that pass over this point. Although they feel such deviation from omnigeneity, this is not to say that they will necessarily behave in a non-omnigeneous fashion, as the bounce-integral in (4.12a ) can lead to partial cancellations of $\varDelta B_{2c}^{\mathrm{QI}}$ , which can have either sign. However, it remains true that if $\varDelta B_{2c}^{\mathrm{QI}}\neq 0$ , then $\epsilon _{\mathrm{eff}}^{3/2,(2)}\neq 0$ .

The abovementioned scenario then describes the significance of the omnigeneity condition of Rodríguez & Plunk (Reference Rodríguez and Plunk2023), which is a property of second-order fields. As such, different choices of second-order shaping (namely, triangularity and Shafranov shift) will affect the omnigeneous behaviour of the field and their choice becomes key in constructing the stellarator field. This is not to say that the first-order near-axis construction is no longer important, as it will remain to strongly affect the amount and form of second-order shaping needed to make a field more omnigeneous. A clear example of this is the radial drift involved in (4.12b ), which by increasing axis curvature (and thus $d$ for a controlled elongation of flux surfaces) will generally require stronger shaping.

One may ask how can the shape at second order be chosen to omnigenise a field and if it is an example of an optimisation problem. As shown by Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025, (3.6)–(3.7)), there is however a unique, closed form choice of shaping that exactly achieves $\varDelta B_{2c}^{\mathrm{QI}}=0$ . This excludes, though, the neighbourhoods (in $\varphi$ ) of flattening points of the magnetic axis, where the shaping necessary to achieve this ideal omnigeneous behaviour would diverge unless the first-order construction was specially chosen. Excluding regions around flattening points (see further discussion later) and applying this choice of shaping, we say we have ‘omnigenised’ the construction.

4.4. Numerical implementation and benchmark

Let us first benchmark the near-axis estimate of the abovementioned effective ripple. To that end, we take an extended set of second-order near-axis equilibria previously used by Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025), described in Appendix A, and their associated global equilibria at a number of different aspect ratios. We then compare the near-axis estimate of $\epsilon _{\mathrm{eff}}$ (as a function of $r$ ), implemented in the pyQIC framework,Footnote 6 with the effective ripple computed by the neoclassical code NEO of the finite aspect ratio equilibria. The comparison is presented in figure 2 as a function of aspect ratio $A=R/r$ .

The agreement between the predicted near-axis $\epsilon _{\mathrm{eff}}$ and the finite volume equilibria calculation, although not exact, is excellent over quite a large range of $A$ . The buffer region contribution in all cases sets a rather benign lower bound to the value of $\epsilon _{\mathrm{eff}}$ at large aspect ratios and seems to be in agreement with the global calculation. This shows the critical role played by the second order in the expansion, which controls the dominant $O(r^{4/3})$ behaviour. At lower aspect ratios, $A\lesssim 10$ , the departures grow, as the deformation of the field increases and departs from its asymptotic description (see figure 3). The latter is unable to capture local ripplesFootnote 7 and the appearance of new trapped particle classes (as in figure 3 b), or misalignment of maxima (as in figure 3 c) with the associated abrupt modification of trapped particle behaviour. These effects become increasingly prominent at lower aspect ratios, and thus additional deviations between the near-axis and global calculation are to be expected.

Figure 3. Diagram with different contributions to $\epsilon _{\mathrm{eff}}$ . (a) Deformation of $|\boldsymbol{B}|$ within the principal well violating the equal radial drift condition of omnigeneity (depicted by broken line). (b) Appearance of local ripple or secondary wells. (c) Misalignment of field maxima, leading to multiple-well trapped particles.

4.5. Measures of omnigeneity

With the benchmark in place, we now introduce different measures based on the effective ripple to assess near-axis fields. We propose measures to characterise the effective ripple of second-order constructions, first-order constructions and the shaping involved when the latter are omnigenised at second order.

We start with the fundamental form of the effective ripple.

  1. (a) Effective ripple from buffer regions, $\epsilon _{\mathrm{eff}}^{3/2,(0)}$ .

    Leading order contribution to the effective ripple from the buffer regions, see (4.8). Its calculation requires information of first order and the evaluation of bounce integrals between bounce points defined by $B_0(\varphi )$ .

  2. (b) Second-order effective ripple, $\epsilon _{\mathrm{eff}}^{3/2,(2)}$ .

    Approximate, order $O(r^{4/3})$ contribution to the effective ripple due to omnigeneity breaking at second order, see (4.11). It requires information on the second-order construction and once again the evaluation of bounce integrals with bounce points defined by $B_0(\varphi )$ .

These combine into a single measure in item (c).

  1. (c) Effective ripple at the edge, $\epsilon _{\mathrm{eff}}^{\mathrm{edge}}$ .

    Estimation of the effective ripple value at the flux surface corresponding to a reference aspect ratio of $A_{\mathrm{ref}} = 10$ evaluated using the asymptotic expressions

    (4.13) \begin{equation} \epsilon _{\mathrm{eff}}^{\mathrm{edge}}=\left (\epsilon _{\mathrm{eff}}^{3/2,(0)}+r_{\mathrm{ref}}^2\epsilon _{\mathrm{eff}}^{3/2,(2)}\right )^{2/3}, \end{equation}
    with $r_{\mathrm{ref}}=R/A_{\mathrm{ref}}$ and $R$ is the major radius calculated using the magnetic axis length, $L$ , as $R=L/2\pi$ .

The $\epsilon _{\mathrm{eff}}^{\mathrm{edge}}$ is a dimensionless measure that can be directly interpreted as one would the effective ripple of an optimised stellarator. This is a measure that diagnoses the effective ripple of a fully consistent second-order near-axis construction. However, as discussed previously in this section and by Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025), there are certain aspects of the field that are a result of lower-order choices in the near-axis construction. Thus, we would like to have some way to assess this ‘intrinsic’ behaviour. The simplest measure is item (d).

  1. (d) Non-omnigeneous mismatch at the well bottom,Footnote 8 $\varDelta B_{\mathrm{min}}^{\mathrm{QI}}$ .

    Define

    (4.14) \begin{equation} \varDelta B_{\mathrm{min}}^{\mathrm{QI}}=r_{\mathrm{ref}}^2\left .\frac {\varDelta B_{2c}^{\mathrm{QI}}}{\bar {B}}\right |_{\mathrm{min}} \end{equation}
    evaluated at the bottom of the trapping well. Here, $\bar {B}$ is the average value of $B_0$ and $r_{\mathrm{ref}}$ a reference radial value (which we compute for $A_{\mathrm{ref}}=10$ ). The measure provides a sense of omnigeneity breaking near the bottom of the trapping well normalised to the average field strength. It only requires first -order quantities, following (3.8) of Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025).

To translate this relative breaking of omnigeneity into the language of the effective ripple, we can evaluate $\epsilon _{\mathrm{eff}}^{\mathrm{edge}}$ for a near-axis field constructed using the omnigeneising shaping at second order. That is, the shaping that forces $\varDelta B_{2c}^{\mathrm{QI}}=0$ for all $\varphi$ , barring some masked region near the flattening points. The shaping needed to achieve this is given by Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025, (3.6)–(3.7)). The remaining ripple value is the result of the contribution from the straight sections, we denote as item (e).

  1. (e) Effective ripple of omnigenised field, $\epsilon _{\mathrm{eff}}^{\mathrm{shap}}$ .

    Estimate of the effective ripple of an omnigenised near-axis field at $r_{\mathrm{ref}}$ . It is defined as $\epsilon _{\mathrm{eff}}^{\mathrm{edge}}$ for a field in which the second-order shaping has been chosen to enforce $\varDelta B_{2c}^{\mathrm{QI}}=0$ everywhere except a 15 % of the toroidal domain around the inflexion points. This evaluation requires solving the second-order near-axis equations with the appropriate omnigenising shaping and computing the appropriate bounce integrals.

To quantify how much shaping is required to construct this omnigenised field, we define item (f).

  1. (f) Average omnigenising shaping, $\hat {T}^{\mathrm{shap}}$ .

    Averaged measure of the amount of shaping introduced at second order. We define

    (4.15) \begin{equation} \hat {T}^2=\frac {r_{\mathrm{ref}}^2}{2\pi }\int _0^{2\pi }\left (X_{20}^2+Y_{20}^2+Z_{20}^2+\frac {X_{2c}^2+X_{2s}^2+Y_{2c}^2+Y_{2s}^2+Z_{2c}^2+Z_{2s}^2}{2}\right )\,\mathrm{d}\varphi . \end{equation}
    which we have non-dimensionalised with respect to the minor radius $r_{\mathrm{ref}}$ , indicating the relative deformation of the elliptical cross-sections needed to omnigenise a field. We define $\hat {T}^{\mathrm{shap}}$ as the shaping value of the omnigenised field at an aspect ratio $A_{\mathrm{ref}}=10=R/r_{\mathrm{ref}}$ . Note that $\hat {T} = \hat {T}[X_{2c}, X_{2s}]$ may be considered a functional of the two free shaping functions at second order.

The average measure $\hat {T}$ quantifies second-order shaping in absolute terms, but makes no reference to the first-order shape that it modifies. To elucidate how shaped a configuration is, it is important to consider the interaction with first-order shaping at finite radius $r$ . To capture this, we introduce the critical radius $r_c$ (or its reciprocal, the critical aspect ratio $A_c\sim R/r_c$ ) defined by Landreman (Reference Landreman2021). This measure captures the complexity of flux surfaces by reflecting the maximal radial extent at which flux surfaces continue to exist without any unphysical intersection, i.e. before the Jacobian of the coordinate system vanishes. That way, low $A_c$ indicates that the second-order shaping is compatible with lower first-order shaping for relatively compact fields.

  1. (g) Minimal aspect ratio of omnigenised field, $A_c^{\mathrm{shap}}$ .

    Minimum value of the aspect ratio $A$ for which the near-axis construction of the omnigenised field does not present locally self-intersecting flux surfaces. This is based on the definition of Landreman (Reference Landreman2021),

    (4.16) \begin{equation} A_c=R/\mathrm{min}\left [r\,|\,\exists \,\theta ,\varphi : \mathcal{J}(r,\theta ,\varphi )=0\right ], \end{equation}
    where $\mathcal{J}$ is the Jacobian of the $\{r,\theta ,\varphi \}$ coordinate system.

We gather the abovementioned measures evaluated on the configurations in the benchmark in table 1. The first figure to look at is the effective ripple at the edge, which provides a single measure to contextualise these near-axis constructions amongst the space of optimised stellarators. Configurations with values below a per cent are often regarded as adequate with regards to neoclassical behaviour. It is clear that the second-order ( $O(r^{4/3})$ ) contribution dominates the behaviour of $\epsilon _{\mathrm{eff}}$ . To understand how much of the behaviour comes from the particular choice at second order and how much is intrinsic to the lower orders, we then look at the properties of the omnigenised field.

Table 1. Shaping configurations for effective ripple. The table shows information regarding the omnigeneous nature of the near-axis constructions in the benchmark. The table is separated into two main parts. Top rows show the measures of omnigeneity, in particular, the effective ripple for the original second order field in the benchmark (top), and the omnigenised form of the field (bottom). The lower rows present information regarding the shaping of the original field (top) and the omnigenised field. All the measures are defined in the main text.

The lack of omnigeneity near the inflexion points is manifest in $\epsilon _{\mathrm{eff}}^{\mathrm{shap}}$ , which does not approach the baseline value $\epsilon _{\mathrm{eff}}^{(0)}$ for any of the configurations. This is also indicated by the non-zero values of $\varDelta B_{\mathrm{min}}^{\mathrm{QI}}$ . However, the optimised version of config. 4.4 (by construction) and # 76, both show reduced ripple. What might appear most surprising, though, is that not all omnigenised configurations exhibit smaller ripple than their original forms, that is, $\epsilon _{\mathrm{eff}}^{\mathrm{shap}}\gt \epsilon _{\mathrm{eff}}^{\mathrm{edge}}$ in some cases. This is a result of a strong non-omnigeneous drive near the bottom of the well, which, in the original configuration, partially cancelled the $\varDelta B_{2c}^{\mathrm{QI}}$ away from it.

Figure 4. Evolution of effective ripple with omnigenising second-order shaping. The plots show the evolution of the half-helicity benchmark configuration #76 with changing second-order shaping. (a) Evolution of $\epsilon _{\mathrm{eff}}^{\mathrm{edge}}$ (solid) and $A_c$ (broken) as a function of shaping. A value of 0 for the scaled shape corresponds to the original second-order benchmark configuration, while a value of 1 indicates the omnigenised construction. The shaping is scaled linearly in between. (b) Examples of cross-sections in cylindrical coordinates at three values of shaping, indicated as vertical lines on the left plot.

Figure 4 shows in more detail what the act of omnigenising is, presenting the case of configuration # 76. We choose this case because it has an intrinsic near-omnigeneous behaviour (small $\varDelta B_{\mathrm{min}}^{\mathrm{QI}}$ ) at the bottom of its trapping well, and thus nicely illustrates the omnigenising effect of shaping. We observe that moderate variations in the cross-sections lead to significant changes in the ripple. The plot in panel (a) shows how gradually increasing the shaping to its perfect omnigenising value (0 meaning unshaped and 1 the completely shaped case) reduces the ripple, while the changes in the surfaces lead to a significant increase in $A_c$ . This reflects a general tendency observed with near-axis QI constructions: second-order shaping to improve omnigeneity is often costly in terms of shaping. Freedom at first order must also be used to effectively construct omnigeneous fields.

5. Appearance of secondary trapping wells: $A_w$

In the previous section, we focused on assessing omnigeneity in terms of the asymptotic behaviour of $\epsilon _{\mathrm{eff}}$ . However, we noted that this did not account for the appearance of small localised secondary wells, which we now consider (see figure 3 b). The formation of these defects is linked to increased neoclassical transport (Ho & Kulsrud Reference Ho and Kulsrud1987) and particle losses (Mynick Reference Mynick1983; Paul et al. Reference Paul, Bhattacharjee, Landreman, Alex, Velasco and Nies2022). It is simple to picture a newly formed class of ripple-trapped particles, which live on those local ripples and thus experience whichever the local non-zero radial drift is. A deeper well results in more trapped particles, and the further from the bottom and top along the trapping well such ripple is, the stronger the local drift is. Having a sense of the presence of such ripples is then important.

5.1. Construction of a ripple well measure, $A_w$

How do these secondary wells appear in the approximately QI near-axis scenario? By construction choice, in the limit of an infinite aspect ratio equilibrium ( $r\rightarrow 0$ ), there is a single well defined by $B_0$ and thus no trace of any secondary wells. The ripple well question is then a finite aspect ratio one, which will require evaluating the asymptotic description at a finite $A$ . We define $A_w$ as the largest aspect ratio $A$ for which a ripple well first appears along a magnetic field line within our asymptotic near-axis field model. Trapping wells are identified seeking points at which $\partial _\varphi |_\alpha B=0$ (i.e. partial toroidal derivative keeping the field line label constant, namely $\partial _\varphi |_\alpha B=(\partial _\varphi +\iota \partial _\theta )B$ ). To distinguish ripple wells from the main trapping well defined by $B_0(\varphi )$ on axis, we shall picture the appearance of secondary wells as a ‘dynamic’ action in radius. As we look at surfaces of decreasing aspect ratio, ripples may start forming but must do so by first forming inflexion points, $\partial _\varphi |_\alpha ^2 B=0$ . We therefore define the ripple-well aspect ratio,

(5.1) \begin{equation} A_w=R\big /\min \left \{r \,|\, \exists \,\theta ,\varphi : \partial _\varphi |_\alpha B(r,\theta ,\varphi )=0, \partial _\varphi ^2|_\alpha B(r,\theta ,\varphi )=0\right \}. \end{equation}

In practice, finding $A_w$ requires a procedure (detailed in Appendix C) similar to the calculation of the critical radius $r_c$ introduced previously and originally by Landreman (Reference Landreman2021). Briefly put, the two conditions in the definition of (5.1) written in terms of $B(r,\theta ,\varphi )=\sum _{n=0}^2 r^nB_n(\theta ,\varphi )$ may be interpreted as simultaneous algebraic equations on $r$ and $\theta$ , which may be solved for every $\varphi$ . The resulting multiple roots may then be written as a multi-valued function $\hat {A}_w(\alpha )$ (eliminating $\varphi$ ), of which the maximum is $A_w$ .

5.2. Assessment and application

Let us consider the behaviour of ripple wells in two of the example configurations in the benchmark (see Appendix A) and plot in figure 5 the multi-valued function $1/\hat {A}_w$ . For illustration purposes, we accompany these plots with the corresponding $B$ contours.

Figure 5. Ripple well diagnostic measure $\hat {A}_w$ for configurations 4.1 and 4.3. The plots show (left) the function $1/\hat {A}_w$ as a function of $\alpha$ , the field line label, for configs. (a) 4.1 and (b) 4.3, the spaghetti diagrams. The hatched area represents $\hat {A}_w\gt A_w$ , and the shaded regions the interval of $\alpha$ that have a ripple well. The right plots show the $|\boldsymbol{B}|$ contours corresponding to the $r$ values indicated by the horizontal silver lines on the left plot. The solid black line in the contour plots shows the direction of a magnetic field line, the broken white line contours of $\partial _\varphi |_\alpha B=0$ and the scatter, inflexions captured by the spaghetti diagram.

The plots of $1/\hat {A}_w$ , which we refer to as spaghetti diagrams (borrowing from the condensed matter lingo), are best interpreted from bottom to top. In the interval $0\lt 1/\hat {A}_w\lt 1/A_w$ , the field does not present any secondary well, even though it may present topological defects in the contours of $|\boldsymbol{B}|$ , i.e. puddles (Rodríguez & Plunk Reference Rodríguez and Plunk2023). At $\hat {A}_w=A_w$ , a band is reached; that is, an inflexion point appears along a field line for the first time. By symmetry, these inflexions occur in pairs. Pairs of bifurcating branches appear and separate with increasing $1/\hat {A}_w$ . The shaded areas these curves bound represent every field line (i.e. intervals of $\alpha$ ) containing secondary wells. This area grows at lower aspect ratios and additional bifurcations do appear. We must mention the unpaired bifurcations that appear near $\alpha /\pi \approx 1$ of panel (a), which appear to contravene the general behaviour presented previously, as they do not bound field lines with ripples. In fact, field lines in between have extended trapping wells. At least, until these branches cross.

With all this into account, at a finite $A\lt A_w$ , we expect more ripples in config. 4.1 as compared with 4.3. What the spaghetti diagram fails to indicate is the location (in $\varphi$ ) of such ripples and thus how strong is the radial drift experienced by ripple-trapped particles. To fully assess the relevance of ripples, some of that information should be taken into account, but we shall not explore this further here, and leave the relationship between $A_w$ and the level of departure of the near-axis approximation to $\epsilon _{\mathrm{eff}}$ (see previous section) for future investigation.

The comparison of different configurations can be made more quantitative by looking at $A_w$ , which we present in table 2. The ripple measure $A_w$ exhibits some correlation with the shaping measure $A_c$ (they have a Pearson correlation of $\rho =0.75$ , $p-\text{val}=0.05$ ). The more shaping means the more variation in the field, the larger the second-order field terms and thus the larger $A_w$ . However, this is far from being a one-to-one relationship and $A_w$ merits its own use as a field diagnostic. Minimising $A_w$ leads to ‘cleaner’ $|\boldsymbol{B}|$ contours at finite aspect ratios. From this brief benchmark, it appears that half-helicity configurations (as well as the second-order QI optimised one) are more resilient to the appearance of wells. There are other elements in the near-axis equilibrium that have the potential to significantly influence the appearance of ripple wells, one being the shape of $B_0$ . We would expect configurations with flatter minima, as those favouring MHD stability and maximum- $\mathcal{J}$ (Plunk et al. Reference Plunk, Drevlak, Rodriguez, Babin, Goodman and Hindenlang2024; Rodríguez et al. Reference Rodríguez, Helander and Goodman2024), to be more susceptible to the appearance of ripples.

Table 2. Ripple well distance in the benchmark configurations. The table shows the values of the aspect ratio when the first ripple-well appears, $A_w$ , and that at which the near-axis construction breaks down, $A_c$ , for the configurations used as a benchmark in the paper.

6. Magnetic well stability and shaping: $W$ and $\mathcal{G}^W$

There are crucial physical features of the field beyond omnigeneity that also depend on the second-order form of the field. In particular, we are interested in MHD stability, which we capture in this paper through the so-called magnetic well criterion (Greene Reference Greene1997): a field is deemed unstable (in particular, to interchange instability in the low plasma $\beta$ limit) if $V''\gt 0$ , where $V$ is the volume enclosed by flux surfaces and the primes denote derivatives with respect to $\psi$ . In the context of the near-axis framework, $V''$ can be written in simple form as (Landreman & Jorge Reference Landreman and Jorge2020, (3.6))

(6.1) \begin{equation} V''=2\pi \left |\frac {G_0}{\bar {B}}\right |\int _0^{2\pi }\frac {\mathrm{d}\varphi }{B_0^4}\left [3\left (B_{1s}^2+B_{1c}^2\right )-4B_0B_{20}-\frac {\mu _0p_2B_0^2}{\pi }\int _0^{2\pi }\frac {\mathrm{d}\varphi '}{B_0(\varphi ')^2}\right ]+O(r^2), \end{equation}

where symbols have their standard near-axis meaning (Landreman & Sengupta Reference Landreman and Sengupta2019; Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025). The key ingredient here is $B_{20}$ , the poloidally averaged ‘radial’ gradient of $|\boldsymbol{B}|$ . A positive value is beneficial to stability as it tends to make field-lines curve outwards (from force balance, $\nabla _\perp (B^2/2)=B^2\boldsymbol{\kappa } - \mu _0 \nabla p$ for $\boldsymbol{\kappa }$ the curvature of field lines). The field component $B_{20}$ controls other physics such as precession and the maximum- $\mathcal{J}$ property. We do not delve into this here, but refer the reader to Rodríguez et al. (Reference Rodríguez, Helander and Goodman2024) for an in-depth discussion and several useful measures.

Values of $V''$ are often reported as a relative well measure, given in the form of a percentage (Solov’ev & Shafranov Reference Solov’ev and Shafranov1970, (14.29)). Following this convention, we define the relative well of a finite aspect ratio equilibrium as $W=\int _0^{\psi _a}V''\mathrm{d}\psi /V'(0)$ , where $\psi _a$ is the edge value of $\psi$ . Such a measure might in general be misleading, as the magnetic well criterion is a locally radial one. In the present case of the near-axis expansion, where $V''$ is constant to leading order, though, $W$ is merely a normalisation choice for $V''$ . Choosing as a reference $r_{\mathrm{ref}}=R/A_{\mathrm{ref}}$ (unless otherwise stated, with $A_{\mathrm{ref}}\sim 10$ ), in the near-axis framework, we define

(6.2) \begin{equation} W=\frac {\bar {B}r_{\mathrm{ref}}^2}{4\pi G_0}\left [\int _0^{2\pi }\frac {\mathrm{d}\varphi }{B_0^2}\right ]^{-1}V''. \end{equation}

With such a measure, we may assess the stability of a prescribed second-order field. We expect the stability to depend both on shaping choices such as triangularity and Shafranov shift (Freidberg Reference Freidberg2014, (12.89)), second-order quantities, but also first-order ones. In fact, following the works of Rodríguez et al. (Reference Rodríguez, Helander and Goodman2024, Reference Rodriguez, Plunk and Jorge2025), we can look near the straight sections of the field, where second-order shaping has no effect, to study the intrinsic stability contribution of the first order. In particular, the function $B_{20}$ will have some prescribed value there.

  1. (a) Relative radial gradient at the trapping well bottom, $B_{20,\mathrm{min}}$ .

    We define $B_{20,\mathrm{min}}$ as

    (6.3) \begin{equation} B_{20,\mathrm{min}}=r_{\mathrm{ref}}^2\left .\frac { B_{20}}{B_0}\right |_{\mathrm{min}} \end{equation}
    at the bottom of the trapping well. This is the poloidal-averaged radial gradient at the bottom of the well, which controls the poloidal precession of deeply trapped particles and contributes to stability if positive (Plunk et al. Reference Plunk, Drevlak, Rodriguez, Babin, Goodman and Hindenlang2024; Rodríguez & Mackenbach Reference Rodríguez and Mackenbach2023; Rodríguez et al. Reference Rodríguez, Helander and Goodman2024). This is an intrinsic feature of the first-order construction. The measure is normalised to serve as a relative field strength change at a reference surface of aspect ratio $A_{\mathrm{ref}}$ .

Away from these special points, it is possible to choose the second-order shaping to make the field MHD stable, but how should this shape be chosen and how much does that shaping depend on the lower orders?

6.1. Sensitivity of vacuum well

To determine the sensitivity of the magnetic well to the shaping at second order, we compute the variation of the magnetic well defined in (6.1) with respect to the input functions $X_{2c}$ and $X_{2s}$ on which the integrand depends. Following the general prescription detailed in Appendix E for computing the shape gradient $\mathcal{G}^S=(\delta{\kern-1pt}S/\delta{\kern-1pt}X_{2c},\,\delta{\kern-1pt}S/\delta{\kern-1pt}X_{2s})$ of a general functional of the form

(6.4) \begin{equation} S=\int _0^{2\pi } f(B_{20},B_{2c},B_{2s},\varphi )\,\mathrm{d}\varphi , \end{equation}

we may compute the shape gradient associated with the magnetic well, $\mathcal{G}^{W}$ . For the magnetic well, we need

(6.5) \begin{equation} \frac {\partial f}{\partial B_{20}}=-\frac {2r_{\mathrm{ref}}^2}{B_0^3}\left [\int _0^{2\pi }\frac {\mathrm{d}\varphi }{B_0^2}\right ]^{-1}, \quad \frac {\partial f}{\partial B_{2c}}=0, \quad \frac {\partial f}{\partial B_{2s}}=0, \end{equation}

which may be used to compute explicitly the gradient, as in Appendix E.

Although explicit, the resulting gradient involves the inversion of a differential linear operator (see Appendix D). This is a result of $B_{20}$ being part of a self-consistent equilibrium solution. The necessary calculation to find the gradient is then computationally equivalent to solving a modified, second-order near-axis equilibrium. The strength of this gradient calculation is that, because the magnetic well is linear on $B_{20}$ , and thus also on the shaping, the gradient is independent of second order. Once we have computed the gradient, we know precisely how the magnetic well will change under changes in the shaping.

Before exploiting this knowledge of the gradient to concoct some diagnosing measures of the fields, we can gain some perspective on $\mathcal{G}^{W}$ by considering the simplest limit we can: that of an up-down symmetric tokamak field.Footnote 9 In this limit, any toroidal derivative drops out and (see details in Appendix E.1)

(6.6) \begin{equation} \mathcal{G}_{2c}^W = \frac {3r_{\mathrm{ref}}^2}{\pi R}\frac {\bar {d}^4-1}{\bar {d}^4-3}, \quad \mathcal{G}_{2s}^{W} =0, \end{equation}

where $\bar {d}=1$ corresponds to a tokamak with circular cross-sections.Footnote 10 For the case of circular cross-sections, the magnetic well is insensitive to changes in shaping (triangularity) (Rodríguez Reference Rodríguez2023). For a vertically elongated cross-section ( $\bar {d}\lt 1$ ), an increase in $X_{2c}$ (i.e. of positive triangularity) favours the vacuum well, matching the well-known tokamak intuition (Freidberg Reference Freidberg2014; Rodríguez Reference Rodríguez2023). The divergence as $\bar {d}^4\rightarrow 3$ is worrisome, as it leads to ill-behaviour for a very particular horizontally elongated elliptically shaped tokamak. Such behaviour was previously described and analysed by Rodríguez et al. (Reference Rodríguez2023) in the context of quasisymmetric stellarators, where the generalisation of the above observations is true. The divergence is indicative of only one particular form of shaping $X_{2c}$ being physical and consistent with how the construction is being carried out. This unphysicality can be seen on a similar divergence of triangularity, (D11). Fortunately, configurations of interest tend to live away from this singularity.

Having a knowledge of the gradient $\mathcal{G}^{W}$ provides complete insight into the sensitivity of the magnetic well of a configuration. In particular, we are interested in knowing what is the minimal amount of shaping that would make a given first-order near-axis configuration achieve a magnetic well (mirroring the practical approach of Plunk et al. (Reference Plunk, Drevlak, Rodriguez, Babin, Goodman and Hindenlang2024). Because we have computed the shape gradient, we know precisely which shaping combinations will make a configuration stable: we simply need to choose $X_{2c}$ and $X_{2s}$ such that

(6.7) \begin{equation} \mathcal{C}=\int _0^{2\pi }\left (\mathcal{G}_{2c}^{W}X_{2c}+\mathcal{G}^{W}_{2s}X_{2s}\right )\,\mathrm{d}\varphi +W_{\mathrm{ref}}=0, \end{equation}

where $W_{\mathrm{ref}}$ is the magnetic well value of the second-order near-axis construction for $X_{2c}=0=X_{2s}$ . This imposes marginal stability, and in the rare case of $W_{\mathrm{ref}}\gt 0$ , it would require relaxing the stability of the field. The ‘problem’, though, is that there is no unique way of choosing the shaping to satisfy this constraint. We must then impose some regularising choice, which we take to be one that minimises shaping in the form of an integral over the sum of squares of all the second-order shaping functions, as defined in (4.15).Footnote 11 The problem of finding the minimal stabilising shaping can then be formulated as one of finding $X_{2c}$ and $X_{2s}$ that minimise the following constrained variational problem:

(6.8) \begin{equation} T^2[X_{2c},X_{2s}]=\hat {T}^2[X_{2c},X_{2s}]-\lambda \,\mathcal{C}[X_{2c},X_{2s}], \end{equation}

where $\lambda$ is a Lagrange multiplier. We denote the resulting shaping as $X_{2c}^{\mathrm{mhd}}$ and $X_{2s}^{\mathrm{mhd}}$ , for which explicit expressions may be found in Appendix F. These expressions involve the shape gradients computed previously, as well as some additional matrix multiplications, and could in principle be studied analytically. The main power of the approach is however providing a prescription to construct marginally stable approximately QI near-axis fields given a choice of axis, magnetic field strength on axis and first-order information.

To assess such stabilised constructions, we introduce some simple measures. One of the simplest is the following.

  1. (b) Average second-order shaping of stabilised field, $\hat {T}^{\mathrm{mhd}}$ .

    The root-mean-square value of the consistent stabilised second-order shaping, evaluated using (4.15) using the minimal, stabilising choice of shaping, $\hat {T}^{\mathrm{mhd}} = \hat {T}[X_{2c}^{\mathrm{mhd}},X_{2s}^{\mathrm{mhd}}]$ . It is therefore a simple measure of the amount of shaping necessary to stabilise a field, normalised to some reference $r_{\mathrm{ref}}$ .

Table 3. Magnetic well sensitivity of benchmark configurations. The table shows the values of the magnetic well and re-shaped fields for the benchmark configurations, the shape $\hat {T}$ and $r_c^{\mathrm{mhd}}$ second-order shaping measures.

A more accurate measure of the shaping that takes toroidal variation into consideration may also be introduced as follows.

  1. (c) Critical aspect ratio of stabilised field, $A_c^{\mathrm{mhd}}$ .

    The minimum aspect ratio for which the near-axis construction of the stabilised configuration is physical (non-intersecting flux-surfaces). That is, $A_c$ for the near-axis field evaluated with $X_{2c}^{\mathrm{mhd}}$ and $X_{2s}^{\mathrm{mhd}}$ . It is a dimensionless quantity.

Finally, to get a sense of the sensitivity of the shaping and the magnetic well, we also define $ \varDelta W/\varDelta A_c$ as follows.

  1. (d) Magnetic well sensitivity, $ \varDelta W/\varDelta A_c$ .

    Change in the magnetic well $W$ with the change of shaping as measured by $A_c$ around the marginally stable point. Here, we define it by finite differencing as

    (6.9) \begin{equation} \frac {\varDelta W}{\varDelta A_c} = \frac {W(V''=1\,\text{T}^{-2}\,\text{m}^{-1})}{A_c(V''=1\,\text{T}^{-2}\,\text{m}^{-1})-A_c(V''=0)}, \end{equation}
    a dimensionless quantity. A larger value indicates increased sensitivity to shaping. We leave a more precise (perhaps analytic) form of this quantity to future work.

6.2. Numerical implementation and benchmark

We apply the abovementioned measures to the configurations that constitute the benchmark for this paper. We compute the shape gradient for all such configurations, compute their stabilised versions and evaluate the scalar measures presented previously. A summary of the relevant vacuum-well-related properties is gathered in table 3. We start by noting that all configurations in the benchmark are MHD unstable, which appears to be the overwhelming tendency with constructed QI fields, as is the case with the other classes of omnigeneous fields (Landreman & Jorge Reference Landreman and Jorge2020; Landreman Reference Landreman2022; Rodríguez et al. Reference Rodríguez2023). All examples encountered require some concerted shaping to push them towards MHD stability, which we illustrate in figure 6. The correctness of the approach is evidenced in the vanishing of the magnetic well machine precision for the reshaped configurations, $W_{{mhd}}$ , in table 3.

Figure 6. Stabilised configurations and sensitivity of vacuum magnetic well to shaping. (a,b) Plots show (left) the shaping input for stabilising the near-axis fields and (right) the resulting re-shaped cross-sections for the first three configurations of the benchmark. The black, solid lines represent the re-shaped configuration, while the dotted one denotes the starting point. (c) Change in the magnetic well as a function of the shaping measure $A_c$ , illustrating the sensitivity of the fields to shaping.

Beyond the qualitative assessment of the shaping needed from the cross-sections, both the measures $\hat {T}$ and $A_c^{\mathrm{mhd}}$ quantitatively describe the amount of shaping, with the simpler form correlating with the latter. Whenever the re-shaped configuration has a small value for the critical radius, it means that significant shaping is present and if there is a large difference from the original benchmark field construction, $A_c$ in table 3, we can conclude that the magnetic well is quite insensitive to shaping. Such sensitivity is more precisely measured by $\varDelta W/\varDelta A_c$ . Note its large value in the case of config. 4.2, figure 6(b), where minor changes in the shape of the cross-sections are enough to stabilise the field (see figure 6 c). This configuration is also special in that $B_{20,\mathrm{min}}\gt 0$ , as we may expect from the help of having a finite plasma beta in that case. The high sensitivity is a potentially problematic feature of the field if small changes in its shaping can change the response significantly. Note however that this sensitivity does change with $W$ (see figure 6 c) so that a given configuration could perhaps be made less sensitive if sufficiently stabilised. This merits further study.

If one was interested in finding the most MHD stable configurations, these measures could be used as a target of optimisation, which could be helped by the exploitation of ideas from Plunk et al. (Reference Plunk, Drevlak, Rodriguez, Babin, Goodman and Hindenlang2024) and Rodríguez et al. (Reference Rodríguez, Helander and Goodman2024). Before moving on, we note that this notion of MHD stability is only a minimal one, but not necessarily sufficient to achieve true MHD stability. Behaviour such as localised ballooning modes will react differently to the field geometry. In addition, this stabilising reshaping necessarily causes other second-order behaviours to change, and the ensuing trade-offs are an important venue of future work.

7. $\beta$ -sensitivity of Shafranov shift

So far in this paper, we have made little explicit reference to plasma pressure. As we change the plasma pressure, though, we expect the magnetic field to change, as the Lorentz forces should continuously balance pressure gradients. One of the most notable consequences is the change in the Shafranov shift, the relative rigid displacement of nested flux surfaces with respect to each other. To describe this shift, we must define a reference point, a ‘centre’, for each cross-section at different radii, and define the Shafranov shift to be the $\psi$ -derivative of the position of that mid-point. In the context of the near-axis description, the Shafranov shift can be defined as (Rodríguez Reference Rodríguez2023, (3.5); Landreman Reference Landreman2021)

(7.1) \begin{equation} \boldsymbol{\varDelta } = \begin{pmatrix} \varDelta _x \\ \varDelta _y \end{pmatrix} = \begin{pmatrix} X_{20}+X_{2c} \\ Y_{20}+Y_{2c} \end{pmatrix}, \end{equation}

where the displacements are in the normal ( $x$ ) or binormal ( $y$ ) direction as defined by the signed Frenet–Serret frame of the magnetic axis. This expression matches the known definition in the tokamak limit, but one should bear in mind that there is no unique way in which to define the ‘centre’ of a non-elliptical cross-section.

As the pressure gradient increases, so does the Shafranov shift, which results from the plasma pushing against the magnetic field (the poloidal field and hence $\iota$ , in a tokamak). Formally, as plasma pressure increases, so does $B_{20}$ linearly, and with it, the rigid displacement of surfaces $X_{20}$ , eventually leading to two consecutive flux surfaces to touch (see figure 9). This breakdown limits the existence of the equilibrium and thus it is important to gauge how sensitive a field is to changes in pressure. In the context of the near-axis expansion, the sensitivity of a field to changes in the pressure is most naturally formulated keeping the shape of the magnetic axis fixed. This is unlike the scenario of how an actual stellarator might be operated experimentally, namely by fixing some given coil currents (and thus a vacuum field), and letting plasma pressure grow. Modelling the latter, which generally will require the magnetic axis shape to vary with $\beta$ , would involve mathematically separating the vacuum from the plasma field and performing a double expansion, and we do not do that here.

7.1. Shafranov shift shape gradient, $\mathcal{S}$

The variations problem is now one of $\delta{\kern-1pt}\boldsymbol{\varDelta }$ , a change in the shift, with $\delta{\kern-1pt}p_2$ , a change in the pressure gradient. As a result of the change in the plasma pressure, from the definition in (7.1),

(7.2) \begin{equation} \delta{\kern-1pt}\boldsymbol{\varDelta }=\underbrace {\begin{pmatrix} \delta{\kern-1pt}X_{20} \\ \delta{\kern-1pt}Y_{20} \end{pmatrix}}_{\text{Rigid shift}} + \underbrace {\begin{pmatrix} 0 \\ \delta{\kern-1pt}Y_{2c} \end{pmatrix}}_{\text{Triangular shaping}}, \end{equation}

where we distinguish between the shift of the ‘cross-section’ due to a rigid displacement and due to triangular shaping. Although both contribute to the Shafranov shift, we shall here focus on the $\theta$ -average, rigid shift, most useful when thinking of the problem in terms of shifted ellipses (see figure 9).

The variation required then simply involves the second-order equations in Appendix D, explicitly in (D3). In this case, unlike for the magnetic well sensitivity, we need the variation respect to $\delta{\kern-1pt}p_2$ , a scalar,

(7.3) \begin{equation} \hat {\mathbb{L}}\begin{pmatrix} \delta{\kern-1pt}X_{20} \\ \delta{\kern-1pt}Y_{20} \end{pmatrix} = \frac {\delta{\kern-1pt}\boldsymbol{f}}{\delta{\kern-1pt}p_2}\delta{\kern-1pt}p_2, \end{equation}

the variation of $\hat {\mathbb{L}}$ vanishing exactly. Solving this linear system, we may define

(7.4) \begin{equation} \boldsymbol{\mathcal{S}}=\hat {\mathbb{L}}^{-1}\frac {\delta{\kern-1pt}\boldsymbol{f}}{\delta{\kern-1pt}p_2}, \end{equation}

which is a vector function of $\varphi$ . This gradient holds for all second-order choices, as the equation is linear on $p_2$ . That is, $\boldsymbol{\mathcal{S}}$ is a property of the first-order field.

It is natural to introduce some normalisation for the gradient now. With $[\varDelta ]=[L]^{-1}$ and $[p_2]=[p][L]^{-2}$ , introducing the dimensionless plasma beta parameter $\beta _{p,2}=\mu _0p_2/(\bar {B}^2/2)$ for some reference magnetic field and the reference $r_{\mathrm{ref}}=R/A_{\mathrm{ref}}$ , we define $\boldsymbol{\hat{\mathcal{S}}}=(\bar{B}^{2}/2\mu_{0} r_{\mathrm{ref}})\boldsymbol{\mathcal{S}}$ . We should therefore interpret this gradient as a fractional displacement of the surface at a reference aspect ratio $A_{\mathrm{ref}}$ due to a change in plasma beta. We define the following.

  1. (a) Maximum sensitivity of Shafranov shift, $\hat {\mathcal{S}}_{\mathrm{max}}$ .

    Maximum relative value of the Shafranov shift gradient with respect to changes of plasma $\beta$ at a reference aspect ratio $A_{\mathrm{ref}}$ ,

    (7.5) \begin{equation} \hat{\mathcal{S}}_{\mathrm{max}}= \max_{\varphi} \left [\frac {\bar {B}^{2}}{2\mu_{0} r_{\mathrm{ref}}}|{\boldsymbol{\mathcal{S}}}|\right ]. \end{equation}

It is illuminating to consider the familiar tokamak limit. Simplifying the system (see details in Appendix D.3), and considering for simplicity an up-down symmetric configuration,

(7.6) \begin{equation} \hat {\mathcal{S}}_{\mathrm{max}}=\frac {A_{\mathrm{ref}}}{\iota _0^2}\frac {\bar {d}^4}{\bar {d}^4-3}, \end{equation}

where all quantities have their usual meaning. The sensitivity grows with aspect ratio, as the same displacement becomes relatively larger compared with the minor radius. The scaling with $\propto \iota _0^{-2}$ responds to the physical picture of the poloidal field balancing the pressure gradient. A stronger poloidal component means the more resilient the field is to the push of the pressure. The role of elongation is more involved, although it guarantees for vertically elongated configurations, $\bar {d}\lt 1$ , $\hat {\mathcal{S}}_{x}\lt 0$ . That is, there will be a bunching of surfaces on the outboard side. It also shows the artificial divergence discussed in the previous section.

So far, the gradient measure defined in (7.5), $\hat {S}_{\mathrm{max}}$ , provides a scalar measure of sensitivity without distinguishing direction. The significance of any given shift does however depend on the direction in which it occurs. It is not the same to rigidly shift nested ellipses in the direction of the minor axis or the major axis. For directions in which surfaces are closer to each other, the bunching of surfaces is easier and so, potentially, is their intersection. We define an associated critical $\beta$ as that value for which, due to the rigid Shafranov shift, the underlying first-order ellipses just touch at a radius of $r_{\mathrm{ref}}$ . This definition directly uses $\hat {\boldsymbol{\mathcal{S}}}$ , as described in detail in Appendix G and illustrated in figure 9.

  1. (b) Estimate of critical plasma $\beta$ , $\beta _\varDelta$ .

    Estimate of the critical plasma $\beta _p$ at which, due to the rigid part of the Shafranov shift, the first-order near-axis elliptical flux surfaces of an equilibrium just touch at $r=r_{\mathrm{ref}}$ . The value of the plasma beta is defined as a dimensionless scalar $\beta _\varDelta$ , for which a full definition is provided in (G12). Large values of $\beta _\varDelta$ indicate the resilience of the Shafranov shift to changes in plasma $\beta$ .

The metric $\beta _\varDelta$ condenses the information of the gradient $\boldsymbol{\mathcal{S}}$ into a single physically meaningful measure. However, it does so under certain simplifying assumptions. In particular, when it comes to describing when flux surfaces touch each other, it ignores the triangular shaping of flux surfaces, approximating them as ellipses. Thus, $\beta _\varDelta$ is only an estimate of the true critical plasma $\beta$ , which we may compute numerically.

  1. (c) Numerical critical plasma $\beta$ , $\beta _c$ .

    Critical value of $\beta _p=r_{\mathrm{ref}}^2\beta _{p,2}$ , for an assumed aspect ratio $A_{\mathrm{ref}}$ , at which the flux surfaces of the near-axis construction just touch. That is, for $\beta _p = \beta _c$ , we have $A_c = A_{\mathrm{ref}}$ .

In other words, fixing $\beta _p = \beta _c$ , the near-axis construction will not succeed for aspect ratios below $A_{\mathrm{ref}}$ . The value of $\beta _c$ may be found by a root search (and thus is more numerically costly) and includes all elements of shaping up to (and including) second order. We emphasise that this quantity, although defined in exact terms, may still not be the most realistic $\beta$ limit, because it is calculated taking the axis fixed, allowing flux surfaces to move around it as the plasma beta is changed.

7.2. Implementation and examples

We assess the Shafranov shift sensitivity in the configurations of the benchmark. Figure 7 shows the shape gradient of the Shafranov shift for two different examples and table 4 summarises the scalar features of the configurations.Footnote 12

Figure 7. Shafranov shift sensitivity to plasma $\beta$ . The plots show the shape gradient $\hat {\mathcal{S}}_{x}$ and $\hat {\mathcal{S}}_{y}$ for configurations (a) 4.1 and (b) 4.3 in the benchmark set.

The sensitivity $\mathcal{S}_{\mathrm{max}}$ shows that there exists a wide range of sensitivities to changes in plasma $\beta$ . The gradient as a function of $\varphi$ delves deeper into these differences showing the stark difference in the binormal shift of the surfaces (which the half-helicity field 4.3 appears to avoid to a large extent). The gradients also vanish at certain points in $\varphi$ , corresponding to the directions that would break the up-down symmetry of the cross-sections at stellarator symmetric points. From this benchmark, the lowest number of field period configuration (config. 4.1) is the most sensitive, which also has the lowest value of rotational transform. This is true of $\beta _\varDelta$ as well, showing that half-helicity configurations (namely configs. 4.3, # 50 and # 76) consistently exhibit larger beta limits.

The tools introduced here make it possible, in principle, to explore the generality of such observations, but an in-depth analysis is left for future work.

Table 4. Shafranov shift sensitivity to plasma pressure. The table shows the values of the maximum sensitivity of the Shafranov shift, the estimate and numerical critical $\beta$ as well as the reference rotational transform on axis. The half-helicity fields appear to be the most resilient in the benchmark set. The comparison of $\beta _c$ to $\beta _\varDelta$ shows that although $\beta _c$ includes some key elements of the full phenomena, it can deviate significantly.

8. Conclusions

Recent works have demonstrated that it is possible to find approximately quasi-isodynamic stellarator equilibria to second order using near-axis theory, and faithfully reproduce their properties in global equilibria at finite aspect ratio. Such ‘directly constructed’ stellarator equilibria can in principle be used as the basis for further integrated optimisation to develop new stellarator designs.

However, to make the near-axis construction really practically useful, both for developing fundamental understanding and as a tool for stellarator optimisation, it is critical to develop techniques to navigate the space of second-order solutions. The present work tackles this task by defining a set of measures designed to assess the key properties for which a quasi-isodynamic stellarator strives, including low neoclassical transport, quality of omnigeneity and robust stability. Other measures already implemented (although not mentioned in the text) include the coil complexity proxy $L_{\nabla B}$ (Landreman Reference Landreman2021; Kappel, Landreman & Malhotra Reference Kappel, Landreman and Malhotra2024), the effective Rosenbluth–Hinton residual (Rosenbluth & Hinton Reference Rosenbluth and Hinton1998; Rodriguez & Plunk Reference Rodriguez and Plunk2025; Zhu, Lin & Bhattacharjee Reference Zhu, Lin and Bhattacharjee2025) and proxies to evaluate the maximum- $J$ property (Rodríguez et al. Reference Rodríguez, Helander and Goodman2024). Virtually any other measure that depends on magnetic geometry, for instance, MHD ballooning stability or micro-turbulence, can be readily implemented as well in the future.

The procedure for obtaining fields to second order involves fixing a set of free functions at zeroth, first and second order. Unsurprisingly, there is a certain interaction between these choices and the metrics have been formulated in a manner to help assess these choices. We also propose constructive approaches to make these choices, e.g. a way to obtain a minimally shaped, marginally stable (in the magnetic well sense) field or to construct an optimally ‘omnigenised’ configuration given a first-order construction.

The toolset presented here, consisting of both absolute measures (e.g. $\epsilon _{\mathrm{eff}}$ on edge) and sensitivity measures (shape gradient of the magnetic well), now opens the way to exploratory studies of the broad parameter space of QI stellarators, and systematic investigation of ‘trade-offs’ – i.e. the compatibility of desired stellarators properties, underlying reasons and strategies for effectively striking compromises.

Acknowledgements

We thank Carolin Nührenberg for her assistance with magnetic well definitions.

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

Data availability

The data and scripts that support the findings of this study are openly available at the Zenodo repository with DOI/URL 10.5281/zenodo.15340967.

Declaration of interests

The authors report no conflict of interest.

Funding

E.R. was partially supported by a grant by Alexander-von-Humboldt-Stiftung, Bonn, Germany, through a postdoctoral research fellowship.

Appendix A. Benchmark configuration summary

Throughout the paper, we use a number of near-axis fields as a way of benchmarking or illustrating the various measures introduced. In this section, we summarise of what those configurations consist, indicating their main features and referring to the right piece of literature where appropriate.

A.1. QI database

In § 3, we use a large set of QI configurations as a way to benchmark the $\delta{\kern-1pt}B$ measure. This benchmark set had previously been used in work like Rodriguez & Plunk (Reference Rodriguez and Plunk2025), and we now present some of its details. A full description of its construction and the theoretical elements that go into it will be the focus of future publication (Plunk et al. Reference Plunk2025). For a specific example, see Plunk et al. (Reference Plunk, Drevlak, Rodriguez, Babin, Goodman and Hindenlang2024).

The benchmark set consists of first-order QI configurations with a number of field periods ranging from $N=1$ to $6$ , constructed as a three-parameter family as follows. The first parameter is related to the shape of the magnetic axis, which is described by its curvature, $\kappa$ , and torsion, $\tau$ . For technical reasons, these must be defined differently for the case $N=1$ , as compared with $N \geqslant 2$ . For the former, we define

(A1) \begin{align} \kappa = \cos ^2\left (\frac {N \ell }{2}\right ) \sin \left (\frac {N \ell }{2}\right )\left ( \kappa _1 \sin (N \ell ) + \kappa _2 \sin (2 N \ell ) \right ), \end{align}
(A2) \begin{align} \tau = \tau _0 + \tau _1 \cos ( N \ell ) + \tau _2 \cos (2 N \ell ), \end{align}

while in the latter case ( $N \geqslant 2$ ), we set $\kappa _2 = 0$ and $\tau _2 = 0$ . This difference is because four degrees of freedom are here used to close the curve smoothly for the case $N =1$ , while only two degrees of freedom are required for $N \geqslant 2$ . Thus, a single parameter remains to define a one-parameter family of curves. The variable $\ell$ is the length along the curve. This describes a stellarator symmetric axis with zeroes of second order at the tops and third order at the bottom. This is consistent with a curve of half-helicity (Camacho Mata & Plunk Reference Camacho Mata and Plunk2023; Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025). The total length of the axis is taken to be $L=2\pi$ .

The magnetic field on axis $B_0$ is chosen to match the zeroes of $\kappa$ ,

(A3) \begin{equation} B_0 = 1 + 0.25 \cos (N \ell ) + 0.0625 \cos (2N \ell ), \end{equation}

and to have a mirror ratio of ${\sim} 24\,\%$ .Footnote 13 The breaking of omnigeneity necessary at first order is done through a smooth buffer region as described by Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025, § B.2.3) of order $k=3$ .

The first-order construction is finalised by the choice of the elongation profile,

(A4) \begin{equation} \rho = \rho _0 + \rho _1 \cos (N \varphi ), \end{equation}

which is directly related to the more common near-axis quantities of Landreman & Sengupta (Reference Landreman and Sengupta2019) and Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025)] by $\rho = \bar {e} + (1 + \sigma ^2)/\bar {e}$ , where $\bar {e}=\bar {d}^2B_0/\bar {B}$ (which is intimately related to the true elongation of the flux surface) (Plunk et al. Reference Plunk, Drevlak, Rodriguez, Babin, Goodman and Hindenlang2024). These two parameters $\{\rho _0,\rho _1\}$ , together with $\tau _1$ , are our three parameters that span the QI database set considered.

Considering different values of these parameters, the QI database is constructed with a total of 1680 configurations distributed in $\{63,502,358,244,250,263\}$ between number of field periods $\{1,2,3,4,5,6\}$ . Further details on the procedure followed to construct such configurations will follow in a future paper.

A.2. Benchmark configurations from Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025)

In the rest of the paper, we use a reduced set of benchmark configurations, mainly based on those used and explored by Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025, § 4) to test the correct near-axis construction to second order. Here, we briefly summarise the key properties of each of those configurations,

  1. (a) Configuration 4.1: minimally shaped second-order stellarator symmetric, vacuum configuration with $N=2$ , a smooth buffer region with $k=5$ , mirror ratio $15\,\%$ and first-order zeroes of curvature (zero helicity axis).

  2. (b) Configuration 4.2: shaped second-order stellarator symmetric, finite beta and current configuration with $N=3$ , a smooth buffer region with $k=5$ , mirror ratio $25\,\%$ and first-order zeroes of curvature (zero helicity axis).

  3. (c) Configuration 4.3: minimally shaped second-order stellarator symmetric, vacuum configuration with $N=3$ , a smooth buffer region with $k=5$ , mirror ratio $25\,\%$ , and third-order zero of curvature at the bottom and two at the top (half-helicity axis).

  4. (d) Configuration 4.4: minimally shaped second-order stellarator symmetric, vacuum configuration with $N=3$ , a smooth buffer region with $k=5$ , mirror ratio $25\,\%$ , and third-order zero of curvature at the bottom and first-order zeroes of curvature (zero helicity axis). The first-order choices were then optimised to minimise the second-order QI error in the central $20\,\%$ of the toroidal domain. In this paper, we include both the unoptimised and optimised versions.

Figure 8 shows three-dimensional renditions of these configurations for reference.

Figure 8. Three-dimensional rendition of configurations in the benchmark set constructed for $r=0.1$ and with the colourmap denoting the strength of the magnetic field $|\boldsymbol{B}|$ .

A.3. Additional half-helicity configurations

In addition to the abovementioned findings, we also include two additional half-helicity fields constructed much in the same way as Config. 4.4, but corresponding to other constructions in the same parameter family.

  1. (a) Config. # 50: $\kappa _1=- 7.451287$ , $\tau _0=1.379097$ , $\tau _1=- 0.444444$ , $\rho _0=4.5$ , $\rho _1=- 0.9$ .

  2. (b) Config. # 76: $\kappa _1=- 8.938611$ , $\tau _0=1.284143$ , $\tau _1=- 0.177778$ , $\rho _0=4.5$ , $\rho _1=- 0.9$ .

The case of # 76 is particularly interesting, as it has a rather omnigeneous intrinsic second-order behaviour. See figure 8 for the configurations.

Appendix B. Details on the near-axis form of $\epsilon _{\mathrm{eff}}$

In this appendix, we present the details of the asymptotic treatment of the effective ripple of a magnetic field with poloidal contours of $|\boldsymbol{B}|$ within the near-axis framework. The expression we must evaluate asymptotically is the following:

(4.6) \begin{equation} \epsilon _{\mathrm{eff}}^{3/2}=\frac {\pi }{8\sqrt {2}}\frac {(\bar {R}\bar {B})^2}{\mathcal{G}^2}\,\int _{1/B_{\mathrm{max}}}^{1/B_{\mathrm{min}}}\lambda \hat {\mathcal{E}}(\lambda )\,\mathrm{d}\lambda , \end{equation}

where

(4.7) \begin{align} \hat {\mathcal{E}}(\lambda ) &= \frac {1}{\pi }\int _0^{2\pi }\frac {\hat {H}(\lambda ,\alpha )^2}{\hat {I}(\lambda ,\alpha )}\,\mathrm{d}\alpha , \end{align}
(B1a) \begin{align} \hat {H}(\lambda ,\alpha ) &= \frac {1}{\bar {B}}\int _{\varphi _-}^{\varphi _+}\frac {\mathcal{H}(\lambda ,\textit{B})}{B^2}\boldsymbol{B}\times \nabla B\boldsymbol{\cdot \nabla} \psi \,\mathrm{d}\varphi , \end{align}
(B1b) \begin{align} \hat {I}(\lambda ,\alpha ) &= \int _{\varphi _-}^{\varphi _+}\frac {\sqrt {1-\lambda B}}{(B/\bar {B})^2}\mathrm{d}\varphi , \end{align}
(B1c) \begin{align} \nonumber\\[-3pc] \mathcal{G}^2 &= 2\left (\frac {1}{2\pi }\int _0^{2\pi }\mathrm{d}\alpha \int _0^{2\pi /N}\mathrm{d}\varphi \frac {|\nabla \psi |}{B^2}\right )^2\Bigg /\left (\frac {1}{2\pi }\int _0^{2\pi }\mathrm{d}\alpha \int _0^{2\pi /N}\frac {\mathrm{d}\varphi }{B^2}\right ), \end{align}
(4.3) \begin{equation} \mathcal{H}(\lambda ,B)=\frac{\sqrt{1-\lambda B}}{(B/\bar{B})^{2}}\left (\frac{4}{\lambda B}-1\right ), \end{equation}

where we have explicitly applied the considerations in § 4.1 to write the expressions in the most near-axis friendly form.

B.1. Expansion of $\hat {H}$

For the expansion of $\hat {H}$ , let us write using Boozer coordinates

(B2) \begin{equation} \boldsymbol{B}\times \nabla B\boldsymbol{\cdot \nabla} \psi = \frac {B^2}{G+\iota I}(I\partial _\varphi -G\partial _\theta )B, \end{equation}

which may be directly expanded,

(B3) \begin{align} \frac {\boldsymbol{B}\times \nabla B\boldsymbol{\cdot \nabla} \psi }{B^2}&\approx rB_0d\cos (\alpha -\alpha _{\mathrm{buf}})+ \end{align}
(B4) \begin{align} &\quad{} + r^2\left (B_{2s}^{\mathrm{QI}}\cos 2\alpha -B_{2c}^{\mathrm{QI}}\sin 2\alpha +\frac {I_2B_0'}{G_0}\right ) + O(r^3),\\[10pt]\nonumber \end{align}

where the order $O(r^3)$ term will include third-order elements of the magnetic field magnitude and thus we shall not include them.

With this expansion of the radial drift and noting that $\mathcal{H}$ vanishes at bounce points, the perturbation of $\hat {H}$ is a combination of the asymptotic form of the drift and that of the integrand $\mathcal{H}$ . At first order, we easily obtain $\hat {H}\approx rh^{(1)}\sin \alpha$ ,

(4.9b) \begin{equation} h^{(1)} =\int _{\varphi _-}^{\varphi _+}\frac {B_0}{\bar {B}}\mathcal{H}(\lambda ,B_0)d\sin \alpha _{\mathrm{buf}}\,\mathrm{d}\varphi , \end{equation}

where the odd part of the radial drift does not contribute, as its contributions from each side of the well precisely cancel out.

At second order, we must consider both the contributions from the modification in the drift, but also the measure $\mathcal{H}$ . To avoid the explicit appearance of the singular integrand $1/\sqrt {1-\lambda B_0}$ , we integrate the resulting expression by parts (the boundary term being guaranteed to vanish for a field without puddles, Rodríguez & Plunk Reference Rodríguez and Plunk2023), and thus, after enforcing parity in $\varphi$ and collecting terms $\hat {H}$ from both the perturbed $\hat {H}\approx rh^{(1)}\sin \alpha +r^2h^{(2)}\sin 2\alpha$ ,

(4.12a) \begin{align} h^{(2)} &= -2\int _{\varphi _-}^{\varphi _+}\mathcal{H}(\lambda ,B_0)\frac {\varDelta B_{2c}^{\mathrm{QI}}}{\bar {B}}\,\mathrm{d}\varphi , \end{align}
(4.12b) \begin{align} \varDelta B_{2c}^{\mathrm{QI}} &= B_{2c}^{\mathrm{QI}}-\frac {1}{4}\partial _\varphi \left (\frac {B_0^2d^2}{B_0'}\cos 2\alpha _{\mathrm{buf}}\right ).\\[10pt]\nonumber \end{align}

B.2. Expansion of $\hat {I}$

We may now proceed in a similar fashion with the asymptotic evaluation of $\hat {I}$ . It is useful to note that $\hat {I}$ is almost the expression for the second adiabatic invariant $\mathcal{J}_\parallel$ for trapped particles labelled by $\lambda$ . Fortunately, the asymptotic treatment of such expressions (especially at higher order), with the careful handling of the boundary contributions, has already been done elsewhere and thus we simply need to get the appropriate expressions from Rodríguez et al. (Reference Rodríguez, Helander and Goodman2024).

The leading order asymptotic form is simple, $\hat {I}\approx I^{(0)}$ ,

(4.9b) \begin{equation} I^{(0)} = \int _{\varphi _-}^{\varphi _+}\frac {\sqrt {1-\lambda B_0}}{(B_0/\bar {B})^2}\mathrm{d}\varphi . \end{equation}

For the next orders, we can directly draw from (A14) of Rodríguez et al. (Reference Rodríguez, Helander and Goodman2024), and thus write separating $\hat {I}\approx I^{(0)}+rI^{(1)}\cos \alpha +r^2(\bar {I}^{(2)}+\tilde {I}^{(2)}\cos 2\alpha )$ ,

(B6) \begin{equation} I^{(1)}=-2\int _{\varphi _-}^{\varphi _+}F^\star (\lambda ,B_0)d\sin \alpha _{\mathrm{buf}}\,\mathrm{d}\varphi , \end{equation}

and

(B7a) \begin{align} \bar {I}^{(2)}&= -2\int _{\varphi _-}^{\varphi _+}\frac {F^\star (\lambda ,B_0)}{B_0}\left [B_{20}-\frac {1}{4}\partial _\varphi \left (\frac {B_0^2d^2}{B_0'}\right )\right ]\,\mathrm{d}\varphi , \end{align}
(B7b) \begin{align} \tilde {I}^{(2)}&= 2\int _{\varphi _-}^{\varphi _+}\frac {F^\star (\lambda ,B_0)}{B_0}\left [B_{2c}^{\mathrm{QI}}-\frac {1}{4}\partial _\varphi \left (\frac {B_0^2d^2}{B_0'}\cos 2\alpha _{\mathrm{buf}}\right )\right ]\,\mathrm{d}\varphi ,\\[10pt]\nonumber \end{align}

where

(B8) \begin{equation} F^\star (\lambda ,B_0)=\frac {1}{\sqrt {1-\lambda B_0}}\frac {1-3\lambda B_0/4}{(B_0/\bar {B})^2}. \end{equation}

Note that all the $\alpha$ dependence of $\hat {I}$ vanishes in the QI limit, as it must do given the similarity of $\hat {I}$ with $\mathcal{J}_\parallel$ ; the second adiabatic invariant is a flux function in an omnigeneous field (Bernardin et al. Reference Bernardin, Moses and Tataronis1986). The first-order correction is purely driven by the buffer region, while the second comes from the second-order QI mismatch. In that omnigeneous limit, $\bar {I}^{(2)}$ is the only higher order correction left to second order, and it represents the change in the field line length ( $B_{20}$ ), but also in the velocity of the trapped particle along the bounce trajectory.

B.3. Constructing $\mathcal{E}$

Let us then consider now using the asymptotic definitions $\hat {H}\approx rh^{(1)}\sin \alpha +r^2h^{(2)}\sin 2\alpha$ and $\hat {I}\approx I^{(0)}+rI^{(1)}\cos \alpha +r^2(\bar {I}^{(2)}+\tilde {I}^{(2)}\cos 2\alpha )$ ,

(B9) \begin{align} \frac {1}{2\pi }\int _0^{2\pi }\frac {\hat {H}^2}{\hat {I}}\mathrm{d}\alpha &\approx \frac {r^2}{2}\Bigg[\frac {(h^{(1)})^2}{I^{(0)}}+ r^2\Bigg (\frac {(h^{(2)})^2}{I^{(0)}}\underbrace {-\frac {h^{(2)}h^{(1)}}{I^{(0)}}\frac {I^{(1)}}{I^{(0)}}}_{\unicode {x2460}}\end{align}
(B10) \begin{align} &\quad{} +\underbrace {\frac {(h^{(1)})^2}{I^{(0)}}\Bigg [\Bigg (\frac {I^{(1)}}{2I^{(0)}}\Bigg )^2-\frac {\bar {I}^{(2)}-\tilde {I}^{(2)}/2}{I^{(0)}}\Bigg ]}_{\unicode {x2461}}\Bigg )\Bigg ].\\[10pt]\nonumber \end{align}

A careful consideration of this expansion will show that we have a priori unfairly omitted a contribution that is also of order $r^4$ , and that comes from beating of $h^{(1)}$ with what would be $h^{(3)}$ , and in particular its $\sin \alpha$ harmonic. That term involves higher order magnetic field components, notably $B_{31}^c$ , and thus goes beyond the second-order considerations here. Setting this third component aside, the term will also have components inherited from lower orders, which can be evaluated explicitly to assess their magnitude. In practice, these contributions appear to be small. All in all, we shall ignore such a contribution.

In fact, in practice, at order $O(r^4)$ , the main contribution comes from $h^{(2)}$ ; namely, the breaking of omnigeneity at second order. Thus, in practice, and as explicitly presented in the text, we will focus on this term.

B.4. Expansion of geometric factor $\mathcal{G}$

Let us write the geometric factor $\mathcal{G}^2=2D^2/L$ and consider the asymptotic expansion of the integrals. Following Jorge & Landreman (Reference Jorge and Landreman2020, (33)) and carrying it out to higher order, we write

(B11) \begin{align} D&=\frac {1}{2\pi }\int \mathrm{d}\alpha \int \frac {\mathrm{d}\varphi }{B^2}|\nabla \psi |\nonumber \\ &\approx r\overbrace {\frac {1}{2\pi }\int \mathrm{d}\alpha \int \frac {\mathrm{d}\varphi }{B_0}T_1}^{D_1}+r^2\overbrace {\frac {1}{2\pi }\int \mathrm{d}\alpha \int \frac {\mathrm{d}\varphi }{B_0}T_1\left (\frac {T_2}{T_1}-2\frac {B_1}{B_0}\right )}^{D_2}+\nonumber \\ &\quad{} +r^3\underbrace {\frac {1}{2\pi }\int \mathrm{d}\alpha \int \frac {\mathrm{d}\varphi }{B_0^2}T_1\left (\frac {T_3}{T_1}-2\frac {B_1T_2}{B_0T_1}+3\left (\frac {B_1}{B_0}\right )^2-2\frac {B_2}{B_0}\right )}_{D_3},\\[10pt]\nonumber \end{align}

where $|\nabla \psi |/B_0\approx rT_1+r^2T_2+\ldots$ , and we may explicitly write

(B12a) \begin{align} T_1 &= \sqrt {(\partial _\chi X_1)^2+(\partial _\chi Y_1)^2}, \end{align}
(B12b) \begin{align} T_2 &= \frac {1}{T_1}\left [T_1^2\frac {B_1}{B_0}+\partial _\chi X_1\partial _\chi X_2+\partial _\chi Y_1\partial _\chi Y_2\right ],\\[10pt]\nonumber \end{align}

and we omit the explicit form of $T_3$ for brevity. Note that $D_2\approx 0$ as we have odd $\alpha$ -harmonics that average to zero (even if there is a complicated $\alpha$ -dependence in $T_1$ ). To evaluate the $\alpha$ -average of the other quantities, we must explicitly write their poloidal angle dependence. For instance, $T_1$ in the text (4.10), (Jorge & Landreman Reference Jorge and Landreman2020, (33)),

(B13) \begin{equation} |\nabla \psi |^2\approx r^2B_0^2\left [\left (X_{1c}\sin \chi -X_{1s}\cos \chi \right )^2+\left (Y_{1c}\sin \chi -Y_{1s}\cos \chi \right )^2\right ]. \end{equation}

Because we have $|\nabla \psi |$ instead of $|\nabla \psi |^2$ , the integral over $\chi$ must be performed numerically (or related to elliptic integrals, Gradshteyn & Ryzhik Reference Gradshteyn and Ryzhik2014, (3.670.1)).

The expansion of $L$ is simpler and only the expansion in $B$ is necessary. Considering the average over $\alpha$ to eliminate the bare harmonics of $\chi$ , we write

(B14) \begin{equation} L=\frac {1}{2\pi }\int \mathrm{d}\alpha \int \frac {\mathrm{d}\varphi }{B^2}\approx \underbrace {\int \frac {\mathrm{d}\varphi }{B_0^2}}_{L_0} + r^2\underbrace {\frac {1}{2\pi }\int \mathrm{d}\alpha \int \frac {\mathrm{d}\varphi }{B_0^2}\left [3\left (\frac {B_1}{B_0}\right )^2-2\frac {B_2}{B_0}\right ]}_{L_2}. \end{equation}

With both of these,

(B15) \begin{equation} \frac {1}{\mathcal{G}^2}\approx \frac {L_0}{G_0D_1^2}\bigg [1+r^2\underbrace {\bigg (\frac {L_2}{L_0}-\frac {G_2}{G_0} - 2\frac {D_3}{D_1}\bigg )}_{\unicode {x2462}}\bigg ]. \end{equation}

In practice, it is the leading order piece that matters and which we defined as $\mathcal{G}^{(0)}$ in the main text.

B.5. Assessment of approximation

With the approximations and expansions considered previously, we may then construct the leading order forms of $\epsilon _{\mathrm{eff}}^{3/2}$ as presented in § 4. We had argued that some of the terms involved in the asymptotic expression of the effective ripple are, in practice, subsidiary, even though not in the $O(r)$ sense. We now provide some numerical evidence in such regard using the benchmark configurations in the paper as a test-bed. In table 5, we summarise the relative magnitude of different contributions in an attempt to argue the correctness of the approximation to $\epsilon _{\mathrm{eff}}$ . We show by $\unicode {x2460}$ , $\unicode {x2461}$ and $\unicode {x2462}$ the relative contribution by the terms denoted by these symbols in the abovementioned asymptotic expansions to $\epsilon _{\mathrm{eff}}^{3/2,(2)}$ . The smallness of these terms gives us an argument to focus on the contribution of the second-order QI breaking and use it as a part of our effective ripple measure. The benchmark in figure 2 also seconds this.

Table 5. Relative magnitude of additional asymptotic terms in $\epsilon _{\mathrm{eff}}^{3/2,(2) }$ . The table shows the relative contribution to $\epsilon _{\mathrm{eff}}^{3/2,(2)}$ of the asymptotic terms $\unicode {x2460}$ , $\unicode {x2461}$ and $\unicode {x2462}$ . The smallness of these contributions throughout the benchmark configurations supports, along with the role of QI breaking, the expression for the effective ripple measure used.

Appendix C. Details of the ripple well measure $A_w$ calculation

In this appendix, we develop the formalism necessary to efficiently evaluate the ripple well measure $A_w$ presented in the main text, § 5; namely,

(5.1) \begin{equation} A_w=R/\min \left \{r \,|\, \exists \,\theta ,\varphi : \partial _\varphi |_\alpha B(r,\theta ,\varphi )=0, \partial _\varphi ^2|_\alpha B(r,\theta ,\varphi )=0\right \}. \end{equation}

The multi-valued form of $A_w$ for each fixed $\varphi$ was defined as $\hat {A}_w$ , with $A_w=\mathrm{max}_\varphi \hat {A}_w$ .

C.1. First-order construction: too simple

Let us consider first, as a way of introduction, $A_w$ for the simplest case of a first-order field: $B(\theta ,\varphi )=B_0(\varphi ) + r B_1(\theta ,\varphi )$ , where $B_1(\theta ,\varphi )$ is given in (4.4a ). The two conditions in (5.1) to solve simultaneously are

(C1a) \begin{align} B_0'+r(S'\cos \alpha -C'\sin \alpha ) = 0, \end{align}
(C1b) \begin{align} B_0''+r(S''\cos \alpha -C''\sin \alpha ) = 0,\\[10pt]\nonumber \end{align}

where $S = B_0d\sin \alpha _{\mathrm{buf}}$ , $C = B_0d\cos \alpha _{\mathrm{buf}}$ and primes denote derivatives in $\varphi$ . Combining these equations and assuming $r\neq 0$ , one may solve for $\tan \alpha$ and substitute it back to retain a real, positive root for $r$ ,

(C2) \begin{equation} R/\hat {A}^{(1)}_w=\left |\frac {B_0'}{S'-C'\tan \alpha }\sqrt {1+\tan ^2\alpha }\right |, \end{equation}

where $\alpha$ is given by

(C3) \begin{equation} \tan \alpha = \frac {(S'/B_0')'}{(C'/B_0')'}, \end{equation}

defined in the appropriate quadrant so that $1/\hat {A}_w^{(1)}$ solves the original set of equations. Note that in obtaining an expression for $\tan \alpha$ , we have assumed that the equation is not trivially satisfied by $r=0$ . This would have worked for $B_0'=0=B_0''$ , which now instead sees $\hat {r}_w\rightarrow \infty$ .Footnote 14 This should make it clear that the appearance of secondary wells is not the same as the breakdown of $|\boldsymbol{B}|$ contour topology.

In practice, the appearance of secondary wells due to the first-order variation of the field is too simplistic. It is far from capturing the evolution of a second-order near-axis field construction. We must therefore turn to the more complex higher order consideration.

C.2. Higher order form

The procedure at higher orders resembles the procedure followed in the construction of the critical radius $r_c$ by Landreman (Reference Landreman2021). The latter corresponds to the smallest distance from the axis at which flux surfaces become ill-behaved; namely, the first instance of a vanishing coordinate Jacobian $\mathcal{J}=\partial _\psi \boldsymbol{x}\times \partial _\theta \boldsymbol{x}\cdot \partial _\varphi \boldsymbol{x}=0$ . That problem requires the solution of a set of equations formally analogous to those for $A_w$ , see Landreman (Reference Landreman2021, § 4). We exploit that analogy and adapt that work to our problem.

Using the helical angle $\chi =\theta -N\varphi$ , where $N$ is the helicity of the magnetic axis (Rodríguez et al. Reference Rodríguez, Sengupta and Bhattacharjee2022b ; Camacho Mata & Plunk Reference Camacho Mata and Plunk2023; Rodriguez et al. Reference Rodriguez, Plunk and Jorge2025), and writing $B_1(\chi ,\varphi )=B_{1c}(\varphi )\cos \chi +B_{1s}(\varphi )\sin \chi$ and $B_2(\chi ,\varphi )=B_{20}(\varphi )+B_{2c}(\varphi )\cos 2\chi +B_{2s}(\varphi )\sin 2\chi$ , the first condition that $\hat {A}_w$ must satisfy is $\partial _\varphi B|_\alpha =0$ , which explicitly reads

(C4) \begin{equation} g_0 + r\left (g_{1c}\cos \chi +g_{1s}\sin \chi \right )+r^2\left (g_{20}+g_{2c}\cos 2\chi +g_{2s}\sin 2\chi \right ) = 0, \end{equation}

where

(C5a) \begin{align} g_0 &= B_0', \end{align}
(C5b) \begin{align} g_{1c} &= B_{1c}'+\bar {\iota }B_{1s}, & g_{1s} &= B_{1s}'-\bar {\iota }B_{1c}, \end{align}
(C5c) \begin{align} g_{20} &= B_{20}', & g_{2c} &= B_{2c}'+2\bar {\iota }B_{2s}, & g_{2s} &= B_{2s}'-2\bar {\iota }B_{2c}. \\[10pt]\nonumber\end{align}

The second condition, namely $\partial _\varphi ^2B|_\alpha =0$ , can also be found explicitly and written in a form analogous to (C4). We shall not give it explicitly for brevity. Given these two equations, we approach their solution by isolating $r$ for every $\varphi$ and eliminating it from the equations, reducing the system to a single equation on harmonics of $\chi$ . We shall call this the K-equation. Following this procedure, we may write

(C6) \begin{equation} r=\frac {f_{1c}\cos \chi +f_{1s}\sin \chi }{f_{20}+f_{2c}\cos 2\chi +f_{2s}\sin 2\chi }, \end{equation}

where

(C7a) \begin{align} f_{1c} &= B_0'(B_{1c}''+2\bar {\iota }_0B_{1s}'-\bar {\iota }_0^2B_{1c}) - B_0''(B_{1c}'+\bar {\iota }_0B_{1s}), \end{align}
(C7b) \begin{align} f_{1s} &= B_0'(B_{1s}''-2\bar {\iota }_0B_{1c}'-\bar {\iota }_0^2B_{1s}) + B_0''(-B_{1s}'+\bar {\iota }_0B_{1c}), \end{align}
(C7c) \begin{align} f_{20} &= B_0''B_{20}'-B_0'B_{20}'', \end{align}
(C7d) \begin{align} f_{2c} &= -B_0'(B_{2c}''+4\bar {\iota }_0B_{2s}'-4\bar {\iota }_0^2B_{2c}) + B_0''(B_{2c}'+2\bar {\iota }_0B_{2s}), \end{align}
(C7e) \begin{align} f_{2s} &= B_0'(-B_{2s}''+4\bar {\iota }_0B_{2c}'+4\bar {\iota }_0^2B_{2s}) + B_0''(B_{2s}'-2\bar {\iota }_0B_{2c}). \\[20pt]\nonumber\end{align}

Eliminating $r$ from (C4), we are left with the following K-equation in the coordinates $\chi$ and $\varphi$ ,

(C8) \begin{equation} K_0+K_{2c}\cos 2\chi +K_{2s}\sin 2\chi +K_{4s}\sin 4\chi +K_{4s}\sin 4\chi = 0, \end{equation}

where

(C9a) \begin{align} K_0& = \frac {1}{4}\left [2g_0(f_{2c}^2 + 2 f_{20}^2 + f_{2s}^2) + f_{1c} (f_{2c} g_{1c} + f_{2s} g_{1s} ) + f_{1s} (f_{2s} g_{1c} - f_{2c} g_{1s}) \right . \nonumber \\ &\quad{}+2 f_{20} (f_{1c} g_{1c} + f_{1s} g_{1s}) + 2 (f_{1c}^2+f_{1s}^2) g_{20} \nonumber \\ &\quad{}+\left .+ (f_{1c}^2 - f_{1s}^2) g_{2c} + 2 f_{1c} f_{1s} g_{2s}\right ], \end{align}
(C9b) \begin{align} K_{2c} &= \frac {1}{2}\left [f_{1c} f_{2c} g_{1c} + f_{20} (4 f_{2c} g_0 + f_{1c} g_{1c} - f_{1s} g_{1s}) + f_{1c}^2 (g_{20} + g_{2c}) \right . \nonumber \\ &\quad{}+ \left .f_{1s} (f_{2c} g_{1s} - f_{1s} g_{20} + f_{1s} g_{2c})\right ], \end{align}
(C9c) \begin{align} K_{2s}& = \frac {1}{2}\left [f_{1c} f_{2s} g_{1c} + f_{1s} f_{2s} g_{1s} + f_{20} (4 f_{2s} g_0 + f_{1s} g_{1c} + f_{1c} g_{1s}) \right .\nonumber \\ &\quad{} +\left .2 f_{1c} f_{1s} g_{20} + (f_{1c}^2 + f_{1s}^2) g_{2s}\right ] ,\end{align}
(C9d) \begin{align} K_{4c} &= \frac {1}{4}\left [2 (f_{2c}^2 - f_{2s}^2) g_0 - f_{2s} (f_{1s} g_{1c} + f_{1c} g_{1s}) + f_{2c} (f_{1c} g_{1c} - f_{1s} g_{1s}) \right . \nonumber \\ &\quad{} +\left . (f_{1c}^2 - f_{1s}^2) g_{2c} - 2 f_{1c} f_{1s} g_{2s}\right ], \end{align}
(C9e) \begin{align} K_{4s} &= \frac {1}{4}\left [f_{2c} (4 f_{2s} g_0 + f_{1s} g_{1c} + f_{1c} g_{1s}) + f_{1c} (f_{2s} g_{1c} + 2 f_{1s} g_{2c}) \right . \nonumber \\ &\quad{} +\left .(f_{1c}^2-f_{1s}^2) g_{2s} - f_{1s} f_{2s} g_{1s}\right ]. \\[20pt]\nonumber\end{align}

With the equation cast this way, we may then proceed the way that is detailed by Landreman (Reference Landreman2021, § 4.2). That is, we solve the $K$ -equation for $\sin 2\chi$ which is a quartic, being careful about the sign of the trigonometric functions. As a result, we have up to four real roots for each value of $\varphi$ considered in the toroidal domain. Each one of these roots corresponds to a value of $r$ using (C6), and thus represents a triplet $(r,\chi ,\varphi )$ . Finding $\alpha =\chi -\bar {\iota }\varphi$ , we may then represent the values of $r$ for this multitude of roots as a function of $\alpha$ , namely $\hat {A}_w$ . This is what we represent in figure 5 in § 5. The largest of all these roots is $A_w$ .

Appendix D. Linear system of equations at second order

The construction of the near-axis field at second order has been detailed elsewhere, most notably by Landreman & Sengupta (Reference Landreman and Sengupta2019), and in the QI scenario by Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025), where a thorough and pedagogical description is provided. Here, we shall not reproduce the derivation of the construction nor the way in which this is solved. However, we shall for completeness write some of the key equations involved in the near-axis construction to second order. In particular, the equations that the different pieces of the second-order shaping satisfy, focusing on the operator notation that we use in this paper.

D.1. Expressions for $Y_2$

The harmonics of $Y_2$ are defined through (A32)–(A33) of Landreman & Sengupta (Reference Landreman and Sengupta2019) as

(D1) \begin{equation} \begin{pmatrix} Y_{2c} \\ Y_{2s} \end{pmatrix} = \underbrace {\begin{pmatrix} \mathcal{Y}_{2c}^{0} \\ \mathcal{Y}_{2s}^{0} \end{pmatrix}}_{\boldsymbol{\mathcal{Y}}_0} + \underbrace {\begin{pmatrix} \mathcal{Y}_{2c}^{X_{20}} & \mathcal{Y}_{2c}^{Y_{20}} \\ \mathcal{Y}_{2s}^{X_{20}} & \mathcal{Y}_{2s}^{Y_{20}} \end{pmatrix}}_{\bar {\unicode{x1D654}}}\begin{pmatrix} X_{20} \\ Y_{20} \end{pmatrix} + \underbrace {\begin{pmatrix} \mathcal{Y}_{2c}^{X_{2c}} & \mathcal{Y}_{2c}^{X_{2s}} \\ \mathcal{Y}_{2s}^{X_{2c}} & \mathcal{Y}_{2s}^{X_{2s}} \end{pmatrix}}_{\hat {\unicode{x1D654}}}\begin{pmatrix} X_{2c} \\ X_{2s} \end{pmatrix}, \end{equation}

where the components of each matrix are

(D2a) \begin{align} \mathcal{Y}_{2c}^{0} &= \frac {\kappa \bar {B}}{B_0}\frac {X_{1c}X_{1s}}{X_{1c}^2+X_{1s}^2}, \end{align}
(D2b) \begin{align} \mathcal{Y}_{2c}^{X_{20}} &= \frac {X_{1s}Y_{1s}-X_{1c}Y_{1c}}{X_{1c}^2+X_{1s}^2}, \end{align}
(D2c) \begin{align} \mathcal{Y}_{2c}^{Y_{20}} &= -1+2\frac {X_{1c}^2}{X_{1c}^2+X_{1s}^2}, \end{align}
(D2d) \begin{align} \mathcal{Y}_{2c}^{X_{2c}} &= \frac {X_{1c}Y_{1c}+X_{1s}Y_{1s}}{X_{1c}^2+X_{1s}^2} = \mathcal{Y}_{2s}^{X_{2s}}, \end{align}
(D2e) \begin{align} \mathcal{Y}_{2s}^{0} &= \frac {\kappa \bar {B}}{2B_0}\frac {X_{1s}^2-X_{1c}^2}{X_{1c}^2+X_{1s}^2}, \end{align}
(D2f) \begin{align} \mathcal{Y}_{2s}^{X_{20}} &= -\frac {X_{1s}Y_{1c}+X_{1c}Y_{1s}}{X_{1c}^2+X_{1s}^2}, \end{align}
(D2g) \begin{align} \mathcal{Y}_{2s}^{Y_{20}} &= 2\frac {X_{1c}X_{1s}}{X_{1c}^2+X_{1s}^2}, \end{align}
(D2h) \begin{align} \mathcal{Y}_{2c}^{X_{2s}} &= \frac {X_{1c}Y_{1s}-X_{1s}Y_{1c}}{X_{1c}^2+X_{1s}^2}=-\mathcal{Y}_{2s}^{X_{2c}}. \\[20pt]\nonumber\end{align}

This is a purely algebraic equation, which involves no derivatives.

D.2. Equation for $X_{20}$ and $Y_{20}$

To complete the construction at second order, using $X_{2c}$ and $X_{2s}$ as inputs to the problem, we need to solve for $X_{20}$ and $Y_{20}$ . The equations to solve are (A41)–(A42) of Landreman & Sengupta (Reference Landreman and Sengupta2019), which constitute two coupled first-order ordinary differential equations in $\varphi$ to be solved simultaneously. Explicitly solving such a system requires rewriting all second-order quantities explicitly in terms of $X_{20},Y_{20},X_{2c},X_{2s}$ and their derivatives, which involves (D1).

Instead of writing all the components of these operators out explicitly, we show how one should systematically proceed to find these through one particular example. The fully fleshed components may be found in the numerical implementation of the near-axis construction presented in the repository published alongside this work. In its operator form, the full expression is

(D3) \begin{equation} \hat {\mathbb{L}}\begin{pmatrix} X_{20} \\ Y_{20} \end{pmatrix} = -\hat {\mathbb{F}}\begin{pmatrix} X_{2c} \\ X_{2s} \end{pmatrix} + \boldsymbol{f}, \end{equation}

and now we focus on constructing explicitly, say, $\mathbb{L}_{00}$ . That is, the piece of the operator acting on $X_{20}$ in (A41) of Landreman & Sengupta (Reference Landreman and Sengupta2019), not just explicitly, but also through other second-order functions. Here, both $\hat {\mathbb{L}}$ and $\hat {\mathbb{F}}$ represent linear differential operators of first order that act on a vector of dimension 2, as shown. The vector $\boldsymbol{f}$ represents a combination of first-order terms.

Let us be more explicit and consider the contributions one by one. First, the explicit $X_{20}'$ components,

(D4a) \begin{equation} A_{X_{20}'}=-X_{1s}\frac {\mathrm{d}}{\mathrm{d}\varphi }, \end{equation}

and explicit in $X_{20}$ ,

(D4b) \begin{equation} A_{X_{20}}=-Y_{1s}\left (\tau \ell '-2\frac {I_2}{\bar {B}}\ell '\right )-4Y_{1c}\frac {G_0}{\bar {B}}Z_{2c}-4Y_{1s}\frac {G_0}{\bar {B}}Z_{2s}. \end{equation}

We must then also consider the pieces that depend on $Y_{2c}$ and $Y_{2s}$ , which we know are also related to $X_{20}$ by (D1). So we write again,

(D4c) \begin{align} A_{Y_{2c}}=4X_{1s}\frac {G_0}{\bar {B}}Z_{2s}-X_{1c}\left (4\frac {G_0}{\bar {B}}Z_{20}-2\beta _0\ell '\right )+X_{1s}\left (\tau \ell '-2\ell '\frac {I_2}{\bar {B}}\right )-2Y_{1c}\bar {\iota }_0, \\\nonumber\end{align}
(D4d) \begin{align} A_{Y_{2s}}=-4X_{1s}\frac {G_0}{\bar {B}}Z_{2c}-X_{1c}\left (\tau \ell '-2\ell '\frac {I_2}{\bar {B}}\right )-X_{1s}\left (4\frac {G_0}{\bar {B}}Z_{20}-2\beta _0\ell '\right )-2Y_{1s}\bar {\iota }_0, \\[10pt]\nonumber\end{align}

and finally, the terms that depend on the derivatives of these,

(D4e) \begin{align} A_{Y_{2c}'}=-Y_{1s}\frac {{d}}{\mathrm{d}\varphi },\\\nonumber \end{align}
(D4f) \begin{align} A_{Y_{2s}'}=Y_{1c}\frac {\mathrm{d}}{\mathrm{d}\varphi }.\\[10pt]\nonumber \end{align}

With these expressions, we may then write $\hat {\mathbb{L}}_{00}$ explicitly,

(D5) \begin{align} \hat {\mathbb{L}}_{00} &= A_{X_{20}}+\mathcal{Y}_{2c}^{X_{20}}A_{Y_{2c}}+\mathcal{Y}_{2s}^{X_{20}}A_{Y_{2s}}-Y_{1s}(\mathcal{Y}_{2c}^{X_{20}})'+Y_{1c}(\mathcal{Y}_{2s}^{X_{20}})'\nonumber\\ &\quad{}-(X_{1s}+Y_{1s}\mathcal{Y}_{2c}^{X_{20}}-Y_{1c}\mathcal{Y}_{2s}^{X_{20}})\frac {\mathrm{d}}{\mathrm{d}\varphi }. \end{align}

Following a similar procedure with the other components (which we spare the reader from), the remainder terms of $\hat {\mathbb{L}}$ may be found, as well as those of $\hat {\mathbb{F}}$ and $\boldsymbol{f}$ .

D.3. Tokamak limit simplification

Even though the topology of $|\boldsymbol{B}|$ contours over flux surfaces is different in tokamaks compared with QI configurations, the equilibrium construction remains largely the same. For the tokamak limit expressions evaluated in the main text, it is then appropriate to consider the abovementioned tokamak limit of the operators. The toroidal coordinate $\varphi$ being one of symmetry simplifies the evaluation of the expressions significantly, especially because the toroidal derivatives may be taken to vanish exactly.

In the near-axis tokamak notation, we also have $X_{1c}=\bar {d}$ and $X_{1s}=0$ , with $Y_{1s}=1/\bar {d}$ , and define the major radius $R_0=G_0/B_0$ . Taking this into consideration and going through the equations, the following is true in the tokamak limit. The operator $\hat {\mathbb{L}}$ becomes

(D6) \begin{equation} \hat {\mathbb{L}}_{\mathrm{tok}}=-\bar {\iota }_0\frac {B_0}{\bar {d}} \begin{pmatrix} \displaystyle\bar {d}^2-\frac {3}{\bar {d}^2}(1+\sigma ^2) & 4\sigma \\[12pt] 0 & 2 \end{pmatrix}, \end{equation}

which becomes diagonal in the case of an up-down symmetric tokamak (i.e. $\sigma =0$ ). Note here the possibility of a singular matrix if, in the up-down symmetric scenario, $\bar {d}^4=3$ . This singularity was discussed in the main text and is directly related to how the equilibrium problem is being solved. This is however seldom a problem given the typical values of elongation considered.

For $\hat {\mathbb{F}}$ ,

(D7) \begin{equation} \hat {\mathbb{F}}_{\mathrm{tok}} = -\bar {\iota }_0\frac {3B_0}{\bar {d}^3}\begin{pmatrix} \bar {d}^4-1+\sigma ^2 & 2\sigma \\ 2\sigma & -(\bar {d}^4-1+\sigma ^2) \end{pmatrix}, \end{equation}

which is a symmetric matrix. Finally,

(D8) \begin{equation} \boldsymbol{f}_{\mathrm{tok}}=\frac {B_0\bar {\iota }_0}{\bar {d} R_0}\begin{pmatrix} \displaystyle\frac {1}{2}[1+2(\bar {d}^4+\sigma ^2)]-\left (\frac {\bar {d}}{\bar {\iota }_0}\right )^2\frac {\mu _0 p_2}{B_0^2/2} \\[12pt] \displaystyle\frac {5}{2}\sigma \end{pmatrix}. \end{equation}

The matrix operators can be easily inverted and thus used for the shape gradient calculations in the paper.

D.4. Triangularity

It is often illuminating to use more geometrical definitions of the shaping other than those directly involved in the near-axis construction. At second order, we may define an approximation to triangularity following Rodríguez (Reference Rodríguez2023),

(D9) \begin{equation} \delta =2\left (\frac {Y_{2s}}{Y_{1s}}-\frac {X_{2c}}{X_{1c}}\right ), \end{equation}

which through (D1) depends on all $X_{20},X_{2s},X_{2c}$ and $Y_{20}$ . For the purpose of this paper, we are interested in the variations of this expression with respect to the second-order shape choices. That is,

(D10) \begin{equation} \delta{\kern-1pt}\delta = -\frac {2}{Y_{1s}}\left [\begin{pmatrix} \mathcal{Y}_{2s}^{X_{20}} \\[3pt] \mathcal{Y}_{2s}^{Y_{20}} \end{pmatrix}^T\hat {\mathbb{L}}^{-1}\hat {\mathbb{F}} - \begin{pmatrix} \mathcal{Y}_{2s}^{X_{2c}} \\[3pt] \mathcal{Y}_{2s}^{X_{2s}} \end{pmatrix}^T\right ]\begin{pmatrix} \delta{\kern-1pt}X_{2c} \\[1pt] \delta{\kern-1pt}X_{2s} \end{pmatrix} - \frac {2}{X_{1c}}\delta{\kern-1pt}X_{2c}, \end{equation}

which is rather complicated. In the tokamak limit, using the expressions in (D6) and (D7), the expression simplifies significantly to give

(D11) \begin{equation} \delta{\kern-1pt}\delta _{\mathrm{tok}}=\frac {2}{\bar {d}}\frac {\bar {d}^4+3}{\bar {d}^4-3}\delta{\kern-1pt}X_{2c}, \end{equation}

as used in the main text. Note the appearance of the diverging denominator here, which signals the huge variation in the geometric triangularity due to a change in the input function $X_{2c}$ when close to the resonance, emphasising the perilous balance there.

Appendix E. General sensitivity theory

In this appendix, we consider the evaluation of the shape gradient of some functional $S$ with respect to the shaping degrees of freedom at second order. Let such a functional be of the form,

(E1) \begin{equation} S[B_{20},B_{2c},B_{2s}]=\int _0^{2\pi } f(B_{20},B_{2c},B_{2s},\varphi )\,\mathrm{d}\varphi , \end{equation}

a functional that depends directly on the second-order magnetic field functions. As we change the second-order shaping, we are interested in how $S$ changes, call it $\delta{\kern-1pt}S$ . Assuming $f$ to be differentiable with respect to the three components of the second-order magnetic field magnitude,

(E2) \begin{equation} \delta{\kern-1pt}S=\int _0^{2\pi } \left (\frac {\partial f}{\partial B_{20}}\delta{\kern-1pt}B_{20}+\frac {\partial f}{\partial B_{2c}}\delta{\kern-1pt}B_{2c}+\frac {\partial f}{\partial B_{2s}}\delta{\kern-1pt}B_{2s}\right )\,\mathrm{d}\varphi , \end{equation}

and the partial derivatives are meant to be taken keeping the other second-order magnetic field components fixed.Footnote 15 To proceed further, we must relate the variation of these magnetic field components to the shaping. To that end, we draw from the presentation of the second-order construction in § 2.4 of Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025) and the explicit equations in Appendix A of Landreman & Sengupta (Reference Landreman and Sengupta2019).

The shaping freedom is on the functions $X_{2s}$ and $X_{2c}$ , which represent in some form the triangularity that we may exploit to modify $S$ . More precisely, they describe the $m=2$ variation of the distance of the flux surfaces from the magnetic axis along the normal of the latter. As the flux surface is deformed, the magnetic field magnitude must change accordingly, and thus $B_{2c}$ and $B_{2s}$ are quite directly modified. From (2.7) of Rodriguez et al. (Reference Rodriguez, Plunk and Jorge2025) or (A35)–(A36) in Landreman & Sengupta (Reference Landreman and Sengupta2019),

(E3) \begin{align} \delta{\kern-1pt} B_{2c}=\kappa B_0\, \delta{\kern-1pt} X_{2c}, \end{align}
(E4) \begin{align} \delta{\kern-1pt} B_{2s}=\kappa B_0\, \delta{\kern-1pt} X_{2s}.\\[6pt]\nonumber \end{align}

A larger curvature of the magnetic axis results in a stronger supported perpendicular gradient of the magnetic field, and thus the easier the magnitude of the magnetic field can be shaped.

The variation of $B_{20}$ ((A34) of Landreman & Sengupta (Reference Landreman and Sengupta2019)) depends directly on $X_{20}$ , which must be self-consistently solved alongside $Y_{20}$ in (D3). The dependence on $X_{2c}$ and $X_{2s}$ (and their derivatives) do therefore involve the inversion of differential operators, so in the notation of Appendix D.2,

(E5) \begin{equation} \delta{\kern-1pt}B_{20}=-\kappa B_0\begin{pmatrix} 1 & 0 \end{pmatrix}\hat {\mathbb{L}}^{-1}\hat {\mathbb{F}}\begin{pmatrix} \delta{\kern-1pt}X_{2c} \\ \delta{\kern-1pt}X_{2s} \end{pmatrix}. \end{equation}

Once again, we encounter the proportionality to $\kappa$ , which denotes the partial inability of the shaping to modify the field, especially near inflexion points. However, this does not mean that the shaping at these points has no influence on $S$ . Effects lose locality through the inversion of $\hat {\mathbb{L}}$ .

With this, we write

(E6) \begin{equation} \delta{\kern-1pt}S=\int _0^{2\pi } \underbrace {\kappa B_0\left [-\begin{pmatrix} \displaystyle\frac {\partial f}{\partial B_{20}} &\ \ 0 \end{pmatrix} \hat {\mathbb{L}}^{-1}\hat {\mathbb{F}} + \begin{pmatrix} \displaystyle\frac {\partial f}{\partial B_{2c}} & \ \ \displaystyle\frac {\partial f}{\partial B_{2s}} \end{pmatrix}\right ]}_{=\mathcal{G}^T}\delta{\kern-1pt}X_2\,\mathrm{d}\varphi , \end{equation}

where $\mathcal{G}$ can be thought of as the shape gradient $\mathcal{G}=(\mathcal{G}_{2c}, \mathcal{G}_{2s})$ and $\delta{\kern-1pt}X_2=(\delta{\kern-1pt}X_{2c},\delta{\kern-1pt}X_{2s})$ . The function $\mathcal{G}$ can then be interpreted as the so-called shape gradient of $S$ with respect to the shaping $X_2$ . That is, it measures the amount by which an infinitesimal local variation of second-order shaping would change the non-local value of $S$ .

A priori, and with all the quantities in $\mathcal{G}$ being known (they belong to the first-order NAE), we could directly calculate it. However, it is in practice convenient to avoid having to invert $\hat {\mathbb{L}}$ explicitly.Footnote 16 Instead, we may formulate the calculation of $\mathcal{G}$ through an adjoint problem. For simplicity, let us discretise the equation, as we will do anyway in practice. Defining a grid $\{\varphi _0,\varphi _1,\ldots , \varphi _{N-1}\}$ and discretising integrals with the appropriate numerical scheme weight $\int f\mathrm{d}\varphi \approx \sum w_if(\varphi _i)$ , we write

(E7) \begin{equation} \delta{\kern-1pt}S = \sum _{i=0}^{2(N-1)}w_i\mathcal{G}_i\delta{\kern-1pt}X_{2,i}, \end{equation}

where

(E8) \begin{equation} \mathcal{G}_i=-\frac {1}{w_i}\left (\mathbb{F}^T\right )_{ij}\boldsymbol{y}_j+\kappa B_0 \begin{pmatrix} \displaystyle\frac {\partial f}{\partial B_{2c}} \\[12pt] \displaystyle\frac {\partial f}{\partial B_{2s}} \end{pmatrix}, \end{equation}

and $\boldsymbol{y}$ is the solution to the following adjoint problem:

(E9) \begin{equation} \mathbb{L}^T\boldsymbol{y} = \begin{pmatrix} \displaystyle\kappa B_0 w \frac {\partial f}{\partial B_{20}} \\[12pt] 0 \end{pmatrix}. \end{equation}

Thus, to compute the shape gradient $\mathcal{G}$ , the key is to perform an adjoint solve to find $\boldsymbol{y}$ . The system to solve is nevertheless almost the same as for the direct second-order solve problem, (D3), as it involves $\mathbb{L}$ , and thus it involves a complexity analogous to a second-order solve itself. This construction presented in generality may be used for a variety of different measures.

The answer will depend on how we discretise the integral and thus on the weights $w$ . This is the price to pay for not having to integrate by parts. In its most basic form, using the standard trapezoidal scheme, the weight (Süli & Mayers Reference Süli and Mayers2003, p. 202)

(E10) \begin{equation} w_i=\begin{cases} \displaystyle\frac {1}{2}\left (P+\varphi _1-\varphi _{N-1}\right ), \quad (i=0) \\[12pt] \displaystyle\frac {1}{2}\left (\varphi _{i+1}-\varphi _{i-1}\right ), \quad (0\lt i\lt N) \end{cases} \end{equation}

where $P$ is the period of the domain ( $2\pi$ if the whole toroidal angle extent is considered).

E.1. Tokamak limit

Let us consider the simplifying limit of a tokamak, where the toroidal derivatives vanish, and thus the procedure is rather simple (in fact, without the need to use a particular collocation grid). In this limit, using the expressions in Appendix D.3, we may write for the magnetic well,

(E11) \begin{equation} \mathcal{G}^W=-\kappa B_0 \frac {\partial f}{\partial B_{20}}(\mathbb{L}^{-1}\mathbb{F})^T\begin{pmatrix} 1 \\ 0 \end{pmatrix} = -3\kappa B_0 \frac {\partial f}{\partial B_{20}}\begin{pmatrix} \displaystyle\frac {\bar {d}^4-1-3\sigma ^2}{\bar {d}^4-3(1+\sigma ^2)} \\[12pt] \displaystyle-\frac {2\sigma (\sigma ^2+\bar {d}^4)}{3(1+\sigma ^2)-\bar {d}^4} \end{pmatrix}. \end{equation}

Using the derivative of $f$ for $W$ explicitly, (6.5), and taking the up-down symmetric limit for simplicity ( $\sigma =0$ ), we are left with

(E12) \begin{equation} \mathcal{G}^W = \frac {3r_{\mathrm{ref}}^2}{\pi R}\frac {\bar {d}^4-1}{\bar {d}^4-3} \begin{pmatrix} 1\\ 0 \end{pmatrix} . \end{equation}

This is the expression presented in the main text, (6.6).

Appendix F. Variational re-shaping problem

In this appendix, we show how the variational problem of § 6 leads to a very particular form for the shaping inputs at second order in the near-axis construction that allows us to reliably construct stable approximately QI fields. Let us rewrite here the equation in the main text,

(6.8) \begin{align} T[X_{2c},X_{2s}]&=\frac {1}{2\pi }\int _0^{2\pi }\left (X_{20}^2+Y_{20}^2+\frac {X_{2c}^2+X_{2s}^2+Y_{2c}^2+Y_{2s}^2}{2}\right )\,\mathrm{d}\varphi{-} \nonumber \\ &\quad{}-\frac {\lambda }{2\pi }\left [\int _0^{2\pi }\left (\mathcal{G}_{2c}^{W}X_{2c}+\mathcal{G}^{W}_{2s}X_{2s}\right )\,\mathrm{d}\varphi +W_{\mathrm{ref}}\right ], \end{align}

of which we need to take variations. We shall construct the variational considerations of the discretised form of the problem. We could do it in the continuous case, but that would involve integrating by parts, and ultimately, in practice, a discrete version is really needed.

Let us then focus on writing $T$ in the discrete form, thereon, a vector $\boldsymbol{v}=(a(\varphi ),b(\varphi ))$ is defined as an element of $\mathbb{R}^{2N}$ , with $(a_0,a_1,\ldots ,a_{N-1},b_0,\ldots ,b_{N-1})$ , where the subscripts correspond to the function evaluated at $\varphi _i$ , the discretised $\varphi$ -grid. Writing the weight of the discretised integral as $\unicode{x1D652}=\mathrm{diag}(\boldsymbol{w},\boldsymbol{w})$ , where for the trapezoidal rule, $\boldsymbol{w}$ is defined in (E10), and defining a convenient scalar product $\langle \boldsymbol{a},\boldsymbol{b}\rangle _{\unicode{x1D652}}=\boldsymbol{a}^{T}\unicode{x1D652}\boldsymbol{b}$ , we may then write (6.8) as

(F1) \begin{align} 2\pi T[X_{2c},X_{2s}]&= \frac {1}{2}\left \langle \left ( \begin{matrix} X_{2c}\\ X_{2s} \end{matrix}\right ),\left ( \begin{matrix}X_{2c}\\ X_{2s} \end{matrix}\right )\right \rangle_{\unicode{x1D652}} + \left \langle \left ( \begin{matrix} X_{20}\\ Y_{20} \end{matrix}\right ),\left ( \begin{matrix}X_{20}\\ Y_{20} \end{matrix}\right )\right \rangle_{\unicode{x1D652}} +\frac {1}{2}\left \langle \left ( \begin{matrix} Y_{2c}\\ Y_{2s} \end{matrix}\right ),\left ( \begin{matrix}Y_{2c}\\ Y_{2s}\end{matrix} \right )\right \rangle_{\unicode{x1D652}}\nonumber \\ &\quad{}-\lambda \left [\left \langle \left ( \begin{matrix}\mathcal{G}^{W}_{2c}\\[3pt] \mathcal{G}^{W}_{2s}\end{matrix} \right ),\left ( \begin{matrix}X_{2c}\\ X_{2s} \end{matrix}\right )\right \rangle_{\unicode{x1D652}} + W_{\textrm{ref}}\right ].\end{align}

We must now take variations of these expressions with respect to the second-order input functions $X_{2c}$ and $X_{2s}$ . For the first term, this is trivial, but for the next two, we must take the variation through the equations that define first $X_{20}$ and $Y_{20}$ , and then $Y_{2c}$ and $Y_{2s}$ . For the former, we need (D3) and for the latter, both that and (D1). We may summarise these variations as

(F2) \begin{equation} \left ( \begin{matrix}\delta{\kern-1pt}X_{20}\\\delta{\kern-1pt}Y_{20} \end{matrix}\right )=-\underbrace {\hat {\mathbb{L}}^{-1}\mathbb{F}}_{\unicode{x1D653}}\left ( \begin{matrix}\delta{\kern-1pt}X_{2c}\\ \delta{\kern-1pt}X_{2s} \end{matrix}\right ), \quad \left ( \begin{matrix}\delta{\kern-1pt}Y_{2c}\\ \delta{\kern-1pt}Y_{2s} \end{matrix}\right )=\underbrace {\left (\hat {\unicode{x1D654}}-\bar {\unicode{x1D654}}\hat {\mathbb{L}}^{-1}\mathbb{F}\right )}_{\unicode{x1D654}}\left ( \begin{matrix}\delta{\kern-1pt}X_{2c}\\\delta{\kern-1pt}X_{2s} \end{matrix}\right ), \end{equation}

with all matrices defined in Appendix D.

Expressing all the remaining terms explicitly in terms of the second-order input functions, the variation $\delta{\kern-1pt}T$ can be written as

(F3) \begin{equation} 2\pi \delta{\kern-1pt}T= \left \langle \unicode{x1D648} \left ( \begin{matrix} X_{2c}\\ X_{2s} \end{matrix}\right )-\boldsymbol{\Lambda }-\lambda \,\boldsymbol{G},\left ( \begin{matrix} \delta{\kern-1pt}X_{2c}\\ \delta{\kern-1pt}X_{2s} \end{matrix}\right )\right \rangle_{\unicode{x1D652}}, \end{equation}

where

(F4a) \begin{align} \boldsymbol{G} =& \left ( \begin{matrix}\mathcal{G}^{W}_{2c}\\[3pt] \mathcal{G}^{W}_{2s} \end{matrix}\right ), \end{align}
(F4b) \begin{align} \unicode{x1D648}=&\boldsymbol{1}+2\unicode{x1D652}^{-1}\unicode{x1D653}^T\unicode{x1D652}\unicode{x1D653}+\unicode{x1D652}^{-1}\unicode{x1D654}^T\unicode{x1D652}\unicode{x1D654}, \end{align}
(F4c) \begin{align} \boldsymbol{\Lambda }=&\left [2\unicode{x1D652}^{-1}\unicode{x1D653}^T\unicode{x1D652}-\unicode{x1D652}^{-1}\unicode{x1D654}^T\unicode{x1D652}\bar {\unicode{x1D654}}\right ]\mathbb{L}^{-1}\boldsymbol{f}-\unicode{x1D652}^{-1}\unicode{x1D654}^T\unicode{x1D652}\boldsymbol{\mathcal{Y}}_0,\\[10pt]\nonumber \end{align}

and it should be clear that $\unicode{x1D648}$ is a matrix of dimensions $2N\times 2N$ , while $\boldsymbol{\Lambda }$ is a $2N$ vector.

We are then in a position to require the variation (F3) to vanish for all variations, implying

(F5) \begin{equation} \unicode{x1D648}\left ( \begin{matrix}X_{2c}\\ X_{2s} \end{matrix}\right )=\boldsymbol{\Lambda }+\lambda \boldsymbol{G}. \end{equation}

Using this in the constraint equation leads to an expression for the Lagrange multiplier $\lambda$ ,

(F6) \begin{equation} \lambda = -\frac {W_{\mathrm{ref}}+\left \langle \boldsymbol{G},\unicode{x1D648}^{-1}\boldsymbol{\Lambda }\right \rangle_{\unicode{x1D652}}}{\left \langle \boldsymbol{G},\unicode{x1D648}^{-1}\boldsymbol{G}\right \rangle_{\unicode{x1D652}}}. \end{equation}

With that, the required precise form of the second-order shaping is

(F7) \begin{equation} \left ( \begin{matrix} X_{2c}^{\mathrm{mhd}}\\[3pt] X_{2s}^{\mathrm{mhd}} \end{matrix}\right ) = \unicode{x1D648}^{-1}\left (\boldsymbol{\Lambda }+\lambda \boldsymbol{G}\right ). \end{equation}

This is the answer we sought.

To gauge the computational complexity involved to reach the necessary shaping in (F7), we may consider roughly the operations that will be needed. Starting from the last equation, ( F7), we here will need two linear system solves. These very operations may be recycled in the calculation of the Lagrange multiplier in (F6). However, we are hiding equally costly operations in the form of matrix multiplication and inversion (which are numerically of equal complexity (Golub & Van Loan Reference Golub, Van and Charles2013, Chap. 3; Cormen et al. Reference Cormen, Leiserson, Rivest and Stein2022, Chap. 28), which are needed to evaluate both $\unicode{x1D648}$ and $\boldsymbol{\Lambda }$ . To avoid taking explicit inverses especially to avoid numerical instability, the necessary operation could be broadcasted from right to left, so that operations on vectors are used at all times. However, in practice, we see that a naïve implementation is well behaved.

Appendix G. Estimation of critical $\beta$

In § 7, we introduced a measure of a critical plasma $\beta$ that leads to flux surfaces in the near-axis field construction touching. In this appendix, we present the details of said calculation and the exact meaning of the elements that go into it.

G.1. Problem set-up

The problem we want to describe is as follows. Consider a plane normal to the axis at some $\varphi$ value, as we shall describe the problem slice by slice. To first order in $r$ , the shape of the flux surfaces in such a plane corresponds to ellipses. At second order, these ellipses are rigidly shifted as well as triangularly shaped. For the estimation in this appendix, we will simply ignore that triangular shaping and model the cross-sections as ellipses that are rigidly shifted.

Let us be a bit more precise. The ellipses are defined in the signed Frenet–Serret frame (where $X$ and $Y$ correspond to Cartesian coordinates aligned with the normal and binormal directions, respectively) by

(G1a) \begin{align} X/r&=X_{1c}\cos \chi +X_{1s}\sin \chi , \end{align}
(G1b) \begin{align} Y/r&=Y_{1c}\cos \chi +Y_{1s}\sin \chi .\\[10pt]\nonumber \end{align}

This defines an implicit ellipse, following (Rodríguez Reference Rodríguez2023, B1)

(G2) \begin{equation} (1+\sigma ^2)X^2-2XY\sigma \skew4\mathring {\mathcal{E}}+\skew4\mathring {\mathcal{E}}^{{\kern1pt}2}Y^2=\frac {\bar {B}}{B_0}\skew4\mathring {\mathcal{E}}, \end{equation}

where $\skew4\mathring {\mathcal{E}}=B_0\bar {d}^2/\bar {B}$ . Note that this form is analogous to the quasisymmetric case of Rodríguez (Reference Rodríguez2023), where $\skew4\mathring {\mathcal{E}}=(\eta /\kappa )^2$ . This is true with the exception of the right-hand side, due to the variation of the elliptical cross-section with the variation of the field strength $B_0$ in the current QI case. However, this means that the description of the ellipses is identical to that there. Namely, we may characterise an ellipse by its elongation $\mathcal{E}=\tan e$ , defined as the ratio of major to minor radius, and $\theta$ , the angle that the major axis makes with $X$ . Explicitly,

(G3) \begin{equation} \sin 2e=\frac {2\skew4\mathring {\mathcal{E}}}{\skew4\mathring {\mathcal{E}}^{{\kern1pt}2}+1+\sigma ^2}, \quad \tan 2\theta =\frac {2\sigma \skew4\mathring {\mathcal{E}}}{\skew4\mathring {\mathcal{E}}^{{\kern1pt}2}-(1+\sigma ^2)}. \end{equation}

We note that the inversion of the tangent must be carried out with some care to correctly capture the described physical angle.

Figure 9. Illustrating diagrams for the estimation of the critical $\beta$ . (a) Elliptical cross-section indicating the rotation angle $\theta$ and major and minor axes, $a$ and $b$ , respectively. (b) Shift of ellipses along the direction $\boldsymbol{D}$ and the $\boldsymbol{M}$ -transformed scenario involving circles. The diagram shows the geometric meaning of $d$ as defined in (G7).

Now, we consider these ellipses to be shifted rigidly at second order, by an amount that we may refer to as

(G4) \begin{equation} \boldsymbol{D}=r^2\begin{pmatrix} X_{20} \\ Y_{20} \end{pmatrix}, \end{equation}

in the $(\hat {\boldsymbol{X}}, \hat {\boldsymbol{Y}})$ basis. Note that each value of $r$ defines a different ellipse. The goal of this appendix is to precisely describe when this displacement is such that two consecutive ellipses touch.

G.2. Making circles

The problem of touching ellipses can be made significantly simpler by appropriately rotating and scaling the plane. First, we shall consider a clockwise rotation by $\theta$ , the angle of the ellipse, (G3), so that all ellipses become ‘aligned’ with the axes. By align, we mean that the major and minor radii of all ellipses are parallel (or orthogonal) to the signed Frenet–Serret coordinate system. Then we scale the major axis direction by its magnitude and similarly for the minor radius so that the result is a set of displaced circles of different radii. That is, we apply the linear map defined on this basis by

(G5) \begin{equation} \boldsymbol{M}=\begin{pmatrix} r/a & 0 \\ 0 & r/b \end{pmatrix} \begin{pmatrix} \cos \theta & \sin \theta \\ -\sin \theta & \cos \theta \end{pmatrix}, \end{equation}

to all $(X,Y)$ , so that ellipses are mapped to circles of radius $r$ . Using $\mathcal{E}=a/b$ and the definition of the toroidal flux $\psi =\text{Area}\times B_0/2\pi$ , so that $ab=\bar {B}r^2/B_0$ , then

(G6) \begin{equation} a/r=\sqrt {\frac {\bar {B}}{B_0}\mathcal{E}}, \quad b/r=\sqrt {\frac {\bar {B}}{B_0\mathcal{E}}}. \quad \end{equation}

This transformation may be applied to the shift $\boldsymbol{D}$ , so that we have an effective distance $\hat {\boldsymbol{D}}=\boldsymbol{M}\boldsymbol{D}$ (see figure 9).

Through this transformation, we have converted the problem of ellipses into a set of circles with varying radii displaced along the same direction by different amounts. The discussion of touching surfaces may thus be reduced to a discussion along this line.

G.3. Touching circles

Take the line on the rescaled plane defined by $\hat {\boldsymbol{D}}$ and define a function $f(r)$ that gives the distance from the origin to the point of intersection of the circle of radius $r$ with this line. Thanks to all being nicely stacked circles,

(G7) \begin{equation} f(r) = r\left (1-r|\hat {\boldsymbol{D}}|\right ), \end{equation}

where we have defined the point of intersection in the half-line in which circles are bunching.

The point at which circles will touch corresponds to $\partial_{rf}=0$ , which gives

(G8) \begin{equation} A_\varDelta =2R|\hat {\boldsymbol{D}}|, \end{equation}

where $A$ corresponds to the aspect ratio with $R$ the effective major radius defined in terms of the length of the magnetic axis. Below this aspect ratio, flux surfaces will intersect and the near-axis construction is invalid.

G.4. Critical $\beta$

The question is then how much does this critical aspect ratio change with the pressure in the problem? We know from the main text,

(G9) \begin{equation} \frac {\delta{\kern-1pt}\boldsymbol{D}}{\delta{\kern-1pt}\beta }=\frac {\hat {\boldsymbol{\mathcal{S}}}}{r_{\mathrm{ref}}}, \end{equation}

where $\beta ={\beta_{2}r}_\textrm{ref}^{2}$ , and because it is linear in $\beta$ , we may write exactly

(G10) \begin{equation} \boldsymbol{D}_\beta =\boldsymbol{D}_0+\frac {\delta{\kern-1pt}\boldsymbol{D}}{\delta{\kern-1pt}\beta }\delta{\kern-1pt}\beta , \end{equation}

where the subscript zero denotes the Shafranov shift at zero plasma beta.Footnote 17

Let us now define the critical $\beta_{\varDelta}$ as the value of $\beta$ at which the touching of surfaces occurs at a reference aspect ratio $A_{\mathrm{ref}}\approx 10$ . Putting (G8) and (G10) together,

(G11) \begin{equation} A_{\mathrm{ref}}^2\stackrel {!}{=}\left (\hat {\boldsymbol{D}}_0+\frac {\delta{\kern-1pt}\hat {\boldsymbol{D}}}{\delta{\kern-1pt}\beta }\beta_{\varDelta} \right )^2, \end{equation}

where the hats indicate transformed quantities by the matrix $\boldsymbol{M}$ , (G5). The critical $\beta_{\varDelta}$ then corresponds to the largest negative root of this equation. That is, for every $\varphi$ , we may define

(G12) \begin{equation} \beta_{\varDelta} (\varphi )=\min \left [0, \beta_{\pm} :\left (\frac {\delta{\kern-1pt}\hat {\boldsymbol{D}}}{\delta{\kern-1pt}\beta }\right )^2\beta_{\pm}^{2}+2\frac {\delta{\kern-1pt}\hat {\boldsymbol{D}}}{\delta{\kern-1pt}\beta }\cdot \hat {\boldsymbol{D}}_0\beta_{\pm} +\left (\hat {\boldsymbol{D}}_0^2-\frac {1}{4r_{\mathrm{ref}}^2}\right )=0\right ], \end{equation}

and $\beta_{\pm}$ may be computed explicitly with the quadratic formula. The single scalar $\beta_{\varDelta}$ is then the minimum value of this function in the whole $\varphi$ domain.

Footnotes

1 We may use the following shorthand as well: $F_{11}^c=F_{1c}$ , $F_{11}^s=F_{1s}$ , $F_{22}^c=F_{2c}$ , $F_{22}^s=F_{2s}$ for any function that $F$ may be.

2 Note that this is true by definition for sufficiently small $r$ , the expansion variable. In any form, the next order bears information about the truncation error.

3 We note that the construction detailed by Landreman (Reference Landreman2021), in particular (C30), is not correct. This is apparent from the lack of symmetry of the expression with respect to the mid-point of a field period. The expression should be correctly constructed taking the $N$ -fold symmetry into account, $ \bar {f}^{(2)}(\varphi ) =\int _0^\varphi \hat {B}(\varphi ')\,\mathrm{d}\varphi ' + \left ({1}/{2}- {N\varphi }/{2\pi }\right )\int _0^{2\pi /N}\hat {B}(\varphi ')\,\mathrm{d}\varphi '-{N}/{2\pi }\int _0^{2\pi /N}\,\mathrm{d}\varphi ''\int _0^{\varphi ''}\hat {B}(\varphi ')\mathrm{d}\varphi '$ .

4 The code may be found in https://github.com/SebereX/pyQIC.git , a significantly different version of the original code of Jorge et al. (Reference Jorge, Plunk, Drevlak, Landreman, Lobsien, Camacho Mata and Helander2022), and the particular branch is specified in the Zenodo repository.

5 One could carry out an analysis similar to that in § 3 to find the third-order components corresponding to the finite build of a second-order finite aspect ratio equilibrium construction, but we shall not do that here.

6 The implementation makes use of the newer version of the BAD code for bounce averaging.

7 We do not consider the presence of $\theta$ -independent sub-wells (Parra et al. Reference Parra, Calvo, Helander and Landreman2015), and assume that any ripple will be localised in $\theta$ , and thus will be non-omnigeneous.

8 We could define an equivalent measure at the top of the well. However, the behaviour at the minimum is of greater importance as all trapped particles experience it.

9 The considerations presented here hold beyond the context of fields with poloidally closed $|\boldsymbol{B}|$ contours. They extend to any general magnetohydrostatic equilibrium near-axis field with the appropriate adjustments.

10 It is common to use $\bar {\eta }$ instead of $\bar {d}$ in the tokamak and quasisymmetric literature (Garren & Boozer Reference Garren and Boozer1991a ; Landreman & Sengupta Reference Landreman and Sengupta2019), but we here try to remain consistent with the rest of the notation in the paper.

11 This is a natural regularising choice, $L^2$ norm, but others would also be possible (especially those that include penalties penalising large toroidal variations). Simpler forms could also be constructed only minimising the choice of input functions, which does however capture the notion of second-order shaping less accurately.

12 The gradient calculation can be shown by finite differencing to be correct to machine precision.

13 Here, mirror ratio is defined as $\varDelta _{\mathrm{mirr}}=(B_{0,\mathrm{max}}-B_{0,\mathrm{min}})/(B_{0,\mathrm{max}}+B_{0,\mathrm{min}})$ , which is the most used form.

14 To show this, it is sufficient to consider the no-buffer limit of (C2), which at the bottom of the well requires $B_0''d'=0$ and $r\sin \alpha =B_0'/C'$ , so that $r_w=B_0'/C'= {1}/{d}+{B_0'}/{B_0d'}$ . Regardless of how one chooses the orders of $B_0$ and $d$ , this expression diverges as the bottom of the well is approached.

15 It truly is a variation in the functional theory sense.

16 Avoiding explicit inversion of the matrix in solving a linear system tends to be numerically faster and more stable (Cormen et al. Reference Cormen, Leiserson, Rivest and Stein2022, Chap. 28).

17 If a known construction has a finite beta $\beta_{0}$ , then one may simply modify the above with $\beta \mapsto \beta -\beta_{0}$ . The problem is linear.

References

Bender, C.M. & Orszag, S.A. 2013 Advanced Mathematical Methods for Scientists and Engineers I: Asymptotic Methods and Perturbation Theory. Springer Science & Business Media.Google Scholar
Bernardin, M.P., Moses, R.W. & Tataronis, J.A. 1986 Isodynamical (omnigenous) equilibrium in symmetrically confined plasma configurations. Phys. Fluids 29, 26052611.10.1063/1.865501CrossRefGoogle Scholar
Blank, H.de 2004 Guiding center motion. Fusion Sci. Technol. 45, 4754.10.13182/FST04-A468CrossRefGoogle Scholar
Boozer, A.H. 1981 Plasma equilibrium with rational magnetic surfaces. Phys. Fluids 24, 19992003.CrossRefGoogle Scholar
Boozer, A.H. 1983 Transport and isomorphic equilibria. Phys. Fluids 26, 496499.10.1063/1.864166CrossRefGoogle Scholar
Boozer, A.H. 1998 What is a stellarator? Phys. Plasmas 5, 16471655.10.1063/1.872833CrossRefGoogle Scholar
Burby, J.W., Kallinikos, N. & MacKay, R.S. 2020 Some mathematics for quasi-symmetry. J. Math. Phys. 61, 093503.10.1063/1.5142487CrossRefGoogle Scholar
Camacho Mata, K. & Plunk, G.G. 2023 Helicity of the magnetic axes of quasi-isodynamic stellarators. J. Plasma Phys. 89, 905890609.10.1017/S0022377823001204CrossRefGoogle Scholar
Camacho Mata, K., Plunk, G.G. & Jorge, R. 2022 Direct construction of stellarator-symmetric quasi-isodynamic magnetic configurations. J. Plasma Phys. 88, 905880503.CrossRefGoogle Scholar
Cary, J.R. & Shasharina, S.G. 1997 Omnigenity and quasihelicity in helical plasma confinement systems. Phys. Plasmas 4, 33233333.10.1063/1.872473CrossRefGoogle Scholar
Cormen, T.H., Leiserson, C.E., Rivest, R.L. & Stein, C. 2022 Introduction to Algorithms. MIT Press.Google Scholar
D’haeseleer, W.D., Hitchon, W.N.G., Callen, J.D. & Shohet, J.L. 2012 Flux Coordinates and Magnetic Field Structure: A Guide to a Fundamental Tool of Plasma Theory. Springer Science & Business Media.Google Scholar
Dudt, D.W. & Kolemen, E. 2020 DESC: A stellarator equilibrium solver. Phys. Plasmas 27, 102513.CrossRefGoogle Scholar
Dudt, D.W., Goodman, A.G., Conlin, R., Panici, D. & Kolemen, E. 2024 Magnetic fields with general omnigenity. J. Plasma Phys. 90, 905900120.10.1017/S0022377824000151CrossRefGoogle Scholar
Freidberg, J.P. 2014 Ideal MHD. Cambridge University Press.10.1017/CBO9780511795046CrossRefGoogle Scholar
Garren, D.A. & Boozer, A.H. 1991 a Existence of quasihelically symmetric stellarators. Phys. Fluids B: Plasma Phys. 3, 28222834.10.1063/1.859916CrossRefGoogle Scholar
Garren, D.A. & Boozer, A.H. 1991 b Magnetic field strength of toroidal plasma equilibria. Phys. Fluids B: Plasma Phys. 3, 28052821.CrossRefGoogle Scholar
Golub, G.H., Van, L. & Charles, F. 2013 Matrix Computations. JHU Press.Google Scholar
Goodman, A.G. et al. 2023 Constructing precisely quasi-isodynamic magnetic fields. J. Plasma Phys. 89, 905890504.10.1017/S002237782300065XCrossRefGoogle Scholar
Gradshteyn, I.S. & Ryzhik, I.M. 2014 Table of Integrals, Series, and Products. Academic Press.Google Scholar
Greene, J.M. 1997 A brief review of magnetic wells. Comment. Plasma Phys. Controll. Fusion 17, 389402.Google 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, 552565.CrossRefGoogle Scholar
Helander, P. 2014 Theory of plasma confinement in non-axisymmetric magnetic fields. Rep. Prog. Phys. 77, 087001.10.1088/0034-4885/77/8/087001CrossRefGoogle ScholarPubMed
Helander, P. & Nührenberg, J. 2009 Bootstrap current and neoclassical transport in quasi-isodynamic stellarators. Plasma Phys. Controll. Fusion 51, 055004.10.1088/0741-3335/51/5/055004CrossRefGoogle Scholar
Hindenlang, F., Maj, O., Strumberger, E., Rampp, M. & Sonnendrücker, E. 2019 Gvec: A Newly Developed 3d Ideal Mhd Galerkin Variational Equilibrium Code. Simons Collaboration on Hidden Symmetries and Fusion Energy.Google Scholar
Hirshman, S.P. & Whitson, J.C. 1983 Steepest-descent moment method for three-dimensional magnetohydrodynamic equilibria. Phys. Fluids 26, 35533568.10.1063/1.864116CrossRefGoogle Scholar
Ho, D.D.-M. & Kulsrud, R.M. 1987 Neoclassical transport in stellarators. Phys. Fluids 30, 442461.CrossRefGoogle Scholar
Jorge, R. & Landreman, M. 2020 The use of near-axis magnetic fields for stellarator turbulence simulations. Plasma Phys. Controll. Fusion 63, 014001.10.1088/1361-6587/abc862CrossRefGoogle Scholar
Jorge, R., Plunk, G.G., Drevlak, M., Landreman, M., Lobsien, J.-F., Camacho Mata, K. & Helander, P. 2022 A single-field-period quasi-isodynamic stellarator. J. Plasma Phys. 88, 175880504.10.1017/S0022377822000873CrossRefGoogle Scholar
Kappel, J., Landreman, M. & Malhotra, D. 2024 The magnetic gradient scale length explains why certain plasmas require close external magnetic coils. Plasma Phys. Controll. Fusion 66, 025018.10.1088/1361-6587/ad1a3eCrossRefGoogle Scholar
Landreman, M. 2021 Figures of merit for stellarators near the magnetic axis. J. Plasma Phys. 87, 905870112.10.1017/S0022377820001658CrossRefGoogle Scholar
Landreman, M. 2022 Mapping the space of quasisymmetric stellarators using optimized near-axis expansion. J. Plasma Phys. 88, 905880616.10.1017/S0022377822001258CrossRefGoogle Scholar
Landreman, M. & Jorge, R. 2020 Magnetic well and Mercier stability of stellarators near the magnetic axis. J. Plasma Phys. 86, 905860510.CrossRefGoogle Scholar
Landreman, M. & Sengupta, W. 2019 Constructing stellarators with quasisymmetry to high order. J. Plasma Phys. 85, 815850601.10.1017/S0022377819000783CrossRefGoogle Scholar
Littlejohn, R.G. 1983 Variational principles of guiding centre motion. J. Plasma Phys. 29, 111125.CrossRefGoogle Scholar
Lortz, D. & Nührenberg, J. 1976 Equilibrium and stability of a three-dimensional toroidal mhd configuration near its magnetic axis. Zeitschrift für Naturforschung A 31, 12771288.10.1515/zna-1976-1102CrossRefGoogle Scholar
Mercier, C. 1964 Equilibrium and stability of a toroidal magnetohydrodynamic system in the neighbourhood of a magnetic axis. Nucl. Fusion 4, 213226.10.1088/0029-5515/4/3/008CrossRefGoogle Scholar
Mynick, H.E. 1983 Improved theory of collisionless particle motion in stellarators. Phys. Fluids 26, 10081017.10.1063/1.864232CrossRefGoogle Scholar
Mynick, H.E. 2006 Transport optimization in stellarators. Phys. Plasmas 13, 058102.10.1063/1.2177643CrossRefGoogle Scholar
Nemov, V.V., Kasilov, S.V., Kernbichler, W. & Heyn, M.F. 1999 Evaluation of 1/ν neoclassical transport in stellarators. Phys. Plasmas 6, 46224632.10.1063/1.873749CrossRefGoogle Scholar
Nemov, V.V., Kasilov, S.V., Kernbichler, W. & Leitold, G.O. 2008 Poloidal motion of trapped particle orbits in real-space coordinates. Phys. Plasmas 15, 052501.10.1063/1.2912456CrossRefGoogle Scholar
Northrop, T.G. 1961 The guiding center approximation to charged particle motion. Ann. Phys. 15, 79101.10.1016/0003-4916(61)90167-1CrossRefGoogle Scholar
Nührenberg, J. & Zille, R. 1988 Quasi-helically symmetric toroidal stellarators. Phys. Lett. A 129, 113117.10.1016/0375-9601(88)90080-1CrossRefGoogle Scholar
Nührenberg, J. 2010 Development of quasi-isodynamic stellarators. Plasma Phys. Controll. Fusion 52, 124003.10.1088/0741-3335/52/12/124003CrossRefGoogle Scholar
Parra, F.I., Calvo, I., Helander, P. & Landreman, M. 2015 Less constrained omnigeneous stellarators. Nucl. Fusion 55, 033005.10.1088/0029-5515/55/3/033005CrossRefGoogle Scholar
Paul, E.J., Bhattacharjee, A., Landreman, M., Alex, D., Velasco, J.L. & Nies, R. 2022 Energetic particle loss mechanisms in reactor-scale equilibria close to quasisymmetry. Nucl. Fusion 62, 126054.10.1088/1741-4326/ac9b07CrossRefGoogle Scholar
Plunk, G.G., Drevlak, M., Rodriguez, E., Babin, R., Goodman, A. & Hindenlang, F. 2024 Back to the figure-8 stellarator. arXiv:2411.16411.10.1088/1361-6587/adb64bCrossRefGoogle Scholar
Plunk, G.G., Landreman, M. & Helander, P. 2019 Direct construction of optimized stellarator shapes. Part 3. Omnigenity near the magnetic axis. J. Plasma Phys. 85, 905850602.10.1017/S002237781900062XCrossRefGoogle Scholar
Plunk, G.G. et al. 2025 A geometric approach to constructing quasi-isodynamic fields. In preparation.Google Scholar
Rodríguez, E. 2023 Magnetohydrodynamic stability and the effects of shaping: a near-axis view for tokamaks and quasisymmetric stellarators. J. Plasma Phys. 89, 905890211.10.1017/S0022377823000211CrossRefGoogle Scholar
Rodríguez, E. & Plunk, G.G. 2023 Higher order theory of quasi-isodynamicity near the magnetic axis of stellarators. Phys. Plasmas 30, 062507.10.1063/5.0150275CrossRefGoogle Scholar
Rodríguez, E., Helander, P. & Bhattacharjee, A. 2020 Necessary and sufficient conditions for quasisymmetry. Phys. Plasmas 27, 062501.10.1063/5.0008551CrossRefGoogle Scholar
Rodríguez, E., Helander, P. & Goodman, A.G. 2024 The maximum-j property in quasi-isodynamic stellarators. J. Plasma Phys. 90, 905900212.10.1017/S0022377824000345CrossRefGoogle Scholar
Rodríguez, E. & Mackenbach, R.J.J. 2023 Trapped-particle precession and modes in quasisymmetric stellarators and tokamaks: a near-axis perspective. J. Plasma Phys. 89, 905890521.10.1017/S0022377823001125CrossRefGoogle Scholar
Rodríguez, E., Paul, E.J. & Bhattacharjee, A. 2022 a Measures of quasisymmetry for stellarators. J. Plasma Phys. 88, 905880109.10.1017/S0022377821001331CrossRefGoogle Scholar
Rodriguez, E. & Plunk, G.G. 2025 The zonal-flow residual does not tend to zero in the limit of small mirror ratio. J. Plasma Phys. 91, E102.10.1017/S0022377825000066CrossRefGoogle Scholar
Rodriguez, E., Plunk, G.G. & Jorge, R. 2025 Near-axis description of stellarator-symmetric quasi-isodynamic stellarators to second order. J. Plasma Phys. 91, E59.CrossRefGoogle Scholar
Rodríguez, E., Sengupta, W. & Bhattacharjee, A. 2022 b Phases and phase-transitions in quasisymmetric configuration space. Plasma Phys. Controll. Fusion 64, 105006.CrossRefGoogle Scholar
Rodríguez, E., Sengupta, W. & Bhattacharjee, A. 2023 Constructing the space of quasisymmetric stellarators through near-axis expansion. Plasma Phys. Controll. Fusion 65, 095004.10.1088/1361-6587/ace739CrossRefGoogle Scholar
Rosenbluth, M.N. & Hinton, F.L. 1998 Poloidal flow driven by ion-temperature-gradient turbulence in tokamaks. Phys. Rev. Lett. 80, 724727.10.1103/PhysRevLett.80.724CrossRefGoogle Scholar
Sanchez, R., Hirshman, S.P., Ware, A.S., Berry, L.A. & Spong, D.A. 2000 Ballooning stability optimization of low-aspect-ratio stellarators. Plasma Phys. Controll. Fusion 42, 641653.10.1088/0741-3335/42/6/303CrossRefGoogle Scholar
Solov’ev, L.S. & Shafranov, V.D. 1970 In Reviews of Plasma Physics, vol. 5. Consultants Bureau.Google Scholar
Jr Spitzer, L. 1958 The stellarator concept. Phys. Fluids 1, 253264.10.1063/1.1705883CrossRefGoogle Scholar
Stein, E.M. & Shakarchi, R. 2011 Fourier Analysis: an Introduction. vol. 1. Princeton University Press.Google Scholar
Süli, E. & Mayers, D.F. 2003 An Introduction to Numerical Analysis. Cambridge University Press.10.1017/CBO9780511801181CrossRefGoogle Scholar
Wesson, J. 2011 Tokamaks. In International Series of Monographs On Physics. 4th edn Oxford Univ. Press.Google Scholar
Weyl, H. 1916 Über die gleichverteilung von zahlen mod. eins. Mathematische Annalen 77, 313352.CrossRefGoogle Scholar
Zhu, H., Lin, Z. & Bhattacharjee, A. 2025 Collisionless zonal-flow dynamics in quasisymmetric stellarators. J. Plasma Phys. 91, E28.10.1017/S0022377824001739CrossRefGoogle Scholar
Figure 0

Figure 1. Benchmark of the error field measure $\delta{\kern-1pt}B_{\mathrm{ar}}$. The main plot compares the field error $\delta{\kern-1pt}B$, (3.1), evaluated using the global equilibrium computed with VMEC, to the near-axis estimate $\delta{\kern-1pt}B_{\mathrm{ar}}$ for the QI near-axis configurations in the benchmark database of Appendix A.1. The black broken line represents $\delta{\kern-1pt}B=\delta{\kern-1pt}B_{\mathrm{nae}}$ and the dotted one is the moving average of the scatter. The colours for $\delta{\kern-1pt}B_{\mathrm{ar}}$ denote the number of field periods of the configurations (see legend). The inset plot shows the same data scaled by the field period number as $1/N^2$.

Figure 1

Figure 2. Benchmark of effective ripple calculation. The plots show, in log scale, a comparison of the effective ripple as calculated using the code NEO on global equilibria (scatter points) and calculated with the near-axis estimate (solid lines), for a number of different benchmark configurations (see Appendix A). The two detail plots on the right show the individual comparison for two of the cases, including the zeroth-order ripple offset $\epsilon _{\mathrm{eff}}^{(0)}$ as reference (dotted line). The ripple is normalised to a reference $\bar {B}=1\,\rm T$ and $\bar {R}=1\,\rm m$.

Figure 2

Figure 3. Diagram with different contributions to $\epsilon _{\mathrm{eff}}$. (a) Deformation of $|\boldsymbol{B}|$ within the principal well violating the equal radial drift condition of omnigeneity (depicted by broken line). (b) Appearance of local ripple or secondary wells. (c) Misalignment of field maxima, leading to multiple-well trapped particles.

Figure 3

Table 1. Shaping configurations for effective ripple. The table shows information regarding the omnigeneous nature of the near-axis constructions in the benchmark. The table is separated into two main parts. Top rows show the measures of omnigeneity, in particular, the effective ripple for the original second order field in the benchmark (top), and the omnigenised form of the field (bottom). The lower rows present information regarding the shaping of the original field (top) and the omnigenised field. All the measures are defined in the main text.

Figure 4

Figure 4. Evolution of effective ripple with omnigenising second-order shaping. The plots show the evolution of the half-helicity benchmark configuration #76 with changing second-order shaping. (a) Evolution of $\epsilon _{\mathrm{eff}}^{\mathrm{edge}}$ (solid) and $A_c$ (broken) as a function of shaping. A value of 0 for the scaled shape corresponds to the original second-order benchmark configuration, while a value of 1 indicates the omnigenised construction. The shaping is scaled linearly in between. (b) Examples of cross-sections in cylindrical coordinates at three values of shaping, indicated as vertical lines on the left plot.

Figure 5

Figure 5. Ripple well diagnostic measure $\hat {A}_w$ for configurations 4.1 and 4.3. The plots show (left) the function $1/\hat {A}_w$ as a function of $\alpha$, the field line label, for configs. (a) 4.1 and (b) 4.3, the spaghetti diagrams. The hatched area represents $\hat {A}_w\gt A_w$, and the shaded regions the interval of $\alpha$ that have a ripple well. The right plots show the $|\boldsymbol{B}|$ contours corresponding to the $r$ values indicated by the horizontal silver lines on the left plot. The solid black line in the contour plots shows the direction of a magnetic field line, the broken white line contours of $\partial _\varphi |_\alpha B=0$ and the scatter, inflexions captured by the spaghetti diagram.

Figure 6

Table 2. Ripple well distance in the benchmark configurations. The table shows the values of the aspect ratio when the first ripple-well appears, $A_w$, and that at which the near-axis construction breaks down, $A_c$, for the configurations used as a benchmark in the paper.

Figure 7

Table 3. Magnetic well sensitivity of benchmark configurations. The table shows the values of the magnetic well and re-shaped fields for the benchmark configurations, the shape $\hat {T}$ and $r_c^{\mathrm{mhd}}$ second-order shaping measures.

Figure 8

Figure 6. Stabilised configurations and sensitivity of vacuum magnetic well to shaping. (a,b) Plots show (left) the shaping input for stabilising the near-axis fields and (right) the resulting re-shaped cross-sections for the first three configurations of the benchmark. The black, solid lines represent the re-shaped configuration, while the dotted one denotes the starting point. (c) Change in the magnetic well as a function of the shaping measure $A_c$, illustrating the sensitivity of the fields to shaping.

Figure 9

Figure 7. Shafranov shift sensitivity to plasma $\beta$. The plots show the shape gradient $\hat {\mathcal{S}}_{x}$ and $\hat {\mathcal{S}}_{y}$ for configurations (a) 4.1 and (b) 4.3 in the benchmark set.

Figure 10

Table 4. Shafranov shift sensitivity to plasma pressure. The table shows the values of the maximum sensitivity of the Shafranov shift, the estimate and numerical critical $\beta$ as well as the reference rotational transform on axis. The half-helicity fields appear to be the most resilient in the benchmark set. The comparison of $\beta _c$ to $\beta _\varDelta$ shows that although $\beta _c$ includes some key elements of the full phenomena, it can deviate significantly.

Figure 11

Figure 8. Three-dimensional rendition of configurations in the benchmark set constructed for $r=0.1$ and with the colourmap denoting the strength of the magnetic field $|\boldsymbol{B}|$.

Figure 12

Table 5. Relative magnitude of additional asymptotic terms in $\epsilon _{\mathrm{eff}}^{3/2,(2) }$. The table shows the relative contribution to $\epsilon _{\mathrm{eff}}^{3/2,(2)}$ of the asymptotic terms $\unicode {x2460}$, $\unicode {x2461}$ and $\unicode {x2462}$. The smallness of these contributions throughout the benchmark configurations supports, along with the role of QI breaking, the expression for the effective ripple measure used.

Figure 13

Figure 9. Illustrating diagrams for the estimation of the critical $\beta$. (a) Elliptical cross-section indicating the rotation angle $\theta$ and major and minor axes, $a$ and $b$, respectively. (b) Shift of ellipses along the direction $\boldsymbol{D}$ and the $\boldsymbol{M}$-transformed scenario involving circles. The diagram shows the geometric meaning of $d$ as defined in (G7).