Framework for optimizing stellarators
Actively maintained. Last release 3 months ago, commits in 19 of the last 26 weeks. A safe choice.
pip install simsoptsimsopt

simsopt is a framework for optimizing
stellarators.
The high-level routines of simsopt are in python, with calls to C++
or fortran where needed for performance. Several types of components
are included:
- Interfaces to physics codes, e.g. for MHD equilibrium.
- Tools for defining objective functions and parameter spaces for optimization.
- Geometric objects that are important for stellarators - surfaces and curves - with several available parameterizations.
- Efficient implementations of the Biot-Savart law and other magnetic field representations, including derivatives.
- Tools for parallelized finite-difference gradient calculations.
The design of simsopt is guided by several principles:
- Thorough unit testing, regression testing, and continuous integration.
- Extensibility: It should be possible to add new codes and terms to the objective function without editing modules that already work, i.e. the open-closed principle. This is because any edits to working code can potentially introduce bugs.
- Modularity: Physics modules that are not needed for your optimization problem do not need to be installed. For instance, to optimize SPEC equilibria, the VMEC module need not be installed.
- Flexibility: The components used to define an objective function can
be re-used for applications other than standard optimization. For
instance, a
simsoptobjective function is a standard python function that can be plotted, passed to optimization packages outside ofsimsopt, etc.
simsopt is fully open-source, and anyone is welcome to use it, make
suggestions, and contribute.