w7x
Overview
The w7x package is a simulation framework that defines interfaces for simulation codes with interchangeable backends, computation pipelines in a directed acyclic graph. It provides access to simulation codes that does not require the user to be a domain expert of the specific codes and will take care about particularities (like binary installation, sanity checks, output files/format, passing on the output to follow-on codes etc).
The package is named after the Wendelstein 7-X stellarator, but it is generic enough to be used for any magnetic confinement fusion device.
Usage
import w7x
vmec.strategy = "local" # interchangeable
with w7x.distribute(True):
graph = vmec.free_boundary(state)
graph = extender.field(graph)
graph = flt.trace_poincare(
graph,
**params
)
graph = w7x.State.merged( # parallel
graph,
comps.mesh_slice(state, phi=phi)
)
state = w7x.compute(graph, **kwargs)
state.save("my_state.dill")