Hostname: page-component-89b8bd64d-r6c6k Total loading time: 0 Render date: 2026-05-08T18:09:55.972Z Has data issue: false hasContentIssue false

The DESC stellarator code suite. Part 1. Quick and accurate equilibria computations

Published online by Cambridge University Press:  18 May 2023

D. Panici
Affiliation:
Princeton University, Princeton, NJ 08544, USA
R. Conlin
Affiliation:
Princeton University, Princeton, NJ 08544, USA
D.W. Dudt
Affiliation:
Princeton University, Princeton, NJ 08544, USA
K. Unalmis
Affiliation:
Princeton University, Princeton, NJ 08544, USA
E. Kolemen*
Affiliation:
Princeton University, Princeton, NJ 08544, USA
*
Email address for correspondence: ekolemen@princeton.edu
Rights & Permissions [Opens in a new window]

Abstract

Three-dimensional equilibrium codes are vital for stellarator design and operation, and high-accuracy equilibria are also necessary for stability studies. This paper details comparisons of two three-dimensional equilibrium codes: VMEC, which uses a steepest-descent algorithm to reach a minimum-energy plasma state, and DESC, which minimizes the magnetohydrodynamic (MHD) force error in real space directly. Accuracy as measured by satisfaction of MHD force balance is presented for each code, along with the computation time. It is shown that DESC is able to achieve more accurate solutions, especially near axis. The importance of higher-accuracy equilibria is shown in DESC's better agreement of stability metrics with asymptotic formulae. DESC's global Fourier–Zernike basis also yields solutions with analytic derivatives explicitly everywhere in the plasma volume, provides improved accuracy in the radial direction versus conventional finite differences and allows for exponential convergence. Further, DESC can compute a solution with the same accuracy as VMEC in order-of-magnitude less time.

Information

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

Figure 1. Pressure and rotational transform profiles used as inputs for the fixed-boundary W7-X standard configuration equilibria computed in this paper.

Figure 1

Figure 2. Plots of W7-X flux-surface average of normalized force error versus $\rho$ with different radial derivative methods. All have angular resolution of $M=N=16$ and ${\rm NS}=1024$ flux surfaces.

Figure 2

Figure 3. Parallel current density plotted versus normalized toroidal flux $s$ at $u=v=0$ for a W7-X-like equilibrium solved in VMEC with $M=N=16$ and ${\rm NS}=512$. Also shown are the low-order rational surface locations, as well as the locations of the spikes in the force error shown in figure 2.

Figure 3

Figure 4. Physical constraint on Fourier coefficients near axis, where an analytic function's Fourier series coefficients should scale as $\rho ^m$ as they approach the origin (Lewis & Bellan 1990). Note the diverging of the VMEC coefficients when divided by $\rho ^m$ as the axis is approached, indicating that they do not satisfy this analyticity constraint, leading to unphysical modes near axis.

Figure 4

Figure 5. Spectral width ($p=q=2$) of the VMEC and DESC spectra for a W7-X equilibrium. It can be seen that DESC, while not explicitly enforcing any poloidal angle constraints, ends up finding an optimal representation through the course of the optimization procedure. The equilibrium solved is the W7-X standard configuration at $\beta =2\,\%$ with $M=N=16$ angular resolution, $ns=2048$ for the VMEC solution and $L=16$ for the DESC solution.

Figure 5

Figure 6. Pressure and rotational transform profiles used as inputs for the fixed-boundary D-shaped equilibria computed in this paper.

Figure 6

Table 1. Expected convergence with respect to each resolution parameter for VMEC and DESC.

Figure 7

Figure 7. The D-shaped $M=16$ error convergence with increasing radial resolution in VMEC, on a log–log scale. Note the first-order convergence rate, due to the first-order finite differences used in the radial direction.

Figure 8

Figure 8. The D-shaped $M=16$ error convergence for increasing radial resolution in DESC, on a semi-log scale. Note that the linearity here is indicative of exponential convergence.

