# VMEC

The three-dimensional Variational Moments Equilibrium Code (VMEC) minimizes the energy functional

- $ W = \int_{\Omega_p}{ \left ( \frac{1}{2 \mu_0} B^2 + p \right ) dV} $

over the toroidal domain Ω_{p}. The solution is obtained in
flux coordinates
(*s*, *θ*, *ζ*), related to the cylindrical coordinates
(*R*, *φ*, *Z*) by

- $ R = \sum{R_{mn}(s) \cos( m\theta - n\zeta)} $

- $ Z = \sum{Z_{mn}(s) \sin( m\theta - n\zeta)} $

The code assumes nested flux surfaces.
^{[1]}
^{[2]}

## Uses of the code

Due to its speed in computing the MHD equilibrium problem in 3-D it has become the "de facto" standard code for calculating 3-D equilibria. This means that practically all the laboratories
with stellerator devices routinely use it. It has also been used to model tokamak equilibria and lately (2010) it has been applied to reverse field pinches, in particular helical equilibria (non-axisymmetric) in the RFX-Mod.
^{[3]}

The code is being used at fusion laboratories all over the world:

- ORNL, Oak Ridge, TN, USA (code origin)
- PPPL, Princeton, NJ, USA
- IPP, at Garching and Greifswald, Germany
- CRPP, Lausanne, Switzerland
- NIFS, Toki, Japan
- RFX, Padova. Italy
- HSX, Madison, WI, USA
- LNF, Madrid, Spain

## Enhancements / extensions of the code

- DIAGNO,
^{[4]}to calculate the response of magnetic diagnostics - MFBE
^{[5]} - STELLOPT
^{[6]}

## See also

## References

- ↑ S.P. Hirschman et al,
*Steepest-descent moment method for three-dimensional magnetohydrodynamic equilibria*, Phys. Fluids**26**(1983) 3553 - ↑ S.P. Hirschman et al,
*Three-dimensional free boundary calculations using a spectral Green's function method*, Computer Physics Communications**43**, 1 (1986) 143-155 - ↑ D. Terranova et al.,
*Self-Organized Helical Equilibria in the RFX-Mod Reversed Field Pinch*, Contributions to Plasma Physics**50**(2010) 775–779 - ↑ H.J. Gardner,
*Modelling the behaviour of the magnetic field diagnostic coils on the W VII-AS stellarator using a three-dimensional equilibrium code*, Nucl. Fusion**30**(1990) 1417 - ↑ E. Strumberger,
*Finite-β magnetic field line tracing for Helias configurations*, Nucl. Fusion**37**(1997) 19 - ↑ D.A. Spong et al.,
*Physics issues of compact drift optimized stellarators*, Nucl. Fusion**41**(2001) 711