# Stellarator coil optimization supporting multiple magnetic configurations

Brandon F Lee1,2,3, Elizabeth J Paul1,4, Georg Stadler5, and Matt Landreman6 1
Princeton Plasma Physics Laboratory, 100 Stellarator Road, Princeton, NJ 08536
2 Department of Biomedical, Biological, and Chemical Engineering, University
of Missouri, 416 South 6th Street, Columbia, MO 65211  3 Department of Physics
and Astronomy, University of Missouri, 701 South College Avenue, Columbia, MO
65211  4 Department of Astrophysical Sciences, Princeton University, 4 Ivy
Lane, Princeton, NJ 08544  5 Courant Institute of Mathematical Sciences, New
York University, 251 Mercer Street, New York, NY 10012  6 Institute for
Research in Electronics and Applied Physics, University of Maryland, 8223
Paint Branch Drive, College Park, MD 20742<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

We present a technique that can be used to design stellarators with a high
degree of experimental flexibility. For our purposes, flexibility is defined
by the range of values the rotational transform can take on the magnetic axis
of the vacuum field while maintaining satisfactory quasisymmetry. We show that
accounting for configuration flexibility during the modular coil design
improves flexibility beyond that attained by previous methods. Careful
placement of planar control coils and the incorporation of an integrability
objective enhance the quasisymmetry and nested flux surface volume of each
configuration. We show that it is possible to achieve flexibility,
quasisymmetry, and nested flux surface volume to reasonable degrees with a
relatively simple coil set through an NCSX-like example. This example coil
design is optimized to achieve three rotational transform targets and nested
flux surface volumes in each magnetic configuration larger than the NCSX
design plasma volume. Our work suggests that there is a tradeoff between
flexibility, quasisymmetry, and volume of nested flux surfaces.

###### type:

Letter to the Editor

††:

monthyeardate[]

, , ,

  *

Keywords: Stellarator, Optimization, Flexibility, Coil Design

##  1 Introduction

Effective stellarator coil optimization is of great interest to the nuclear
fusion community. Traditionally, a two-stage optimization process is used: a
magnetic field with desirable physical properties is designed, then coils
subject to reasonable engineering constraints are optimized to create the
target field [1, 2]. During the first stage, a “fixed-boundary” approach is
used, which means that the shape of the last closed flux surface acts as a
computational boundary during the magnetic equilibrium calculations. It is
challenging to use the two-stage approach to design stellarators that can
achieve more than one magnetic configuration with the same modular coil set
because the stages are decoupled from one another. Many devices use control
coils to explore several configurations, but these coils are not accounted for
during the modular coil design. Designing a stellarator for flexibility from
the outset would presumably make the device cheaper, and therefore more
experimentally useful, than multiple devices with limited flexibility.

“Free-boundary” equilibrium calculations could, in principle, be used to
circumvent the difficulties introduced by the stage decoupling inherent in the
two-stage approach. In the free-boundary approach, the coil geometries and
currents are first specified, then the shape of the last closed flux surface
is calculated self-consistently. One can theoretically optimize coils to
generate a desirable magnetic field by performing a free-boundary equilibrium
calculation within each step of the coil optimization. In practice, however,
such optimizations typically require substantial computing time and often
struggle to converge. Our method, outlined in section 2, is somewhat similar
to the free-boundary approach but uses a near-axis expansion to reduce
computational complexity.

To achieve experimental flexibility, several stellarators have included planar
coils to modify their magnetic configurations. While planar coils cannot
provide intricate shaping like modular coils, they are relatively simple to
manufacture and can make small modifications to the magnetic field. For
instance, the design of the National Compact Stellarator Experiment (NCSX)
included 18 identical, equally-spaced toroidal field coils to keep the mean
toroidal field constant and free the modular coils for 3D shaping, as well as
4 poloidal field coils to adjust the plasma position and shape [3, 4]. The
currents in each modular and poloidal field coil could be modified
independently, while all the toroidal field coils were intended to have one
power supply. Modifying these currents could change the value of the
rotational transform, $\iota$, on the magnetic axis from approximately $0.175$
to $0.5$ while maintaining constant shear.

The original design of the Helically Symmetric Experiment (HSX) did not
include planar coils. To degrade the quasisymmetry of the field and improve
device flexibility, planar coils were fastened to the plates that already
supported the modular coils [5]. Changing the direction of the currents in the
planar coils independently allowed for the rotational transform on the axis to
be changed by about $10\%$ and significantly degraded the quasisymmetry of the
device [6].

As with HSX, the initial coil design for Wendelstein 7-X (W7-X) did not
include planar coils [7]. However, due to the substantial experimental
flexibility offered by the planar coils in the Wendelstein 7 Advanced
Stellarator (W7-AS), which allowed for the rotational transform to take values
between $0.25$ and $0.7$, W7-X was redesigned to include planar coils [8]. The
W7-X standard configuration, corresponding to no current in the planar coils,
has an edge rotational transform of $5/5$. Running current through the planar
coils can change the edge rotational transform to $5/4$ or $5/6$ [7, 9]. The
planar coils can also be used to affect several other characteristics of the
magnetic field and plasma [7, 9, 10, 11].

The modular coils of the Quasi-Poloidal Stellarator (QPS) were designed to
achieve a single magnetic configuration. Independent power supplies were
envisioned for each modular coil and three pairs of vertical field coils,
while all twelve toroidal field coils would have used one power supply. The
plasma current could also be manipulated with an ohmic transformer [12].
Optimizations of the aforementioned currents resulted in on-axis rotational
transform values of roughly 0.165 to 0.375 with less than a $15\%$ change in
the ion energy confinement.

In this work we utilize the coil design approach proposed in [13], which
couples the vacuum magnetic field and coil optimizations together by
incorporating objectives from both stages into a single objective function so
that they can be optimized simultaneously in one step. This is different from
the two-stage design approach discussed above, which requires sequential
optimization of the magnetic field and coil objective functions. The approach
of [13], which is implemented in the PyPlasmaOpt software, employs a near-axis
expansion [14, 15, 16] to achieve quasisymmetry in the neighborhood of the
magnetic axis. Using this expansion makes the calculations similar in spirit
to free-boundary coil optimizations, but much less computationally intensive.
As previously mentioned, some experimental devices have used planar coils to
change the rotational transform and intentionally degrade quasisymmetry, but
achieving configuration flexibility and quasisymmetry simultaneously is
challenging. We modify PyPlasmaOpt to take flexibility and planar coil
placement into account during the initial optimization rather than first
optimizing the stellarator for a standard state and adding planar coils after
the fact. We also compute quadratic flux minimizing (QFM) surfaces [17]
throughout the optimization to improve the integrability of the field away
from the magnetic axis. For the purposes of demonstration, we use approximate
design parameters of NCSX as the starting point for our optimizations. We show
that device flexibility can be improved by accounting for it in the coil
design stage. An example device is presented that can achieve a range in
$\iota$ on the axis, nested flux surface volumes in each configuration larger
than the design plasma volume of NCSX, and quasisymmetry in each configuration
of similar magnitude to the NCSX design. Our quasisymmetry optimization
approach relies on minimizing the difference between the total magnetic field
and a target field on the magnetic axis, making it easy to use when only
vacuum fields are considered. However, it would not be straightforward to
extend this approach to finite-$\beta$ plasmas because the plasma current
would need to be known throughout the device (as in free-boundary
optimizations) to determine the total magnetic field. Our general approach to
optimizing for flexibility, on the other hand, could readily be extended
beyond vacuum fields.

##  2 Formulation

The basic idea of this work is that flexibility can be achieved by
incorporating several objective functions, one for each of the desired
magnetic configurations, into a single composite objective. We assume that
flexibility is realized by changing the currents in each unique coil while
holding the coil shapes constant. One can imagine that the composite objective
for $N_{\mathrm{m}}$ desired magnetic configurations would take the general
form

$f_{\mathrm{comp}}\coloneqq
f_{\mathrm{indep}}+\sum_{j=1}^{N_{\mathrm{m}}}f_{\mathrm{dep},j},$ (1)

where $f_{\mathrm{indep}}$ is an objective function that is independent of the
coil currents and $f_{\mathrm{dep,j}}$ are objective functions that are
dependent on the coil currents. In this work, $f_{\mathrm{indep}}$ contains
coil regularization terms and the $f_{\mathrm{dep,j}}$ contain terms related
to the rotational transform, quasisymmetry, and nested flux surface volume of
each magnetic configuration. The remainder of this section describes the
details of our formulation.

PyPlasmaOpt calculates a quasiaxisymmetric field in the neighborhood of the
magnetic axis and optimizes coils such that they create a vacuum field on the
axis that coincides with the quasisymmetric field. Magnetic field
contributions from the plasma current are not taken into account in this
model, eliminating the need to solve the more expensive free-boundary
equilibrium problem. The coils are subject to a regularization objective
determined from engineering considerations.

The coil regularization objective is