Figure 9

Figure 9. Flux surfaces for a VMEC ($ns=1024$, $M=16$) and a DESC ($L=M=16$) D-shaped equilibrium solution.

Figure 10

Figure 10. Flux surfaces for a VMEC ($ns=1024$, $M=N=16$) and a DESC ($L=M=N=16$) W7-X equilibrium solution.

Figure 11

Figure 11. The W7-X flux-surface average of normalized force error versus $\rho$ for increasing VMEC angular resolution (all with radial resolution of 1024 flux surfaces) along with DESC solution. Second-order finite differences were used for the radial derivatives in the VMEC force error calculation. The inset shows that the error spikes occur at the same radial position for each VMEC solution shown, independent of resolution.

Figure 12

Figure 12. Scatter plot of average force error versus runtime of W7-X finite-beta DESC and VMEC solutions at various resolutions, plotted along with linear fits of the results for each code. All calculations were run on the same hardware (32 GB RAM on a single AMD EPYC 7281 CPU). Note that for a given time to solution, DESC has generally an order-of-magnitude lower error, as seen by the best-fit lines for the results from each code.

Figure 13

Table 2. Solution parameters scanned over in obtaining the results shown in figure 12. Index refers to the spectral indexing scheme of the Zernike polynomials, which affects the radial resolution for a given $L$ and $M$ (Loomis 1978; Genberg et al.2002).

Figure 14

Figure 13. Pressure and rotational transform profiles of the quasi-helical equilibrium DESC solution ($L=M=12$, $N=12$).

Figure 15

Figure 14. Flux surfaces for the VMEC ($ns=801$, $M=N=10$) and a DESC ($L=M=12$, $N=10$) quasi-helical equilibrium solution.

Figure 16

Figure 15. Mercier stability calculated from VMEC equilibria of increasing radial resolution, as compared with a DESC equilibrium of $L=12$. Both codes were run with toroidal resolution of $N=10$ and poloidal resolution of $M=12$. The DESC solution compares much better with the asymptotic value of $D_{{\rm Merc}}$ near the axis, while the VMEC solution even with high resolution fails to resolve the stability near the axis.

Figure 17

Figure 16. Normalized force error flux-surface average of the VMEC and DESC equilibria corresponding to the calculations in figure 15.

Figure 18

Figure 17. First radial derivative of RMNC $m=3$ $n=1$ coefficient (found with finite differences) for W7-X $M=N=16$ with $ns=512$.

Figure 19

Figure 18. Second radial derivative of RMNC $m=3$ $n=1$ coefficient (found with finite differences) for W7-X $M=N=16$ with $ns=512$.

Figure 20

Figure 19. The W7-X flux-surface average of normalized force error versus $\rho$ for increasingly tighter solver tolerance (all with angular resolution of $M=N=16$ and ${\rm NS}=1024$ flux surfaces). Second-order finite differences were used as the radial derivative in calculating the force error.

Figure 21

Figure 20. The W7-X flux-surface average of normalized force error versus $\rho$ for increasing VMEC angular resolution (all with radial resolution of ${\rm NS}=1024$). Second-order finite differences were used as the radial derivative in calculating the force error.

Figure 22

Figure 21. The W7-X flux-surface average of normalized force error versus $\rho$ for increasing VMEC radial resolution (all with angular resolution of $M=N=16$). The force error does not decrease appreciably past 1024 surfaces for most of the plasma volume, and the error spikes near the edge increase in size as NS increases. Second-order finite differences were used as the radial derivative in calculating the force error.

Figure 23

Figure 22. The W7-X flux-surface average of normalized force error versus $\rho$ for increasing DESC angular and radial resolution. The ANSI Zernike indexing pattern was used (Dudt & Kolemen 2020).

Figure 24

Figure 23. VMEC results labelled with FTOL, showing that low FTOL results in stagnation in error decrease with increasing resolution, as expected.