The magnetic gradient scale length explains why certain plasmas require close external magnetic coils

The separation between the last closed flux surface of a plasma and the external coils that magnetically confine it is a limiting factor in the construction of fusion-capable plasma devices. This plasma-coil separation must be large enough so that components such as a breeding blanket and neutron shielding can fit between the plasma and the coils. Plasma-coil separation affects reactor size, engineering complexity, and particle loss due to field ripple. For some plasmas it can be difficult to produce the desired flux surface shaping with distant coils, and for other plasmas it is infeasible altogether. Here, we seek to understand the underlying physics that limits plasma-coil separation and explain why some configurations require close external coils. In this paper, we explore the hypothesis that the limiting plasma-coil separation is set by the shortest scale length of the magnetic field as expressed by the ∇B tensor. We tested this hypothesis on a database of > 40 stellarator and tokamak configurations. Within this database, the coil-to-plasma distance compared to the minor radius varies by over an order of magnitude. The magnetic scale length is well correlated to the coil-to-plasma distance of actual coil designs generated using the REGCOIL method (Landreman 2017 Nucl. Fusion 57 046003). Additionally, this correlation reveals a general trend that larger plasma-coil separation is possible with a small number of field periods.


I. INTRODUCTION
Magnetic fields are used to confine plasmas at the necessary temperature and density for fusion.The external coils that generate part of these magnetic fields are subject to engineering constraints in order for the device to be feasible to build.One engineering constraint relates to the separation between the last closed flux surface of the plasma and the edge of the nearest external magnetic coil.In reactors, neutron shielding is needed between the plasma and the coils.This shielding protects the magnets from damage caused by the high energy neutrons released from fusion reactions.In addition, due to the limited tritium available worldwide, a reactor requires a breeding blanket to produce more tritium.These components require a separation of roughly 1.5 m between the last closed flux surface (LCFS) and the nearest coil, so that the there is room for both the neutron shielding and the breeding blanket. 1 In this paper, we shall refer to this distance as plasma-coil separation.
A larger plasma-coil separation also desirable since insufficient space can lead to increased costs during design and construction. 2Even in experiments without neutron shielding or a breeding blanket, miscellaneous components are installed between the plasma and the magnets with little separation in between each component.When the vacuum chamber's pressure is lowered, when the magnets are cooled to superconducting temperature, or when the magnets are energized, these components can shift and potentially collide.Additional plasma-coil clearance can allow for components to be spaced further apart, simplifying the engineering design and assembly.
Increasing the minimum plasma-coil distance has additional advantages.Low plasma-coil separation causes ripple in the field strength, which can lower confinement. 3In addition, be-cause coils must be built at a minimum clearance from the plasma, achieving a larger plasma-coil separation can counterintuitively allow for smaller reactors and hence reduced costs.One can scale down a plant design with a large plasma-coil separation until the separation is around 1.5 m.Thus, in several previous reactor studies, coil-plasma separation determines the minimum reactor size. 1,4owever, it can be difficult to optimize coils to achieve a large plasma-coil separation, especially in stellarators.Stellarator optimization is typically divided into two stages.In stage I, the boundary shape of the plasma is optimized in order to achieve properties such as confinement and stability.In stage II, the coil shapes are optimized in order to generate the target field designed in stage I, subject to engineering constraints.Due to the complex shape of a stellarator plasma, moving coils farther away during stage II optimization at a fixed field accuracy results in increased coil complexity (such as increased curvature, longer coils, and closer minimum coilcoil distance), as shown in figure 1.This concept is further elaborated later in this paper in figure 4. Conversely, increasing plasma-coil separation at a fixed coil complexity results in coils that do not reproduce the target plasma shape to a high enough level of accuracy.][7][8] However, single-stage optimization can be computationally challenging.Single-stage optimization also strongly benefits from a good initial condition.It remains valuable therefore to develop an easy-to-calculate proxy for plasma-coil separation for a given plasma shape before a detailed coil design is found.
In this paper, we explore the hypothesis that differences in plasma-coil separation between magnetic configurations can be understood in terms of scale lengths of the magnetic field.We demonstrate this relationship by comparing the magnetic gradient scale length to the plasma-coil separation for a diverse database of plasma configurations, and we show a good correlation between the two.For the coil calculations, we use the REGCOIL method, 9,10 which is convenient for performing a systematic comparison of many configurations.Because of this good correlation, we propose that the smallest magnetic gradient scale length on the surface of the plasma can be used as a proxy for the minimum plasma-coil separation.If a configuration has a small magnetic gradient scale length, it will be intrinsically difficult to find distant coils no matter what coil design code is used.
In section II, we motivate a quantitative measure of the magnetic gradient scale length, and consider this magnetic gradient scale length in model geometry.In section III A, we explain the methods used to calculate the coil configurations for the database of ∼ 40 plasma configurations in order to observe the agreement between the calculated plasma-coil separation and the magnetic gradient scale length.In section IV, we demonstrate the excellent agreement between the two lengths, and provide a discussion of the results.Finally, we conclude in section V.

II. MOTIVATION FOR THE L ∇B SCALE LENGTH
Scale lengths are a common tool in plasma physics.When deriving models, we often employ arguments involving scale lengths to determine which effects are negligible and which effects are significant.For example, when deriving the gyrokinetic or drift-kinetic equations, terms are ordered in the parameter ρ/L, where ρ is the gyroradius and L is a macroscopic scale length of the equilibrium, L ∼ n/|∇n| ∼ T /|∇T | ∼ B/|∇B|. 11or any scalar Q, it is possible to write a gradient scale length of the form One can attempt to design a scale length of similar form for the magnetic field.However, the magnetic field is not a scalar but rather a vector, and so the most useful expression for the magnetic gradient scale length is not immediately obvious.
][14][15][16] In these papers, an equation was derived for the location of a dipole source, based on the local field and its gradient: where the tensor ∇B can be expressed as a 3 × 3 matrix: Equation ( 2) can be solved to localize a magnetic source, and has applications in the field of RFID tag positioning and motion tracking. 17While this equation does further prove that the gradient of the magnetic field vector can be used for source localization, this equation assumes a single dipole-like source.Moreover, the matrix ∇B is not invertible for a straight wire, meaning (2) is a poor choice for an arrangement of coils.To find a more suitable magnetic gradient scale length, let us consider some desirable properties of it.We first would like all components of the ∇B matrix to significantly contribute to the scale length.As an example without this property, consider the possible scale length candidate Equation ( 4) can be written explicitly in terms of Cartesian components of the magnetic field vector and its gradient matrix: Consider a point (x 1 , y 1 , z 1 ) where the magnetic field is locally oriented in a single coordinate direction, i.e.B(x 1 , y 1 , z 1 ) = can be simplified to Only three of the nine elements of the ∇B matrix appear.Consider another point (x 2 , y 2 , z 2 ) where the magnetic field differs from point (x 1 , y 1 , z 1 ) only in the gradient, i.e.: Although the gradients of their magnetic vectors differ, the scale length proposed in equation ( 4) would be the same at both points.In this example, six of the nine Cartesian components of the gradient matrix would have no impact on the scale length.This behavior makes equation (4) a poor choice of a scale length.The same consideration rules out another plausible scale length, the radius of curvature of the magnetic field: where b = B/B is the unit vector in the direction of the field. 18 similar argument can be used to prove that this scale length is independent of some Cartesian components of ∇B when B is aligned with a coordinate axis.Therefore, we are motivated to instead base our scale length on a matrix norm of the gradient matrix ∇B.
Our second consideration is that the norm should be invariant to rotation of coordinates.In other words, given some unitary rotation matrix U, ∥U∇B∥ = ∥∇B∥.Norms that fulfill this property are referred to as unitarily invariant norms.Two common classes of unitarily invariant norms are Schatten 19 and Ky Fan 20 norms.For a matrix A with dimensions m × n, the Schatten-p norm is defined as and the Ky Fan-k norm is defined as where σ i is the i-th singular value of A, p ≥ 1, and 1 ≤ k ≤ n.
The most common unitarily invariant norm is Frobenius norm: where a i j are the elements of A. Note that for the gradient of a magnetic field, the Frobenius norm is equivalent to the Schatten-2 norm in a vacuum field.In a vacuum field, the magnetic field B is curl-free and so B = ∇Φ for some scalar potential Φ. Therefore,∇B = ∇∇Φ, which is manifestly symmetric.While the Frobenius norm is not the only unitarily invariant norm, we will adopt it in this work for simplicity.Thus, given our two criteria for the magnetic scale length -a significant contribution from each component of the ∇B matrix and rotational invariance -we are led to the following formula for the magnetic gradient scale length: The √ 2 factor is explained below.An alternative candidate scale length is where σ i are the 3 singular values of the matrix ∇B.However, in a current-free field, ∇B is symmetric, so equations 12 and 13 are equivalent.2][23] In Appendix B, we compare equation ( 12) to alternative possible measures of a magnetic gradient scale length.
To develop a geometric intuition of L ∇B , let us look at the example of a magnetic field generated by an infinite straight wire.The magnetic field in cylindrical coordinates (R, φ , z) is where I is the current of the wire, and the hat symbols indicate unit vectors.Because of its simplicity, the model geometry of straight wire is a good initial test of the effectiveness of the L ∇B scale length.Let us determine the scale length analytically: Therefore, at any point in the magnetic field, L ∇B is equal to the distance away from the straight wire.This relationship is shown in figure 2. The factor of √ 2 was included in equation ( 12) to rescale L ∇B so that it is equivalent with the distance to a wire in this reduced model.Note that equation (17) does not require knowing where the coil is located, only local measurement of B and ∇B.This property means that we can use these two quantities to approximate the distance to the nearest coil.See Appendix A for a discussion of L ∇B for the magnetic field of a circular wire.

A. Requirements for Unique Coil Optimization
In order to verify the accuracy of L ∇B as a proxy for the plasma-coil separation, we compare L ∇B to the plasma-coil sep- aration of stage II optimized stellarator configurations.However, the coils that generate a given plasma shape are not unique.Given a magnetic field B(x) which is only known within a region that is a finite distance away from the current-carrying source, for any δ > 0 there exists an infinite number of current arrangements to generate B up to an error ε < δ . 9To ensure a unique coil arrangement, we must establish additional constraints, such as some measure of coil complexity.
There are multiple methods commonly used to compute the shapes of stellarator coils.The most prominent two are filamentary coil methods and current potential methods.In filamentary coil methods, such as the code FOCUS, 24 each coil is parameterized as a curve, allowing for optimization in 3-D space.However, the objective functions of these codes have multiple local minima, so results are dependent on the initial set of parameters.Also, these methods can have a significant number of adjustable parameters, such as scalarization weights and the number of coils.These aspects make it difficult to compute coil shapes in an automated and systematic way for a wide variety of plasma configurations.Current potential methods, like REGCOIL, define some preset winding surface on which the coils can lie.These methods optimize the current potential on this surface, and then calculate the coil shapes using contours of the current potential.
For this paper, we use the REGCOIL method. 9,10REGCOIL, compared to its precursor NESCOIL, 25 includes a ridge regression in the current density.Ridge regression not only reduces overfitting, but also ensures the minimum of the loss function in not underdetermined, which guarantees that any local minimum is a unique global minimum.Here we present an overview of REGCOIL's methods. 9One initializes an infinitely thin winding surface surrounding the plasma.For simplicity, in this paper we define each winding surface to be the surface that is a uniform offset distance L from the plasma surface.One can parameterize the current potential on the winding surface as a Fourier series: where θ ′ and φ ′ are the poloidal and toroidal coordinates on the winding surface, G is the total poloidal current, I is the total toroidal current, and assuming stellarator symmetry.For modular coils, I = 0. From this current potential, we calculate the current density: where n ′ is the normal vector on the winding surface.It is then possible to find the magnetic field at any point in space via the Biot-Savart law: REGCOIL's aim is to find Fourier amplitudes of the potential Φ j which minimize the objective function f : where θ and φ are the poloidal and toroidal coordinates on the plasma surface, n is the normal vector on the plasma surface, and λ is a regularization parameter.The first term is the Therefore, this term is a measure of disagreement between the magnetic field generated by the external coils and the magnetic field of the target configuration.The second term is a measure of the current density K over the winding surface, which acts as a L 2 regularizer to constrain the otherwise underdetermined system.K is also a measure of coil complexity, as we discuss further below.Minimizing the objective function will result in coils that generate the desired shape for the LCFS with minimal coil complexity.
To calculate the current on the winding surface, we need to specify only two parameters, the plasma-coil separation L and the regularization parameter λ .We choose L and λ so that the resulting coils fulfill two constraints.Let us define the quadratic flux normalized to the surface area of the plasma: where A plasma is the surface area of the last closed flux surface.Ideally, the normalized quadratic flux is 0 T, but due to the penalty on current density in the objective function, the optimal stage-II magnetic field will not exactly match the stage-I optimized magnetic field.For the results that follow, we chose λ so that B * RMS = 0.01 T, with all configurations scaled to an average field strength in the plasma of 5.865 T. The value 0.01 T was chosen as it is low enough to achieve closed flux surfaces that match the target last closed flux surface, as shown in figure 3a.
Let us also define the largest magnitude of the current density K on the winding surface as ∥K∥ ∞ .The plasma-coil separation L is adjusted so that ∥K∥ ∞ equals a target value ∥K∥ * ∞ .This constraint has two useful properties.First, increasing plasmacoil separation while fixing B * RMS smoothly increases ∥K∥ ∞ as shown in figure 4.This means the target ∥K∥ * ∞ will be associated with a unique plasma-coil separation, which can be found using root-finding.Second, on a winding surface, a higher current density results in lower coil-coil separation, which is a common measure of coil complexity. 27To understand why, consider N coils which approximate the current sheet on a winding surface.Via Lagrange's identity, ∥K∥ = ∥∇Φ∥.Let us assume the total poloidal current I pol is distributed uniformly among the coils, so the current in each coil is I pol /N, where N is the number of coils.In the limit of a large number of coils, the current density can be expressed in terms of the distance between coils d cc : In the case of a finite number of coils, this formula remains a good approximation when d cc is small.Therefore, The maximum current density ∥K∥ ∞ and its dependence on the plasma-coil separation L for the winding surface of a precise QH configuration.For each plasma-coil separation, REGCOIL computes the current potential Φ on the winding surface that achieves a target B RMS = 0.01 T. With this constraint, there is a monotonic relationship between ∥K∥ ∞ and L, so a ∥K∥ ∞ equality constraint will result in a unique solution for L.
where d min is the minimum coil-coil distance.To choose ∥K∥ * ∞ , we considered values that have been proposed in detailed engineering studies.For example, in ARIES-CS, there are 18 coils (3 unique coils per half field period) and the minimum coil-coil separation is 77.32 cm. 1 Using equation (24), this separation is equivalent to a maximum current density of 17.16 MA/m.Therefore, we vary L so that ∥K∥ ∞ = 17.16MA/m.