$R(\mathbf{c})\coloneqq\sum_{i=1}^{N_{\mathrm{c}}}\left[\frac{1}{2}\left(\frac{L_{\mathrm{c}}^{(i)}(\mathbf{c})-L_{\mathrm{c}}^{(i,\mathrm{target})}}{L_{\mathrm{c}}^{(i,\mathrm{target})}}\right)^{2}\right.\\\
+\alpha\int\mathrm{max}\left(0,\kappa_{i}(\mathbf{c})-\frac{2\pi}{L_{\mathrm{c}}^{(i)}(\mathbf{c})}\right)^{4}d\ell_{i}\\\
+\left.\gamma\sum_{k=1}^{i-1}\int\int\mathrm{max}\left(0,d_{\mathrm{min}}-\|\mathbf{r}_{i}(\mathbf{c})-\mathbf{r}_{k}(\mathbf{c})\|\right)^{2}d\ell_{i}d\ell_{k}\right],$
(2)

where $N_{c}$ is the total number of unique coils, $L_{\mathrm{c}}^{(i)}$ is
the length of coil $i$, $\kappa_{i}$ is the curvature of coil $i$,
$d_{\mathrm{min}}$ is the minimum desired intercoil distance, $\mathbf{r}_{i}$
is the position vector along coil $i$, and $\alpha$ and $\gamma$ are weights.
These regularization terms prevent the length and shape of the coils from
becoming physically unrealistic. For each optimization, we set
$\alpha=10^{-6}$, $\gamma=1000$, and $d_{\mathrm{min}}=0.2$ similar to [13].

Some objective function terms unique to magnetic configuration $j$ are

$f_{\mathrm{config,}j}(\mathbf{c},\mathbf{a})\coloneqq\frac{\int_{\mathrm{MA},j}\|\mathbf{B}_{\mathrm{coils},j}\left(\mathbf{c}\right)-\mathbf{B}_{\mathrm{QS},j}\left(\mathbf{a}\right)\|^{2}d\ell}{\int_{\mathrm{MA},j}\|\mathbf{B}_{\mathrm{coils},j}\left(\mathbf{c}\right)\|^{2}d\ell}\\\
+\frac{\int_{\mathrm{MA},j}\|\nabla\mathbf{B}_{\mathrm{coils},j}\left(\mathbf{c}\right)-\nabla\mathbf{B}_{\mathrm{QS},j}\left(\mathbf{a}\right)\|^{2}d\ell}{\int_{\mathrm{MA},j}\|\nabla\mathbf{B}_{\mathrm{coils},j}\left(\mathbf{c}\right)\|^{2}d\ell}\\\
+\frac{1}{2}\left(\frac{\iota_{j}\left(\mathbf{a}\right)-\iota^{\mathrm{target}}_{j}}{\iota^{\mathrm{target}}_{j}}\right)^{2}+\frac{1}{2}\left(\frac{L_{\mathrm{a},j}\left(\mathbf{a}\right)-L^{\mathrm{target}}_{\mathrm{a},j}}{L^{\mathrm{target}}_{\mathrm{a},j}}\right)^{2},$
(3)

where $\mathbf{c}$ are the coil parameters, $\mathbf{a}$ are the magnetic axis
parameters, $\mathbf{B}_{\mathrm{coils}}$ is the magnetic field produced by
the coils, $\mathbf{B}_{\mathrm{QS}}$ is the target quasisymmetric field,
$L_{\mathrm{a}}$ is the length of the magnetic axis, and $\|\cdot\|$ denotes
the $L^{2}$-norm for vectors and the Frobenius norm for tensors. The
quasisymmetry model takes a specified magnetic axis and a parameter related to
the elongation of the flux surfaces as its inputs and returns
$\mathbf{B}_{\mathrm{QS}}$, $\nabla\mathbf{B}_{\mathrm{QS}}$, and $\iota$ by
numerically solving a first-order nonlinear ordinary differential equation
[14, 15, 16]. This means that the magnetic axis used by the quasisymmetry
model and the true magnetic axis from the coils do not necessarily coincide
unless the error in the first two terms of the objective (3) is small. We also
rely on small error in these terms for an accurate calculation of $\iota$. The
third term in equation (3) enforces our target value of $\iota$ by
manipulating the magnetic axis fed to the quasisymmetry model, and the fourth
prevents the magnetic axis from becoming very large or small.

As discussed in section 5, we found that optimizing for multiple
$\iota^{\mathrm{target}}$ values could create smaller-than-desired volumes of
nested flux surfaces. In an attempt to mitigate this, we compute a QFM surface
[17] for each magnetic configuration throughout the optimization. A QFM
surface with a unit normal vector $\hat{\mathbf{n}}_{j}$ is defined as the
minimizer of the objective function

