Skip to content

Add a VMEX interoperability example - #62

Draft
rogeriojorge wants to merge 8 commits into
mainfrom
docs/vmex-interop
Draft

rogeriojorge wants to merge 8 commits into
mainfrom
docs/vmex-interop

Conversation

@rogeriojorge

@rogeriojorge rogeriojorge commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

Add an ESSOS-to-VMEX example: tabulate the coil field, solve a free-boundary equilibrium, write its wout, and trace field lines with ESSOS. README and getting-started links show the workflow.

The example uses released VMEX 0.6.0 APIs. Measured rotational transform at s=0.5 is 0.417488 from tracing versus 0.417531 from the equilibrium. A full CPU run and headless run completed; the recorded 79-test suite passed with one expected failure. Python 3.10–3.12 CI passes.

GPU execution was not tested. The tabulation wrapper can use MgridField.from_coils when the minimum VMEX version is updated.

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@rogeriojorge
rogeriojorge marked this pull request as draft October 3, 2026 03:55
ESSOS optimizes coils; the equilibrium those coils hold is what VMEX
(pip install vmex) solves. The two meet without either importing the other,
but nothing in the repository showed how.

examples/simple_examples/equilibrium_from_coils_vmex.py takes the bundled
Landreman-Paul QA Coils, tabulates their Biot-Savart field onto the
cylindrical grid VMEX's free-boundary solver consumes, solves the vacuum
free boundary, reads the result back as an essos.fields.Vmec and traces
field lines through it. The rotational transform it measures agrees with
VMEC's own iotaf to 1e-4 relative.

Uses only released VMEX 0.6.0 (MgridField.from_cartesian_field,
scale_input, solve_free_boundary, wout_from_state, write_wout), so it runs
against the published wheel.

README and getting_started gain a short section pointing at it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant