Tutorials

These tutorials provide step-by-step guides for running VMEC++ and troubleshooting common issues:

  • Fixed-Boundary Equilibrium Tutorial: Learn how to set up and run fixed-boundary equilibria, with recommended settings for stability analysis (lbsubs), boundary representation (spectral condensation), and weakly shaped configurations (like QA).

  • Free-Boundary Equilibrium Tutorial: Learn how to set up and run free-boundary equilibria with external coil fields, including both MGRID files and in-memory response tables.

  • Troubleshooting and Debugging Common Failures: Practical advice for diagnosing stalled or unstable solves, including tuning delt, handling strongly shaped free boundaries near islands or separatrices, and checking Jacobian errors.

  • Post-Processing wout Quantities: How to read the wout arrays (full vs half grid, mode layout, signs), convert between Fourier and real space, and take radial derivatives, including the regularized odd-m derivative. Points to SIMSOPT’s vmec_compute_geometry as a larger example.

  • Fourier Basis Implementation in VMEC++: How VMEC++ implements Fourier transforms and basis conversions, including the internal product basis versus the external combined basis (rmnc, zmns), and the DFT with pre-computed basis arrays.