$f_{\mathrm{QFM},j}(\mathbf{S},\mathbf{c})\coloneqq\frac{\int_{\mathrm{S},j}\left(\mathbf{B}_{\mathrm{coils},j}\cdot\hat{\mathbf{n}}_{j}\right)^{2}d^{2}x}{\int_{\mathrm{S},j}B_{\mathrm{coils},j}^{2}d^{2}x}$
(4)

with respect to the surface parameters, $\mathbf{S}$, subject to the
constraint that the volume equals a user-specified constant. The resulting QFM
surface is an approximate magnetic surface, and the value of
$f_{\mathrm{QFM},j}$ quantifies the deviation of the field from integrability.
Each QFM surface is recomputed at every iteration of the optimization, and the
value of equation (4) is then penalized as shown in equation (5).

We enable the code to simultaneously optimize $N_{\mathrm{m}}$ magnetic
configurations that share the same coil set, each with their own
$\iota^{\mathrm{target}}$, by implementing the composite objective

$f_{\mathrm{comp}}(\mathbf{c},\mathbf{a})\coloneqq\\\
R(\mathbf{c})+\sum_{j=1}^{N_{\mathrm{m}}}\left(f_{\mathrm{config,}j}(\mathbf{c},\mathbf{a})+\eta\min_{\mathbf{S}}f_{\mathrm{QFM},j}(\mathbf{S},\mathbf{c})\right),$
(5)

where $\eta$ is a weight.

The variation of each $f_{\mathrm{QFM},j}$ with respect to $\mathbf{c}$ is

$\delta
f_{\mathrm{QFM},j}(\delta\mathbf{c};\mathbf{S(\mathbf{B})},\mathbf{B})=\\\
\delta f_{\mathrm{QFM},j}(\delta\mathbf{B};\mathbf{S},\mathbf{B})+\delta
f_{\mathrm{QFM},j}(\delta\mathbf{S}(\delta\mathbf{B});\mathbf{S(\mathbf{B})},\mathbf{B}),$
(6)

where $\delta\mathbf{B}=\delta\mathbf{B}(\delta\mathbf{c})$. The first term in
equation (6) corresponds to the explicit dependence of each
$f_{\mathrm{QFM},j}$ on the magnetic field, and the second term corresponds to
the implicit dependence of each $f_{\mathrm{QFM},j}$ on the magnetic field
through the QFM surface shape. Because each $f_{\mathrm{QFM},j}$ is evaluated
at a stationary point with respect to $\mathbf{S}$, only the first term of
equation (6) contributes. The derivatives of the other terms in the composite
objective function (5) are computed analytically or using adjoint methods as
described in [13]. The value of the objective is minimized by the L-BFGS-B
algorithm [18, 19] implemented in SciPy [20].

To quantify the quasiaxisymmetry (QA) of an optimized configuration during
postprocessing, we define the QA error to be

$\epsilon_{\mathrm{QA}}\coloneqq\sqrt{\frac{\sum_{m,n\neq
0}B_{m,n}^{2}}{\sum_{m,n}B_{m,n}^{2}}},$ (7)

where $B_{m,n}$ refer to the Fourier harmonics of the magnetic field in Boozer
coordinates on a given flux surface. These harmonics are obtained from
BOOZ_XFORM [21] using the vacuum field calculated from free-boundary VMEC
[22].

##  3 Optimization for Flexible QA Configuration

Several approaches were explored to develop an optimization formulation that
allows for reasonable achievement of flexibility, quasisymmetry, and a large
volume of nested flux surfaces. Some of these approaches are discussed in
sections 4 and 5. For the successful formulation, we optimized for three
values of $\iota^{\mathrm{target}}$: $0.3959$, $0.6180$, and $0.7940$. The
first is the on-axis $\iota$ of the original NCSX design [4], while the second
and third are substantially larger noble irrationals. It is known that QA
becomes progressively more difficult to achieve as $\iota$ grows [23, 24, 25],
so choosing two large $\iota^{\mathrm{target}}$ values serves as a challenging
test for our methods, especially since we only consider the vacuum field. We
initialize the optimization using an approximation of the NCSX modular coils
[4, 26] with six Fourier modes. We add two planar coils per half field period
as well. The parameters of each planar coil included in the optimization space
were its center, orientation angles, radius, and current. The planar coils
were initialized as circles with radii of 1.3 m and placed equidistant around
the device. QFM surfaces with volume $2.959{\ }\mathrm{m^{3}}$ (the design
NCSX plasma volume), $\eta=50$, three poloidal modes, and three toroidal modes
were added to each magnetic configuration during the optimization. The number
of poloidal and toroidal modes was raised to six or eight during
postprocessing to obtain smoother surfaces, and the surface volumes were
adjusted to achieve agreement with the Poincaré plots shown in figure 1. These
surfaces served as the initial guesses for the free-boundary VMEC
calculations. The coils produced by the optimization are shown in figure 1(d),
and the currents can be found in table 1.

