Hostname: page-component-745bb68f8f-b95js Total loading time: 0 Render date: 2025-02-11T13:22:11.623Z Has data issue: false hasContentIssue false

Near-axis expansion of stellarator equilibrium at arbitrary order in the distance to the axis

Published online by Cambridge University Press:  28 January 2020

R. Jorge*
Affiliation:
Institute for Research in Electronics and Applied Physics, University of Maryland, College Park, MD 20742, USA
W. Sengupta
Affiliation:
Courant Institute of Mathematical Sciences, New York University, New York, NY 10012, USA
M. Landreman
Affiliation:
Institute for Research in Electronics and Applied Physics, University of Maryland, College Park, MD 20742, USA
*
Email address for correspondence: rjorge@umd.edu
Rights & Permissions [Opens in a new window]

Abstract

A direct construction of equilibrium magnetic fields with toroidal topology at arbitrary order in the distance from the magnetic axis is carried out, yielding an analytical framework able to explore the landscape of possible magnetic flux surfaces in the vicinity of the axis. This framework can provide meaningful analytical insight into the character of high-aspect-ratio stellarator shapes, such as the dependence of the rotational transform and the plasma beta limit on geometrical properties of the resulting flux surfaces. The approach developed here is based on an asymptotic expansion on the inverse aspect ratio of the ideal magnetohydrodynamics equation. The analysis is simplified by using an orthogonal coordinate system relative to the Frenet–Serret frame at the magnetic axis. The magnetic field vector, the toroidal magnetic flux, the current density, the field line label and the rotational transform are derived at arbitrary order in the expansion parameter. Moreover, a comparison with a near-axis expansion formalism employing an inverse coordinate method based on Boozer coordinates (the so-called Garren–Boozer construction) is made, where both methods are shown to agree at lowest order. Finally, as a practical example, a numerical solution using a W7-X equilibrium is presented, and a comparison between the lowest-order solution and the W7-X magnetic field is performed.

Type
Research Article
Copyright
© Cambridge University Press 2020

1 Introduction

To successfully confine a high-temperature plasma, with the ultimate goal of yielding a net energy gain from the resulting nuclear fusion reactions, the plasma pressure and electromagnetic forces should be balanced for sufficiently long periods of time. For this reason, the study of plasma equilibria lays at the fundamental level of magnetic confinement studies. Such magnetic fields are found by solving the ideal magnetohydrodynamics (MHD) equation

(1.1)$$\begin{eqnarray}\boldsymbol{J}\times \boldsymbol{B}=\unicode[STIX]{x1D735}p.\end{eqnarray}$$

In this work, we focus on obtaining three-dimensional magnetic equilibrium fields suitable for fusion devices, such as tokamaks and stellarators. Compared to tokamaks, stellarators have the advantage of eliminating instabilities and difficulties related to current-driven modes of operation. However, the degrees of freedom related to the solution of (1.1) in a non-axisymmetric geometry increases substantially (approximately one order of magnitude (Boozer Reference Boozer2015)) compared to its axisymmetric counterpart. An outstanding challenge is therefore to understand the landscape of three-dimensional equilibrium magnetic fields and to identify its most relevant cases for the success of the fusion program.

The current effort of stellarator optimization is to find shapes of external coils and currents that yield equilibrium magnetic fields with good plasma confinement. Such optimization effort has led to breakthroughs related to stellarator confinement, namely in the field of neoclassical transport (such as quasisymmetry), MHD stability and turbulence associated with drift waves (Grieger et al. Reference Grieger, Lotz, Merkel, Nührenberg, Sapper, Strumberger, Wobig, Burhenn, Erckmann and Gasparino1992; Mynick Reference Mynick2006; Mynick, Pomphrey & Xanthopoulos Reference Mynick, Pomphrey and Xanthopoulos2010). These efforts rely mainly on computational tools that provide solutions that are largely dependent on the initial point used in configuration space, where such dependencies are usually unknown. In this work, we perform a theoretical construction of stellarator equilibrium fields that can act as a guideline for the computational stellarator optimization program by providing a practical tool that can generate good initial points for conventional optimization algorithms while also allowing the theoretical analysis of their confinement properties independently of the chosen algorithms.

The near-axis framework is based on an asymptotic expansion of the equilibrium fields in powers of the inverse aspect ratio $\unicode[STIX]{x1D716}$, where

(1.2)$$\begin{eqnarray}\unicode[STIX]{x1D716}={\displaystyle \frac{a}{R}}\ll 1,\end{eqnarray}$$

with $a$ the maximum perpendicular distance from the axis to the plasma boundary and $R$ the minimum of the local radius of curvature of the magnetic axis. When solving (1.1), we focus on a system where the plasma $\unicode[STIX]{x1D6FD}$ is small, i.e.

(1.3)$$\begin{eqnarray}\unicode[STIX]{x1D6FD}={\displaystyle \frac{\overline{p}}{\overline{B}^{2}/8\unicode[STIX]{x03C0}}}\ll 1,\end{eqnarray}$$

where $\overline{p}$ and $\overline{B}$ in (1.3) are taken to be the pressure and average magnetic field strength on axis. Finally, the magnetic field $\boldsymbol{B}$ is written in terms of the toroidal magnetic flux $\unicode[STIX]{x1D713}$ and a field line label $\unicode[STIX]{x1D6FC}$ using the Clebsch representation

(1.4)$$\begin{eqnarray}\boldsymbol{B}=\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}\times \unicode[STIX]{x1D735}\unicode[STIX]{x1D6FC},\end{eqnarray}$$

which is a way of locally writing divergence-free vector fields (Helander Reference Helander2014). Within the near-axis formalism, the fields $\boldsymbol{B},\unicode[STIX]{x1D713}$ and $\unicode[STIX]{x1D6FC}$ are expanded in a power series in $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}/a$, with the $\unicode[STIX]{x1D70C}$ distance from the magnetic axis to an arbitrary point along the plane locally perpendicular to the axis.

The construction of magnetic field equilibria using a near-axis framework has mainly followed one of two approaches, namely using a direct or an inverse coordinates approach. In the direct method, pioneered by Mercier, Solov’ev and Shafranov (Mercier Reference Mercier1964; Solov’ev & Shafranov Reference Solov’ev and Shafranov1970), the magnetic flux surface function $\unicode[STIX]{x1D713}$ is found explicitly in terms of the Mercier coordinates $(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D703},s)$, with $\unicode[STIX]{x1D703}$ the angular polar coordinate in the plane locally perpendicular to the magnetic axis and $s$ the arclength function of the magnetic axis curve. This method allowed for several significant analytical results in the context of stellarator equilibria. An estimate for equilibrium and stability $\unicode[STIX]{x1D6FD}$-values using the direct approach was first given in Lortz & Nuhrenberg (Reference Lortz and Nuhrenberg1976, Reference Lortz and Nuhrenberg1977) by carrying out the expansion up to third order in $\unicode[STIX]{x1D70C}$. Higher-order formulations of the direct approach were also used in Bernardin, Moses & Tataronis (Reference Bernardin, Moses and Tataronis1986), Salat (Reference Salat1995) to prove important geometric properties of MHD equilibria and, more recently, in Chu et al. (Reference Chu, Guo, Liu, Ren, Shaing and Zhu2019), to obtain a generalized Grad–Shafranov equation for near-axis equilibria with constant axis curvature. Finally, we note that the direct method can also be used to derive a Hamiltonian formulation for the magnetic field lines and obtain adiabatic invariants to successively higher order in $\unicode[STIX]{x1D70C}$ (Bernardin & Tataronis Reference Bernardin and Tataronis1985).

In contrast, in the inverse method, the spatial position vector $\boldsymbol{r}$ is obtained as a function of magnetic coordinates involving $\unicode[STIX]{x1D713}$, the toroidal magnetic flux, such as Hamada or Boozer coordinates. The first use of the inverse method can be traced back to the work of Lortz and Nuhrenberg (see appendix II of Lortz & Nuhrenberg Reference Lortz and Nuhrenberg1976), where a near-axis expansion in Hamada coordinates was related to an expansion in the direct method to evaluate the Mercier stability criterion. An inverse coordinate description relying solely on Boozer coordinates was pioneered by Garren & Boozer (Reference Garren and Boozer1991a), Garren and Boozer (Reference Garren and Boozer1991b), further extended to allow vanishing curvature and the use of standard cylindrical coordinates in Landreman & Sengupta (Reference Landreman and Sengupta2018), Landreman, Sengupta & Plunk (Reference Landreman, Sengupta and Plunk2019). Boozer coordinates have the advantage that the particle guiding centre drift trajectories are determined by the magnetic field strength $B$ only (in contrast with the magnetic field vector $\boldsymbol{B}(\boldsymbol{r})$) (Boozer Reference Boozer1981). Furthermore, the Garren–Boozer construction allows for a practical procedure to directly construct MHD equilibria optimized for neoclassical transport without numerical optimization, i.e. to obtain analytical quasisymmetric fields, while showing that at third order in $\sqrt{\unicode[STIX]{x1D713}}$ the requirement of quasisymmetry leads to an overdetermined system of equations (Garren and Boozer Reference Garren and Boozer1991b). To lowest order, however, it was shown that the core shape and rotational transform of many optimization-based experimental devices could be accurately described by the Garren–Boozer construction (Landreman Reference Landreman2019), showing that a near-axis framework can potentially be used as an accurate analytical model for modern stellarator configurations.

In this work, for the first time, the direct method is formulated at arbitrary order in $\unicode[STIX]{x1D716}$ (and hence $\unicode[STIX]{x1D70C}$) for both vacuum and finite-$\unicode[STIX]{x1D6FD}$ systems. The use of the direct method has several advantages with respect to the inverse one, which are explored here. First, while the inverse approach relies on the existence of a flux surface function $\unicode[STIX]{x1D713}$ to define its coordinate system, the direct method allows for the construction of magnetic fields with resonant surfaces (such as magnetic islands) and can provide analytical constraints for the existence of magnetic surfaces. Second, in the direct method, the magnetic axis is defined in terms of the vacuum magnetic field, allowing the determination of a Shafranov shift and plasma beta limits when MHD finite $\unicode[STIX]{x1D6FD}$ effects are included. Finally, due to the use of an orthogonal coordinate system, the algebra is simplified considerably, allowing for the determination of the asymptotic expansion of $\boldsymbol{B}$, $\unicode[STIX]{x1D713}$, $\unicode[STIX]{x1D6FC}$ and $\unicode[STIX]{x1D704}$ at arbitrary order in $\unicode[STIX]{x1D716}$.

This paper is organized as follows. In § 2 the near-axis framework is introduced, focusing on the construction of an orthogonal coordinate system based on the magnetic axis and the asymptotic expansion of the physical quantities of interest. The asymptotic expansions of the vacuum magnetic field $\boldsymbol{B}$, the magnetic flux surface function $\unicode[STIX]{x1D713}$ and the magnetic field line label $\unicode[STIX]{x1D6FC}$ are obtained in terms of Mercier coordinates in § 3, while the finite $\unicode[STIX]{x1D6FD}$ case is presented in § 4. In particular, the lowest-order vacuum solutions are cast in terms of geometrical quantities of the elliptical flux surface, such as the eccentricity and rotation angle. In § 5, the rotational transform $\unicode[STIX]{x1D704}$ is computed based on the solution for $\unicode[STIX]{x1D6FC}$, and the rotational transform on axis is analytically evaluated and interpreted based on geometrical considerations. A comparison with an indirect method, particularly with the Garren–Boozer construction, is performed in § 6 where equivalence between both approaches is shown at lowest order. Finally, a numerical solution of the lowest-order system of equations is obtained in § 7 by comparing with a W7-X equilibrium profile. The conclusions follow.

2 Near-axis framework in Mercier’s coordinates

2.1 Mercier’s coordinate system

In this section, leveraging the work in Mercier (Reference Mercier1964) and Solov’ev & Shafranov (Reference Solov’ev and Shafranov1970), we construct an orthogonal coordinate system associated with a particular field line of force $\boldsymbol{r}_{0}(s)$, which is taken to be the magnetic axis curve. We let $L$ denote the total length of $\boldsymbol{r}_{0}$, such that $0\leqslant s\leqslant L$. The unit tangent vector $\boldsymbol{t}$ is defined as

(2.1)$$\begin{eqnarray}\boldsymbol{t}=\boldsymbol{r}_{0}^{\prime }(s),~0\leqslant s\leqslant L.\end{eqnarray}$$

Using the fact that $\boldsymbol{t}^{\prime }(s)$ is orthogonal to $\boldsymbol{t}$, the unit normal vector $\boldsymbol{n}$ is defined as $\boldsymbol{n}=\boldsymbol{t}^{\prime }(s)/\unicode[STIX]{x1D705}$ with $\unicode[STIX]{x1D705}=|\boldsymbol{t}^{\prime }(s)|=|(\boldsymbol{t}\boldsymbol{\cdot }\unicode[STIX]{x1D735})\boldsymbol{t}|$ the curvature, while the unit binormal vector $\boldsymbol{n}$ obeys $\boldsymbol{b}=\boldsymbol{t}\times \boldsymbol{n}$. The triad $(\boldsymbol{t},\boldsymbol{n},\boldsymbol{b})$ forms a right-handed system of orthogonal unit vectors, usually called the Frenet–Serret frame (Spivak Reference Spivak1999), which obey the following set of first-order differential equations

(2.2)$$\begin{eqnarray}\displaystyle & \displaystyle \boldsymbol{t}^{\prime }(s)=\unicode[STIX]{x1D705}\boldsymbol{n}, & \displaystyle\end{eqnarray}$$
(2.3)$$\begin{eqnarray}\displaystyle & \displaystyle \boldsymbol{n}^{\prime }(s)=-\unicode[STIX]{x1D705}\boldsymbol{t}+\unicode[STIX]{x1D70F}\boldsymbol{b}, & \displaystyle\end{eqnarray}$$
(2.4)$$\begin{eqnarray}\displaystyle & \displaystyle \boldsymbol{b}^{\prime }(s)=-\unicode[STIX]{x1D70F}\boldsymbol{n}, & \displaystyle\end{eqnarray}$$

with $\unicode[STIX]{x1D70F}$ the torsion. Explicit expressions for the curvature and torsion when the curve $\boldsymbol{r}_{0}$ is parametrized in terms of a parameter $t$ other than the arclength $s$ (e.g. the toroidal angle $\unicode[STIX]{x1D6F7}$ in cylindrical coordinates) can be obtained using

(2.5)$$\begin{eqnarray}\unicode[STIX]{x1D705}(t)={\displaystyle \frac{|\boldsymbol{r}^{\prime }(t)\times \boldsymbol{r}^{\prime \prime }(t)|}{|\boldsymbol{r}^{\prime }(t)|^{3}}},\end{eqnarray}$$

and

(2.6)$$\begin{eqnarray}\unicode[STIX]{x1D70F}(t)={\displaystyle \frac{\left(\boldsymbol{r}^{\prime }(t)\times \boldsymbol{r}^{\prime \prime }(t)\right)\boldsymbol{\cdot }\boldsymbol{r}^{\prime \prime \prime }(t)}{|\boldsymbol{r}^{\prime }(t)\times \boldsymbol{r}^{\prime \prime }(t)|^{2}}}.\end{eqnarray}$$

It can be shown that any curve (such as the magnetic axis) can be described only with $\unicode[STIX]{x1D705}$ and $\unicode[STIX]{x1D70F}$ (see e.g. Spivak (Reference Spivak1999)). Given $\unicode[STIX]{x1D705}$ and $\unicode[STIX]{x1D70F}$, the Frenet–Serret frame can then be found using (2.2)–(2.4) and a set of initial conditions. An example of a magnetic axis curve is shown in figure 1, together with the Frenet–Serret unit vectors, namely the tangent (blue), normal (green) and binormal (red) unit vectors.

Figure 1. Example of a magnetic surface using Mercier’s coordinates, where the radial coordinate $\unicode[STIX]{x1D70C}$ is prescribed as a function of $s$ and $\unicode[STIX]{x1D714}=\unicode[STIX]{x1D703}+\unicode[STIX]{x1D6FE}$ in order to obtain a toroidal shape with elliptical cross-section. The magnetic axis curve is shown in black, together with the Frenet–Serret unit vectors, namely the tangent (cyan), normal (grey) and binormal (orange) unit vectors. The blue and yellow lines in the outermost surface denote the curves with constant $\unicode[STIX]{x1D703}$ and $s$, respectfully.

We now let $\unicode[STIX]{x1D70C}$ denote the distance between an arbitrary point $\boldsymbol{r}$ to the axis $\boldsymbol{r}_{0}$ in the plane $(\boldsymbol{n},\boldsymbol{b})$ orthogonal to the axis, and let $\unicode[STIX]{x1D703}$ be the angle measured from the normal to $\boldsymbol{r}-\boldsymbol{r}_{0}$. The radius vector $\boldsymbol{r}$ can then be written as

(2.7)$$\begin{eqnarray}\boldsymbol{r}=\boldsymbol{r}_{0}(s)+\unicode[STIX]{x1D70C}\cos \unicode[STIX]{x1D703}\boldsymbol{n}(s)+\unicode[STIX]{x1D70C}\sin \unicode[STIX]{x1D703}\boldsymbol{b}(s).\end{eqnarray}$$

We note that the set of coordinates $(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D703},s)$ can be made orthogonal by introducing the angle $\unicode[STIX]{x1D714}$, defined by

(2.8)$$\begin{eqnarray}\unicode[STIX]{x1D714}=\unicode[STIX]{x1D703}+\unicode[STIX]{x1D6FE}(s),~\unicode[STIX]{x1D6FE}(s)=\int _{0}^{s}\unicode[STIX]{x1D70F}(s^{\prime })\,\text{d}s^{\prime },\end{eqnarray}$$

with $\unicode[STIX]{x1D6FE}$ the integrated torsion. An example of a magnetic surface constructed using Mercier’s formalism is shown in figure 1, where the radial coordinate $\unicode[STIX]{x1D70C}$ was chosen to be a function of $s$ and $\unicode[STIX]{x1D714}$ in order to obtain poloidal cross-sections with an elliptical shape. The explicit expression of $\unicode[STIX]{x1D70C}(s,\unicode[STIX]{x1D714})$ for the case of an elliptical expression can be found in § 3. The determinant of the metric tensor is given by

(2.9)$$\begin{eqnarray}\sqrt{g}=\unicode[STIX]{x1D70C}h_{s}\end{eqnarray}$$

in both the $(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D703},s)$ and $(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)$ coordinate systems. However, the metric tensor $\unicode[STIX]{x1D628}_{ij}$ is diagonal only when expressed in terms of the $(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)$ coordinates, with $\unicode[STIX]{x1D628}_{ij}=\text{diag}(1,\unicode[STIX]{x1D70C}^{2},h_{s}^{2})$. In (2.9), we defined $h_{s}$ as

(2.10)$$\begin{eqnarray}h_{s}=1-\unicode[STIX]{x1D705}\unicode[STIX]{x1D70C}\cos (\unicode[STIX]{x1D714}-\unicode[STIX]{x1D6FE}).\end{eqnarray}$$

In the following, we assume that the plasma boundary is close enough to the axis such that $\unicode[STIX]{x1D70C}<1/\unicode[STIX]{x1D705}$ leading to a non-zero Jacobian across the whole plasma volume. Finally, we introduce a Cartesian coordinate system in the $(\boldsymbol{n},\boldsymbol{b})$ plane by defining $x=\unicode[STIX]{x1D70C}\cos \unicode[STIX]{x1D703}$ and $y=\unicode[STIX]{x1D70C}\sin \unicode[STIX]{x1D703}$, yielding

(2.11)$$\begin{eqnarray}\boldsymbol{r}=\boldsymbol{r}_{0}(s)+x\boldsymbol{n}(s)+y\boldsymbol{b}(s).\end{eqnarray}$$

We note that the position vector in (2.11) coincides with the definition in the inverse coordinate method (Garren & Boozer Reference Garren and Boozer1991a) only to lowest order in $\unicode[STIX]{x1D716}$. A key difference between the direct method pursued here and the inverse method in (Garren & Boozer Reference Garren and Boozer1991a) is that the latter includes a finite contribution in the $\boldsymbol{t}$ direction in (2.11), leading to distinct vectors $\boldsymbol{r}-\boldsymbol{r}_{0}(s)$ between both the direct and the inverse method at the same point $\boldsymbol{r}$.

2.2 Power series expansion

In this section, we show how to construct the asymptotic series related to a physical quantity $f$ in terms of $\unicode[STIX]{x1D716}$ and $\unicode[STIX]{x1D70C}$. As shown below, such construction imposes conditions on the series coefficients of $f$. In § 3, we prove that the magnetic field satisfies such conditions in the vacuum case at all orders. In what follows, we normalize $\unicode[STIX]{x1D70C},x$ and $y$ to the characteristic perpendicular scale $a$ and the quantities $\unicode[STIX]{x1D705},\unicode[STIX]{x1D70F}$ and $s$ to the characteristic parallel scale $R$. The magnetic field is normalized to a constant $\overline{B}=\int _{0}^{L}B_{0}(s)\,\text{d}s/L$, with $B_{0}(s)$ the magnetic field on axis and $\unicode[STIX]{x1D713}$ is normalized to $\overline{B}R^{2}$. The asymptotic expansion of a function $f$ is then constructed by noting that any analytic function $f$ has a Taylor expansion near the origin $(x,y)=(0,0)$ of the form

(2.12)$$\begin{eqnarray}f(x,y,s)=\mathop{\sum }_{p=0}^{\infty }\mathop{\sum }_{j=0}^{\infty }f_{pj}(s)x^{p}y^{j}\unicode[STIX]{x1D716}^{p+j}.\end{eqnarray}$$

Similarly, using (2.11), we write $f$ as

(2.13)$$\begin{eqnarray}f(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)=\mathop{\sum }_{n=0}^{\infty }f_{n}(\unicode[STIX]{x1D714},s)\unicode[STIX]{x1D716}^{n}\unicode[STIX]{x1D70C}^{n}.\end{eqnarray}$$

The equality between the two expansions in (2.12) and (2.13) yields

(2.14)$$\begin{eqnarray}f_{n}(\unicode[STIX]{x1D714},s)=\mathop{\sum }_{p=0}^{n}f_{pn-p}(s)\cos ^{p}(\unicode[STIX]{x1D703})\sin ^{(n-p)}(\unicode[STIX]{x1D703})=\mathop{\sum }_{p=0}^{n}f_{np}^{c}(s)\cos (p\unicode[STIX]{x1D703})+f_{np}^{s}(s)\sin (p\unicode[STIX]{x1D703}).\end{eqnarray}$$

Equation (2.14) shows that $f_{n}$ can be written as a Fourier series in terms of $\cos p\unicode[STIX]{x1D703}$ and $\sin p\unicode[STIX]{x1D703}$ with only even or odd values of $p$ in the range $0\leqslant p\leqslant n$ depending on whether $n$ is even or odd (Kuo-Petravic & Boozer Reference Kuo-Petravic and Boozer1987). This is proven in appendix A. In the following, when dealing with Mercier’s coordinates $(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)$, analyticity is shown in the form of (2.14) rather than (2.12).

We expand the components of the magnetic field $\boldsymbol{B}$ as $\boldsymbol{B}=B_{\unicode[STIX]{x1D70C}}\boldsymbol{e}_{\unicode[STIX]{x1D70C}}+B_{\unicode[STIX]{x1D714}}\boldsymbol{e}_{\unicode[STIX]{x1D714}}+B_{s}\boldsymbol{e}_{s}$ with $\boldsymbol{e}_{\unicode[STIX]{x1D70C}}=\cos \unicode[STIX]{x1D703}\boldsymbol{n}+\sin \unicode[STIX]{x1D703}\boldsymbol{b}$, $\boldsymbol{e}_{\unicode[STIX]{x1D714}}=-\sin \unicode[STIX]{x1D703}\boldsymbol{n}+\cos \unicode[STIX]{x1D703}\boldsymbol{b}$ and $\boldsymbol{e}_{s}=\boldsymbol{t}$ using (2.13), i.e.

(2.15)$$\begin{eqnarray}\displaystyle B_{\unicode[STIX]{x1D70C}}=\mathop{\sum }_{n=0}^{\infty }B_{\unicode[STIX]{x1D70C}n}(\unicode[STIX]{x1D714},s)\unicode[STIX]{x1D716}^{n}\unicode[STIX]{x1D70C}^{n}, & & \displaystyle\end{eqnarray}$$

and similarly for $B_{\unicode[STIX]{x1D714}},B_{s}$ and $\unicode[STIX]{x1D713}$. The fields $\boldsymbol{B},\unicode[STIX]{x1D713}$ and $\unicode[STIX]{x1D6FC}$ are split into a vacuum and a finite $\unicode[STIX]{x1D6FD}$ component as

(2.16)$$\begin{eqnarray}\boldsymbol{B}=\boldsymbol{B}^{0}+\boldsymbol{B}^{1},\end{eqnarray}$$

with $\boldsymbol{B}^{0}$ the vacuum magnetic field in the absence of a plasma and $\boldsymbol{B}^{1}$ a linear perturbation in $\unicode[STIX]{x1D6FD}$. A similar split is applied to $\unicode[STIX]{x1D713}$ and $\unicode[STIX]{x1D6FC}$. The linear perturbations satisfy

(2.17)$$\begin{eqnarray}\left|{\displaystyle \frac{\boldsymbol{B}^{1}}{\boldsymbol{B}^{0}}}\right|\sim {\displaystyle \frac{\unicode[STIX]{x1D713}^{1}}{\unicode[STIX]{x1D713}^{0}}}\sim {\displaystyle \frac{\unicode[STIX]{x1D6FC}^{1}}{\unicode[STIX]{x1D6FC}^{0}}}\sim \unicode[STIX]{x1D6FD}\ll 1.\end{eqnarray}$$

We first consider the vacuum case and obtain a set of equations for the coefficients $B_{\unicode[STIX]{x1D70C}n}^{0},B_{\unicode[STIX]{x1D714}n}^{0},B_{sn}^{0},\unicode[STIX]{x1D713}_{n}^{0}$ and $\unicode[STIX]{x1D6FC}_{n}^{0}$.

3 Vacuum configuration

In vacuum, the magnetic field is irrotational, i.e. $\unicode[STIX]{x1D735}\times \boldsymbol{B}=0$. We therefore define the magnetic scalar potential $\unicode[STIX]{x1D719}$ as

(3.1)$$\begin{eqnarray}\boldsymbol{B}^{0}=\unicode[STIX]{x1D735}\unicode[STIX]{x1D719},\end{eqnarray}$$

with $\unicode[STIX]{x1D719}$ normalized to $\overline{B}R$ and $\unicode[STIX]{x1D735}$ normalized to $R$. Using (3.1) and $\unicode[STIX]{x1D735}\boldsymbol{\cdot }\boldsymbol{B}=0$, we find that $\unicode[STIX]{x1D719}$ satisfies Laplace’s equation, $\unicode[STIX]{x1D6FB}^{2}\unicode[STIX]{x1D719}=0$. In normalized Mercier coordinates $(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)$, the gradient operator $\unicode[STIX]{x1D735}\unicode[STIX]{x1D719}$ can be written as

(3.2)$$\begin{eqnarray}\unicode[STIX]{x1D735}\unicode[STIX]{x1D719}={\displaystyle \frac{1}{\unicode[STIX]{x1D716}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D719}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}\boldsymbol{e}_{\unicode[STIX]{x1D70C}}+{\displaystyle \frac{1}{\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D719}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}\boldsymbol{e}_{\unicode[STIX]{x1D714}}+{\displaystyle \frac{1}{h_{s}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D719}}{\unicode[STIX]{x2202}s}}\boldsymbol{e}_{s},\end{eqnarray}$$

while Laplace’s equation reads

(3.3)$$\begin{eqnarray}{\displaystyle \frac{1}{\unicode[STIX]{x1D70C}}}{\displaystyle \frac{\unicode[STIX]{x2202}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}\left(h_{s}\unicode[STIX]{x1D70C}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D719}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}\right)+{\displaystyle \frac{1}{\unicode[STIX]{x1D70C}^{2}}}{\displaystyle \frac{\unicode[STIX]{x2202}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}\left(h_{s}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D719}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}\right)+\unicode[STIX]{x1D716}^{2}{\displaystyle \frac{\unicode[STIX]{x2202}}{\unicode[STIX]{x2202}s}}\left({\displaystyle \frac{1}{h_{s}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D719}}{\unicode[STIX]{x2202}s}}\right)=0.\end{eqnarray}$$

As $\boldsymbol{r}_{0}$ is the axis of the vacuum magnetic field, $\boldsymbol{B}^{0}$, we impose that both the radial and angular vacuum magnetic fields vanish when $\unicode[STIX]{x1D70C}=0$, and the magnetic field on axis $B_{0}$ be a function of $s$ only, i.e. $\boldsymbol{B}^{0}(\unicode[STIX]{x1D70C}=0)=B_{0}(s)\boldsymbol{e}_{s}$. This sets $B_{\unicode[STIX]{x1D714}0}^{0}=B_{\unicode[STIX]{x1D70C}0}^{0}=0$ and $B_{s0}^{0}=B_{0}(s)$. The lowest-order solution of (3.1) is then given by

(3.4)$$\begin{eqnarray}\unicode[STIX]{x1D735}\unicode[STIX]{x1D719}=B_{0}(s)\boldsymbol{e}_{s}+O(\unicode[STIX]{x1D716}),\end{eqnarray}$$

which, up to $O(\unicode[STIX]{x1D716})$, yields

(3.5)$$\begin{eqnarray}\unicode[STIX]{x1D719}=\int _{0}^{s}B_{0}(s^{\prime })\,\text{d}s^{\prime }+O(\unicode[STIX]{x1D716}^{2}).\end{eqnarray}$$

3.1 Vacuum magnetic scalar potential

We now expand $\unicode[STIX]{x1D719}$ using (2.13) and collect terms of the same order in $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}$ in (3.3) in order to obtain a single equation for $\unicode[STIX]{x1D719}_{n}$. In the following, we define $\dot{\unicode[STIX]{x1D719}}=\unicode[STIX]{x2202}_{\unicode[STIX]{x1D714}}\unicode[STIX]{x1D719}$ and $\unicode[STIX]{x1D719}^{\prime }=\unicode[STIX]{x2202}_{s}\unicode[STIX]{x1D719}$ for the partial derivatives with respect to $\unicode[STIX]{x1D714}$ and $s$, respectively. We first focus on the $O(\unicode[STIX]{x1D716}^{2})$ term of (3.3)

(3.6)$$\begin{eqnarray}\ddot{\unicode[STIX]{x1D719}}_{2}+4\unicode[STIX]{x1D719}_{2}=-B_{0}^{\prime }(s).\end{eqnarray}$$

The homogeneous solution of (3.6) can be written as a linear combination of $\sin 2\unicode[STIX]{x1D714}$ and $\cos 2\unicode[STIX]{x1D714}$ terms, while the particular solution is given by $-B_{0}^{\prime }/4$, i.e.

(3.7)$$\begin{eqnarray}\unicode[STIX]{x1D719}_{2}=-{\displaystyle \frac{B_{0}^{\prime }}{4}}+c_{1}\sin 2\unicode[STIX]{x1D714}+c_{2}\cos 2\unicode[STIX]{x1D714}.\end{eqnarray}$$

For convenience, and to later obtain a direct relation between the coefficients of $\sin 2\unicode[STIX]{x1D714}$ and $\cos 2\unicode[STIX]{x1D714}$ and the geometric parameters of the flux surface function, we introduce the functions $\unicode[STIX]{x1D6FF}(s),\unicode[STIX]{x1D702}(s)$ and $\unicode[STIX]{x1D707}(s)=\tanh \unicode[STIX]{x1D702}(s)$, and write $\unicode[STIX]{x1D719}_{2}$ as

(3.8)$$\begin{eqnarray}\unicode[STIX]{x1D719}_{2}={\displaystyle \frac{B_{0}}{2}}\left[(\ln B_{0}^{-1/2})^{\prime }+\unicode[STIX]{x1D707}u^{\prime }\sin 2u-{\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{2}}\cos 2u\right],~u=\unicode[STIX]{x1D714}-\unicode[STIX]{x1D6FE}(s)+\unicode[STIX]{x1D6FF}(s).\end{eqnarray}$$

The integration constants $\unicode[STIX]{x1D6FF}(s)$ and $\unicode[STIX]{x1D702}(s)$ that characterize the $O(\unicode[STIX]{x1D716}^{2})$ scalar potential $\unicode[STIX]{x1D719}$ are arbitrary (periodic) functions of $s$ can be used to impose additional constraints on the magnetic field $\boldsymbol{B}$, such as quasisymmetry or omnigeneity.

Focusing on the $O(\unicode[STIX]{x1D716}^{3})$ term of (3.3), we obtain the following equation for $\unicode[STIX]{x1D719}_{3}$

(3.9)$$\begin{eqnarray}9\unicode[STIX]{x1D719}_{3}+\ddot{\unicode[STIX]{x1D719}}_{3}=-B_{0}\cos \unicode[STIX]{x1D703}\unicode[STIX]{x1D705}^{\prime }+\unicode[STIX]{x1D705}[2\unicode[STIX]{x1D719}_{22}^{c}\cos (\unicode[STIX]{x1D703}+2\unicode[STIX]{x1D6FF})+2\unicode[STIX]{x1D719}_{22}^{s}\sin (\unicode[STIX]{x1D703}+2\unicode[STIX]{x1D6FF})-B_{0}\unicode[STIX]{x1D70F}\sin \unicode[STIX]{x1D703}-2B_{0}^{\prime }\cos \unicode[STIX]{x1D703}],\end{eqnarray}$$

with $\unicode[STIX]{x1D719}_{22}^{c}=-B_{0}\unicode[STIX]{x1D702}^{\prime }/4$ and $\unicode[STIX]{x1D719}_{22}^{s}=B_{0}\unicode[STIX]{x1D707}u^{\prime }/2$. Similarly to (3.8), we write $\unicode[STIX]{x1D719}_{3}$ as

(3.10)$$\begin{eqnarray}\unicode[STIX]{x1D719}_{3}=\unicode[STIX]{x1D719}_{31}^{c}\cos u+\unicode[STIX]{x1D719}_{31}^{s}\sin u+\unicode[STIX]{x1D719}_{33}^{c}\cos 3u+\unicode[STIX]{x1D719}_{33}^{s}\sin 3u.\end{eqnarray}$$

Plugging the form of (3.10) in (3.9), we obtain for the particular solution

(3.11)$$\begin{eqnarray}\displaystyle & \displaystyle \unicode[STIX]{x1D719}_{31}^{c}(s)=-{\displaystyle \frac{\unicode[STIX]{x1D705}B_{0}}{8}}\left({\displaystyle \frac{5}{2}}{\displaystyle \frac{B_{0}^{\prime }}{B_{0}}}+{\displaystyle \frac{k^{\prime }}{k}}+{\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{2}}\cos 2\unicode[STIX]{x1D6FF}-\unicode[STIX]{x1D707}u^{\prime }\sin 2\unicode[STIX]{x1D6FF}\right), & \displaystyle\end{eqnarray}$$
(3.12)$$\begin{eqnarray}\displaystyle & \displaystyle \unicode[STIX]{x1D719}_{31}^{s}(s)={\displaystyle \frac{\unicode[STIX]{x1D705}B_{0}}{8}}\left(-\unicode[STIX]{x1D70F}+{\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{2}}\sin 2\unicode[STIX]{x1D6FF}+\unicode[STIX]{x1D707}u^{\prime }\cos 2\unicode[STIX]{x1D6FF}\right), & \displaystyle\end{eqnarray}$$

with both $\unicode[STIX]{x1D719}_{33}^{c}(s)$ and $\unicode[STIX]{x1D719}_{33}^{s}(s)$ integration constants from the homogeneous solution.

To obtain an expression for the solution of $\unicode[STIX]{x1D719}_{n}$ at arbitrary order in $\unicode[STIX]{x1D716}$, we first define the Laplacian operator $D$ in polar $(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714})$ coordinates multiplied by $\unicode[STIX]{x1D70C}^{2}$ as

(3.13)$$\begin{eqnarray}D\unicode[STIX]{x1D719}=\left[\unicode[STIX]{x1D70C}{\displaystyle \frac{\unicode[STIX]{x2202}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}\left(\unicode[STIX]{x1D70C}{\displaystyle \frac{\unicode[STIX]{x2202}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}\right)+{\displaystyle \frac{\unicode[STIX]{x2202}^{2}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}^{2}}}\right]\unicode[STIX]{x1D719}=\mathop{\sum }_{n=2}^{\infty }\left(n^{2}\unicode[STIX]{x1D719}_{n}+\ddot{\unicode[STIX]{x1D719}}_{n}\right)\unicode[STIX]{x1D716}^{n}\unicode[STIX]{x1D70C}^{n}.\end{eqnarray}$$

Laplace’s equation, equation (3.3), can then be written as

(3.14)$$\begin{eqnarray}D\unicode[STIX]{x1D719}=-\mathop{\sum }_{n=2}^{\infty }\unicode[STIX]{x1D716}^{n}\unicode[STIX]{x1D70C}^{n}\left[{\displaystyle \frac{\unicode[STIX]{x1D705}}{h_{s}}}\left(\dot{\unicode[STIX]{x1D719}}_{n-1}\sin \unicode[STIX]{x1D703}-(n-1)\unicode[STIX]{x1D719}_{n-1}\cos \unicode[STIX]{x1D703}\right)+{\displaystyle \frac{\unicode[STIX]{x1D719}_{n-2}^{\prime \prime }}{h_{s}^{2}}}+{\displaystyle \frac{(\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703})^{\prime }}{h_{s}^{3}}}\unicode[STIX]{x1D719}_{n-3}^{\prime }\right],\end{eqnarray}$$

where we defined $\unicode[STIX]{x1D719}_{-1}=0$. We then expand the inverse powers of $h_{s}=1-\unicode[STIX]{x1D716}\unicode[STIX]{x1D705}\unicode[STIX]{x1D70C}\cos \unicode[STIX]{x1D703}$ in a power series in $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}$ and collect terms of the same power in $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}$, yielding for $n\geqslant 3$

(3.15)$$\begin{eqnarray}\displaystyle n^{2}\unicode[STIX]{x1D719}_{n}+\ddot{\unicode[STIX]{x1D719}}_{n} & = & \displaystyle -\mathop{\sum }_{m=2}^{n}\unicode[STIX]{x1D705}^{n-m}\cos \unicode[STIX]{x1D703}^{n-m}\left[\vphantom{\int }\unicode[STIX]{x1D705}\left(\dot{\unicode[STIX]{x1D719}}_{m-1}\sin \unicode[STIX]{x1D703}-(m-1)\unicode[STIX]{x1D719}_{m-1}\cos \unicode[STIX]{x1D703}\right)\right.\nonumber\\ \displaystyle & & \displaystyle \left.+(n-m+1)\unicode[STIX]{x1D719}_{m-2}^{\prime \prime }+{\displaystyle \frac{(n-m+1)(n-m+2)}{2}}(\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703})^{\prime }\unicode[STIX]{x1D719}_{m-3}^{\prime }\right]\!.\qquad\end{eqnarray}$$

We note that (3.15) has the form of a periodically driven harmonic oscillator with natural frequency $n$. Similarly to $\unicode[STIX]{x1D719}_{2}$ and $\unicode[STIX]{x1D719}_{3}$, we decompose $\unicode[STIX]{x1D719}_{n}$ into its Fourier harmonics as

(3.16)$$\begin{eqnarray}\unicode[STIX]{x1D719}_{n}=\mathop{\sum }_{p=0}^{n}\unicode[STIX]{x1D719}_{np}^{c}(s)\cos pu+\unicode[STIX]{x1D719}_{np}^{s}(s)\sin pu.\end{eqnarray}$$

At each order $n$, the expansion of (3.16) can be plugged in (3.15), yielding a set of one-dimensional differential equations for the coefficients $\unicode[STIX]{x1D719}_{np}^{c}(s)$ and $\unicode[STIX]{x1D719}_{np}^{s}(s)$. As the right-hand side of (3.15) only contains frequencies in $\unicode[STIX]{x1D714}$ up to $(n-2)$ (shown in appendix A), the solutions of $\unicode[STIX]{x1D719}_{np}^{c}$ and $\unicode[STIX]{x1D719}_{np}^{s}$ in (3.16) for $0\leqslant p\leqslant n-2$ are determined by the lower-order $O(\unicode[STIX]{x1D716}^{n-1}\unicode[STIX]{x1D70C}^{n-1})$ particular solutions. The two remaining functions $\unicode[STIX]{x1D719}_{nn}^{c}(s)$ and $\unicode[STIX]{x1D719}_{nn}^{s}(s)$ are then integration parameters from the solution of the homogeneous equation in (3.16). Finally, we remark that the analyticity condition of (2.14) for $\unicode[STIX]{x1D719}$ can be derived from the solution of Laplace’s equation, equation (3.3), as shown in appendix A.

3.2 Vacuum magnetic toroidal flux surface function

We now determine the expression for the normalized vacuum toroidal flux $\unicode[STIX]{x1D713}^{0}(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)$. Using (1.4) and (3.1), we determine $\unicode[STIX]{x1D713}^{0}$ via

(3.17)$$\begin{eqnarray}\unicode[STIX]{x1D735}\unicode[STIX]{x1D719}\boldsymbol{\cdot }\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}^{0}=0.\end{eqnarray}$$

Expanding the gradient operator using (3.2), we rewrite (3.17) as

(3.18)$$\begin{eqnarray}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D719}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{0}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}+{\displaystyle \frac{1}{\unicode[STIX]{x1D70C}^{2}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D719}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{0}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}+{\displaystyle \frac{\unicode[STIX]{x1D716}^{2}}{h_{s}^{2}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D719}}{\unicode[STIX]{x2202}s}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{0}}{\unicode[STIX]{x2202}s}}=0.\end{eqnarray}$$

An expression for the power series coefficients $\unicode[STIX]{x1D713}_{n}^{0}$ of $\unicode[STIX]{x1D713}^{0}$ can then be obtained by expanding both $\unicode[STIX]{x1D719}$ and $\unicode[STIX]{x1D713}^{0}$ in (3.18) in powers of $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}$ using (2.13) and

(3.19)$$\begin{eqnarray}\unicode[STIX]{x1D713}^{0}=\mathop{\sum }_{n=0}^{\infty }\unicode[STIX]{x1D713}_{n}^{0}(\unicode[STIX]{x1D714},s)\unicode[STIX]{x1D716}^{n}\unicode[STIX]{x1D70C}^{n},\end{eqnarray}$$

yielding

(3.20)$$\begin{eqnarray}2n\unicode[STIX]{x1D719}_{2}\unicode[STIX]{x1D713}_{n}^{0}+\dot{\unicode[STIX]{x1D719}}_{2}\dot{\unicode[STIX]{x1D713}}_{n}^{0}+B_{0}\unicode[STIX]{x1D713}_{n}^{0^{\prime }}=F_{n}^{0},\end{eqnarray}$$

where $F_{0}^{0}=0$ and

(3.21)$$\begin{eqnarray}\displaystyle F_{n}^{0} & = & \displaystyle -\mathop{\sum }_{m=0}^{n-1}\left[\vphantom{\mathop{\sum }_{f=m}^{n}}(n+2-m)m\unicode[STIX]{x1D719}_{n+2-m}\unicode[STIX]{x1D713}_{m}^{0}+\dot{\unicode[STIX]{x1D719}}_{n+2-m}\dot{\unicode[STIX]{x1D713}}_{m}^{0}\right.\nonumber\\ \displaystyle & & \displaystyle \left.+\,\unicode[STIX]{x1D713}_{m}^{0^{\prime }}\mathop{\sum }_{f=m}^{n}(n-f+1)\unicode[STIX]{x1D705}^{n-f}\cos \unicode[STIX]{x1D703}^{n-f}\unicode[STIX]{x1D719}_{f-m}^{\prime }\right],\end{eqnarray}$$

for $n>0$. Although a formal solution of (3.20) can be obtained using the method of characteristics (as shown in appendix B), here, we focus on deriving a one-dimensional system of differential equations for $\unicode[STIX]{x1D713}_{n}^{0}$ with the coefficients $\unicode[STIX]{x1D719}_{np}^{c}$ and $\unicode[STIX]{x1D719}_{np}^{s}$ as sources. As an aside, we note that both $\unicode[STIX]{x1D713}^{0}$ and $\unicode[STIX]{x1D6FC}^{0}$ obey the constraint in (3.17). The distinction between the two is made by requiring $\unicode[STIX]{x1D713}^{0}$ to obey the analyticity condition, equation (2.14).

Using (3.20) and the analyticity condition, equation (2.14), the lowest-order solutions for $\unicode[STIX]{x1D713}^{0}$ are then given by $\unicode[STIX]{x1D713}_{0}^{0^{\prime }}=\unicode[STIX]{x1D713}_{1}^{0}=0$. The constant $\unicode[STIX]{x1D713}_{0}^{0}$ is set to zero by requiring that $\unicode[STIX]{x1D713}^{0}$ vanishes on the magnetic axis. Focusing on the $n=2$ case in (3.20), the equation for $\unicode[STIX]{x1D713}_{2}^{0}=\unicode[STIX]{x1D713}_{20}^{0}+\unicode[STIX]{x1D713}_{22}^{0s}\sin 2u+\unicode[STIX]{x1D713}_{22}^{0c}\cos 2u$ can be written as

(3.22)$$\begin{eqnarray}\unicode[STIX]{x1D6F9}_{2}^{0^{\prime }}=A_{2}^{0}\unicode[STIX]{x1D6F9}_{2}^{0},\end{eqnarray}$$

with $\unicode[STIX]{x1D6F9}_{2}^{0}=B_{0}(s)^{-1}[\unicode[STIX]{x1D713}_{20}^{0},\unicode[STIX]{x1D713}_{22}^{0s},\unicode[STIX]{x1D713}_{22}^{0c}]^{\text{T}}$ and $A_{2}^{0}$ given by

(3.23)$$\begin{eqnarray}A_{2}^{0}=\left(\begin{array}{@{}ccc@{}}0 & -2\unicode[STIX]{x1D707}u^{\prime } & \unicode[STIX]{x1D702}^{\prime }\\ -2\unicode[STIX]{x1D707}u^{\prime } & 0 & 2u^{\prime }\\ \unicode[STIX]{x1D702}^{\prime } & -2u^{\prime } & 0\\ \end{array}\right).\end{eqnarray}$$

The system of equations in (3.22) can be simplified by introducing the transformation

(3.24)$$\begin{eqnarray}\unicode[STIX]{x1D6F9}_{2}^{0}=T_{2}\unicode[STIX]{x1D70E}_{2}^{0},\end{eqnarray}$$

with $\unicode[STIX]{x1D70E}_{2}^{0}=[\unicode[STIX]{x1D70E}_{21}^{0},\unicode[STIX]{x1D70E}_{22}^{0},\unicode[STIX]{x1D70E}_{23}^{0}]^{\text{T}}$ and $\unicode[STIX]{x1D64F}_{2}$ the matrix

(3.25)$$\begin{eqnarray}\unicode[STIX]{x1D64F}_{2}=2\left(\begin{array}{@{}ccc@{}}-\text{sinh}\,\unicode[STIX]{x1D702} & \text{i} & \cosh \unicode[STIX]{x1D702}\\ -\text{sinh}\,\unicode[STIX]{x1D702} & -\text{i} & \cosh \unicode[STIX]{x1D702}\\ \cosh \unicode[STIX]{x1D702} & 0 & -\text{sinh}\,\unicode[STIX]{x1D702}\\ \end{array}\right).\end{eqnarray}$$

The quantities $\unicode[STIX]{x1D70E}_{2}^{0}$ then satisfy the following decoupled system of equations:

(3.26)$$\begin{eqnarray}\unicode[STIX]{x1D70E}_{2}^{0^{\prime }}=\left(\begin{array}{@{}ccc@{}}2{\displaystyle \frac{\text{i}u^{\prime }}{\cosh \unicode[STIX]{x1D702}}} & 0 & 0\\ 0 & -2{\displaystyle \frac{\text{i}u^{\prime }}{\cosh \unicode[STIX]{x1D702}}} & 0\\ 0 & 0 & 0\end{array}\right)\unicode[STIX]{x1D70E}_{2}^{0}.\end{eqnarray}$$

The solution of (3.26) can then be given in terms of the integral

(3.27)$$\begin{eqnarray}v(s)=\int _{0}^{s}{\displaystyle \frac{u^{\prime }(x)}{\cosh \unicode[STIX]{x1D702}(x)}}\,\text{d}x=\int _{0}^{s}\sqrt{1-\unicode[STIX]{x1D707}(x)^{2}}[\unicode[STIX]{x1D6FF}^{\prime }(x)-\unicode[STIX]{x1D70F}(x)]\,\text{d}x,\end{eqnarray}$$

as

(3.28)$$\begin{eqnarray}\unicode[STIX]{x1D70E}_{2}^{0}(s)=[\unicode[STIX]{x1D70E}_{21}^{00}\text{e}^{2\text{i}v(s)},\unicode[STIX]{x1D70E}_{22}^{00}\text{e}^{-2\text{i}v(s)},\unicode[STIX]{x1D70E}_{23}^{00}]^{\text{T}},\end{eqnarray}$$

with $\unicode[STIX]{x1D70E}_{21}^{00},\unicode[STIX]{x1D70E}_{22}^{00}$ and $\unicode[STIX]{x1D70E}_{23}^{00}$ constants. The flux surface function $\unicode[STIX]{x1D713}_{2}^{0}$ can then be found using (3.24).

A more streamlined method to obtain the lowest-order flux surface function $\unicode[STIX]{x1D713}_{2}^{0}$ can be found by noting that the free parameter $\unicode[STIX]{x1D6FF}$ in the analyticity condition in (2.14) can be used to set $\unicode[STIX]{x1D713}_{22}^{0s}=0$, i.e. the expansion coefficients of the field $\unicode[STIX]{x1D719}$ are chosen in such a way that the $\sin 2u$ terms in $\unicode[STIX]{x1D713}_{2}^{0}$ vanish. From (3.22), the remaining $\unicode[STIX]{x1D713}_{20}^{0}$ and $\unicode[STIX]{x1D713}_{22}^{0c}$ terms are then given by

(3.29)$$\begin{eqnarray}\displaystyle & \displaystyle \unicode[STIX]{x1D702}^{\prime }={\displaystyle \frac{\unicode[STIX]{x1D713}_{022}^{c^{\prime }}}{\unicode[STIX]{x1D713}_{20}^{0}}}={\displaystyle \frac{\unicode[STIX]{x1D713}_{20}^{0^{\prime }}}{\unicode[STIX]{x1D713}_{22}^{0c}}}, & \displaystyle\end{eqnarray}$$
(3.30)$$\begin{eqnarray}\displaystyle & \displaystyle \unicode[STIX]{x1D707}=\tanh \unicode[STIX]{x1D702}={\displaystyle \frac{\unicode[STIX]{x1D713}_{22}^{0c}}{\unicode[STIX]{x1D713}_{20}^{0}}}. & \displaystyle\end{eqnarray}$$

Defining $\unicode[STIX]{x1D713}_{22}^{0c}=\sinh \unicode[STIX]{x1D702}$ and $\unicode[STIX]{x1D713}_{20}^{0}=\cosh \unicode[STIX]{x1D702}$, the vacuum magnetic flux surface function $\unicode[STIX]{x1D713}^{0}=\unicode[STIX]{x1D713}_{2}^{0}\unicode[STIX]{x1D70C}^{2}\unicode[STIX]{x1D716}^{2}+O(\unicode[STIX]{x1D716}^{3})$ can then be written as

(3.31)$$\begin{eqnarray}\unicode[STIX]{x1D713}_{2}^{0}={\displaystyle \frac{B_{0}\unicode[STIX]{x03C0}}{\sqrt{1-\unicode[STIX]{x1D707}^{2}}}}\left(1+\unicode[STIX]{x1D707}\cos 2u\right)=B_{0}\unicode[STIX]{x03C0}\left(e^{\unicode[STIX]{x1D702}}\cos ^{2}u+\text{e}^{-\unicode[STIX]{x1D702}}\sin ^{2}u\right).\end{eqnarray}$$

The multiplicative constant in (3.31) is chosen such that $\unicode[STIX]{x1D713}$ equals the toroidal magnetic flux, i.e.

(3.32)$$\begin{eqnarray}\unicode[STIX]{x1D713}={\displaystyle \frac{1}{L}}\int (\boldsymbol{B}\boldsymbol{\cdot }\unicode[STIX]{x1D735}s)\,\text{d}V,\end{eqnarray}$$

with $\text{d}V$ the volume element, which in the $(\unicode[STIX]{x1D713},\unicode[STIX]{x1D703},s)$ coordinate system reads $\text{d}V=\text{d}\unicode[STIX]{x1D713}\,\text{d}\unicode[STIX]{x1D703}\,\text{d}s/(\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}\times \unicode[STIX]{x1D735}\unicode[STIX]{x1D703}\boldsymbol{\cdot }\unicode[STIX]{x1D735}s)$. We note that for a circular cross-section with $\unicode[STIX]{x1D707}=0$, $\unicode[STIX]{x1D713}^{0}=\unicode[STIX]{x03C0}B_{0}\unicode[STIX]{x1D70C}^{2}$.

The analysis that led to the solution in (3.28) can be extended to higher orders. Explicit expressions for the third- and fourth-order solutions can be found in appendix C. Furthermore, as shown in appendix D, the system of equations for $\unicode[STIX]{x1D6F9}_{n}^{0}$, with $\unicode[STIX]{x1D6F9}_{n}^{0}$ the column vector with the coefficients of the Fourier expansion of $B_{0}^{-n/2}\unicode[STIX]{x1D713}_{n}^{0}$ in $u$ for arbitrary $n$ with $\unicode[STIX]{x1D713}_{n}^{0}$ expanded as

(3.33)$$\begin{eqnarray}\unicode[STIX]{x1D713}_{n}^{0}=\mathop{\sum }_{p=0}^{n}\unicode[STIX]{x1D713}_{np}^{0c}\cos pu+\unicode[STIX]{x1D713}_{np}^{0s}\sin pu,\end{eqnarray}$$

can be cast into the following form

(3.34)$$\begin{eqnarray}\unicode[STIX]{x1D6F9}_{n}^{0^{\prime }}=\unicode[STIX]{x1D63C}_{n}\unicode[STIX]{x1D6F9}_{n}^{0}+\unicode[STIX]{x1D63D}_{n}^{0},\end{eqnarray}$$

with $\unicode[STIX]{x1D63C}_{n}$ and $\unicode[STIX]{x1D63D}_{n}^{0}$ square matrices with periodic coefficients. An analysis of the properties of $\unicode[STIX]{x1D63C}_{n}$ and $\unicode[STIX]{x1D63D}_{n}^{0}$ using the methods of Floquet theory is left for a future study.

The form of (3.26), (C 6) and (C 10) suggests the existence of a matrix $\unicode[STIX]{x1D64F}_{n}$ at arbitrary order in $n$ such that the vectors $\unicode[STIX]{x1D748}_{n}^{0}$ defined by

(3.35)$$\begin{eqnarray}\unicode[STIX]{x1D713}_{n}^{0}=\unicode[STIX]{x1D64F}_{n}\unicode[STIX]{x1D748}_{n}^{0},\end{eqnarray}$$

satisfy a decoupled system of first-order differential equations. Assuming the existence of $\unicode[STIX]{x1D64F}_{n}$ for $n>4$, the decoupled system of equations for $\unicode[STIX]{x1D748}_{n}^{0}=\unicode[STIX]{x1D64F}_{n}^{-1}\unicode[STIX]{x1D713}_{n}^{0}$, a column vector with entries $\unicode[STIX]{x1D70E}_{nm}^{0}$ can be written for arbitrary $n$ in the following simplified form:

(3.36)$$\begin{eqnarray}\unicode[STIX]{x1D70E}_{nm}^{0^{\prime }}(s)-\text{i}mv^{\prime }(s)\unicode[STIX]{x1D70E}_{nm}^{0}=F_{nm}^{0},\end{eqnarray}$$

with $m$ an odd (even) integer if $n$ is odd (even) and $-n\leqslant m\leqslant n$ and $v(s)$ given by (3.27). The problem of determining the parameters associated with the flux surface function is then reduced to the solution of (3.36). A general solution of (3.36) is given by

(3.37)$$\begin{eqnarray}\unicode[STIX]{x1D70E}_{nm}^{0}(s)=\text{e}^{\text{i}mv(s)}\int _{s_{0}}^{s}F_{nm}^{0}(x)\text{e}^{-\text{i}mv(x)}\,\text{d}x.\end{eqnarray}$$

We now require $\unicode[STIX]{x1D713}^{0}$ (hence $\unicode[STIX]{x1D70E}_{nm}^{0}$) to be periodic on $s$ with period $L$, i.e. we impose the periodicity condition $\unicode[STIX]{x1D70E}_{nm}^{0}(s+L)=\unicode[STIX]{x1D70E}_{nm}^{0}(s)$, which sets the constant of integration $s_{0}$. The periodic solution of (3.36) is then given by (Mercier Reference Mercier1964; Solov’ev & Shafranov Reference Solov’ev and Shafranov1970)

(3.38)$$\begin{eqnarray}\unicode[STIX]{x1D70E}_{nm}^{0}(s)={\displaystyle \frac{\text{e}^{\text{i}mv(s)}}{\text{e}^{-\text{i}mv(L)}-1}}\int _{s}^{s+L}\text{e}^{-\text{i}mv(x)}F_{nm}^{0}(x)\,\text{d}x.\end{eqnarray}$$

Analysis of (3.38) shows that a periodic solution of $\unicode[STIX]{x1D70E}_{nm}^{0}$ (hence $\unicode[STIX]{x1D713}_{n}^{0}$) yields a resonant denominator when

(3.39)$$\begin{eqnarray}v(L)=2\unicode[STIX]{x03C0}{\displaystyle \frac{l}{m}},\end{eqnarray}$$

with $l$ an integer. We therefore conclude that, for a solution of $\unicode[STIX]{x1D70E}_{nm}^{0}$ to exist, either the rotational transform on axis is an irrational number, or the numerators in (3.38) vanish for a rational on-axis rotational transform. In § 5, we relate the parameter $v(L)$ to the rotational transform $\unicode[STIX]{x1D704}$ and show that (3.39) is satisfied when the magnetic field lines in the vicinity of the magnetic axis close on themselves after one or more circuits along $s$, i.e. (3.39) is the condition for the existence of rational surfaces.

3.3 Vacuum field line label

The vacuum field line label $\unicode[STIX]{x1D6FC}^{0}$ is found by equating (1.4) and (3.1), yielding the following set of three coupled equations:

(3.40)$$\begin{eqnarray}\displaystyle & \displaystyle h_{s}\unicode[STIX]{x1D70C}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D719}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}={\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{0}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D6FC}^{0}}{\unicode[STIX]{x2202}s}}-{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{0}}{\unicode[STIX]{x2202}s}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D6FC}^{0}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}, & \displaystyle\end{eqnarray}$$
(3.41)$$\begin{eqnarray}\displaystyle & \displaystyle h_{s}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D719}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}=\unicode[STIX]{x1D70C}\left({\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{0}}{\unicode[STIX]{x2202}s}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D6FC}^{0}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}-{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{0}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D6FC}^{0}}{\unicode[STIX]{x2202}s}}\right), & \displaystyle\end{eqnarray}$$
(3.42)$$\begin{eqnarray}\displaystyle & \displaystyle {\displaystyle \frac{\unicode[STIX]{x1D716}^{2}\unicode[STIX]{x1D70C}^{2}}{h_{s}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D719}}{\unicode[STIX]{x2202}s}}=\unicode[STIX]{x1D70C}\left({\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{0}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D6FC}^{0}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}-{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{0}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D6FC}^{0}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}\right). & \displaystyle\end{eqnarray}$$

Expanding $\unicode[STIX]{x1D6FC}^{0}$ in $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}$ as

(3.43)$$\begin{eqnarray}\unicode[STIX]{x1D6FC}^{0}=\mathop{\sum }_{n}\unicode[STIX]{x1D6FC}_{n}^{0}(\unicode[STIX]{x1D714},s)\unicode[STIX]{x1D716}^{n}\unicode[STIX]{x1D70C}^{n},\end{eqnarray}$$

we find that, to lowest order in $\unicode[STIX]{x1D716}$, equations (3.40)–(3.42) reduce to

(3.44)$$\begin{eqnarray}\displaystyle & \displaystyle 2\unicode[STIX]{x1D719}_{2}=\dot{\unicode[STIX]{x1D713}}_{2}^{0}\unicode[STIX]{x1D6FC}_{0}^{0^{\prime }}-\unicode[STIX]{x1D713}_{2}^{0^{\prime }}\dot{\unicode[STIX]{x1D6FC}}^{0}, & \displaystyle\end{eqnarray}$$
(3.45)$$\begin{eqnarray}\displaystyle & \displaystyle \dot{\unicode[STIX]{x1D719}}_{2}=-2\unicode[STIX]{x1D713}_{2}^{0}\unicode[STIX]{x1D6FC}_{0}^{0^{\prime }}, & \displaystyle\end{eqnarray}$$
(3.46)$$\begin{eqnarray}\displaystyle & \displaystyle \unicode[STIX]{x1D719}_{0}^{\prime }=2\unicode[STIX]{x1D713}_{2}^{0}\dot{\unicode[STIX]{x1D6FC}}_{0}^{0}. & \displaystyle\end{eqnarray}$$

We note that, by eliminating $\unicode[STIX]{x1D6FC}_{0}^{0^{\prime }}$ and $\dot{\unicode[STIX]{x1D6FC}}_{0}^{0}$ in (3.44), using (3.45) and (3.46) we obtain (3.20) with $n=2$. Solving (3.46) for $\unicode[STIX]{x1D6FC}_{0}^{0}$ and plugging the result in (3.45), we find that

(3.47)$$\begin{eqnarray}\unicode[STIX]{x1D6FC}^{0}={\displaystyle \frac{1}{2\unicode[STIX]{x03C0}}}\left[\arctan \left(\text{e}^{-\unicode[STIX]{x1D702}}\tan u\right)-v(s)\right]+O(\unicode[STIX]{x1D716}).\end{eqnarray}$$

As expected, in contrast with $\unicode[STIX]{x1D713}^{0}$, $\unicode[STIX]{x1D6FC}^{0}$ does not obey the analyticity condition in (2.14).

In order to obtain the vacuum field line label $\unicode[STIX]{x1D6FC}^{0}$ to arbitrary order, we expand $\unicode[STIX]{x1D6FC}^{0}$ in powers of $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}$ and obtain the following formulas for (3.41) and (3.42) and $n>0$

(3.48)$$\begin{eqnarray}\displaystyle \hspace{-24.0pt}-2(\unicode[STIX]{x1D713}_{2}^{0})^{n/2+1}{\displaystyle \frac{\unicode[STIX]{x2202}}{\unicode[STIX]{x2202}s}}\left(\unicode[STIX]{x1D6FC}_{n}^{0}(\unicode[STIX]{x1D713}_{2}^{0})^{-n/2}\right) & = & \displaystyle \dot{\unicode[STIX]{x1D719}}_{n+2}-\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703}\dot{\unicode[STIX]{x1D719}}_{n+1}\nonumber\\ \displaystyle \hspace{-24.0pt} & & \displaystyle -\,\mathop{\sum }_{m=0}^{n-1}[m\unicode[STIX]{x1D6FC}_{m}^{0}\unicode[STIX]{x1D713}_{n+2-m}^{^{\prime }0}-(n+2-m)\unicode[STIX]{x1D6FC}_{m}^{^{\prime }0}\unicode[STIX]{x1D713}_{n+2-m}^{0}],\end{eqnarray}$$
(3.49)$$\begin{eqnarray}\displaystyle \hspace{-24.0pt}2(\unicode[STIX]{x1D713}_{2}^{0})^{n/2+1}{\displaystyle \frac{\unicode[STIX]{x2202}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}\left(\unicode[STIX]{x1D6FC}_{n}^{0}(\unicode[STIX]{x1D713}_{2}^{0})^{-n/2}\right) & = & \displaystyle \mathop{\sum }_{m=0}^{n}\unicode[STIX]{x1D719}_{m}^{\prime }(\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703})^{n-m}\nonumber\\ \displaystyle \hspace{-24.0pt} & & \displaystyle +\,\mathop{\sum }_{m=0}^{n-1}[m\unicode[STIX]{x1D6FC}_{m}^{0}\dot{\unicode[STIX]{x1D713}}_{n+2-m}-(n+2-m)\dot{\unicode[STIX]{x1D6FC}}_{m}^{0}\unicode[STIX]{x1D713}_{n+2-m}^{0}].\end{eqnarray}$$

As done for $\unicode[STIX]{x1D6FC}_{0}^{0}$, at each order, equation (3.49) can be used to find an analytical expression for $\unicode[STIX]{x1D6FC}_{n}^{0}$ up to an additive function of $s$, which is set by (3.48).

4 MHD equilibrium

We now solve (1.1) in the near-axis expansion formalism at first order in $\unicode[STIX]{x1D6FD}$. In the following, the plasma current density $\boldsymbol{J}$ is normalized to $\overline{B}/4\unicode[STIX]{x03C0}R$ and $p$ to $\overline{p}$. The linearized system of equations for $\boldsymbol{B}^{1},\boldsymbol{J}$ and $\unicode[STIX]{x1D713}^{1}$ is given by the first-order ideal MHD equation

(4.1)$$\begin{eqnarray}\boldsymbol{J}\times \boldsymbol{B}^{0}=\unicode[STIX]{x1D6FD}p^{\prime }(\unicode[STIX]{x1D713}^{0})\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}^{0},\end{eqnarray}$$

Ampère’s law

(4.2)$$\begin{eqnarray}\unicode[STIX]{x1D735}\times \boldsymbol{B}^{1}=\boldsymbol{J},\end{eqnarray}$$

with both $\boldsymbol{B}^{1}$ and $\boldsymbol{J}$ divergence free, i.e. $\unicode[STIX]{x1D735}\boldsymbol{\cdot }\boldsymbol{B}^{1}=\unicode[STIX]{x1D735}\boldsymbol{\cdot }\boldsymbol{J}=0$ and by the linearized flux surface condition

(4.3)$$\begin{eqnarray}\unicode[STIX]{x1D735}\unicode[STIX]{x1D719}\boldsymbol{\cdot }\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}^{1}=-\boldsymbol{B}^{1}\boldsymbol{\cdot }\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}^{0},\end{eqnarray}$$

where we used the fact that $\boldsymbol{B}_{0}=\unicode[STIX]{x1D735}\unicode[STIX]{x1D719}$.

We split the current density $\boldsymbol{J}$ into a parallel and perpendicular to $\boldsymbol{B}_{0}$ components

(4.4)$$\begin{eqnarray}\boldsymbol{J}=\unicode[STIX]{x1D6FD}p^{\prime }(\unicode[STIX]{x1D713}^{0})\left(\unicode[STIX]{x1D716}\boldsymbol{J}_{\bot }+J_{\Vert }\boldsymbol{B}^{0}\right).\end{eqnarray}$$

The multiplicative factor $\unicode[STIX]{x1D716}$ in (4.4) is present in order to satisfy the divergence-free condition for the current density, $\unicode[STIX]{x1D735}\boldsymbol{\cdot }\boldsymbol{J}=0$. The perpendicular current can be found using (4.1), yielding

(4.5)$$\begin{eqnarray}\boldsymbol{J}_{\bot }={\displaystyle \frac{\boldsymbol{B}^{0}\times \unicode[STIX]{x1D735}\unicode[STIX]{x1D713}^{0}}{|\boldsymbol{B}^{0}|^{2}}},\end{eqnarray}$$

while the parallel current is obtained by imposing $\unicode[STIX]{x1D735}\boldsymbol{\cdot }J=0$, yielding

(4.6)$$\begin{eqnarray}\boldsymbol{B}^{0}\boldsymbol{\cdot }\unicode[STIX]{x1D735}J_{\Vert }=-\unicode[STIX]{x1D735}\boldsymbol{\cdot }\left({\displaystyle \frac{\boldsymbol{B}^{0}\times \unicode[STIX]{x1D735}\unicode[STIX]{x1D713}^{0}}{|\boldsymbol{B}^{0}|^{2}}}\right)=\boldsymbol{B}^{0}\boldsymbol{\cdot }(\unicode[STIX]{x1D735}B_{0}^{-2}\times \unicode[STIX]{x1D735}\unicode[STIX]{x1D713}^{0})=\boldsymbol{J}_{\bot }\boldsymbol{\cdot }{\displaystyle \frac{\unicode[STIX]{x1D735}|\boldsymbol{B}^{0}|^{2}}{|\boldsymbol{B}^{0}|^{2}}}.\end{eqnarray}$$

4.1 MHD current density vector

We start by deriving the forms of the perpendicular and parallel current densities, $\boldsymbol{J}_{\bot }$ and $J_{\Vert }$ respectively. In the following, to simplify the notation, we define the coefficients of the inverse expansion for $|\boldsymbol{B}^{0}|^{2}$ as

(4.7)$$\begin{eqnarray}{\displaystyle \frac{1}{|\boldsymbol{B}^{0}|^{2}}}={\displaystyle \frac{1}{|\unicode[STIX]{x1D735}\unicode[STIX]{x1D719}|^{2}}}=\mathop{\sum }_{n=0}^{\infty }{\displaystyle \frac{{\mathcal{B}}_{n}}{B_{0}(s)^{2}}}\unicode[STIX]{x1D716}^{n}\unicode[STIX]{x1D70C}^{n},\end{eqnarray}$$

with $B_{0}(s)=|\boldsymbol{B}^{0}|_{\unicode[STIX]{x1D70C}=0}$ the vacuum magnetic field modulus on axis and ${\mathcal{B}}_{0}$=1.

Using (4.5), the three components $(J_{\bot s},J_{\bot \unicode[STIX]{x1D70C}},J_{\bot \unicode[STIX]{x1D714}})$ of the perpendicular current can be written as

(4.8)$$\begin{eqnarray}\displaystyle \hspace{-26.39996pt} & \displaystyle B_{0}(s)^{2}J_{\bot sl+2}=\mathop{\sum }_{g=0}^{l}\mathop{\sum }_{p=0}^{g}{\mathcal{B}}_{l-g}\left[(p+2)\unicode[STIX]{x1D719}_{p+2}\dot{\unicode[STIX]{x1D713}}_{0g-p+2}-(g-p+2)\unicode[STIX]{x1D713}_{0g-p+2}\dot{\unicode[STIX]{x1D719}}_{p+2}\right]\!, & \displaystyle\end{eqnarray}$$
(4.9)$$\begin{eqnarray}\displaystyle \hspace{-26.39996pt} & \displaystyle B_{0}(s)^{2}J_{\bot \unicode[STIX]{x1D70C}l+1}=\mathop{\sum }_{f=0}^{l}\mathop{\sum }_{g=0}^{f}\mathop{\sum }_{p=0}^{g}{\mathcal{B}}_{l-g}\left[\dot{\unicode[STIX]{x1D719}}_{p}\unicode[STIX]{x1D713}_{0g-p+2}^{\prime }-\unicode[STIX]{x1D719}_{p}^{\prime }\dot{\unicode[STIX]{x1D713}}_{0g-p+2}\right](\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703})^{l-f}\!, & \displaystyle\end{eqnarray}$$
(4.10)$$\begin{eqnarray}\displaystyle \hspace{-26.39996pt} & \displaystyle B_{0}(s)^{2}J_{\bot \unicode[STIX]{x1D714}l+1}=\mathop{\sum }_{f=0}^{l}\mathop{\sum }_{g=0}^{f}\mathop{\sum }_{p=0}^{g}{\mathcal{B}}_{l-g}\!\left[(g-p+2)\unicode[STIX]{x1D713}_{0g-p+2}\unicode[STIX]{x1D719}_{p}^{\prime }-p\unicode[STIX]{x1D713}_{0g-p+2}^{\prime }\unicode[STIX]{x1D719}_{p}\right]\!(\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703})^{l-f}\!. & \displaystyle\end{eqnarray}$$

We remark that, as expected, the perpendicular current vanishes on axis, i.e. $J_{\bot s0}=J_{\bot \unicode[STIX]{x1D70C}0}=J_{\bot \unicode[STIX]{x1D714}0}=0$.

The power series expansion coefficients $J_{\Vert n}$ of $J_{\Vert }=\sum _{n}J_{\Vert n}\unicode[STIX]{x1D716}^{n}\unicode[STIX]{x1D70C}^{n}$ are obtained by expanding the terms included in (4.6) in power of $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}$, yielding

(4.11)$$\begin{eqnarray}\displaystyle 2n\unicode[STIX]{x1D719}_{2}J_{\Vert n}+\dot{\unicode[STIX]{x1D719}}_{2}\dot{J}_{\Vert n}+B_{0}J_{\Vert n}^{\prime }={\displaystyle \frac{G_{n}}{B_{0}(s)^{2}}}-H_{n}, & & \displaystyle\end{eqnarray}$$

with $H_{0}=G_{0}=0$ and the coefficients $H_{n}$ and $G_{n}$ given by

(4.12)$$\begin{eqnarray}H_{n}=\mathop{\sum }_{g=0}^{n-1}\left[(n-g+2)\unicode[STIX]{x1D719}_{n-g+2}gJ_{\Vert g}+\dot{\unicode[STIX]{x1D719}}_{n-g+2}\dot{J}_{\Vert g}+\unicode[STIX]{x1D719}_{n-g}^{\prime }J_{\Vert g}^{\prime }+(\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703})^{n-g}\mathop{\sum }_{m=0}^{g}\unicode[STIX]{x1D719}_{g-m}^{\prime }J_{\Vert m}^{\prime }\right]\!,\end{eqnarray}$$

and

(4.13)$$\begin{eqnarray}\displaystyle G_{n} & = & \displaystyle \mathop{\sum }_{g=1}^{n}\left\{\mathop{\sum }_{p=0}^{g-1}\mathop{\sum }_{r=0}^{n-g}\unicode[STIX]{x1D719}_{r}^{\prime }(\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703})^{n-g-r}\left[(g-p)\dot{\unicode[STIX]{x1D713}}_{0p+2}{\mathcal{B}}_{g-p}-(p+2)\dot{\unicode[STIX]{x1D713}}_{0p+2}\dot{{\mathcal{B}}}_{g-p}\right]\right.\nonumber\\ \displaystyle & & \displaystyle \left.+\,\mathop{\sum }_{l=1}^{g}\mathop{\sum }_{p=0}^{l-1}(\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703})^{g-l}\left[\left({\mathcal{B}}_{l-p-1}^{\prime }-2{\displaystyle \frac{B_{0}^{\prime }}{B_{0}}}{\mathcal{B}}_{l-p-1}\right)(p+2)\unicode[STIX]{x1D713}_{0p+2}\dot{\unicode[STIX]{x1D719}}_{n-g+1}\right.\right.\nonumber\\ \displaystyle & & \displaystyle \left.\left.+\,{\mathcal{B}}_{l-p}\left(\unicode[STIX]{x1D713}_{0p+1}^{\prime }\unicode[STIX]{x1D719}_{n-g+1}-(l-p)\unicode[STIX]{x1D713}_{0p+1}\dot{\unicode[STIX]{x1D719}}_{n-g+1}\right)\vphantom{\mathop{\sum }_{g=1}^{n}}\right]\right\},\end{eqnarray}$$

respectively, for $n>0$. We note that, as both $J_{\Vert }$ and $\unicode[STIX]{x1D713}^{0}$ are obtained by solving a magnetic differential equation, $J_{\Vert n}$ obeys an advection equation similar to the one of $\unicode[STIX]{x1D713}_{2}^{0}$, equation (B 1). Therefore, similarly to (3.34), the components of the parallel current column vector ${\mathcal{J}}_{\Vert n}$ with ${\mathcal{J}}_{\Vert n}=[J_{\Vert n0}J_{\Vert n2}^{c}J_{\Vert n2}^{s}~\cdots ]^{\text{T}}$ for even $n$ and ${\mathcal{J}}_{\Vert n}=[J_{\Vert n1}^{c}J_{\Vert n1}^{s}J_{\Vert n3}^{c}J_{\Vert n3}^{s}~\cdots \,]^{\text{T}}$ for odd $n$, can be shown to obey

(4.14)$$\begin{eqnarray}{\mathcal{J}}_{\Vert n}^{\prime }=A_{n}^{0}{\mathcal{J}}_{\Vert n}+C_{n}^{0},\end{eqnarray}$$

with $C_{n}^{0}$ a source term dependent on the components $G_{n}$ and $H_{n}$. Using the same transformation matrix $\unicode[STIX]{x1D64F}_{n}$ as in (3.35), the components $\unicode[STIX]{x1D70E}_{nm}^{1}$ of $\unicode[STIX]{x1D70E}_{n}^{1}$, where $\unicode[STIX]{x1D70E}_{n}^{1}$ is given by

(4.15)$$\begin{eqnarray}{\mathcal{J}}_{\Vert n}=\unicode[STIX]{x1D64F}_{n}\unicode[STIX]{x1D70E}_{n}^{1},\end{eqnarray}$$

can be shown to satisfy (3.36) with a different source term, namely

(4.16)$$\begin{eqnarray}\unicode[STIX]{x1D70E}_{nm}^{1^{\prime }}(s)-\text{i}mv^{\prime }\unicode[STIX]{x1D70E}_{nm}^{1}=D_{nm}^{1},\end{eqnarray}$$

with $D_{nm}^{1}=\unicode[STIX]{x1D64F}_{n}^{-1}C_{n}^{0}$. The solution of $\unicode[STIX]{x1D70E}_{nm}^{1}$ is then of the form of (3.38).

For $f=0$, equation (4.11) determines the current on axis $J_{\Vert 0}$ to be a constant. For $f=1$, the equation for the coefficients $\unicode[STIX]{x1D706}$ and $\unicode[STIX]{x1D707}$ of the first-order current $J_{\Vert 1}=\unicode[STIX]{x1D706}\sin u+\unicode[STIX]{x1D707}\cos u$ can be written as

(4.17)$$\begin{eqnarray}\unicode[STIX]{x1D70E}_{1}^{\prime }-\text{i}v^{\prime }(s)\unicode[STIX]{x1D70E}_{1}=-B_{0}^{3/4}(s)4\unicode[STIX]{x1D705}\left[\text{e}^{\unicode[STIX]{x1D702}/2}(1-\unicode[STIX]{x1D707}\cos \unicode[STIX]{x1D6FF})+\text{i}\text{e}^{-\unicode[STIX]{x1D702}/2}(1+\unicode[STIX]{x1D707})\sin \unicode[STIX]{x1D6FF}\right]\!,\end{eqnarray}$$

with $\unicode[STIX]{x1D70E}_{1}=B_{0}(s)^{-1/2}(\unicode[STIX]{x1D706}\text{e}^{\unicode[STIX]{x1D702}/2}-\text{i}\unicode[STIX]{x1D707}\text{e}^{-\unicode[STIX]{x1D702}/2})$.

4.2 MHD magnetic field vector

We now proceed by calculating the first-order magnetic field by expanding the components of $\boldsymbol{B}^{1}$ in powers of $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}$ as

(4.18)$$\begin{eqnarray}\boldsymbol{B}^{1}=\mathop{\sum }_{n}\boldsymbol{B}_{n}^{1}(s\unicode[STIX]{x1D714})\unicode[STIX]{x1D716}^{n}\unicode[STIX]{x1D70C}^{n}\end{eqnarray}$$

and use (4.2) to solve for $\boldsymbol{B}_{\unicode[STIX]{x1D70C}n}^{1},\boldsymbol{B}_{\unicode[STIX]{x1D714}n}^{1}$ and $\boldsymbol{B}_{sn}^{1}$. From the $\unicode[STIX]{x1D70C}$ component of (4.2) we find at lowest order the constraint constraint ${\dot{B}}_{s0}^{1}=0$. For higher order, we obtain for the $\unicode[STIX]{x1D70C}$ component

(4.19)$$\begin{eqnarray}\mathop{\sum }_{n=1}^{\infty }\unicode[STIX]{x1D716}^{n}\unicode[STIX]{x1D70C}^{n}\left[{\displaystyle \frac{\unicode[STIX]{x2202}B_{sn}^{1}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}-\unicode[STIX]{x1D705}{\displaystyle \frac{\unicode[STIX]{x2202}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}(\cos \unicode[STIX]{x1D703}B_{sn-1}^{1})-{\displaystyle \frac{\unicode[STIX]{x2202}B_{\unicode[STIX]{x1D714}n-1}^{1}}{\unicode[STIX]{x2202}s}}\right]=A_{\unicode[STIX]{x1D70C}}^{J},\end{eqnarray}$$

with $A_{\unicode[STIX]{x1D70C}}^{j}=\unicode[STIX]{x1D6FD}h_{s}p^{\prime }(\unicode[STIX]{x1D713}^{0})(\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}J_{\bot \unicode[STIX]{x1D70C}}+J_{\Vert }\unicode[STIX]{x1D70C}\unicode[STIX]{x2202}\unicode[STIX]{x1D719}/\unicode[STIX]{x2202}\unicode[STIX]{x1D70C})$, for the $\unicode[STIX]{x1D714}$ component

(4.20)$$\begin{eqnarray}\mathop{\sum }_{n=1}^{\infty }\unicode[STIX]{x1D716}^{n}\unicode[STIX]{x1D70C}^{n}\left[nB_{sn}^{1}-(n+1)\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703}B_{sn-1}^{1}-{\displaystyle \frac{\unicode[STIX]{x2202}B_{\unicode[STIX]{x1D70C}n-1}^{1}}{\unicode[STIX]{x2202}s}}\right]=A_{\unicode[STIX]{x1D714}}^{J},\end{eqnarray}$$

with $A_{\unicode[STIX]{x1D714}}^{J}=-\unicode[STIX]{x1D6FD}h_{s}p^{\prime }(\unicode[STIX]{x1D713}^{0})(\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}J_{\bot \unicode[STIX]{x1D70C}}+J_{\Vert }\unicode[STIX]{x2202}\unicode[STIX]{x1D719}/\unicode[STIX]{x2202}\unicode[STIX]{x1D714})$ and for the $s$ component

(4.21)$$\begin{eqnarray}\mathop{\sum }_{n=0}^{\infty }\unicode[STIX]{x1D716}^{n}\unicode[STIX]{x1D70C}^{n}\left[(n+1)B_{\unicode[STIX]{x1D714}n}^{1}-{\displaystyle \frac{\unicode[STIX]{x2202}B_{\unicode[STIX]{x1D70C}n}^{1}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}\right]=A_{s}^{J},\end{eqnarray}$$

with $A_{s}^{J}=\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}\unicode[STIX]{x1D6FD}p^{\prime }(\unicode[STIX]{x1D713}^{0})(J_{\bot s}+h_{s}^{-1}J_{\Vert }\unicode[STIX]{x2202}\unicode[STIX]{x1D719}/\unicode[STIX]{x2202}s)$. In order to simplify the calculations and eliminate one of the three components of (4.2), we replace (4.19) by the condition, $\unicode[STIX]{x1D735}\boldsymbol{\cdot }\boldsymbol{B}^{1}=0$, which can be written as

(4.22)$$\begin{eqnarray}{\displaystyle \frac{\unicode[STIX]{x2202}(\unicode[STIX]{x1D70C}B_{\unicode[STIX]{x1D70C}}^{1})}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}+{\displaystyle \frac{\unicode[STIX]{x2202}B_{\unicode[STIX]{x1D714}}^{1}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}=-\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}\left[{\displaystyle \frac{\unicode[STIX]{x2202}B_{s}^{1}}{\unicode[STIX]{x2202}s}}+\unicode[STIX]{x1D705}{\displaystyle \frac{\unicode[STIX]{x2202}(\cos \unicode[STIX]{x1D703}B_{\unicode[STIX]{x1D714}}^{1})}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}+{\displaystyle \frac{\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703}}{\unicode[STIX]{x1D70C}}}{\displaystyle \frac{\unicode[STIX]{x2202}(\unicode[STIX]{x1D70C}^{2}B_{s}^{1})}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}\right].\end{eqnarray}$$

Expanding the functions $A_{\unicode[STIX]{x1D714}}^{J}$ and $A_{s}^{J}$ in terms of powers of $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}$, the following expressions for the perturbed magnetic field are found

(4.23)$$\begin{eqnarray}\displaystyle (n+1)^{2}B_{\unicode[STIX]{x1D70C}n}^{1}+{\displaystyle \frac{\unicode[STIX]{x2202}^{2}B_{\unicode[STIX]{x1D70C}n}^{1}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}^{2}}} & = & \displaystyle -(n+1)\left[{\displaystyle \frac{1}{n+1}}{\displaystyle \frac{\unicode[STIX]{x2202}A_{sn}^{J}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}+{\displaystyle \frac{\unicode[STIX]{x2202}B_{sn-1}^{1}}{\unicode[STIX]{x2202}s}}\right.\nonumber\\ \displaystyle & & \displaystyle \left.+\,\unicode[STIX]{x1D705}{\displaystyle \frac{\unicode[STIX]{x2202}(\cos \unicode[STIX]{x1D703}B_{\unicode[STIX]{x1D714}n-1}^{1})}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}+(n+2)\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703}B_{sn-1}^{1}\right],\end{eqnarray}$$
(4.24)$$\begin{eqnarray}\displaystyle B_{\unicode[STIX]{x1D714}n}^{1} & = & \displaystyle {\displaystyle \frac{1}{n+1}}\left(A_{sn}^{J}+{\displaystyle \frac{\unicode[STIX]{x2202}B_{1\unicode[STIX]{x1D70C}n}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}\right),\end{eqnarray}$$
(4.25)$$\begin{eqnarray}\displaystyle B_{sn}^{1} & = & \displaystyle {\displaystyle \frac{1}{n}}\left[{\displaystyle \frac{\unicode[STIX]{x2202}B_{\unicode[STIX]{x1D70C}n-1}^{1}}{\unicode[STIX]{x2202}s}}+(n+1)\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703}B_{sn-1}^{1}+A_{\unicode[STIX]{x1D714}n}^{J}\right].\end{eqnarray}$$

The lowest-order field $\boldsymbol{B}_{0}^{1}$ is found to satisfy $B_{\unicode[STIX]{x1D70C}0}^{1}=B_{\unicode[STIX]{x1D70C}0}^{1c}(s)\cos u+B_{\unicode[STIX]{x1D70C}0}^{1s}(s)\sin u$, $B_{\unicode[STIX]{x1D714}0}^{1}=\unicode[STIX]{x2202}B_{\unicode[STIX]{x1D70C}0}^{1}/\unicode[STIX]{x2202}\unicode[STIX]{x1D714}$ and $B_{s0}^{1}=B_{s0}^{1}(s)$, in agreement with Solov’ev & Shafranov (Reference Solov’ev and Shafranov1970). While analyticity could be proven rigorously for the vacuum case, we note that the right-hand side of the forced linear harmonic oscillator equation for $B_{\unicode[STIX]{x1D70C}n}^{1}$ in (4.23) might contain $n+1$ resonating frequencies resulting from the product $J_{\Vert }\unicode[STIX]{x2202}\unicode[STIX]{x1D719}/\unicode[STIX]{x2202}s$ in the $A_{s}^{J}$ term. These resonances can lead to the appearance of non-analytic and weakly singular terms of the form $\unicode[STIX]{x1D70C}^{n}(\log \unicode[STIX]{x1D70C})^{m}$ as discussed in Weitzner (Reference Weitzner2016).

4.3 MHD flux surface function

We now obtain $\unicode[STIX]{x1D713}^{1}$ using the linearized flux surface condition, equation (4.3). We take advantage of the fact that (4.3) is similar to (3.17), although with a non-zero source term, i.e.

(4.26)$$\begin{eqnarray}2n\unicode[STIX]{x1D719}_{2}\unicode[STIX]{x1D713}_{n}^{1}+\dot{\unicode[STIX]{x1D719}}_{2}\dot{\unicode[STIX]{x1D713}}_{n}^{1}+B_{0}\unicode[STIX]{x1D713}_{n}^{1}=F_{n}^{1},\end{eqnarray}$$

with

(4.27)$$\begin{eqnarray}F_{n}^{1}=F_{n}^{0}-{\displaystyle \frac{\unicode[STIX]{x1D716}}{n!}}\left[{\displaystyle \frac{1}{\unicode[STIX]{x1D716}^{2}}}{\displaystyle \frac{\unicode[STIX]{x2202}^{n}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}^{n}}}\left(B_{\unicode[STIX]{x1D70C}}^{1}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{0}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}+{\displaystyle \frac{B_{\unicode[STIX]{x1D714}}^{1}}{\unicode[STIX]{x1D70C}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{0}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}+\unicode[STIX]{x1D716}{\displaystyle \frac{B_{s}^{1}}{h_{s}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{0}}{\unicode[STIX]{x2202}s}}\right)\right]_{\unicode[STIX]{x1D70C}=0}.\end{eqnarray}$$

By plugging the analyticity condition for $\unicode[STIX]{x1D713}^{1}$, equation (2.14), in (4.26) and defining the column vector $\unicode[STIX]{x1D6F9}_{n}^{1}$ in an analogous manner with $\unicode[STIX]{x1D6F9}_{n}^{0}$, the following set of equations for $\unicode[STIX]{x1D713}_{n}^{1}$ is found

(4.28)$$\begin{eqnarray}\unicode[STIX]{x1D6F9}_{n}^{1^{\prime }}=\unicode[STIX]{x1D63C}_{n}\unicode[STIX]{x1D6F9}_{n}^{1}+\unicode[STIX]{x1D63D}_{n}^{1},\end{eqnarray}$$

with $\unicode[STIX]{x1D63D}_{n}^{1}$ the matrix of Fourier coefficients of $F_{n}^{1}$ at each order $n$. The components of $\unicode[STIX]{x1D63C}_{n}$ are given in appendix D.

The lowest-order solution for $\unicode[STIX]{x1D713}^{1}$ is given by

(4.29)$$\begin{eqnarray}\unicode[STIX]{x1D713}^{1}=\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}[\unicode[STIX]{x1D713}_{11}^{c}(s)\cos u+\unicode[STIX]{x1D713}_{11}^{c}(s)\sin u]+O(\unicode[STIX]{x1D716}^{2}),\end{eqnarray}$$

with $\unicode[STIX]{x1D713}_{11}^{c}$ and $\unicode[STIX]{x1D713}_{11}^{s}$ obeying the set of equations

(4.30)$$\begin{eqnarray}\displaystyle & \displaystyle {\displaystyle \frac{B_{0}(s)}{2}}\unicode[STIX]{x1D713}_{11}^{c^{\prime }}=\unicode[STIX]{x1D719}_{22}^{s}\unicode[STIX]{x1D713}_{11}^{s}+(\unicode[STIX]{x1D719}_{20}+\unicode[STIX]{x1D719}_{22}^{c})\unicode[STIX]{x1D713}_{11}^{c}-B_{1\unicode[STIX]{x1D70C}}^{c}(\unicode[STIX]{x1D713}_{20}^{0}+\unicode[STIX]{x1D713}_{22}^{0c})-B_{1\unicode[STIX]{x1D70C}}^{s}\unicode[STIX]{x1D713}_{22}^{0s}, & \displaystyle\end{eqnarray}$$
(4.31)$$\begin{eqnarray}\displaystyle & \displaystyle {\displaystyle \frac{B_{0}(s)}{2}}\unicode[STIX]{x1D713}_{11}^{s^{\prime }}=\unicode[STIX]{x1D719}_{22}^{s}\unicode[STIX]{x1D713}_{11}^{c}+(\unicode[STIX]{x1D719}_{20}-\unicode[STIX]{x1D719}_{22}^{c})\unicode[STIX]{x1D713}_{11}^{s}-B_{1\unicode[STIX]{x1D70C}}^{s}(\unicode[STIX]{x1D713}_{20}^{0}-\unicode[STIX]{x1D713}_{22}^{0c})-B_{1\unicode[STIX]{x1D70C}}^{c}\unicode[STIX]{x1D713}_{22}^{0s}. & \displaystyle\end{eqnarray}$$

4.4 Shafranov shift

Here, we show how to obtain the position of the magnetic axis $(x_{M},y_{M})$ once finite $\unicode[STIX]{x1D6FD}$ effects are taken into account. Although the procedure is valid for arbitrary order in the expansion parameter $\unicode[STIX]{x1D716}$, we calculate $(x_{M},y_{M})$ explicitly to lowest order in $\unicode[STIX]{x1D716}$ only. We first rewrite $\unicode[STIX]{x1D713}^{1}$ in Cartesian $(x,y)$ coordinates as

(4.32)$$\begin{eqnarray}\unicode[STIX]{x1D713}^{1}=\unicode[STIX]{x1D716}(ax+by),\end{eqnarray}$$

with the functions $a$ and $b$ given by $a=\unicode[STIX]{x1D713}_{11}^{c}\cos \unicode[STIX]{x1D6FF}+\unicode[STIX]{x1D713}_{11}^{s}\sin \unicode[STIX]{x1D6FF}$ and $b=-\unicode[STIX]{x1D713}_{11}^{c}\sin \unicode[STIX]{x1D6FF}+\unicode[STIX]{x1D713}_{11}^{s}\cos \unicode[STIX]{x1D6FF}$. The lowest-order magnetic flux surface function in $\unicode[STIX]{x1D716}$ and $\unicode[STIX]{x1D6FD}$, in $x$ and $y$ coordinates, is then given by

(4.33)$$\begin{eqnarray}\unicode[STIX]{x1D713}=\unicode[STIX]{x1D713}^{0}+\unicode[STIX]{x1D713}^{1}=ax+by+Ax^{2}+By^{2}+Cxy,\end{eqnarray}$$

with $A=(1+\unicode[STIX]{x1D707}\cos 2\unicode[STIX]{x1D6FF})/\sqrt{1-\unicode[STIX]{x1D707}^{2}}$, $B=(1-\unicode[STIX]{x1D707}\cos 2\unicode[STIX]{x1D6FF})/\sqrt{1-\unicode[STIX]{x1D707}^{2}}$ and $C=-2\unicode[STIX]{x1D707}\sin 2\unicode[STIX]{x1D6FF}/\sqrt{1-\unicode[STIX]{x1D707}^{2}}$. Setting the derivatives of $\unicode[STIX]{x1D713}$ with respect to $x$ and $y$ equal to zero, the position of the magnetic axis $(x_{M},y_{M})$ is found to be

(4.34)$$\begin{eqnarray}x_{M}={\displaystyle \frac{2aB-bC}{C^{2}-4AB}},\end{eqnarray}$$

and

(4.35)$$\begin{eqnarray}y_{M}={\displaystyle \frac{2Ab-aC}{C^{2}+4AB}}.\end{eqnarray}$$

The condition that the distortion of the magnetic surfaces be small, i.e. $x_{M}\sim y_{M}\ll a$ leads to a limit on the maximum allowed $\unicode[STIX]{x1D6FD}$. For the derivation of the plasma beta-limit $\unicode[STIX]{x1D6FD}\ll 2\unicode[STIX]{x1D716}\unicode[STIX]{x1D704}_{0}^{2}$ for the particular case of a circular magnetic axis, $\unicode[STIX]{x1D6FF}=n\unicode[STIX]{x03C0}$ and neglecting curvature effects, see Solov’ev & Shafranov (Reference Solov’ev and Shafranov1970).

4.5 MHD field line label

Finally, for the field line label $\unicode[STIX]{x1D6FC}^{1}$, using $\boldsymbol{B}^{1}=\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}^{1}\times \unicode[STIX]{x1D735}\unicode[STIX]{x1D6FC}^{1}$, we derive the following set of three coupled equations:

(4.36)$$\begin{eqnarray}\displaystyle & \displaystyle h_{s}\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}B_{1\unicode[STIX]{x1D70C}}={\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{1}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D6FC}^{1}}{\unicode[STIX]{x2202}s}}-{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{1}}{\unicode[STIX]{x2202}s}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D6FC}^{1}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}, & \displaystyle\end{eqnarray}$$
(4.37)$$\begin{eqnarray}\displaystyle & \displaystyle h_{s}\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}B_{\unicode[STIX]{x1D714}}^{1}=\unicode[STIX]{x1D70C}\left({\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{1}}{\unicode[STIX]{x2202}s}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D6FC}^{1}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}-{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{1}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D6FC}^{1}}{\unicode[STIX]{x2202}s}}\right), & \displaystyle\end{eqnarray}$$
(4.38)$$\begin{eqnarray}\displaystyle & \displaystyle \unicode[STIX]{x1D716}^{2}\unicode[STIX]{x1D70C}^{2}B_{s}^{1}=\unicode[STIX]{x1D70C}\left({\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{1}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D6FC}^{1}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}-{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D713}^{1}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}{\displaystyle \frac{\unicode[STIX]{x2202}\unicode[STIX]{x1D6FC}^{1}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D70C}}}\right). & \displaystyle\end{eqnarray}$$

Expanding $\unicode[STIX]{x1D6FC}^{1}$ in a series of powers of $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}$ and following the approach in § 3.3, we find

(4.39)$$\begin{eqnarray}\displaystyle -(\unicode[STIX]{x1D713}_{1}^{1})^{n+1}{\displaystyle \frac{\unicode[STIX]{x2202}}{\unicode[STIX]{x2202}s}}\left[\unicode[STIX]{x1D6FC}_{n}^{1}(\unicode[STIX]{x1D713}_{1}^{1})^{-n}\right] & = & \displaystyle B_{\unicode[STIX]{x1D714}n}^{1}-k\cos \unicode[STIX]{x1D703}B_{\unicode[STIX]{x1D714}n-1}^{1}\nonumber\\ \displaystyle & & \displaystyle -\,\mathop{\sum }_{m=0}^{n-1}\left[\unicode[STIX]{x1D713}_{n-m+1}^{1^{\prime }}m\unicode[STIX]{x1D6FC}_{m}^{1}-\unicode[STIX]{x1D713}_{n-m+1}^{1}(n-m+1)\unicode[STIX]{x1D6FC}_{m}^{1^{\prime }}\right]\end{eqnarray}$$
(4.40)$$\begin{eqnarray}\displaystyle (\unicode[STIX]{x1D713}_{1}^{1})^{n+1}{\displaystyle \frac{\unicode[STIX]{x2202}}{\unicode[STIX]{x2202}\unicode[STIX]{x1D714}}}\left[\unicode[STIX]{x1D6FC}_{n}^{1}(\unicode[STIX]{x1D713}_{1}^{1})^{-n}\right] & = & \displaystyle B_{1sn-1}\nonumber\\ \displaystyle & & \displaystyle +\,\mathop{\sum }_{m=0}^{n-1}\left[\dot{\unicode[STIX]{x1D713}}_{n-m+1}^{1}m\unicode[STIX]{x1D6FC}_{m}^{1}-\unicode[STIX]{x1D713}_{n-m+1}^{1}(n-m+1)\dot{\unicode[STIX]{x1D6FC}}_{m}^{1}\right]\!.\quad\end{eqnarray}$$

Analogously to (3.48) and (3.49), at each order in $\unicode[STIX]{x1D716}^{n}$, equation (4.40) can be used to find an analytical expression for $\unicode[STIX]{x1D6FC}_{n}^{1}$ up to an additive function of $s$, which is set by (3.49).

5 Rotational transform

In this section, we aim at calculating the rotational transform $\unicode[STIX]{x1D704}$ at arbitrary order, given an explicit form of $\unicode[STIX]{x1D6FC}(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)$. We first note that, as $\boldsymbol{B}=\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}\times \unicode[STIX]{x1D735}\unicode[STIX]{x1D6FC}$ must be periodic in both $s$ and $\unicode[STIX]{x1D703}$, the most general form for the field line label $\unicode[STIX]{x1D6FC}$ is given by

(5.1)$$\begin{eqnarray}\unicode[STIX]{x1D6FC}=f(\unicode[STIX]{x1D713})\unicode[STIX]{x1D703}-g(\unicode[STIX]{x1D713})s+\tilde{\unicode[STIX]{x1D6FC}}(\unicode[STIX]{x1D713},\unicode[STIX]{x1D703},s),\end{eqnarray}$$

with $\tilde{\unicode[STIX]{x1D6FC}}$ a periodic function in both $s$ and $\unicode[STIX]{x1D703}$. The functions $g(\unicode[STIX]{x1D713})$ and $f(\unicode[STIX]{x1D713})$ can be found using the expression for the toroidal flux in (3.32) and the specific poloidal flux

(5.2)$$\begin{eqnarray}\unicode[STIX]{x1D712}^{\prime }(\unicode[STIX]{x1D713})={\displaystyle \frac{\text{d}}{\text{d}\unicode[STIX]{x1D713}}}\left[{\displaystyle \frac{1}{2\unicode[STIX]{x03C0}}}\int (\boldsymbol{B}\boldsymbol{\cdot }\unicode[STIX]{x1D735}\unicode[STIX]{x1D703})\,\text{d}V\right]=\unicode[STIX]{x1D704}-N,\end{eqnarray}$$

with $\unicode[STIX]{x1D712}=\unicode[STIX]{x1D712}(\unicode[STIX]{x1D713})$ (Kruskal & Kulsrud Reference Kruskal and Kulsrud1958; D’haeseleer et al. Reference D’haeseleer, Hitchon, Callen and Shohet1991) and $N$ the total number of rotations of the normal vector after one circuit along the axis. Here, the poloidal magnetic flux $\unicode[STIX]{x1D712}$ is given by the flux that passes through the two closed curves given by the magnetic axis and the line

(5.3)$$\begin{eqnarray}\unicode[STIX]{x1D703}=\unicode[STIX]{x1D714}-\unicode[STIX]{x1D6FE}(s)=\text{const.},~\unicode[STIX]{x1D713}(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D703},s)=\text{const.},\end{eqnarray}$$

i.e. the trace of the intersection of the magnetic surface normal to the magnetic axis. We note that in order to calculate the angle through which the magnetic field line rotates around the axis for a complete circuit along the torus, we subtracted from $\unicode[STIX]{x1D712}^{\prime }(\unicode[STIX]{x1D713})$ the number of times $N$ the curve in (5.3) (or equivalently the normal vector $\boldsymbol{n}$) encircles the magnetic axis. Using (5.1), we can write the magnetic field $\boldsymbol{B}$ as

(5.4)$$\begin{eqnarray}\boldsymbol{B}=f(\unicode[STIX]{x1D713})\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}\times \unicode[STIX]{x1D735}\unicode[STIX]{x1D703}-g(\unicode[STIX]{x1D713})\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}\times \unicode[STIX]{x1D735}s+\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}\times \unicode[STIX]{x1D735}\tilde{\unicode[STIX]{x1D6FC}}.\end{eqnarray}$$

Plugging (5.4) in (3.32), we find $f(\unicode[STIX]{x1D713})=1/2\unicode[STIX]{x03C0}$, while using (5.2) and (5.4) we find $g(\unicode[STIX]{x1D713})=(\unicode[STIX]{x1D704}-N)/L$, yielding

(5.5)$$\begin{eqnarray}\unicode[STIX]{x1D6FC}={\displaystyle \frac{\unicode[STIX]{x1D703}}{2\unicode[STIX]{x03C0}}}-(\unicode[STIX]{x1D704}-N){\displaystyle \frac{s}{L}}+\tilde{\unicode[STIX]{x1D6FC}},\end{eqnarray}$$

with $L$ defined in (2.1) as the total length of the axis. An expression for $\unicode[STIX]{x1D704}$ in terms of $\unicode[STIX]{x1D6FC}$, valid at arbitrary order in $\unicode[STIX]{x1D716}$, is then given by

(5.6)$$\begin{eqnarray}\unicode[STIX]{x1D704}=\unicode[STIX]{x1D6FC}(s,\unicode[STIX]{x1D703})-\unicode[STIX]{x1D6FC}(s+L,\unicode[STIX]{x1D703})+N.\end{eqnarray}$$

We now apply (5.6) to the lowest-order expression of $\unicode[STIX]{x1D6FC}$ in (3.47), yielding

(5.7)$$\begin{eqnarray}\displaystyle \unicode[STIX]{x1D704} & = & \displaystyle {\displaystyle \frac{1}{2\unicode[STIX]{x03C0}}}\left(-\arctan \left.\!\left[\text{e}^{-\unicode[STIX]{x1D702}(s^{\prime })}\tan (\unicode[STIX]{x1D703}+\unicode[STIX]{x1D6FF}(s^{\prime }))\right]\right._{s^{\prime }=s}^{s^{\prime }=s+L}+\left[v(s+L)-v(s)\right]\right)+N\nonumber\\ \displaystyle & = & \displaystyle {\displaystyle \frac{1}{2\unicode[STIX]{x03C0}}}\left(v(L)-\left[\unicode[STIX]{x1D6FF}(L)-\unicode[STIX]{x1D6FF}(0)\right]\right)+N\nonumber\\ \displaystyle & = & \displaystyle {\displaystyle \frac{1}{2\unicode[STIX]{x03C0}}}\left(\int _{0}^{L}[(\unicode[STIX]{x1D6FF}^{\prime }-\unicode[STIX]{x1D70F})\sqrt{1-\unicode[STIX]{x1D707}^{2}}]\,\text{d}s-\left[\unicode[STIX]{x1D6FF}(L)-\unicode[STIX]{x1D6FF}(0)\right]\right)+N.\end{eqnarray}$$

Note that in the case $\unicode[STIX]{x1D6FF}(L)=\unicode[STIX]{x1D6FF}(0)$ and $N=0$, the resonance condition in (3.39) is equivalent to the condition of $\unicode[STIX]{x1D704}=l/m$ with $l$ and $m$ integers. In order to interpret the rotational transform obtained in (5.7), we write the lowest-order toroidal flux $\unicode[STIX]{x1D713}_{2}^{0}$ as

(5.8)$$\begin{eqnarray}{\displaystyle \frac{\unicode[STIX]{x1D713}_{2}^{0}}{B_{0}\unicode[STIX]{x03C0}}}=X^{2}+Y^{2}=Ax^{2}+By^{2}+Cxy,\end{eqnarray}$$

where $(X,Y)$ are the elliptical coordinates

(5.9a,b)$$\begin{eqnarray}X=\text{e}^{\unicode[STIX]{x1D702}/2}\unicode[STIX]{x1D70C}\cos u,\quad Y=\text{e}^{-\unicode[STIX]{x1D702}/2}\unicode[STIX]{x1D70C}\sin u,\end{eqnarray}$$

for $(x,y)$ Cartesian coordinates in the plane locally perpendicular to the magnetic axis given by (2.11). From (5.8), it is clear that surfaces of constant $\unicode[STIX]{x1D713}_{2}^{0}$ are circles in elliptical coordinates and ellipses in Cartesian coordinates. We then conclude that the total turning angle of a field line after one toroidal rotation, i.e. the rotational transform, is given by the sum of the total turning angle $\arctan Y/X_{s=0}^{s=L}$ at constant field line label $\unicode[STIX]{x1D6FC}_{0}^{0}$, with the total rotation angle of the ellipse $\unicode[STIX]{x1D701}$ in the $(x,y)$ plane and with the total rotation angle of the $(x,y)$ plane itself, i.e. the number of times $N$ the curve in (5.3) encircles the magnetic axis. As $\unicode[STIX]{x1D6FC}_{0}^{0}$ can be written as

(5.10)$$\begin{eqnarray}\unicode[STIX]{x1D6FC}_{0}^{0}=\arctan {\displaystyle \frac{Y}{X}}-v(s),\end{eqnarray}$$

the total turning angle $\arctan Y/X|_{s=0}^{s=L}$ at constant $\unicode[STIX]{x1D6FC}_{0}^{0}$ is then given by $v(L)-v(0)=v(L)$. The rotating angle $\unicode[STIX]{x1D701}$ of the ellipse can be determined via the relations $A=\cos ^{2}\unicode[STIX]{x1D701}/a^{2}+\sin ^{2}\unicode[STIX]{x1D701}/b^{2}$, $B=\sin ^{2}\unicode[STIX]{x1D701}/a^{2}+\cos ^{2}\unicode[STIX]{x1D701}/b^{2}$ and $C=\sin 2\unicode[STIX]{x1D701}/a^{2}-\sin 2\unicode[STIX]{x1D701}/b^{2}$, which applied to (5.8) yields $\unicode[STIX]{x1D701}=-\unicode[STIX]{x1D6FF}$. The rotational transform is then given by the ratio between the total summing angles and the angle $2\unicode[STIX]{x03C0}$ related to one complete toroidal revolution, yielding

(5.11)$$\begin{eqnarray}\unicode[STIX]{x1D704}={\displaystyle \frac{v(L)-\left[\unicode[STIX]{x1D6FF}(L)-\unicode[STIX]{x1D6FF}(0)\right]}{2\unicode[STIX]{x03C0}}}+N,\end{eqnarray}$$

in agreement with the result in (5.7).

6 Comparison with the Garren–Boozer construction

In this section, we show the equivalence between the near-axis framework developed in the previous sections using the direct method, with the Garren–Boozer construction based on the inverse coordinate approach (Garren and Boozer Reference Garren and Boozer1991b). For simplicity, we perform the comparison between explicit vacuum solutions of the direct and inverse approach up to first order in $O(\unicode[STIX]{x1D716})$. In Boozer coordinates $(\unicode[STIX]{x1D713},\unicode[STIX]{x1D717},\unicode[STIX]{x1D711})$, the magnetic field can be written in a contravariant representation as

(6.1)$$\begin{eqnarray}\boldsymbol{B}=(\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}\times \unicode[STIX]{x1D735}\unicode[STIX]{x1D717}+\unicode[STIX]{x1D704}(\unicode[STIX]{x1D713})\unicode[STIX]{x1D735}\unicode[STIX]{x1D711}\times \unicode[STIX]{x1D735}\unicode[STIX]{x1D713})/2\unicode[STIX]{x03C0},\end{eqnarray}$$

while in a covariant representation it reads

(6.2)$$\begin{eqnarray}\boldsymbol{B}=\overline{\unicode[STIX]{x1D6FD}}(\unicode[STIX]{x1D713},\unicode[STIX]{x1D717},\unicode[STIX]{x1D711})\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}/2\unicode[STIX]{x03C0}+I(\unicode[STIX]{x1D713})\unicode[STIX]{x1D735}\unicode[STIX]{x1D717}+G(\unicode[STIX]{x1D713})\unicode[STIX]{x1D735}\unicode[STIX]{x1D711},\end{eqnarray}$$

where $\overline{\unicode[STIX]{x1D6FD}}$ is related to the Pfirsch–Schlüter current (Boozer Reference Boozer1981), $I(\unicode[STIX]{x1D713})$ is $\unicode[STIX]{x1D707}_{0}/(2\unicode[STIX]{x03C0})$ times the toroidal current enclosed by the flux surface and $G(\unicode[STIX]{x1D713})$ is $\unicode[STIX]{x1D707}_{0}/(2\unicode[STIX]{x03C0})$ times the poloidal current outside the flux surface. Focusing on the vacuum case, the covariant representation in (6.2) can be written as

(6.3)$$\begin{eqnarray}\boldsymbol{B}=G_{0}\unicode[STIX]{x1D735}\unicode[STIX]{x1D711},\end{eqnarray}$$

with $G_{0}$ a non-zero constant given by

(6.4)$$\begin{eqnarray}G_{0}={\displaystyle \frac{L}{\displaystyle \int _{0}^{2\unicode[STIX]{x03C0}}d\unicode[STIX]{x1D711}B_{0}^{-1}(\unicode[STIX]{x1D711})}},\end{eqnarray}$$

or, alternatively, $s^{\prime }(\unicode[STIX]{x1D711})=G_{0}/B_{0}$ with $s$ the arclength function. The Jacobian $\sqrt{g}$ can be found from the product of (6.1) and (6.3), yielding

(6.5)$$\begin{eqnarray}\sqrt{g}={\displaystyle \frac{1}{\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}\boldsymbol{\cdot }\unicode[STIX]{x1D735}\unicode[STIX]{x1D717}\times \unicode[STIX]{x1D735}\unicode[STIX]{x1D711}}}={\displaystyle \frac{G_{0}}{2\unicode[STIX]{x03C0}B^{2}}}.\end{eqnarray}$$

We note that the normalization constant $\overline{B}$ in Landreman & Sengupta (Reference Landreman and Sengupta2018) corresponds to the constant $\overline{B}$ used here to normalize $\unicode[STIX]{x1D713}$ and $\boldsymbol{B}$ times $1/\unicode[STIX]{x03C0}$ due to the different definitions of $\unicode[STIX]{x1D713}$.

The direct transformation from $(\unicode[STIX]{x1D713},\unicode[STIX]{x1D717},\unicode[STIX]{x1D711})$ to $(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)$ coordinates can be found in the following way. From the equality between (3.1) and (6.3), the toroidal Boozer angle can be computed at any order in vacuum using

(6.6)$$\begin{eqnarray}\unicode[STIX]{x1D711}(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)={\displaystyle \frac{\unicode[STIX]{x1D719}}{G_{0}}}.\end{eqnarray}$$

The toroidal flux $\unicode[STIX]{x1D713}(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)$ is computed using (3.31), while the poloidal Boozer angle $\unicode[STIX]{x1D717}$ can be found by first noting that the magnetic field $\boldsymbol{B}$ in (6.1) can be written as $\boldsymbol{B}=\unicode[STIX]{x1D735}\unicode[STIX]{x1D713}\times \unicode[STIX]{x1D735}(\unicode[STIX]{x1D717}-\unicode[STIX]{x1D704}\unicode[STIX]{x1D711})/2\unicode[STIX]{x03C0}=\unicode[STIX]{x1D735}\unicode[STIX]{x1D74D}\times \unicode[STIX]{x1D735}\unicode[STIX]{x1D6FC}$ yielding

(6.7)$$\begin{eqnarray}\unicode[STIX]{x1D717}=2\unicode[STIX]{x03C0}\unicode[STIX]{x1D6FC}+\unicode[STIX]{x1D704}\unicode[STIX]{x1D711},\end{eqnarray}$$

and plugging the expressions for $\unicode[STIX]{x1D6FC}$ and $\unicode[STIX]{x1D711}$ from (3.47) and (6.6) in (6.7). The transformation between both coordinate systems is then given by

(6.8)$$\begin{eqnarray}\displaystyle \hspace{-24.0pt} & \displaystyle \unicode[STIX]{x1D713}(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)={\displaystyle \frac{B_{0}\unicode[STIX]{x03C0}\unicode[STIX]{x1D70C}^{2}}{\sqrt{1-\unicode[STIX]{x1D707}^{2}}}}[1+\unicode[STIX]{x1D707}(s)\cos (2u)]=B_{0}\unicode[STIX]{x03C0}\unicode[STIX]{x1D70C}^{2}(\text{e}^{\unicode[STIX]{x1D702}}\cos ^{2}u+\text{e}^{-\unicode[STIX]{x1D702}}\sin ^{2}u)+O(\unicode[STIX]{x1D70C}^{3}) & \displaystyle\end{eqnarray}$$
(6.9)$$\begin{eqnarray}\displaystyle \hspace{-24.0pt} & \displaystyle \unicode[STIX]{x1D711}(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)={\displaystyle \frac{1}{G_{0}}}\int _{0}^{s}B_{0}(s^{\prime })\,\text{d}s^{\prime }+O(\unicode[STIX]{x1D70C}), & \displaystyle\end{eqnarray}$$
(6.10)$$\begin{eqnarray}\displaystyle \hspace{-24.0pt} & \displaystyle \unicode[STIX]{x1D717}(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)=\arctan \left(\text{e}^{-\unicode[STIX]{x1D702}}\tan u\right)-v(s)+{\displaystyle \frac{\unicode[STIX]{x1D704}}{G_{0}}}\int _{0}^{s}B_{0}(s^{\prime })\,\text{d}s^{\prime }+O(\unicode[STIX]{x1D70C}). & \displaystyle\end{eqnarray}$$

We now show the equivalence of the first-order position vector $\boldsymbol{r}$ between the direct and inverse approaches. This is done first by stating the solution for $\boldsymbol{r}$ in the Garren–Boozer construction and its related constraints, and showing that the lowest-order transformation in (6.8)–(6.10), together with the results from the previous sections, yields a similar set of constraints. In the Garren–Boozer construction, to first order in $\unicode[STIX]{x1D716},$ the position vector is given by

(6.11)$$\begin{eqnarray}\boldsymbol{r}=\boldsymbol{r}_{0}(s)+X_{1}\boldsymbol{n}(s)+Y_{1}\boldsymbol{b}(s),\end{eqnarray}$$

with

(6.12)$$\begin{eqnarray}X_{1}=\sqrt{\unicode[STIX]{x1D713}}\left[X_{1,1c}(\unicode[STIX]{x1D711})\cos \unicode[STIX]{x1D717}+X_{1,1s}(\unicode[STIX]{x1D711})\sin \unicode[STIX]{x1D717}\right],\end{eqnarray}$$

and

(6.13)$$\begin{eqnarray}Y_{1}=\sqrt{\unicode[STIX]{x1D713}}\left[Y_{1,1c}(\unicode[STIX]{x1D711})\cos \unicode[STIX]{x1D717}+Y_{1,1s}(\unicode[STIX]{x1D711})\sin \unicode[STIX]{x1D717}\right].\end{eqnarray}$$

The first constraint is given by

(6.14)$$\begin{eqnarray}X_{1,1c}Y_{1,1s}-X_{1,1s}Y_{1,1c}={\displaystyle \frac{1}{\unicode[STIX]{x03C0}B_{0}}}.\end{eqnarray}$$

The second constraint is the solution for the magnetic field strength $B=B_{0}(1-\unicode[STIX]{x1D705}X_{1})$. Finally, the constraint equation derived from the $\boldsymbol{n}$ and $\boldsymbol{b}$ equations at $O(\unicode[STIX]{x1D716})$, i.e. equation (63) of Garren & Boozer (Reference Garren and Boozer1991a) and equation (3.8) of Landreman & Sengupta (Reference Landreman and Sengupta2018), reads

(6.15)$$\begin{eqnarray}\unicode[STIX]{x1D704}V_{1}=X_{1,1c}{\displaystyle \frac{\text{d}X_{1,1s}}{\text{d}\unicode[STIX]{x1D711}}}-X_{1,1s}{\displaystyle \frac{\text{d}X_{1,1c}}{\text{d}\unicode[STIX]{x1D711}}}+Y_{1,1c}{\displaystyle \frac{\text{d}Y_{1,1s}}{\text{d}\unicode[STIX]{x1D711}}}-Y_{1,1s}{\displaystyle \frac{\text{d}Y_{1,1c}}{\text{d}\unicode[STIX]{x1D711}}}-{\displaystyle \frac{2G_{0}}{\unicode[STIX]{x03C0}B_{0}^{2}}}\unicode[STIX]{x1D70F},\end{eqnarray}$$

with

(6.16)$$\begin{eqnarray}V_{1}=X_{1,1s}^{2}+X_{1,1c}^{2}+Y_{1,1c}^{2}+Y_{1,1s}^{2}.\end{eqnarray}$$

In the following, we show the equivalence of the three constraints between the direct and inverse approaches.

We equate (2.7) and (6.11) and express the Boozer angle $\unicode[STIX]{x1D717}$ in terms of $(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D714},s)$ using (6.10), yielding the following expressions for $(X_{1,1c},Y_{1,1s},Y_{1,1c},Y_{1,1s})$

