GVEC is an open-source software for the generation of three-dimensional ideal MHD equilibria.
Ideas are strongly based on VMEC (Hirshman & Whitson, 1983).
Installable with pip. Python bindings for running, postprocessing and integration with other tools.
Radial discretization using B-Splines of arbitrary polynomial degree. Fourier series in poloidal and toroidal direction with different maximum modenumber for each variable.
Initialize with a VMEC netCDF output or interface with other codes: JOREK, CASTOR3D, GENE…
Choice of the mapping \((X^1,X^2,\zeta) \mapsto (x,y,z)\), not restricted to \((R,Z,\phi)\), but e.g. a generalized Frenet frame.
Use of modern object-oriented Fortran
The magnetic field of a two-fieldperiod QI-stellarator configuration (configuration taken from Hindenlang et al. (2025)).#
Citing GVEC#
If you use GVEC in your work, please cite:
Hindenlang et al., (2026). GVEC: A flexible 3D MHD equilibrium solver. Journal of Open Source Software, 11(120), 9670, doi:10.21105/joss.09670
To cite a specific version of GVEC, you can use the corresponding archive on Zenodo.
Statement of need#
MHD equilibrium solutions are the basis for a number of high fidelity plasma physics models and associated codes. For example, they provide the initial conditions for linear and nonlinear MHD solvers (e.g. CASTOR3D (Puchmayr et al., 2023), CAS3D (Schwab, 1993), Jorek3D (Nikulsin et al., 2022), Struphy (Holderied et al., 2022), M3D-C1 (Jardin, 2004)), or the magnetic field for particle orbit tracing (e.g. SIMPLE (Albert et al., 2020)) and turbulence simulations (e.g. BOUT++ (Shanahan et al., 2024), GENE (Bañón Navarro et al., 2020)). 3D MHD equilibria are directly used to analyse potential stellarator configurations in optimisation frameworks, such as SIMSOPT (Landreman et al., 2021) or STELLOPT (Lazerson et al., 2020).
GVEC has a flexible coordinate frame, allowing it to represent boundary shapes beyond those possible with the standard cylindrical coordinates used by many equilibrium codes. This can be used for example to optimise the boundary shape of the figure-8 stellarator in Plunk et al. (2025).
Contact#
GVEC is being developed in the department of Numerical Methods in Plasma Physics (NMPP) led by Prof. Eric Sonnendruecker at the Max Planck Institute for Plasma Physics in Garching, Germany.
The list of contributors is found in List of Contributors.