(a)

(b)

(c)

(d)

(e)

(f)

(g)

Figure 1: (1(a)) (1(b)), and (1(c)) show Poincaré plots for the $\iota^{\mathrm{target}}=0.3959$, $\iota^{\mathrm{target}}=0.6180$, and $\iota^{\mathrm{target}}=0.7940$ configurations, respectively, of the flexible device discussed in section 3. The (overlapping) solid blue and dotted orange curves indicate the QFM and free-boundary VMEC surfaces, respectively, used during postprocessing. Twelve poloidal and toroidal modes were used for the VMEC calculations. The volumes of the VMEC surfaces shown are $5.166$ $\mathrm{m^{3}}$ (1(a)), $4.954$ $\mathrm{m^{3}}$ (1(b)), and $3.534$ $\mathrm{m^{3}}$ (1(c)). Note that the flux surfaces become elongated as $\iota$ increases, which is consistent with previous work [23, 25]. (1(d)) shows the modular and planar coils of the flexible device over one field period and the VMEC boundary associated with (1(a)). (1(e)) shows a comparison between the modular coils of the flexible device (blue) and those of the original NCSX design (red). (1(f)) shows $\epsilon_{\mathrm{QA}}$ for each configuration of the flexible device and the original NCSX design [3]. (1(g)) shows the rotational transform for each configuration of the flexible device and the original NCSX design calculated using free-boundary VMEC. Stars indicate the (on-axis) optimization targets. The effective minor radius in (1(f)) and (1(g)) is computed with the same definition used in VMEC, given in [16]. Table 1: Optimized modular and planar coil currents (kA) needed to produce the results of section 3. Note that the magnetic field is normalized to have an average magnitude of 1 T on the axis. | Small $\iota$ | Medium $\iota$ | Large $\iota$
---|---|---|---
Mod. 1 | 360.5 | 443.5 | 491.3
Mod. 2 | 355.4 | 415.1 | 440.5
Mod. 3 | 274.0 | 325.1 | 349.9
Plan. 1 | -136.6 | -33.1 | 41.7
Plan. 2 | -124.4 | -33.5 | -9.3
Table 2: Comparison of the maximum curvature ($\mathrm{m^{-1}}$), minimum intercoil distance (m), and maximum length (m) for the modular coils in the original NCSX design and the example design presented in section 3. | Orig. NCSX | Ex. Design
---|---|---
Max. $\kappa$ | 10.6 | 3.81
Min. Intercoil Dist. | 0.152 | 0.198
Max. Coil Len. | 7.29 | 8.17
Table 3: Currents (in kA-turns) in the modular, toroidal field, and poloidal field coils from the NCSX flexibility study of Pomphrey et al. [3] for comparison with the currents of the flexible device outlined in section 3, which are shown in table 1. Note that PF1 and PF2 were excluded from the flexibility calculations as they were primarily dedicated to ohmic heating and that the average toroidal field strength was $1.7$ T at $R=1.4~{}\mathrm{m}$. | Mod. 1 | Mod. 2 | Mod. 3 | TF | PF3 | PF4 | PF5 | PF6
---|---|---|---|---|---|---|---|---
Target $\iota^{\mathrm{axis}}=0.50$ | 759.2 | 714.6 | 626.1 | -39.2 | 1524.2 | 159.0 | 208.2 | -1.3
$\iota^{\mathrm{axis}}=0.40$ (Ref. Config.) | 694.2 | 654.6 | 551.1 | 27.8 | 1524.2 | 1180.0 | 95.2 | -2.3
Target $\iota^{\mathrm{axis}}=0.30$ | 616.2 | 593.6 | 485.1 | 100.8 | 1524.2 | 787.0 | 62.2 | -2.3
Target $\iota^{\mathrm{axis}}=0.20$ | 513.2 | 497.6 | 390.1 | 194.8 | -159.8 | 233.0 | 55.2 | 4.7