(6.17)$$\begin{eqnarray}\displaystyle & \displaystyle X_{1,1c}={\displaystyle \frac{1}{\sqrt{B_{0}\unicode[STIX]{x03C0}}}}\left(\text{e}^{-\unicode[STIX]{x1D702}/2}\cos \unicode[STIX]{x1D6FF}\cos f-\text{e}^{\unicode[STIX]{x1D702}/2}\sin \unicode[STIX]{x1D6FF}\sin f\right), & \displaystyle\end{eqnarray}$$
(6.18)$$\begin{eqnarray}\displaystyle & \displaystyle X_{1,1s}={\displaystyle \frac{1}{\sqrt{B_{0}\unicode[STIX]{x03C0}}}}\left(\text{e}^{-\unicode[STIX]{x1D702}/2}\cos \unicode[STIX]{x1D6FF}\sin f+\text{e}^{\unicode[STIX]{x1D702}/2}\sin \unicode[STIX]{x1D6FF}\cos f\right), & \displaystyle\end{eqnarray}$$
(6.19)$$\begin{eqnarray}\displaystyle & \displaystyle Y_{1,1c}={\displaystyle \frac{-1}{\sqrt{B_{0}\unicode[STIX]{x03C0}}}}\left(\text{e}^{\unicode[STIX]{x1D702}/2}\cos \unicode[STIX]{x1D6FF}\sin f+\text{e}^{-\unicode[STIX]{x1D702}/2}\sin \unicode[STIX]{x1D6FF}\cos f\right), & \displaystyle\end{eqnarray}$$
(6.20)$$\begin{eqnarray}\displaystyle & \displaystyle Y_{1,1s}={\displaystyle \frac{1}{\sqrt{B_{0}\unicode[STIX]{x03C0}}}}\left(\text{e}^{\unicode[STIX]{x1D702}/2}\cos \unicode[STIX]{x1D6FF}\cos f-\text{e}^{-\unicode[STIX]{x1D702}/2}\sin \unicode[STIX]{x1D6FF}\sin f\right), & \displaystyle\end{eqnarray}$$

where $f(s)=\unicode[STIX]{x1D704}\unicode[STIX]{x1D711}(s)-v(s)$. In order to derive (6.17)–(6.20), we have expressed the toroidal flux as $\unicode[STIX]{x1D713}=B_{0}\unicode[STIX]{x03C0}\unicode[STIX]{x1D70C}^{2}(e^{\unicode[STIX]{x1D702}}\cos ^{2}u+\text{e}^{-\unicode[STIX]{x1D702}}\sin ^{2}u)$ and used the trigonometric identities

(6.21)$$\begin{eqnarray}\cos \left[\arctan (\text{e}^{-\unicode[STIX]{x1D702}}\tan u)\right]={\displaystyle \frac{\text{e}^{\unicode[STIX]{x1D702}/2}\cos u}{\sqrt{\text{e}^{\unicode[STIX]{x1D702}}\cos ^{2}u+\text{e}^{-\unicode[STIX]{x1D702}}\sin ^{2}u}}},\end{eqnarray}$$

and

(6.22)$$\begin{eqnarray}\sin \left[\arctan (\text{e}^{-\unicode[STIX]{x1D702}}\tan u)\right]={\displaystyle \frac{\text{e}^{-\unicode[STIX]{x1D702}/2}\sin u}{\sqrt{\text{e}^{\unicode[STIX]{x1D702}}\cos ^{2}u+\text{e}^{-\unicode[STIX]{x1D702}}\sin ^{2}u}}}.\end{eqnarray}$$

Plugging (6.17)–(6.20) in (6.14), the first Garren–Boozer constraint is automatically satisfied. The second constraint related to the magnetic field modulus is satisfied since $X_{1}=\unicode[STIX]{x1D70C}\cos \unicode[STIX]{x1D703}$ and the lowest order vacuum magnetic field in the direct approach from $B=|\unicode[STIX]{x1D735}\unicode[STIX]{x1D719}|$ is given by $B=B_{0}(1-\unicode[STIX]{x1D705}\unicode[STIX]{x1D70C}\cos \unicode[STIX]{x1D703})$. Finally, using the system of (6.17)–(6.20), the constraint in (6.15) is also satisfied automatically.

7 Numerical comparison with W7-X equilibrium

With the aim of testing the framework developed in the previous sections for a realistic equilibrium, we now focus on describing the inner surfaces of the optimized stellarator W7-X using the near-axis expansion, and evaluate the accuracy of the expansion as we move radially outward towards increasing $\unicode[STIX]{x1D70C}$. For this study, the vacuum W7-X standard configuration is used, which corresponds to the A configuration of Geiger et al. (Reference Geiger, Beidler, Feng, Maassberg, Marushchenko and Turkin2015) at $\unicode[STIX]{x1D6FD}=0$. As a boundary, we choose a W7-X surface with a magnetic toroidal flux (in SI units) of $\unicode[STIX]{x1D713}=0.01~\text{T}~\text{m}^{2}$. We remark that the toroidal flux in the plasma boundary for this configuration is $\unicode[STIX]{x1D713}_{b}=2.19~\text{T}~\text{m}^{2}$, yielding $\unicode[STIX]{x1D713}/\unicode[STIX]{x1D713}_{b}\simeq 4.6\times 10^{-3}$ for the surface considered here. The expansion parameter on this particular surface can be estimated as $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}\sim \sqrt{\unicode[STIX]{x1D713}/\overline{B}R^{2}}\sim 10^{-2}$, with $\overline{B}\sim 3$ T and $R\sim 5.5$ m. For simplicity, we use the lowest-order expressions in vacuum for $\unicode[STIX]{x1D713}$, i.e. (3.31) and (C 1), and perform a nonlinear least-squares fit to find the functions $\unicode[STIX]{x1D707},\unicode[STIX]{x1D6FF},B_{0},\unicode[STIX]{x1D713}_{31}^{0c},\unicode[STIX]{x1D713}_{31}^{0s},\unicode[STIX]{x1D713}_{33}^{0c}$ and $\unicode[STIX]{x1D713}_{33}^{0s}$ that best approximate the shape of the magnetic field near the axis of W7-X. The numerical tool used for this study can be found in Jorge (Reference Jorge2019). As inputs for the numerical procedure, we use the magnetic axis of W7-X and the Fourier harmonics associated with that particular surface of constant $\unicode[STIX]{x1D713}$, as given by the VMEC code (Hirshman & Whitson Reference Hirshman and Whitson1983). In VMEC, a cylindrical coordinate system is employed, in which the position vector $\boldsymbol{r}$ is written as

(7.1)$$\begin{eqnarray}\boldsymbol{r}=R\boldsymbol{e}_{R}(\unicode[STIX]{x1D6F7})+Z\boldsymbol{e}_{Z},\end{eqnarray}$$

with $(\boldsymbol{e}_{R},\boldsymbol{e}_{\unicode[STIX]{x1D6F7}},\boldsymbol{e}_{Z})$ the cylindrical unit basis vectors and $(R,\unicode[STIX]{x1D6F7},Z)$ standard cylindrical coordinates. The two coordinates used to parametrize the flux surface in VMEC are a poloidal angle $\unicode[STIX]{x1D703}_{V}$ and the standard toroidal angle $\unicode[STIX]{x1D6F7}$. Assuming stellarator geometry, the radial and vertical components of $\boldsymbol{r}$ can then be written as

(7.2)$$\begin{eqnarray}R=\mathop{\sum }_{m,n}R_{mn}\cos (m\unicode[STIX]{x1D703}_{V}-n\unicode[STIX]{x1D6F7}),\end{eqnarray}$$

and

(7.3)$$\begin{eqnarray}Z=\mathop{\sum }_{m,n}Z_{mn}\sin (m\unicode[STIX]{x1D703}_{V}-n\unicode[STIX]{x1D6F7}).\end{eqnarray}$$

The magnetic axis is also described using a cylindrical coordinate system, with $R,Z$ and $\boldsymbol{e}_{R}$ parametrized using a single quantity $\unicode[STIX]{x1D6F7}_{a}$, satisfying $0\leqslant \unicode[STIX]{x1D6F7}_{a}<2\unicode[STIX]{x03C0}$. The magnetic axis $\boldsymbol{r}_{0}(\unicode[STIX]{x1D719})$ of the W7-X configuration used here is given by

(7.4)$$\begin{eqnarray}\displaystyle \boldsymbol{r}_{0}(\unicode[STIX]{x1D6F7}_{a}) & = & \displaystyle \left[5.56+0.37\cos (5\unicode[STIX]{x1D6F7}_{a})+0.02\cos (10\unicode[STIX]{x1D6F7}_{a})\right]\boldsymbol{e}_{R}\nonumber\\ \displaystyle & & \displaystyle -\,\left[0.31\sin (5\unicode[STIX]{x1D6F7}_{a})+0.02\sin (10\unicode[STIX]{x1D6F7}_{a})\right]\boldsymbol{e}_{Z}.\end{eqnarray}$$

We start by deriving the relation between Mercier’s coordinates $(\unicode[STIX]{x1D70C},\unicode[STIX]{x1D703},s)$ and VMEC’s poloidal $\unicode[STIX]{x1D703}_{V}$ and toroidal $\unicode[STIX]{x1D6F7}$ coordinates. This allows us to parametrize the surfaces of constant $\unicode[STIX]{x1D713}$ in terms of $\unicode[STIX]{x1D70C}(\unicode[STIX]{x1D713},\unicode[STIX]{x1D703}_{V},\unicode[STIX]{x1D6F7})$ and find a parametric form for the position vector $\boldsymbol{r}$ in (2.7) in terms of $(\unicode[STIX]{x1D703}_{V},\unicode[STIX]{x1D6F7})$ at any order in $\unicode[STIX]{x1D716}$. Starting with the arclength function $s$, we use the fact that the tangent vector $\boldsymbol{t}$ is a unit vector and employ the chain rule in (2.1), yielding $\text{d}s/\text{d}\unicode[STIX]{x1D6F7}_{a}=|\text{d}\boldsymbol{r}_{0}/\text{d}\unicode[STIX]{x1D6F7}_{a}|$. Next, the relation between the toroidal angle on axis $\unicode[STIX]{x1D6F7}_{a}$ and the poloidal and toroidal angles on the surface $(\unicode[STIX]{x1D703}_{V},\unicode[STIX]{x1D6F7})$ is found by imposing that the tangential component of $\boldsymbol{r}-\boldsymbol{r}_{0}$ vanishes, i.e.

(7.5)$$\begin{eqnarray}\boldsymbol{t}(\unicode[STIX]{x1D6F7}_{a})\boldsymbol{\cdot }\left[\boldsymbol{r}(\unicode[STIX]{x1D703}_{V},\unicode[STIX]{x1D6F7})-\boldsymbol{r}_{0}(\unicode[STIX]{x1D6F7}_{a})\right]=0,\end{eqnarray}$$

as required by the form of $\boldsymbol{r}$ in (2.7). The angle $\unicode[STIX]{x1D703}$, present in the radius vector $\boldsymbol{r}$ in (2.7), is found using

(7.6)$$\begin{eqnarray}\unicode[STIX]{x1D703}=\arctan \left\{{\displaystyle \frac{\left[\boldsymbol{r}(\unicode[STIX]{x1D703}_{V},\unicode[STIX]{x1D6F7})-\boldsymbol{r}_{0}(\unicode[STIX]{x1D719}_{a})\right]\boldsymbol{\cdot }\boldsymbol{b}(\unicode[STIX]{x1D6F7}_{a})}{\left[\boldsymbol{r}(\unicode[STIX]{x1D703}_{V},\unicode[STIX]{x1D6F7})-\boldsymbol{r}_{0}(\unicode[STIX]{x1D719}_{a})\right]\boldsymbol{\cdot }\boldsymbol{n}(\unicode[STIX]{x1D6F7}_{a})}}\right\}.\end{eqnarray}$$

The functions $\unicode[STIX]{x1D6F7}_{a}(\unicode[STIX]{x1D703}_{V},\unicode[STIX]{x1D6F7})$ and $\unicode[STIX]{x1D703}(\unicode[STIX]{x1D703}_{V},\unicode[STIX]{x1D6F7})$ allow us to write the surfaces of constant flux in (3.31) and (C 1) in terms of VMEC’s coordinates $\unicode[STIX]{x1D703}_{V}$ and $\unicode[STIX]{x1D6F7}$. The data points for the fit are obtained by forming a two-dimensional grid of $\unicode[STIX]{x1D70C}(\unicode[STIX]{x1D703}_{V},\unicode[STIX]{x1D6F7})$ with $0\leqslant \unicode[STIX]{x1D703}_{V}<2\unicode[STIX]{x03C0}$ and $0\leqslant \unicode[STIX]{x1D6F7}<2\unicode[STIX]{x03C0}/N_{fp}$ with $N_{fp}$ the number of field periods of the toroidal surface ($N_{fp}=5$ for W7-X). For this study, a total of $20\times 30$ points in $(\unicode[STIX]{x1D703}_{V},\unicode[STIX]{x1D6F7})$ is used. Finally, the function $\unicode[STIX]{x1D70C}(\unicode[STIX]{x1D703}_{V},\unicode[STIX]{x1D6F7})$ is obtained by summing the squares of the normal and binormal components of the vector $\boldsymbol{r}-\boldsymbol{r}_{0}$ in (2.7), i.e.

(7.7)$$\begin{eqnarray}\unicode[STIX]{x1D70C}=|\boldsymbol{r}(\unicode[STIX]{x1D703}_{V},\unicode[STIX]{x1D6F7})-\boldsymbol{r}_{0}(\unicode[STIX]{x1D6F7}_{a})|.\end{eqnarray}$$

Table 1. Fitting results of the W7-X surface $\unicode[STIX]{x1D713}=0.01~\text{T}~\text{m}^{-2}$ to the expressions in (3.31) and (C 1). Only the parameters with absolute value greater than $0.01$ are shown.

Figure 2. Eight equally spaced cross-sections with $0\leqslant \unicode[STIX]{x1D6F7}<2\unicode[STIX]{x03C0}/5$. (a,c) VMEC (full lines) and best-fit results (dashed lines) for the lowest-order expression for $\unicode[STIX]{x1D713}$ in (3.31). (b,d) VMEC (full lines) and best-fit results (dashed lines) for the higher-order expression for $\unicode[STIX]{x1D713}$ in (C 1). (a,b) Fit to surface with $\unicode[STIX]{x1D713}=0.01~\text{T}~\text{m}^{-2}$. (c,d) fit to surface with $\unicode[STIX]{x1D713}=0.44~\text{T}~\text{m}^{-2}$.

The best-fit results for the Fourier coefficients of $B_{0},\unicode[STIX]{x1D707}$ and $\unicode[STIX]{x1D6FF}$ are shown in table 1, where we write $B_{0}=\sum _{n}B_{0n}\cos nN_{fp}\unicode[STIX]{x1D6F7}$, $\unicode[STIX]{x1D707}=\sum _{n}\unicode[STIX]{x1D707}_{n}\cos nN_{fp}\unicode[STIX]{x1D6F7}$ and $\unicode[STIX]{x1D6FF}=-N_{fp}\unicode[STIX]{x1D6F7}/2+\sum _{n}\unicode[STIX]{x1D6FF}_{n}\sin nN_{fp}\unicode[STIX]{x1D6F7}$ with $N_{fp}=5$ for the case of W7-X. With the functions $\unicode[STIX]{x1D6FF}$ and $\unicode[STIX]{x1D707}$ from table 1, we can estimate the rotational transform on-axis $\unicode[STIX]{x1D704}_{0}$ using (5.7). This yields $\unicode[STIX]{x1D704}_{0}=0.851$, while the rotational transform on-axis for the W7-X configuration considered here is $\unicode[STIX]{x1D704}_{0}=0.855$.

For the next order in $\unicode[STIX]{x1D713}$, where triangularity is added as a degree of freedom, a similar method is used to find the parameters $\unicode[STIX]{x1D713}_{31}^{0c},\unicode[STIX]{x1D713}_{31}^{0s},\unicode[STIX]{x1D713}_{33}^{0c}$ and $\unicode[STIX]{x1D713}_{33}^{0s}$ that provide the best-fit results of (C 1) to (7.7). In order to make the stellarator symmetry apparent, we write $\unicode[STIX]{x1D713}_{3}$ as

(7.8)$$\begin{eqnarray}\unicode[STIX]{x1D713}_{3}=\mathop{\sum }_{m,n}\unicode[STIX]{x1D713}_{3}^{mn}\cos (m\unicode[STIX]{x1D703}-nN_{fp}\unicode[STIX]{x1D6F7}_{a}),\end{eqnarray}$$

with $N_{fp}=5$ for the case of W7-X. The resulting Fourier coefficients $\unicode[STIX]{x1D713}_{3}^{mn}$ are shown in table 1, where a total of 6 Fourier modes are used. Due to their negligible variation compared with the lowest-order fit, the coefficients of $B_{0},\unicode[STIX]{x1D6FF}$ and $\unicode[STIX]{x1D707}$ coefficients resulting from the next-order fit are not shown in table 1.

In figure 2, we show the cross-sections of the flux surface of VMEC and the resulting lowest-order (a,c) and higher-order (b,d) fit results. The eight cross-sections in figure 2 are computed at equally spaced values of $\unicode[STIX]{x1D6F7}$ in the interval $0\leqslant \unicode[STIX]{x1D6F7}<2\unicode[STIX]{x03C0}/5$. The full lines figure 2 represent VMEC’s cross-sections, while the dashed lines represent the best-fit results.

Next, we compare the magnetic field on the inner W7-X surface in using the first-order expression for $B=|\unicode[STIX]{x1D735}\unicode[STIX]{x1D719}|$

(7.9)$$\begin{eqnarray}B\simeq B_{0}(1+\unicode[STIX]{x1D705}\unicode[STIX]{x1D70C}\cos \unicode[STIX]{x1D703}).\end{eqnarray}$$