B. Additional Methods for finite β Configurations
Before we can calculate L ∇B and the optimized plasma-coil separation L REGCOIL , we need to calculate two additional terms when β , the ratio of plasma to magnetic pressure, is nonzero.This complication arises because in this case the magnetic field is not generated only by currents in the external coils, and the current from the plasma may complicate the relationship between L ∇B and the plasma-coil separation.Therefore, for this paper we will be careful to decompose the total magnetic field B into the magnetic field from the coils B coils , and the magnetic field from the plasma, B plasma : To compute L ∇B , we use the virtual casing method to calculate B coils on the LCFS. 28,29To summarize the virtual casing approach, B coils is computed using a magnetic method of images to match the boundary conditions on the plasma surface.
As a result, we can find a solution for B coils on the last closed flux surface δ Ω : where p is a point on the LCFS.We used the package VIRTUAL_CASING 30,31 via SIMSOPT 32,33 in order to calculate B coils and ∇B coils , which we then used to calculate L ∇B via equation (12).
A similar issue is present in optimizing the external coils using REGCOIL.REGCOIL's objective function in equation ( 21) uses the total magnetic field B as in equation (25).Therefore, we must find B plasma .REGCOIL is interfaced to the BNORM code from the STELLOPT suite, 34 which calculates B plasma using data from a VMEC file. 35Then B coils is added to B plasma to calculate the objective function 21 using equation (25).and the coil arrangements found by REGCOIL.Here L REGCOIL is 1.7960 m, as this value was found to be the required plasma-coil separation to satisfy the accuracy and complexity constraints.The red dot is located where L ∇B is smallest.

