# 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

## Enhancements / extensions of the code

• DIAGNO, [4] to calculate the response of magnetic diagnostics
• MFBE [5]
• STELLOPT [6]