In figure 3(a,b) we show the magnetic field strength in the inner surface from VMEC (a,c) and from the lowest order fit (b,d right using the first-order expression for $B$ in (7.9), while in figure 3(c,d) the same is shown for the plasma boundary surface.

Figure 3. Magnetic field strength in the flux surface from VMEC (a,c) and from the lowest-order fit (b,d) using the first-order expression for $B=|\unicode[STIX]{x1D735}\unicode[STIX]{x1D719}|$ in (7.9). (a,b) Inner surface with $\unicode[STIX]{x1D713}=0.01~\text{T}~\text{m}^{2}$. (c,d) Plasma boundary with $\unicode[STIX]{x1D713}=2.19~\text{T}~\text{m}^{2}$.

Figure 4. Left: cross-section of VMEC (full lines) and the best-fit results (dashed lines) at lowest order (a) and higher order (b) at $\unicode[STIX]{x1D6F7}=2\unicode[STIX]{x03C0}/10$; Right: cross-section of VMEC (full lines) and the best-fit results (dashed lines) at lowest order (c) and higher order (d) $\unicode[STIX]{x1D6F7}=0$.

Figure 5. Cross-section of VMEC (full lines) and the best-fit results (dashed lines) at lowest order (a) and higher order (b) at $\unicode[STIX]{x1D6F7}=\unicode[STIX]{x03C0}/10$.

Finally, we look at the cross-sections of six equally spaced surfaces of constant $\unicode[STIX]{x1D713}$ from the inner surface to the plasma boundary using the best-fit results of the nonlinear regression to the inner surface obtained in table 1. In figure 4, we show the cross-section of VMEC (full lines) and the best-fit results (dashed lines) at lowest order (left) and higher order (right) at $\unicode[STIX]{x1D6F7}=0$ and $\unicode[STIX]{x1D6F7}=\unicode[STIX]{x03C0}/5$, while in figure 5 we show the cross-sections at $\unicode[STIX]{x1D6F7}=\unicode[STIX]{x03C0}/10$. We note that the parameters obtained for the considered inner surface where $\unicode[STIX]{x1D716}\unicode[STIX]{x1D70C}=10^{-4}$ yield a shaping of the surfaces up to the plasma boundary that follow qualitatively the behaviour of the flux surfaces obtained using the VMEC code except at $\unicode[STIX]{x1D6F7}=0$, where the agreement is limited to the inner surfaces. This is also seen in figure 6, where the plasma boundary of W7-X and its magnetic field strength is compared to the resulting surface using the best-fit parameters for $\unicode[STIX]{x1D713}_{2}$.

Figure 6. (a) W7-X plasma boundary. (b) Resulting surface from the nonlinear squares fit of (3.31) to (7.7). The colours show the magnetic field strength on the surface.

In this section, we were able to obtain both second and third order approximations in $\unicode[STIX]{x1D716}$ for the surfaces of constant toroidal flux $\unicode[STIX]{x1D713}$ of the W7-X stellarator by performing a nonlinear regression to a single surface close to the magnetic axis, which requires very little computational effort to compute. This procedure has shown to yield the correct rotational transform on axis with an error of less than 0.5 %, and to predict the qualitative behaviour of the shape and strength of the magnetic field across a wide range of volumes inside the plasma boundary. We remark that the method described here is valid at arbitrary order for a tokamak or stellarator-like toroidal equilibrium obtained using the VMEC code.

8 Conclusion

In this work, equilibrium magnetic fields are constructed at arbitrary order in the distance from the magnetic axis to the outer plasma boundary, both for vacuum and finite-$\unicode[STIX]{x1D6FD}$ configurations. Using an orthogonal coordinate system based on the parameters of the magnetic axis, the coefficients of the asymptotic power series in $\unicode[STIX]{x1D716}$ (the inverse aspect ratio) for the magnetic field, magnetic flux surface function, field line label and rotational transform are derived. While the near-axis framework allows for the construction of magnetic fields with chaotic structure, it also allows for the existence of nested flux surfaces. The associated constraints for the non-existence of good flux surfaces are derived, namely the presence of resonant denominators that vanish for a rational rotational transform. Within a finite-$\unicode[STIX]{x1D6FD}$ construction, a procedure to compute the resulting Shafranov shift of the magnetic axis and the associated beta limit is presented, and a comparison between the lowest order direct and inverse coordinate methods is shown. Finally, a numerical analysis is performed by comparing the near-axis expansion to a W7-X equilibrium at second and third order in the expansion.

The framework presented here is applicable to a wide range of plasma configurations. Indeed, as shown in Landreman (Reference Landreman2019), the lowest-order inverse coordinate approach (which is shown in this work to be equivalent to the direct approach used here), when used to construct quasisymmetric designs, can accurately describe many stellarator designs obtained using numerical optimization algorithms. The construction of quasisymmetric stellarator shapes using the methods developed here will be the subject of future work. As a further avenue of future study, we mention the possibility of using the near-axis expansion to numerically compute stellarator shapes in the volume inside a given surface by solving the system of equations in (3.34) to compute new equilibria as opposed to the nonlinear regression approach applied here. Furthermore, a thorough study of the resonances present in the system of (4.23)–(4.25) that might lead to the appearance of non-analytic and weakly singular terms of the form $\unicode[STIX]{x1D70C}^{n}(\log \unicode[STIX]{x1D70C})^{m}$ is needed. Finally, by using a sufficiently high order in the expansion, we expect this framework to be able to generate input data for optimization codes such as ROSE (Drevlak et al. Reference Drevlak, Beidler, Geiger, Helander and Turkin2019) and STELLOPT (Spong et al. Reference Spong, Hirshman, Berry, Lyon, Fowler, Strickler, Cole, Nelson, Williamson and Ware2001), possibly increasing the performance of such numerical tools.

Acknowledgements

We wish to thank J. Loizu, A. Cerfon, P. Helander, G. Plunk, R. MacKay and N. Kalinikos for many fruitful discussions regarding the content of the manuscript, as well as the Courant Institute, IPP Greifswald and the University of Warwick for their warm reception during the writing of the manuscript. This work was supported by a grant from the Simons Foundation (560651, ML) and a US DOE Grant no. DEFG02-86ER53223.

Appendix A. Fourier expansion of $f_{n}(\unicode[STIX]{x1D714},s)$

The aim of this section is to show that the magnetic scalar potential $f_{n}$ in (2.13) can be written as a Fourier series with frequencies $p$ ranging from $0\leqslant p\leqslant n$ or, equivalently, to derive (3.16). We start by deriving the Fourier series using (2.14), which stems from an expansion in $x$ and $y$, and then perform a similar derivation instead using Laplace’s equation, equation (3.15), which stems from an expansion in $\unicode[STIX]{x1D70C}$.

Starting with (2.14), we aim at deriving the Fourier series of the product $\cos ^{p}\unicode[STIX]{x1D703}\sin ^{(n-p)}\unicode[STIX]{x1D703}$. While the expressions for the Fourier series of $\sin ^{n}\unicode[STIX]{x1D703}$ and $\cos ^{n}\unicode[STIX]{x1D703}$ can be found in previous literature (Gradshteyn & Ryzhik Reference Gradshteyn and Ryzhik2007), a brief derivation for the Fourier series of their product is given below. Such product can be simplified using Euler’s formula and the binomial theorem, yielding

(A 1)$$\begin{eqnarray}\displaystyle \cos ^{p}\unicode[STIX]{x1D703}\sin ^{(n-p)}\unicode[STIX]{x1D703} & = & \displaystyle {\displaystyle \frac{1}{2^{n}}}{\displaystyle \frac{1}{i^{(n-p)}}}\mathop{\sum }_{r=0}^{p}\mathop{\sum }_{k=0}^{n-p}\binom{p}{r}\binom{n-p}{k}(-1)^{k}\text{e}^{\text{i}\unicode[STIX]{x1D703}[(n-2(k+r)]}\nonumber\\ \displaystyle & = & \displaystyle {\displaystyle \frac{1}{2^{n}}}{\displaystyle \frac{1}{i^{(n-p)}}}\mathop{\sum }_{r=0}^{p}\mathop{\sum }_{\unicode[STIX]{x1D708}=r}^{n-p+r}\binom{p}{r}\binom{n-p}{\unicode[STIX]{x1D708}-r}(-1)^{\unicode[STIX]{x1D708}-r}\text{e}^{\text{i}\unicode[STIX]{x1D703}(n-2\unicode[STIX]{x1D708})},\end{eqnarray}$$

where, in the last step, we replaced the summation index $k$ with $\unicode[STIX]{x1D708}=k+r$.

We now simplify (A 1) by interchanging the sum limits and split the result between even and odd $n$. For odd $n$, the right-hand side of (A 1) is given by

(A 2)$$\begin{eqnarray}\displaystyle {\displaystyle \frac{1}{2^{n}}}{\displaystyle \frac{1}{i^{(n-p)}}}\left[\mathop{\sum }_{\unicode[STIX]{x1D708}=0}^{p}\left(\text{e}^{\text{i}\unicode[STIX]{x1D703}(n-2\unicode[STIX]{x1D708})}+(-1)^{n-p}\text{e}^{-\text{i}\unicode[STIX]{x1D703}(n-2\unicode[STIX]{x1D708})}\right)\mathop{\sum }_{r=0}^{\unicode[STIX]{x1D708}}\binom{p}{r}\binom{n-p}{\unicode[STIX]{x1D708}-r}(-1)^{\unicode[STIX]{x1D708}-r}\right. & & \displaystyle \nonumber\\ \displaystyle \left.+\mathop{\sum }_{\unicode[STIX]{x1D708}=p+1}^{(n-1)/2}\left(\text{e}^{\text{i}\unicode[STIX]{x1D703}(n-2\unicode[STIX]{x1D708})}+(-1)^{n-p}\text{e}^{-\text{i}\unicode[STIX]{x1D703}(n-2\unicode[STIX]{x1D708})}\right)\mathop{\sum }_{r=0}^{p}\binom{p}{r}\binom{n-p}{\unicode[STIX]{x1D708}-r}(-1)^{\unicode[STIX]{x1D708}-r}\right], & & \displaystyle\end{eqnarray}$$

with the terms involving the exponential function reducing to $\sin (n-2\unicode[STIX]{x1D708})\unicode[STIX]{x1D703}$ or $\cos (n-2\unicode[STIX]{x1D708})\unicode[STIX]{x1D703}$ if $n-p$ is odd or even, respectively. The sums over $r$ can be stated in terms of the Gaussian hypergeometric function $_{2}F_{1}$, yielding

(A 3)$$\begin{eqnarray}\displaystyle \!\!\!\mathop{\sum }_{r=0}^{\unicode[STIX]{x1D708}}\!\binom{p}{r}\!\binom{n-p}{\unicode[STIX]{x1D708}-r}\!(-1)^{\unicode[STIX]{x1D708}-r} & = & \displaystyle c(\unicode[STIX]{x1D708},n,p)\nonumber\\ \displaystyle \!\!\! & = & \displaystyle \mathop{\sum }_{r=0}^{p}\binom{p}{r}\binom{n-p}{\unicode[STIX]{x1D708}-r}(-1)^{\unicode[STIX]{x1D708}-r}\nonumber\\ \displaystyle \!\!\! & = & \displaystyle (-1)^{\unicode[STIX]{x1D708}}\binom{n-p}{\unicode[STIX]{x1D708}}_{2}F_{1}(-p,-\unicode[STIX]{x1D708};1+n-p-\unicode[STIX]{x1D708};-1)\end{eqnarray}$$
(A 4)$$\begin{eqnarray}\displaystyle \!\!\! & = & \displaystyle (-1)^{\unicode[STIX]{x1D708}}{\displaystyle \frac{\unicode[STIX]{x1D6E4}(1+n-p)}{\unicode[STIX]{x1D6E4}(1+\unicode[STIX]{x1D708})}}{\displaystyle \frac{\,_{2}F_{1}(-p,-\unicode[STIX]{x1D708};1+n-p-\unicode[STIX]{x1D708};-1)}{\unicode[STIX]{x1D6E4}(1+n-p-\unicode[STIX]{x1D708})}}.\qquad\end{eqnarray}$$

The last identity shows that $c(\unicode[STIX]{x1D708},n,p)$ is well defined even when $(1+n-p-\unicode[STIX]{x1D708})$ is negative (Olver et al. Reference Olver, Lozier, Boisvert and Clark2010). Therefore, for odd $n$, the product in (A 1) can be written as

(A 5)$$\begin{eqnarray}\displaystyle \cos ^{p}\unicode[STIX]{x1D703}\sin ^{(n-p)}\unicode[STIX]{x1D703} & = & \displaystyle 2^{n-1}(-1)^{((n-p-1)/2)}\!\mathop{\sum }_{\unicode[STIX]{x1D708}=0}^{(n-1)/2}\!c(\unicode[STIX]{x1D708},n,p)\sin (n-2\unicode[STIX]{x1D708})\unicode[STIX]{x1D703}\quad (\text{for even }p),\qquad\end{eqnarray}$$
(A 6)$$\begin{eqnarray}\displaystyle & = & \displaystyle 2^{n-1}(-1)^{(n-p)/2}\mathop{\sum }_{\unicode[STIX]{x1D708}=0}^{(n-1)/2}c(\unicode[STIX]{x1D708},n,p)\cos (n-2\unicode[STIX]{x1D708})\unicode[STIX]{x1D703}\quad (\text{for odd }p).\end{eqnarray}$$

We note that for odd $n$, the range of the Fourier modes are from $\unicode[STIX]{x1D703}$ [when $\unicode[STIX]{x1D708}=(n-1)/2$] to $n$ (when $\unicode[STIX]{x1D708}=0$), and only odd harmonics are present.

The results for even $n$ differ from the above due to the additional $\unicode[STIX]{x1D708}=n/2$ term. Proceeding as before, we write the right-hand side of (A 1) as

(A 7)$$\begin{eqnarray}\displaystyle 2^{-n}(-1)^{(n-p-1)/2}[c\left(n/2,n,p\right)+\mathop{\sum }_{\unicode[STIX]{x1D708}=0}^{(n/2)-1}2c(\unicode[STIX]{x1D708},n,p)\sin (n-2\unicode[STIX]{x1D708})\unicode[STIX]{x1D703}] & & \displaystyle\end{eqnarray}$$

for odd $p$, while for even $p$ it reads

(A 8)$$\begin{eqnarray}\displaystyle 2^{-n}(-1)^{(n-p)/2}[c\left(n/2,n,p\right)+\mathop{\sum }_{\unicode[STIX]{x1D708}=0}^{(n/2)-1}2c(\unicode[STIX]{x1D708},n,p)\cos (n-2\unicode[STIX]{x1D708})\unicode[STIX]{x1D703}]. & & \displaystyle\end{eqnarray}$$

In this case, the Fourier modes lie between $0$ and $n$, and only even modes appear. As shown above, there are no Fourier modes with frequency higher than $n$ in (A 1), showing that $f_{n}$ is indeed analytic.

We now show the analyticity of $f_{n}$ using Laplace’s equation, equation (3.15) as a starting point, i.e. derive (3.16) from (3.15). We start by Fourier decomposing using the $\cos ^{n}\unicode[STIX]{x1D703}$ term in (3.15), yielding (Gradshteyn & Ryzhik Reference Gradshteyn and Ryzhik2007)

(A 9)$$\begin{eqnarray}\cos ^{n}\unicode[STIX]{x1D703}=\mathop{\sum }_{\unicode[STIX]{x1D708}=0}^{\lfloor n/2\rfloor }C_{e}(\unicode[STIX]{x1D708},n)\cos (n-2\unicode[STIX]{x1D708})\unicode[STIX]{x1D703},\end{eqnarray}$$

with $C_{e}(\unicode[STIX]{x1D708},n)=2^{1-n}\binom{n}{\unicode[STIX]{x1D708}}$ for odd $n$ and $C_{e}(\unicode[STIX]{x1D708},n)=2^{-n}(2\binom{n}{\unicode[STIX]{x1D708}}+\binom{n}{n/2}\unicode[STIX]{x1D6FF}_{\unicode[STIX]{x1D708},n/2})$ for even $n$. We note that by replacing the index $p$ with $n$ in the Fourier expansion of $\cos ^{p}\unicode[STIX]{x1D703}\sin ^{(n-p)}\unicode[STIX]{x1D703}$ of (A 6), the expression in (A 9) is obtained. Using (A 9), the right-hand side of (3.15) can be rewritten as

(A 10)$$\begin{eqnarray}\displaystyle & & \displaystyle \mathop{\sum }_{m=0}^{n-3}\mathop{\sum }_{\unicode[STIX]{x1D708}=0}^{\lfloor m/2\rfloor }C_{e}(\unicode[STIX]{x1D708},m)\cos (m-2\unicode[STIX]{x1D708})\unicode[STIX]{x1D703}\left[\vphantom{\int }\unicode[STIX]{x1D705}\left({\dot{f}}_{n-m-1}\sin \unicode[STIX]{x1D703}-(n-m-1)f_{n-m-1}\cos \unicode[STIX]{x1D703}\right)\right.\nonumber\\ \displaystyle & & \displaystyle \qquad \left.+\,(m+1)f_{n-m-2}^{\prime \prime }+{\displaystyle \frac{(m+1)(m+2)}{2}}(\unicode[STIX]{x1D705}^{\prime }\cos \unicode[STIX]{x1D703}+\unicode[STIX]{x1D705}\unicode[STIX]{x1D70F}\sin \unicode[STIX]{x1D703})f_{n-m-3}^{\prime }\right]\unicode[STIX]{x1D705}^{m}.\end{eqnarray}$$

Splitting (A 10) between its $(m+1)$ and $(m-2\unicode[STIX]{x1D708}\pm 1)$ harmonics, we obtain

(A 11)$$\begin{eqnarray}\displaystyle & & \displaystyle \mathop{\sum }_{m=0}^{n-3}\mathop{\sum }_{\unicode[STIX]{x1D708}=0}^{\lfloor m/2\rfloor }C_{e}(\unicode[STIX]{x1D708},m)\unicode[STIX]{x1D705}^{m}\left[\left(\cos (m-2\unicode[STIX]{x1D708}+1)\unicode[STIX]{x1D703}+\cos (m-2\unicode[STIX]{x1D708}-1)\unicode[STIX]{x1D703}\right)T_{1}\right.\nonumber\\ \displaystyle & & \displaystyle \quad \left.+\,\left(\sin (m-2\unicode[STIX]{x1D708}+1)\unicode[STIX]{x1D703}+\sin (m-2\unicode[STIX]{x1D708}-1)\unicode[STIX]{x1D703}\right)\unicode[STIX]{x1D64F}_{2}+2(m+1)f_{n-m-2}^{\prime \prime }\cos \unicode[STIX]{x1D703}\right]\!,\;\qquad\end{eqnarray}$$

where

(A 12)$$\begin{eqnarray}\displaystyle T_{1}={\displaystyle \frac{(m+1)(m+2)}{2}}\unicode[STIX]{x1D705}^{\prime }f_{n-m-3}^{\prime }-(n-m-1)\unicode[STIX]{x1D705}\hspace{2.22198pt}f_{n-m-1}, & & \displaystyle\end{eqnarray}$$

and

(A 13)$$\begin{eqnarray}\displaystyle \unicode[STIX]{x1D64F}_{2}=\unicode[STIX]{x1D705}\left[{\displaystyle \frac{(m+1)(m+2)}{2}}\unicode[STIX]{x1D70F}f_{n-m-3}^{\prime }+{\dot{f}}_{n-m-1}\right]. & & \displaystyle\end{eqnarray}$$

From the $(m-2\unicode[STIX]{x1D708}\pm 1)$ harmonic terms (A 11), it is clear that the maximum frequency of $\unicode[STIX]{x1D714}$ in (3.15) is $(n-2)$. This shows that, in vacuum, the forced harmonic oscillator equation determining the magnetic field is free of resonances of frequency $n$.

We shall now inductively prove that $\unicode[STIX]{x1D719}_{k}$ is of the form given by (3.16) for arbitrary order in $k$. The case for $k\leqslant 3$ is already derived in (3.6) and (3.9). To order $k>3$, we assume the form (3.16), such that

(A 14)$$\begin{eqnarray}\left.\begin{array}{@{}c@{}}\displaystyle \unicode[STIX]{x1D719}_{k}=\mathop{\sum }_{p=0}^{k}\unicode[STIX]{x1D719}_{pk}^{c}(s)\cos pu+\unicode[STIX]{x1D719}_{pk}^{s}(s)\sin pu,\\ \displaystyle \dot{\unicode[STIX]{x1D719}}_{k}=\mathop{\sum }_{p=0}^{k}p\left[-\unicode[STIX]{x1D719}_{pk}^{c}(s)\sin pu+\unicode[STIX]{x1D719}_{pk}^{s}(s)\cos pu\right]\!,\\ \displaystyle \unicode[STIX]{x1D719}_{k}^{\prime }=\mathop{\sum }_{p=0}^{k}\left\{\!\left[{\unicode[STIX]{x1D719}_{pk}^{c}}^{\prime }(s)-p\unicode[STIX]{x1D70F}\hspace{2.22198pt}\unicode[STIX]{x1D719}_{pk}^{s}(s)\right]\cos pu+\left[{\unicode[STIX]{x1D719}_{pk}^{s}}^{\prime }(s)+p\unicode[STIX]{x1D70F}\unicode[STIX]{x1D719}_{pk}^{c}(s)\right]\sin pu\right\}\!.\end{array}\right\}\end{eqnarray}$$

The maximum frequency of $\unicode[STIX]{x1D714}$ in $T_{1}$ and $T_{2}$ stems from the $\unicode[STIX]{x1D719}_{n-m-1}$ terms and is $(n-m-1)$. Similarly, the term $\unicode[STIX]{x1D719}_{n-m-2}^{\prime \prime }\cos \unicode[STIX]{x1D703}$ yields a maximum frequency $(n-m-1)$. When plugged in (A 11), we obtain frequencies in the range $m-2\unicode[STIX]{x1D708}\pm 1-n+m+1$ to $m-2\unicode[STIX]{x1D708}\pm 1+n-m-1$ with an upper limit of $n-2$. Therefore, the form (3.16) holds for arbitrary order in $n$. The terms with frequency $p$ in the range $0\leqslant p\leqslant n-2$ in (3.16) for $\unicode[STIX]{x1D719}_{n}$ are shown to be determined by its lower order counterparts, while two free functions of $s$ are obtained at each order $n$, i.e. the $\cos$ and $\sin$ coefficients of frequency $n$.

Appendix B. Solution for $\unicode[STIX]{x1D713}_{n}$ using the method of characteristics

Noting that (3.20) is of the form of an inhomogeneous advection equation for $\unicode[STIX]{x1D713}_{n}^{0}$, its solution can either be solved iteratively using the analyticity condition, equation (2.14), or by using the method of characteristics.

Along the characteristic curves parameterized by $s$ with $d\unicode[STIX]{x1D714}/ds=\dot{\unicode[STIX]{x1D719}}_{2}/B_{0}$, we can write (3.20) as

(B 1)$$\begin{eqnarray}{\displaystyle \frac{\text{d}\unicode[STIX]{x1D713}_{n}^{0}}{\text{d}s}}+{\displaystyle \frac{2n\unicode[STIX]{x1D719}_{2}}{B_{0}}}\unicode[STIX]{x1D713}_{n}^{0}={\displaystyle \frac{F_{n}^{0}}{B_{0}}}.\end{eqnarray}$$

Using the expression for $\unicode[STIX]{x1D719}_{2}$, the characteristic curve $\unicode[STIX]{x1D714}(s)$ is given by

(B 2)$$\begin{eqnarray}\tan u={\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{2u^{\prime }\unicode[STIX]{x1D707}}}+{\displaystyle \frac{\unicode[STIX]{x1D701}_{1}(s)}{u^{\prime }\unicode[STIX]{x1D707}}}\tanh \left[\unicode[STIX]{x1D701}_{2}(s)+\unicode[STIX]{x1D701}_{1}(s)B_{0}(s)\int _{0}^{s}{\displaystyle \frac{\text{d}s^{\prime }}{B_{0}(s^{\prime })}}\right],\end{eqnarray}$$

where $\unicode[STIX]{x1D701}_{1}(s)=\sqrt{(\unicode[STIX]{x1D702}^{\prime }/2)^{2}+\unicode[STIX]{x1D707}^{2}(u^{\prime })^{2}}$ and $\unicode[STIX]{x1D701}_{2}(s)$ is an arbitrary function of $s$. Defining the integrating factor $M_{n}(s)=\exp (2n\int _{0}^{s}\unicode[STIX]{x1D719}_{2}(s^{\prime })/B_{0}(s^{\prime })\,\text{d}s^{\prime })$, the solution of (B 1) reads

(B 3)$$\begin{eqnarray}\unicode[STIX]{x1D713}_{n}^{0}(s)={\displaystyle \frac{1}{M_{n}(s)}}\left[C+\int _{0}^{s}{\displaystyle \frac{M_{n}(s^{\prime })F_{n}(s^{\prime })}{B_{0}(s^{\prime })}}\,\text{d}s^{\prime }\right].\end{eqnarray}$$

The integration constant $C$ is found imposing the periodicity requirement $\unicode[STIX]{x1D713}_{n}^{0}(s+L)=\unicode[STIX]{x1D713}_{n}^{0}(s)$, with $L$ the total length of the magnetic axis, yielding

(B 4)$$\begin{eqnarray}C={\displaystyle \frac{\displaystyle \oint {\displaystyle \frac{M_{n}F_{n}}{B_{0}}}\,\text{d}s}{1-\text{e}^{2n\oint \unicode[STIX]{x1D719}_{2}/B_{0}\,\text{d}s}}}.\end{eqnarray}$$

Appendix C. Explicit expressions for the higher-order vacuum flux surface function

For the $n=3$ case in (3.20), the source term reads $F_{3}^{0}=-6\unicode[STIX]{x1D719}_{3}\unicode[STIX]{x1D713}_{2}^{0}-\dot{\unicode[STIX]{x1D719}}_{3}\dot{\unicode[STIX]{x1D713}}_{2}^{0}-2B_{0}\unicode[STIX]{x1D713}_{2}^{0^{\prime }}\unicode[STIX]{x1D705}\cos \unicode[STIX]{x1D703}$. Similarly to (3.22), the equation for $\unicode[STIX]{x1D713}_{3}^{0}$, with $\unicode[STIX]{x1D713}_{3}^{0}$ of the form

(C 1)$$\begin{eqnarray}\unicode[STIX]{x1D713}_{3}^{0}=\unicode[STIX]{x1D713}_{31}^{0c}\cos u+\unicode[STIX]{x1D713}_{31}^{0s}\sin u+\unicode[STIX]{x1D713}_{33}^{0c}\cos 3u+\unicode[STIX]{x1D713}_{33}^{0s}\sin 3u,\end{eqnarray}$$

can be written as

(C 2)$$\begin{eqnarray}\unicode[STIX]{x1D6F9}_{3}^{0^{\prime }}=A_{3}^{0}\unicode[STIX]{x1D6F9}_{3}^{0}+B_{3}^{0},\end{eqnarray}$$

with $\unicode[STIX]{x1D6F9}_{3}^{0}=B_{0}^{-3/2}[\unicode[STIX]{x1D713}_{31}^{0c}\unicode[STIX]{x1D713}_{31}^{0s}\unicode[STIX]{x1D713}_{33}^{0c}\unicode[STIX]{x1D713}_{33}^{0s}]^{\text{T}}$, $\unicode[STIX]{x1D63C}_{3}^{0}$ the matrix

(C 3)$$\begin{eqnarray}\unicode[STIX]{x1D63C}_{3}^{0}=\left(\begin{array}{@{}cccc@{}}\unicode[STIX]{x1D702}^{\prime } & -(2\unicode[STIX]{x1D707}+1)u^{\prime } & {\displaystyle \frac{3\unicode[STIX]{x1D702}^{\prime }}{2}} & -3\unicode[STIX]{x1D707}u^{\prime }\\ -(2\unicode[STIX]{x1D707}-1)u^{\prime } & -\unicode[STIX]{x1D702}^{\prime } & 3\unicode[STIX]{x1D707}u^{\prime } & {\displaystyle \frac{3\unicode[STIX]{x1D702}^{\prime }}{2}}\\ {\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{2}} & \unicode[STIX]{x1D707}u^{\prime } & 0 & -3u^{\prime }\\ -\unicode[STIX]{x1D707}u^{\prime } & {\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{2}} & 3u^{\prime } & 0\\ \end{array}\right)\end{eqnarray}$$

and $\unicode[STIX]{x1D63D}_{3}^{0}$ the matrix

(C 4)$$\begin{eqnarray}\unicode[STIX]{x1D63D}_{3}^{0}={\displaystyle \frac{2\unicode[STIX]{x03C0}B_{0}^{-3/2}}{\sqrt{1-\unicode[STIX]{x1D707}}^{2}}}\left(\begin{array}{@{}c@{}}-(2\unicode[STIX]{x1D707}+3)\unicode[STIX]{x1D719}_{31}^{c}+3\unicode[STIX]{x1D707}\unicode[STIX]{x1D719}_{33}^{c}\\ (2\unicode[STIX]{x1D707}-3)\unicode[STIX]{x1D719}_{31}^{s}-3\unicode[STIX]{x1D707}\unicode[STIX]{x1D719}_{33}^{s}\\ -\unicode[STIX]{x1D707}\unicode[STIX]{x1D719}_{31}^{c}+3\unicode[STIX]{x1D719}_{33}^{c}\\ -\unicode[STIX]{x1D707}\unicode[STIX]{x1D719}_{31}^{s}+3\unicode[STIX]{x1D719}_{33}^{s}\end{array}\right).\end{eqnarray}$$

e system of equations in (C 2), we introduce the transformation $\unicode[STIX]{x1D6F9}_{3}^{0}=\unicode[STIX]{x1D64F}_{3}\unicode[STIX]{x1D70E}_{3}^{0}$, with $\unicode[STIX]{x1D70E}_{3}^{0}=[\unicode[STIX]{x1D70E}_{31}^{0},\unicode[STIX]{x1D70E}_{32}^{0},\unicode[STIX]{x1D70E}_{33}^{0},\unicode[STIX]{x1D70E}_{34}^{0}]^{\text{T}}$ and $\unicode[STIX]{x1D64F}_{3}$ the matrix

(C 5)$$\begin{eqnarray}\unicode[STIX]{x1D64F}_{3}=\text{e}^{-3\unicode[STIX]{x1D702}/2}\left(\begin{array}{@{}cccc@{}}\text{e}^{2\unicode[STIX]{x1D702}}-1 & 2\text{i}\text{e}^{2\unicode[STIX]{x1D702}}\sinh (\unicode[STIX]{x1D702}) & -3\text{e}^{2\unicode[STIX]{x1D702}}-1 & -\text{i}\text{e}^{\unicode[STIX]{x1D702}}\left(\text{e}^{2\unicode[STIX]{x1D702}}+3\right)\\ \text{e}^{2\unicode[STIX]{x1D702}}-1 & -2\text{i}\text{e}^{2\unicode[STIX]{x1D702}}\sinh (\unicode[STIX]{x1D702}) & -3\text{e}^{2\unicode[STIX]{x1D702}}-1 & \text{i}\text{e}^{\unicode[STIX]{x1D702}}\left(\text{e}^{2\unicode[STIX]{x1D702}}+3\right)\\ \text{e}^{2\unicode[STIX]{x1D702}}+3 & -\text{i}\text{e}^{\unicode[STIX]{x1D702}}\left(3\text{e}^{2\unicode[STIX]{x1D702}}+1\right) & 3-3\text{e}^{2\unicode[STIX]{x1D702}} & 6\text{i}\text{e}^{2\unicode[STIX]{x1D702}}\sinh (\unicode[STIX]{x1D702})\\ \text{e}^{2\unicode[STIX]{x1D702}}+3 & \text{i}\text{e}^{\unicode[STIX]{x1D702}}\left(3\text{e}^{2\unicode[STIX]{x1D702}}+1\right) & 3-3\text{e}^{2\unicode[STIX]{x1D702}} & -6\text{i}\text{e}^{2\unicode[STIX]{x1D702}}\sinh (\unicode[STIX]{x1D702})\\ \end{array}\right).\end{eqnarray}$$

The quantities $\unicode[STIX]{x1D70E}_{3}^{0}$ then satisfy

(C 6)$$\begin{eqnarray}\unicode[STIX]{x1D70E}_{3}^{0^{\prime }}-\left(\begin{array}{@{}cccc@{}}{\displaystyle \frac{\text{i}u^{\prime }}{\cosh \unicode[STIX]{x1D702}}} & 0 & 0 & 0\\ 0 & 3{\displaystyle \frac{\text{i}u^{\prime }}{\cosh \unicode[STIX]{x1D702}}} & 0 & 0\\ 0 & 0 & -{\displaystyle \frac{\text{i}u^{\prime }}{\cosh \unicode[STIX]{x1D702}}} & 0\\ 0 & 0 & 0 & -3{\displaystyle \frac{\text{i}u^{\prime }}{\cosh \unicode[STIX]{x1D702}}}\end{array}\right)\unicode[STIX]{x1D70E}_{3}^{0}=F_{3}^{0},\end{eqnarray}$$

with $F_{3}^{0}=\unicode[STIX]{x1D64F}_{3}^{-1}\unicode[STIX]{x1D63D}_{3}^{0}$.

The decoupling of the $n=4$ case in (3.20) can be performed in an analogous manner, where the equation for $\unicode[STIX]{x1D713}_{4}^{0}=\unicode[STIX]{x1D713}_{40}^{0}+\unicode[STIX]{x1D713}_{42}^{0c}\cos 2u+\unicode[STIX]{x1D713}_{42}^{0s}\sin 2u+\unicode[STIX]{x1D713}_{44}^{0c}\cos 4u+\unicode[STIX]{x1D713}_{44}^{0s}\sin 4u$ can be written as

(C 7)$$\begin{eqnarray}\unicode[STIX]{x1D6F9}_{4}^{0^{\prime }}=\unicode[STIX]{x1D63C}_{4}^{0}\unicode[STIX]{x1D6F9}_{4}^{0}+B_{4}^{0},\end{eqnarray}$$

with $\unicode[STIX]{x1D6F9}_{4}^{0}=B_{0}^{-4/2}[\unicode[STIX]{x1D713}_{040},\unicode[STIX]{x1D713}_{042}^{c},\unicode[STIX]{x1D713}_{042}^{s},\unicode[STIX]{x1D713}_{044}^{c},\unicode[STIX]{x1D713}_{044}^{s}]^{\text{T}}$ and $\unicode[STIX]{x1D63C}_{4}^{0}$ the matrix

(C 8)$$\begin{eqnarray}\unicode[STIX]{x1D63C}_{4}^{0}=\left(\begin{array}{@{}ccccc@{}}0 & -3\unicode[STIX]{x1D707}u^{\prime } & {\displaystyle \frac{3\unicode[STIX]{x1D702}^{\prime }}{2}} & 0 & 0\\ -4\unicode[STIX]{x1D707}u^{\prime } & 0 & 2u^{\prime } & 2\unicode[STIX]{x1D702}^{\prime } & 4\unicode[STIX]{x1D707}u^{\prime }\\ 2\unicode[STIX]{x1D702}^{\prime } & -2u^{\prime } & 0 & -4\unicode[STIX]{x1D707}u^{\prime } & 2\unicode[STIX]{x1D702}^{\prime }\\ 0 & {\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{2}} & -\unicode[STIX]{x1D707}u^{\prime } & 0 & 4u^{\prime }\\ 0 & \unicode[STIX]{x1D707}u^{\prime } & {\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{2}} & -4u^{\prime } & 0\\ \end{array}\right).\end{eqnarray}$$

The diagonalizing matrix $\unicode[STIX]{x1D64F}_{4}$ is given by

(C 9)$$\begin{eqnarray}\unicode[STIX]{x1D64F}_{4}={\displaystyle \frac{1}{64}}\left(\begin{array}{@{}ccccc@{}}-6\sinh ^{2}\unicode[STIX]{x1D702} & -6\sinh ^{2}\unicode[STIX]{x1D702} & 12\sinh 2\unicode[STIX]{x1D702} & 12\sinh 2\unicode[STIX]{x1D702} & 6\cosh 2\unicode[STIX]{x1D702}+2\\ 8\text{i}\sinh \unicode[STIX]{x1D702} & -8\text{i}\sinh \unicode[STIX]{x1D702} & -16\text{i}\cosh \unicode[STIX]{x1D702} & 16\text{i}\cosh \unicode[STIX]{x1D702} & 0\\ -4\sinh 2\unicode[STIX]{x1D702} & -4\sinh 2\unicode[STIX]{x1D702} & 16\cosh 2\unicode[STIX]{x1D702} & 16\cosh 2\unicode[STIX]{x1D702} & 8\sinh 2\unicode[STIX]{x1D702}\\ 4\text{i}\cosh \unicode[STIX]{x1D702} & -4\text{i}\cosh \unicode[STIX]{x1D702} & -8\text{i}\sinh \unicode[STIX]{x1D702} & 8\text{i}\sinh \unicode[STIX]{x1D702} & 0\\ -\text{cosh}\,2\unicode[STIX]{x1D702}-3 & -\text{cosh}\,2\unicode[STIX]{x1D702}-3 & 4\sinh 2\unicode[STIX]{x1D702} & 4\sinh 2\unicode[STIX]{x1D702} & 4\sinh ^{2}\unicode[STIX]{x1D702}\\ \end{array}\right),\end{eqnarray}$$

and the functions $\unicode[STIX]{x1D70E}_{4}^{0}$ satisfy the following set of equations

(C 10)$$\begin{eqnarray}\unicode[STIX]{x1D70E}_{4}^{0^{\prime }}-\left(\begin{array}{@{}ccccc@{}}4{\displaystyle \frac{\text{i}u^{\prime }}{\cosh \unicode[STIX]{x1D702}}} & 0 & 0 & 0 & 0\\ 0 & -4{\displaystyle \frac{\text{i}u^{\prime }}{\cosh \unicode[STIX]{x1D702}}} & 0 & 0 & 0\\ 0 & 0 & 2{\displaystyle \frac{\text{i}u^{\prime }}{\cosh \unicode[STIX]{x1D702}}} & 0 & 0\\ 0 & 0 & 0 & 2{\displaystyle \frac{\text{i}u^{\prime }}{\cosh \unicode[STIX]{x1D702}}} & 0\\ 0 & 0 & 0 & 0 & 0\end{array}\right)\unicode[STIX]{x1D70E}_{4}^{0}=F_{4}^{0}.\end{eqnarray}$$

Appendix D. System of equations for the vacuum flux surface function at arbitrary order

We now solve for $\unicode[STIX]{x1D713}_{n}^{0}$ to obtain a set of differential equations of the form

(D 1)$$\begin{eqnarray}\unicode[STIX]{x1D6F9}_{n}^{0^{\prime }}=\unicode[STIX]{x1D63C}_{n}^{0}\unicode[STIX]{x1D6F9}_{n}^{0}+B_{n}^{0},\end{eqnarray}$$

where the components of $\unicode[STIX]{x1D713}_{n}^{0}$ are written as $\unicode[STIX]{x1D6F9}_{n}^{0}=B_{0}^{-n/2}[\unicode[STIX]{x1D713}_{0n0},\unicode[STIX]{x1D6F9}_{n2}^{0c},\unicode[STIX]{x1D6F9}_{n2}^{0s}\cdots \,]^{\text{T}}$ for $n$ even and $\unicode[STIX]{x1D6F9}_{n}^{0}=B_{0}^{-n/2}[\unicode[STIX]{x1D6F9}_{n1}^{0c},\unicode[STIX]{x1D6F9}_{n1}^{0s},\unicode[STIX]{x1D6F9}_{n3}^{0c},\unicode[STIX]{x1D6F9}_{n3}^{0s}\cdots \,]^{\text{T}}$ for $n$ odd Plugging the expansion of (2.14) in (3.20), we find for $\unicode[STIX]{x1D6F9}_{nm}^{0}=B_{0}^{-n/2}\unicode[STIX]{x1D713}_{nm}^{0}$ and $0\leqslant m\leqslant 2$

(D 2)$$\begin{eqnarray}\displaystyle \unicode[STIX]{x1D6F9}_{n0}^{0c^{\prime }} & = & \displaystyle (n+2)\left[{\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{4}}\unicode[STIX]{x1D6F9}_{n2}^{0c}-{\displaystyle \frac{\unicode[STIX]{x1D707}u^{\prime }}{2}}\unicode[STIX]{x1D6F9}_{n2}^{0s}\right]+B_{0}^{-n/2-1}F_{n0}^{0c}\end{eqnarray}$$
(D 3)$$\begin{eqnarray}\displaystyle \unicode[STIX]{x1D6F9}_{n1}^{0c^{\prime }} & = & \displaystyle -u^{\prime }\left[\unicode[STIX]{x1D6F9}_{n1}^{0s}+{\displaystyle \frac{\unicode[STIX]{x1D707}}{2}}(n+1)\unicode[STIX]{x1D6F9}_{n1}^{0s}+{\displaystyle \frac{\unicode[STIX]{x1D707}}{2}}(n+3)\unicode[STIX]{x1D6F9}_{n3}^{0s}\right]\nonumber\\ \displaystyle & & \displaystyle +\,{\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{4}}\left[(n+1)\unicode[STIX]{x1D6F9}_{n1}^{0c}+(n+3)\unicode[STIX]{x1D6F9}_{n3}^{0c}\right]+B_{0}^{-n/2-1}F_{n1}^{0c},\end{eqnarray}$$
(D 4)$$\begin{eqnarray}\displaystyle \unicode[STIX]{x1D6F9}_{n1}^{0s^{\prime }} & = & \displaystyle -u^{\prime }\left[\unicode[STIX]{x1D6F9}_{n1}^{0s}+{\displaystyle \frac{\unicode[STIX]{x1D707}}{2}}(n+1)\unicode[STIX]{x1D6F9}_{n1}^{0s}+{\displaystyle \frac{\unicode[STIX]{x1D707}}{2}}(n+3)\unicode[STIX]{x1D6F9}_{n3}^{0s}\right]\nonumber\\ \displaystyle & & \displaystyle +\,{\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{4}}\left[(n+1)\unicode[STIX]{x1D6F9}_{n1}^{0c}+(n+3)\unicode[STIX]{x1D6F9}_{n3}^{0c}\right]+B_{0}^{-n/2-1}F_{n1}^{0c},\end{eqnarray}$$
(D 5)$$\begin{eqnarray}\displaystyle \unicode[STIX]{x1D6F9}_{n2}^{0c^{\prime }} & = & \displaystyle n{\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{2}}\unicode[STIX]{x1D6F9}_{n0}^{0c}-2u^{\prime }\unicode[STIX]{x1D6F9}_{n2}^{0s}+{\displaystyle \frac{n+4}{2}}\left(\unicode[STIX]{x1D707}u^{\prime }\unicode[STIX]{x1D6F9}_{n4}^{0s}-{\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{2}}\unicode[STIX]{x1D6F9}_{n4}^{0c}\right)+B_{0}^{-n/2-1}F_{n2}^{0c}\end{eqnarray}$$
(D 6)$$\begin{eqnarray}\displaystyle \unicode[STIX]{x1D6F9}_{n2}^{0s^{\prime }} & = & \displaystyle 2u^{\prime }\unicode[STIX]{x1D6F9}_{0n2}^{c}-n\unicode[STIX]{x1D707}u^{\prime }\unicode[STIX]{x1D6F9}_{n0}^{0c}+{\displaystyle \frac{n+4}{2}}\left(\unicode[STIX]{x1D707}u^{\prime }\unicode[STIX]{x1D6F9}_{n4}^{0c}+{\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{2}}\unicode[STIX]{x1D6F9}_{n4}^{0s}\right)+B_{0}^{-n/2-1}F_{n2}^{0s},\end{eqnarray}$$

and for $m\geqslant 3$

(D 7)$$\begin{eqnarray}\displaystyle \hspace{-24.0pt}\unicode[STIX]{x1D6F9}_{nm}^{0c^{\prime }} & = & \displaystyle {\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{4}}\left[\unicode[STIX]{x1D6F9}_{nm-2}^{0c}(n+2-m)+\unicode[STIX]{x1D6F9}_{nm+2}^{0c}(n+2+m)\right]\nonumber\\ \displaystyle \hspace{-24.0pt} & & \displaystyle -\,u^{\prime }\left[m\unicode[STIX]{x1D6F9}_{nm}^{0s}-{\displaystyle \frac{\unicode[STIX]{x1D707}}{2}}\unicode[STIX]{x1D6F9}_{nm-2}^{0s}(n+2-m)+{\displaystyle \frac{\unicode[STIX]{x1D707}}{2}}\unicode[STIX]{x1D6F9}_{nm+2}^{0s}(n+2+m)\right]+B_{0}^{-n/2-1}F_{nm}^{0c}\end{eqnarray}$$
(D 8)$$\begin{eqnarray}\displaystyle \hspace{-24.0pt}\unicode[STIX]{x1D6F9}_{nm}^{0s^{\prime }} & = & \displaystyle {\displaystyle \frac{\unicode[STIX]{x1D702}^{\prime }}{4}}\left[\unicode[STIX]{x1D6F9}_{nm-2}^{0s}(n-2+m)+\unicode[STIX]{x1D6F9}_{nm+2}^{0s}(n+2+m)\right]\nonumber\\ \displaystyle \hspace{-24.0pt} & & \displaystyle -\,u^{\prime }\!\left[-m\unicode[STIX]{x1D6F9}_{nm}^{0c}+{\displaystyle \frac{\unicode[STIX]{x1D707}}{2}}\unicode[STIX]{x1D6F9}_{nm-2}^{0c}(n+2-m)-{\displaystyle \frac{\unicode[STIX]{x1D707}}{2}}\unicode[STIX]{x1D6F9}_{nm+2}^{0c}(n+2+m)\right]\!+B_{0}^{-n/2-1}F_{nm}^{0s},\end{eqnarray}$$

with $F_{nm}^{0s}$ and $F_{nm}^{0c}$ the $\sin mu$ and $\cos mu$ Fourier coefficients of $F_{n}^{0}$, respectively.

References

Bernardin, M. P., Moses, R. W. & Tataronis, J. A. 1986 Isodynamical (omnigenous) equilibrium in symmetrically confined plasma configurations. Phys. Fluids 29 (8), 2605.CrossRefGoogle Scholar
Bernardin, M. P. & Tataronis, J. A. 1985 Hamiltonian approach to the existence of magnetic surfaces. J. Math. Phys. 26 (9), 2370.CrossRefGoogle Scholar
Boozer, A. H. 1981 Plasma equilibrium with rational magnetic surfaces. Phys. Fluids 24 (11), 1999.CrossRefGoogle Scholar
Boozer, A. H. 2015 Stellarator design. J. Plasma Phys. 81 (6), 515810606.CrossRefGoogle Scholar
Chu, M. S., Guo, W., Liu, W., Ren, Q., Shaing, K. C. & Zhu, P. 2019 A three-dimensional magnetohydrodynamic equilibrium in an axial coordinate with a constant curvature. Nucl. Fusion 59 (8), 086004.CrossRefGoogle Scholar
D’haeseleer, W. D., Hitchon, W. N. G., Callen, J. D. & Shohet, J. L. 1991 Flux Coordinates and Magnetic Field Structure: A Guide to a Fundamental Tool of Plasma Theory. Springer.CrossRefGoogle Scholar
Drevlak, M., Beidler, C. D., Geiger, J., Helander, P. & Turkin, Y. 2019 Optimisation of stellarator equilibria with ROSE. Nucl. Fusion 59 (1), 016010.CrossRefGoogle Scholar
Garren, D. A. & Boozer, A. H. 1991a Existence of quasihelically symmetric stellarators. Phys. Fluids B 3 (10), 2822.CrossRefGoogle Scholar
Garren, D. A. & Boozer, A. H. 1991b Magnetic field strength of toroidal plasma equilibria. Phys. Fluids B 3 (10), 2805.CrossRefGoogle Scholar
Geiger, J., Beidler, C. D., Feng, Y., Maassberg, H., Marushchenko, N. B. & Turkin, Y. 2015 Physics in the magnetic configuration space of W7-X. Plasma Phys. Control. Fusion 57 (1), 014004.CrossRefGoogle Scholar
Gradshteyn, I. S. & Ryzhik, M. 2007 Table of Integrals, Series, and Products. Elsevier.Google Scholar
Grieger, G., Lotz, W., Merkel, P., Nührenberg, J., Sapper, J., Strumberger, E., Wobig, H., Burhenn, R., Erckmann, V., Gasparino, U. et al. 1992 Physics optimization of stellarators. Phys. Fluids B 4 (7), 2081.CrossRefGoogle Scholar
Helander, P. 2014 Theory of plasma confinement in non-axisymmetric magnetic fields. Rep. Prog. Phys. 77 (8), 087001.CrossRefGoogle Scholar
Hirshman, S. P. & Whitson, J. C. 1983 Steepest-descent moment method for three-dimensional magnetohydrodynamic equilibria. Phys. Fluids 26 (12), 3553.CrossRefGoogle Scholar
Jorge, R.2019 SENAC: Stellarator Near-Axis Equilibrium Code. Dataset on Zenodo. doi:10.5281/zenodo.3575116.CrossRefGoogle Scholar
Kruskal, M. D. & Kulsrud, R. M. 1958 Equilibrium of a magnetically confined plasma in a toroid. Phys. Fluids 1 (4), 265.CrossRefGoogle Scholar
Kuo-Petravic, G. & Boozer, A. H. 1987 Numerical determination of the magnetic field line hamiltonian. J. Comput. Phys. 73 (1), 107.CrossRefGoogle Scholar
Landreman, M. 2019 Optimized quasisymmetric stellarators are consistent with the GarrenBoozer construction. Plasma Phys. Control. Fusion 61 (7), 075001.CrossRefGoogle Scholar
Landreman, M. & Sengupta, W. 2018 Direct construction of optimized stellarator shapes. Part 1. Theory in cylindrical coordinates. J. Plasma Phys. 84 (6), 905840616.CrossRefGoogle Scholar
Landreman, M., Sengupta, W. & Plunk, G. G. 2019 Direct construction of optimized stellarator shapes. Part 2. Numerical quasisymmetric solutions. J. Plasma Phys. 85 (1), 905850103.CrossRefGoogle Scholar
Lortz, D. & Nuhrenberg, J. 1976 Equilibrium and stability of a three-dimensional toroidal MHD configuration near its magnetic axis. Z. Naturforsch. 31 (11), 1277.Google Scholar
Lortz, D. & Nuhrenberg, J. 1977 Equilibrium and stability of the $l=2$ stellarator without longitudinal current. Nucl. Fusion 17 (1), 125.CrossRefGoogle Scholar
Mercier, C. 1964 Equilibrium and stability of a toroidal magnetohydrodynamic system in the neighbourhood of a magnetic axis. Nucl. Fusion 4 (3), 213.CrossRefGoogle Scholar
Mynick, H. E. 2006 Transport optimization in stellarators. Phys. Plasmas 13 (5), 058102.CrossRefGoogle Scholar
Mynick, H. E., Pomphrey, N. & Xanthopoulos, P. 2010 Optimizing stellarators for turbulent transport. Phys. Rev. Lett. 105 (9), 095004.CrossRefGoogle Scholar
Olver, F. W. J., Lozier, D. W., Boisvert, R. F. & Clark, C. W. 2010 NIST Handbook of Mathematical Functions. Cambridge University Press.Google Scholar
Salat, A. 1995 Nonexistence of magnetohydrodynamic equilibria with poloidally closed field lines in the case of violated axisymmetry. Phys. Plasmas 2 (5), 1652.CrossRefGoogle Scholar
Solov’ev, L. S. & Shafranov, V. D. 1970 Reviews of Plasma Physics 5. Consultants Bureau.Google Scholar
Spivak, M. 1999 A Comprehensive Introduction to Differential Geometry: Volume 2. Publish or Perish Inc.Google Scholar
Spong, D. A., Hirshman, S. P., Berry, L. A., Lyon, J. F., Fowler, R. H., Strickler, D. J., Cole, M. J., Nelson, B. N., Williamson, D. E., Ware, A. S. et al. 2001 Physics issues of compact drift optimized stellarators. Nucl. Fusion 41 (6), 711.CrossRefGoogle Scholar
Weitzner, H. 2016 Expansions of non-symmetric toroidal magnetohydrodynamic equilibria. Phys. Plasmas 23 (6), 062512.CrossRefGoogle Scholar
Figure 0

Figure 1. Example of a magnetic surface using Mercier’s coordinates, where the radial coordinate $\unicode[STIX]{x1D70C}$ is prescribed as a function of $s$ and $\unicode[STIX]{x1D714}=\unicode[STIX]{x1D703}+\unicode[STIX]{x1D6FE}$ in order to obtain a toroidal shape with elliptical cross-section. The magnetic axis curve is shown in black, together with the Frenet–Serret unit vectors, namely the tangent (cyan), normal (grey) and binormal (orange) unit vectors. The blue and yellow lines in the outermost surface denote the curves with constant $\unicode[STIX]{x1D703}$ and $s$, respectfully.

Figure 1

Table 1. Fitting results of the W7-X surface $\unicode[STIX]{x1D713}=0.01~\text{T}~\text{m}^{-2}$ to the expressions in (3.31) and (C 1). Only the parameters with absolute value greater than $0.01$ are shown.

Figure 2

Figure 2. Eight equally spaced cross-sections with $0\leqslant \unicode[STIX]{x1D6F7}<2\unicode[STIX]{x03C0}/5$. (a,c) VMEC (full lines) and best-fit results (dashed lines) for the lowest-order expression for $\unicode[STIX]{x1D713}$ in (3.31). (b,d) VMEC (full lines) and best-fit results (dashed lines) for the higher-order expression for $\unicode[STIX]{x1D713}$ in (C 1). (a,b) Fit to surface with $\unicode[STIX]{x1D713}=0.01~\text{T}~\text{m}^{-2}$. (c,d) fit to surface with $\unicode[STIX]{x1D713}=0.44~\text{T}~\text{m}^{-2}$.

Figure 3

Figure 3. Magnetic field strength in the flux surface from VMEC (a,c) and from the lowest-order fit (b,d) using the first-order expression for $B=|\unicode[STIX]{x1D735}\unicode[STIX]{x1D719}|$ in (7.9). (a,b) Inner surface with $\unicode[STIX]{x1D713}=0.01~\text{T}~\text{m}^{2}$. (c,d) Plasma boundary with $\unicode[STIX]{x1D713}=2.19~\text{T}~\text{m}^{2}$.

Figure 4

Figure 4. Left: cross-section of VMEC (full lines) and the best-fit results (dashed lines) at lowest order (a) and higher order (b) at $\unicode[STIX]{x1D6F7}=2\unicode[STIX]{x03C0}/10$; Right: cross-section of VMEC (full lines) and the best-fit results (dashed lines) at lowest order (c) and higher order (d) $\unicode[STIX]{x1D6F7}=0$.

Figure 5

Figure 5. Cross-section of VMEC (full lines) and the best-fit results (dashed lines) at lowest order (a) and higher order (b) at $\unicode[STIX]{x1D6F7}=\unicode[STIX]{x03C0}/10$.

Figure 6

Figure 6. (a) W7-X plasma boundary. (b) Resulting surface from the nonlinear squares fit of (3.31) to (7.7). The colours show the magnetic field strength on the surface.