Our results are best understood when compared to the NCSX flexibility study
carried out by Pomphrey et al. [3]. They performed several optimizations of
the coil currents with fixed coil shapes and shear, seeking a different value
of $\iota$ during each optimization. They considered non-zero plasma $\beta$
and current. From figure 1(e) and table 2, it is clear that the coils in our
example design are simpler according to our regularization criteria than those
of the NCSX design. This suggests that they would be easier to construct.
Comparing the currents obtained by our optimization with those from the NCSX
flexibility study, shown in table 3, suggests that our currents are
reasonable. The Poincaré plots in figure 1 show that the volume of nested flux
surfaces shrinks somewhat for configurations with larger $\iota$, similar to
the previous study. Even so, the nested flux surface volume for each
configuration presented in this section is greater than the design NCSX plasma
volume. In the previous study, the minimum on-axis $\epsilon_{\mathrm{QA}}$ is
$0.004873$ when $\iota^{\mathrm{axis}}=0.49$. As shown in figure 1(f), the
maximum on-axis $\epsilon_{\mathrm{QA}}$ for our flexible device is $0.004877$
in the $\iota^{\mathrm{target}}=0.7940$ configuration. However, it should be
noted that the original NCSX design had superior $\epsilon_{\mathrm{QA}}$ far
from the axis, likely because this was not accounted for in our objective
function. Similarly, other desirable traits not included in our objective
function may be absent from the flexible device. For instance, all three of
its magnetic configurations have magnetic hills whereas the NCSX design has a
magnetic well. The trends in $\epsilon_{\mathrm{eff}}^{3/2}$ follow those in
figure 1(f). A plot comparing $\epsilon_{\mathrm{eff}}^{3/2}$ for the
configurations described in this section and the original NCSX design,
calculated using NEO [27], can be found in the supplementary material. Figure
1(g) shows that we achieve on-axis rotational transforms in roughly the range
$0.4$ to $0.74$, which is larger than the range of $0.175$ to $0.5$ in the
previous study and more challenging to achieve in a QA configuration due to
the large values of $\iota$. Taken together, the optimization presented in
this work resulted in an example coil design that achieves substantial
flexibility, quasisymmetry near the axis comparable to the original NCSX
design, and a large volume of nested flux surfaces in all three targeted
magnetic configurations. This was achieved with 12 carefully-placed planar
toroidal field coils, whereas the original NCSX design utilized 18 equally-
spaced toroidal field coils and 4 poloidal field coils.

##  4 Sequential Optimization

A sequential optimization consisting of two steps is useful for
contextualizing the performance of the formulation outlined in the previous
two sections. In the first step, modular coils alone were optimized for
$\iota^{\mathrm{target}}=0.3959$ on the axis. This was a benchmark
optimization in [13] and produces excellent quasisymmetry and nested flux
surface volume. In the second step, the modular coils from the first step were
frozen in place and planar coils were added as in the previous section. The
currents in all the coils and the positions of the planar coils were optimized
to achieve $\iota^{\mathrm{target}}=0.7940$. A QFM surface with $\eta=50$ was
added in the second step to prevent the volume of nested flux surfaces from
becoming very small. As seen in figure 2, the nested flux surface volumes and
quasisymmetry achieved using this formulation are comparable with those
achieved using the formulation outlined in sections 2 and 3. But despite only
specifying two (rather than three) $\iota^{\mathrm{target}}$ values, we find
less flexibility than that shown in the previous section. This suggests that
greater flexibility may be obtained by accounting for it during the initial
coil optimization.

(a)

(b)

(c)

(d)

(e)

Figure 2: (2(a)) and (2(b)) show Poincaré plots for the
$\iota^{\mathrm{target}}=0.3959$ and $\iota^{\mathrm{target}}=0.7940$
configurations, respectively, of the device discussed in section 4. The
(overlapping) solid blue and dotted orange curves indicate the QFM and free-
boundary VMEC surfaces, respectively, used during postprocessing. The volumes
of the VMEC surfaces shown are $2.958$ $\mathrm{m^{3}}$ (2(a)) and $1.884$
$\mathrm{m^{3}}$ (2(b)). (2(c)) shows the modular and planar coils of the
device over one field period and the VMEC boundary associated with (2(b)).
(2(d)) shows $\epsilon_{\mathrm{QA}}$ for each configuration of the device and
the original NCSX design [3]. (2(e)) shows the rotational transform for each
configuration of the device and the original NCSX design calculated using
free-boundary VMEC. Stars indicate the (on-axis) optimization targets. The
effective minor radius in (2(d)) and (2(e)) is computed with the same
definition used in VMEC, given in [16].

##  5 Other Optimization Formulations

In the process of coming to the result in section 3, several optimization
formulations were attempted that proved to be suboptimal. Without planar coils
or QFM surfaces, the modular coils were rather inflexible when optimized using
a sequential approach. Adding planar coils but no QFM surfaces resulted in
reasonable flexibility and QA but a small plasma volume for the large $\iota$
configuration.

If multiple $\iota^{\mathrm{target}}$ were taken into account during an
optimization without planar coils or QFM surfaces, flexibility and QA could be
achieved to an impressive degree, but the nested flux surface volumes were
unacceptably small and the coils were too complex for practical use. Adding
planar coils to this optimization created strong flexibility and QA and
increased the volume of nested flux surfaces. However, the volumes were still
smaller than desired, particularly for large $\iota$. Adding QFM surfaces
generated mixed results: the volume of nested flux surfaces was greatly
increased, but flexibility and QA decreased. The magnitude of these effects
depended strongly on the value of $\eta$.