C. Summary of Optimization Methods
Given these additional considerations, we now summarize the process of computing the coil-plasma distance with REGCOIL and comparing the result with L ∇B .We first choose an initial λ and L. If β > 0, we must also compute B plasma using BNORM.We then construct a winding surface offset from the plasma by a uniform distance L. We then compute the amplitudes Φ j in the Fourier series of the current potential Φ on the winding surface in order to minimize the loss function f in equation (21).We then perform a search over the regularization parameter λ so that the normalized quadratic flux constraint RMS is fulfilled.We found that 0.01 T was sufficient to match the target LCFS, as shown in figure 3a.We then scan over L to fulfill the maximum current density constraint, ∥K∥ * ∞ = 17.16MA/m.We refer to the optimized plasma-coil separation subject to these constraints as L REGCOIL .Refer to figure 5 for a flowchart depicting the optimization process.We checked the numerical resolution needed to ensure convergence of L RECOIL .We determined that for these parameters, sufficient convergence was achieved when the number of poloidal modes m j and toroidal modes n j used to represent the current potential both equal 20, and the number of grid points in each angle necessary to discretize the surface area integrals (referred to within REGCOIL's code as ntheta_coil, nzeta_coil, ntheta_plasma, and nzeta_plasma) all equal 96.We also calculate the magnetic gradient scale length for the plasma configuration.We first calculate B coils and ∇B coils using VIRTUAL_CASING in SIMSOPT if β > 0. We then calculate L ∇B on a high resolution grid of points on the LCFS.
In Appendix C, we describe the method of converting from flux coordinates (like the coordinates used in VMEC 35 ) to Cartesian coordinates in order to calculate the Frobenius norm.We define as the smallest value of L ∇B on the LCFS, δ Ω.
We show an example of the optimized coil arrangement and L ∇B for one configuration, the precise QH stellarator, 26 in figure 6.

IV. RESULTS AND DISCUSSION
We have gathered a database of over 40 plasma configurations.These configurations are listed in Appendix D. The database includes quasi-axisymmetric stellarators, quasihelical stellarators, quasi-isodynamic stellarators, tokamaks, and other miscellaneous stellarators.The VMEC files of these configurations and supplemental data have been made available on Zenodo. 36For a fair comparison, all configurations have been scaled to the minor radius of the reactor-scale ARIES-CS configuration, a = 1.704 m. 1 (If the configurations are all scaled to the same major radius instead of minor radius, the results that follow are not qualitatively different.)The volume averaged magnetic field of each configuration in our database is also scaled to the volume averaged magnetic field of ARIES-CS, 5.865 T. Interestingly, the calculated L REGCOIL varies by a factor of 10 across the database.Evidently, there are significant differences among configurations in the feasibility of attaining large coil-plasma separation.Figure 7 compares the minimum L ∇B for each configuration with the plasma-coil separation obtained via REGCOIL.A strong correlation between these two quantities is evident; the correlation coefficient R 2 = 0.941.It is noteworthy that the correlation of figure 7 is insensitive to the target ∥K∥ * ∞ and B * RMS we choose.Changing either of these constraints within a plausible range changes only the slope and intercept of the linear regression between L ∇B and L REGCOIL , but has little effect on the strength of the correlation.This correlation is also insensitive to the exact formulation of the magnetic gradient scale length.In section II, we considered some alternative scale lengths to L ∇B .In Appendix B, we present similar figures to figure 7 calculated with these alternate scale lengths.These scale lengths have slightly weaker correlation with L REGCOIL compared to L ∇B , but are generally still well correlated.
As can be seen in Appendix D, there is a trend that the largest coil-plasma distances are possible only with a small number of field periods.Indeed, the two configurations with the largest plasma-coil separation have a single field period, and the next seven configurations with the largest plasma-coil separation all have two field periods.
Another noteworthy result is that the optimized current density K on the winding surface and L ∇B calculated on the LCFS are often correlated spatially.For example, in figure 8 we have presented overlapping contour plots for K and L ∇B for one configuration.The two angles on the winding surface (θ ′ , φ ′ ) are defined so that for a position vector r ′ on the winding surface, where r is the position vector on the LCFS at the associated point (θ , φ ), and n is the outward unit normal vector on the LCFS.For many configurations, the position of maximum current density ∥K∥ ∞ and the position of the smallest scale length L * ∇B coincide.Spatial correlation of the contours is strongest near the limiting point (largest ∥K∥ ∞ and smallest L ∇B ), weaker in regions of lower ∥K∥ and larger L ∇B .There is usually weaker spatial correlation in configurations that are relatively far from the linear regression line in figure 7. We also found a strong spatial correlation between the location of ∥K∥ ∞ and the position of highest radius of curvature, equation (8).The points of largest ∥K∥ ∞ , smallest L ∇B , and smallest radius of curvature are usually in the inside curve of the beanshaped cross-section, as shown in figure 6.This relationship matches conventional wisdom that coil engineering constraints are hardest to satisfy in this region.
We should note that the shift caused by accounting for nonvacuum magnetic fields was relatively small.If we do not correct for the difference between B and B coils , both L ∇B and L REGCOIL only shift slightly.This shift is small because the database we used only contained configurations with β ≤ 5%.Therefore, B plasma was an order of magnitude less than B coils .There may be a more significant shift in configurations with higher β .
As figure 7 shows, a number of configurations have some deviation from the linear regression.Some of these configu-rations have properties that suggest why L ∇B or L REGCOIL for these configurations may not lie on the best-fit line.For example, one point that is somewhat below the best-fit line is the ITER tokamak 37 .This configuration may lie off the trend line because REGCOIL cannot match the target B RMS , which vanishes for axisymmetric configurations.
Another property that is present among some outliers is coil ripple.For example, the point furthest above the best-fit line is an HSX configuration 38 that includes ripple from its 48 modular coils.We compared this standard HSX configuration to an HSX variant in which the ripple was removed.The shape of HSX's last closed flux surface is defined by a Fourier series, where m and n are the poloidal and toroidal mode numbers, respectively, and n f p is the number of field periods.To create the HSX variant, we truncate any boundary mode with n > 4, which smooths out the field.For this HSX variant, the stage II optimized coils can be placed farther away, and the ripple-less HSX configuration better matches the linear regression.This may point to a limitation in L ∇B .The magnetic field of HSX only differs from ripple-less HSX on small spatial scales, while L ∇B primarily captures large spatial scales.Since additional gradients magnify small spatial scales, it may be worthwhile to consider alternative scale lengths based on ∇∇B.
A final group of outlier configurations in figure 7 is associated with relatively large errors in the VMEC solution.Because L ∇B is calculated using data from VMEC, the VMEC solution must be accurate.We can check the accuracy of these solutions by measuring Tr(∇B), which should be 0 everywhere, or ∇B − (∇B) T , which should be 0 in a vacuum.These quantities differ from zero significantly in some of the configurations that are outliers in figure 7.For example, the CTH configuration with high rotational transform, 39 which is the configuration that is farthest from the line of best fit, has a ∥∇B − (∇B) T ∥ F = 0.19∥∇B∥ F .For configurations such as this one with large ∥∇B − (∇B) T ∥ F , we were unable to obtain satisfactory VMEC solutions at higher resolution, since at higher resolution it is hard to achieve small values of the MHD force residual.This issue is likely specific to VMEC, so these configurations might lie closer to the best-fit line in figure 7 if another equilibrium code was used instead.

V. SUMMARY AND FUTURE WORK
Over the course of this paper, we explored the magnetic gradient scale length and its connection to plasma-coil separation.Since a magnetic field decays with distance from the source, the source cannot be much farther than this scale length.The distance to a source is exactly the L ∇B scale length in the case of an infinite straight wire.
We calculated the minimum magnetic gradient scale length for a wide variety of over 40 plasma configurations, and found it to correlate strongly with the coil-plasma separation, for fixed magnetic field accuracy and coil complexity.For a given configuration, the point of minimum magnetic scale length is typically located on the inside of the bean-shaped crosssection of the plasma, where coil complexity is typically greatest.These observations support the use of L ∇B as a measure of the intrinsic difficulty of producing a given magnetic field with distant coils.We can now understand why it is difficult to find stage-II coil solutions far from the plasma for certain plasma configurations: if the configuration has a small L ∇B , it will be hard to find distant coils no matter what specific coil design code is used.
We observe a general inverse relationship between the number of field periods and the plasma-coil separation.In particular, the nine configurations with largest coil-to-plasma distance compared to the minor radius all have only one or two field periods.This makes one-or two-field-period configurations attractive for reactors, where a blanket and neutron shielding are required between the coils and plasma.
We plan on further studying the nature of the magnetic gradient scale length L ∇B .There is also merit in studying the norm of ∇∇B, which is a rank 3 tensor.However, ∇∇B may be more susceptible to the noise in the magnetic field due to discretization error in the MHD equilibrium solution.In the future, we would like to study how the slope of the linear regression of figure 7 changes as B * RMS and ∥K∥ * ∞ change.In addition, it would be natural to try including L ∇B in the objective functions of Stage I optimizations (i.e., optimizing the plasma shape without explicitly considering coil shapes), with the goal of increasing the plasma-coil separation.Compared to REGCOIL or other coil design codes, using L ∇B to approximate plasma-coil separation requires few assumptions, since we do not have to set constraints on the quadratic flux accuracy or the highest current density.In addition to L ∇B taking less time to calculate than plasma-coil separation, it is easier to differentiate through L ∇B , which would further shorten optimization time.Using the same logic, We can then use the chain rule to find We can substitute these formulas into equation (C6) in order to calculate ∂ B x /∂ x, ∂ B x /∂ y, and ∂ B x /∂ z.We can use similar steps to calculate any of the other six elements of the matrix ∇B.

FIG. 1 :
FIG. 1: Using REGCOIL, coils are calculated at constant distances of (a) 25 cm, (b) 50 cm, and (c) 65 cm away from the last closed flux surface to create the magnetic field for the W7-X plasma (which has a minor radius of a = 53 cm).The generated flux surfaces all have a fixed B RMS error of 0.02 T. At higher offset distances, the coils have increased complexity.
FIG. 2: (a) A For an infinite straight wire, the L ∇B scale length calculated from the local magnetic field (for example the red dot) is the distance to the wire.One can compute L ∇B without knowing the location of the wire.(b) At any point around the wire (represented by the gray dot), we can use L ∇B to find the distance to the wire by only measuring B and ∇B at one point.

FIG. 3 :
FIG. 3: Poincare plots of the precise quasi-helical (QH) stellarator configuration 26 scaled to a = 1.704 m and volume averaged B = 5.865 T. The coils for these plots were computed by REGCOIL on a winding surface offset from the plasma surface by 1.796 m.The coils are optimized to achieve a target B RMS of (a) 0.01 T, (b) 0.1 T, and (c) 0.5 T. The black dotted line is the target boundary surface.At high B RMS , the flux surfaces of the Poincare plot do not match the target flux surface.
FIG.4:The maximum current density ∥K∥ ∞ and its dependence on the plasma-coil separation L for the winding surface of a precise QH configuration.For each plasma-coil separation, REGCOIL computes the current potential Φ on the winding surface that achieves a target B RMS = 0.01 T. With this constraint, there is a monotonic relationship between ∥K∥ ∞ and L, so a ∥K∥ ∞ equality constraint will result in a unique solution for L.

FIG. 5 :
FIG.5:A flowchart depicting the iterative stage II optimization via REGCOIL to achieve the necessary coil constraints.

FIG. 7 :
FIG.7:For a wide range of plasma configurations scaled to a minor radius of 1.704 m, we used REGCOIL to perform stage II coil-optimization (subject to constraints in field accuracy and coil complexity).The plasma-coil separation found (labeled L REGCOIL ) has a strong correlation with the smallest value of L ∇B evaluated on the surface.

FIG. 8 :
FIG.8: Two contour plots are overlaid for the precise QH stellarator and the coil solution of figure6.The filled-in contours indicate L ∇B on the plasma surface.The unfilled contours depict the current density K on the winding surface, determined as described in section III A. The locations of smallest L ∇B and largest K coincide, at the inside of the bean cross-section.This spatial correlation is strongest in configurations close to the linear regression line in figure7.

FIG. 9 :
FIG.9:The L ∇B scale length for the magnetic field generated by a circular wire.The circle has a radius of 1 m and lies in the x-y plane.Grey dots signify the location of the wire.

FIG. 10 :FIG. 11 :
FIG.10:A comparison of magnetic gradient scale lengths for the precise QH plasma configuration.26For clarity, the colormap is bounded so that any scale length larger than 20 m is truncated to 20 m.