The results surveyed in this section suggest the general, intuitive conclusion
that there is a tradeoff between flexibility, quasisymmetry, and volume of
nested flux surfaces. However, the optimization described in section 3
demonstrates that all three criteria can be achieved to reasonable degrees
simultaneously with a single set of relatively simple coils. The existence of
this coil set, which somewhat defies the tradeoff just mentioned, highlights
the abundance of local minima in the objective function. Thus, future
stellarator optimization studies likely should be started from many initial
configurations to avoid local minima.

##  6 Conclusions

We have found that there appears to be a tradeoff between flexibility,
quasisymmetry, and volume of nested flux surfaces in the context of
stellarator design. However, we have shown an NCSX-like example device that
simultaneously achieves a range of relatively large rotational transform
values on the magnetic axis which are difficult to access in QA, reasonable
quasisymmetry, and large nested flux surface volumes with a single, relatively
simple coil set. The most effective optimization formulation we identified
involved incorporating multiple rotational transform targets, planar coil
placement, and an integrability objective into the modular coil optimization.
Stellarator optimization may be improved by starting from many initial
conditions to avoid local minima.

In the future, similar work could be pursued that considers windowpane coils
to add primarily poloidal flux or attempts to achieve more than one type of
quasisymmetry with a single coil set. Other formulations could be examined
that incorporate objectives ensuring quasisymmetry to high order off-axis
[16], target integrability on several surfaces throughout the plasma volume,
or eliminate the need for an integrability objective by ensuring quasisymmetry
on a given flux surface [28]. Stochastic optimization techniques could also be
used to create coils that perform robustly even in the face of manufacturing
errors [29]. It may be beneficial to lower the weights of the coil
regularization terms. This enables coil sets to create target magnetic fields
more effectively [30], and we incidentally found that it improves flexibility.
These studies could be performed for both devices that use only electromagnets
and devices that use a combination of electromagnets and permanent magnets.
However, substantial current changes in the modular coils were required to
create flexibility in this work, which suggests that designing flexible
stellarators with permanent magnets may require changing magnet arrays. This
would likely only be feasible in small-scale experiments such as MUSE [31].

In general, we have shown evidence that stellarators may have improved
flexibility if it is accounted for in the coil design stage. It may be
possible to apply similar optimization techniques to more sophisticated
objective functions to optimize flexible stellarators that satisfy other
important design criteria not considered here, such as MHD stability, magnetic
shear, and fast ion confinement. Packages such as SIMSOPT [32] will likely
make attempting such optimizations relatively straightforward. If this
approach is carried out successfully, it could allow for more cost-effective
experimental devices to be constructed, thus accelerating progress in the
field.

## Acknowledgments

We acknowledge Florian Wechsung and Andrew Giuliani for providing the
PyPlasmaOpt code. We also acknowledge conversations with Aaron Bader on the
HSX control coils. We thank Neil Pomphrey for providing data from the previous
NCSX flexibility study. Finally, we thank the anonymous reviewers, whose
feedback was extremely helpful.

This work was made possible by funding from the Department of Energy for the
Summer Undergraduate Laboratory Internship (SULI) program. This work is
supported by the US DOE Contract No. DE-AC02-09CH11466. EJP was supported by
the Presidential Postdoctoral Research Fellowship at Princeton University.
This research was also supported by the Simons Foundation/SFARI (560651, GS
and ML).

## References

  * [1] D. A. Spong et al.  Physics issues of compact drift optimized stellarators.  Nuclear Fusion, 41:711, 2001.
  * [2] D. J. Strickler, L. A. Berry, and S. P. Hirshman.  Designing coils for compact stellarators.  Fusion Science and Technology, 41(2):107–115, 2002.
  * [3] N. Pomphrey et al.  NCSX magnetic configuration flexibility and robustness.  Fusion Science and Technology, 51(2):181–202, 2007.
  * [4] A. Reiman et al.  Recent advances in the design of quasiaxisymmetric stellarator plasma configurations.  Physics of Plasmas, 8:2083, 2001.
  * [5] D. T. Anderson.  Personal Communication, June 2021.
  * [6] S. P. Gerhardt.  Measurements and Modeling of the Plasma Response to Electrode Biasing in the HSX Stellarator.  PhD thesis, University of Wisconsin – Madison, 2004.
  * [7] J. Geiger et al.  Physics in the magnetic configuration space of W7-X.  Plasma Physics and Controlled Fusion, 57:014004, 2014.
  * [8] G. Grieger et al.  Physics optimization of stellarators.  Physics of Fluids B: Plasma Physics, 4:2081, 1992.
  * [9] A. Dinklage et al.  Magnetic configuration effects on the Wendelstein 7-X stellarator.  Nature Physics, 14:855–860, 2018.
  * [10] C. Beidler.  Personal Communication, July 2021.
  * [11] J. Kontula et al.  ASCOT simulations of 14 MeV neutron rates in W7-X: Effect of magnetic configuration.  Plasma Physics and Controlled Fusion, 63:035022, 2021.
  * [12] D. A. Spong et al.  QPS transport physics flexibility using variable coil currents.  Fusion Science and Technology, 46(1):215–223, 2004.
  * [13] A. Giuliani et al.  Single-stage gradient-based stellarator coil design: Optimization for near-axis quasi-symmetry.  Journal of Computational Physics, 459:111147, 2022.
  * [14] M. Landreman and W. Sengupta.  Direct construction of optimized stellarator shapes. Part 1. Theory in cylindrical coordinates.  Journal of Plasma Physics, 84(6):905840616, 2018.
  * [15] M. Landreman, W. Sengupta, and G. G. Plunk.  Direct construction of optimized stellarator shapes. Part 2. Numerical quasisymmetric solutions.  Journal of Plasma Physics, 85(1):905850103, 2019.
  * [16] M. Landreman and W. Sengupta.  Constructing stellarators with quasisymmetry to high order.  Journal of Plasma Physics, 85(6):815850601, 2019.
  * [17] R. L. Dewar, S. R. Hudson, and P. F. Price.  Almost invariant manifolds for divergence-free fields.  Physics Letters A, 194(1–2):49–56, 1994.
  * [18] R. H. Byrd, P. Lu, and J. Nocedal.  A limited memory algorithm for bound constrained optimization.  SIAM Journal on Scientific and Statistical Computing, 16(5):1190–1208, 1995.
  * [19] C. Zhu, R. H. Byrd, and J. Nocedal.  L-BFGS-B: Algorithm 778: L-BFGS-B, FORTRAN routines for large scale bound constrained optimization.  ACM Transactions on Mathematical Software, 23(4):550–560, 1997\.
  * [20] P. Virtanen et al.  Scipy 1.0: Fundamental algorithms for scientific computing in Python.  Nature Methods, 17(3):261–272, 2020.
  * [21] R. Sanchez et al.  Ballooning stability optimization of low-aspect-ratio stellarators.  Plasma Physics and Controlled Fusion, 42:641, 2000.
  * [22] S. P. Hirshman and J.C. Whitson.  Steepest‐descent moment method for three‐dimensional magnetohydrodynamic equilibria.  The Physics of Fluids, 26:3553, 1983.
  * [23] E. Rodriguez, W. Sengupta, and A. Bhattacharjee.  Phases and phase-transitions in quasisymmetric configuration space.  Preprint. arXiv:2202.01194.
  * [24] M. Landreman, S. Buller, and M. Drevlak.  Optimization of quasisymmetric stellarators with self-consistent bootstrap current and energetic particle confinement.  Preprint. arXiv:2205.02914.
  * [25] E. Rodriguez, W. Sengupta, and A. Bhattacharjee.  Topology-mediated approach to the design of quasisymmetric stellarators.  Preprint. arXiv:2204.10234.
  * [26] D. Williamson et al.  Modular coil design developments for the National Compact Stellarator Experiment (NCSX).  Fusion Engineering and Design, 75–79:71–74, 2005.
  * [27] V. V. Nemov, S. V. Kasilov, W. Kernbichler, and M. F. Heyn.  Evaluation of 1/$\nu$ neoclassical transport in stellarators.  Physics of Plasmas, 6(12):4622–4632, 1999.
  * [28] A. Giuliani et al.  Direct computation of magnetic surfaces in Boozer coordinates and coil optimization for quasi-symmetry.  Preprint. arXiv:2203.03753.
  * [29] F. Wechsung et al.  Single-stage gradient-based stellarator coil design: stochastic optimization.  Nuclear Fusion, 62:076034, 2022.
  * [30] F. Wechsung et al.  Precise stellarator quasi-symmetry can be achieved with electromagnetic coils.  Proceedings of the National Academy of Sciences, 119:e2202084119, 2022.
  * [31] T. Qian et al.  Simpler optimized stellarators using permanent magnets.  Nuclear Fusion, 62:084001, 2022.
  * [32] M. Landreman et al.  SIMSOPT: A flexible framework for stellarator optimization.  Journal of Open Source Software, 6:3525, 2021.