Skip to main content

Framework for optimizing stellarators

Project description

simsopt

GitHub codecov DOI

SIMSOPT SIMSOPT

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 simsopt objective function is a standard python function that can be plotted, passed to optimization packages outside of simsopt, etc.

simsopt is fully open-source, and anyone is welcome to use it, make suggestions, and contribute.

Several methods are available for installing simsopt. One recommended approach is to use pip:

pip install simsopt

For detailed installation instructions on some specific systems, see the wiki. Also, a Docker container is available with simsopt and its components pre-installed, which can be started using

docker run -it --rm hiddensymmetries/simsopt

More installation options, instructions for the Docker container, and other information can be found in the main simsopt documentation here.

Some of the physics modules with compiled code reside in separate repositories. These separate modules include

  • VMEC, for MHD equilibrium.
  • SPEC, for MHD equilibrium.
  • booz_xform, for Boozer coordinates.

If you use simsopt in your research, kindly cite the code using this reference:

[1] M Landreman, B Medasani, F Wechsung, A Giuliani, R Jorge, and C Zhu, "SIMSOPT: A flexible framework for stellarator optimization", J. Open Source Software 6, 3525 (2021).

See also the simsopt publications page.

We gratefully acknowledge funding from the Simons Foundation's Hidden symmetries and fusion energy project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simsopt-1.3.0.tar.gz (25.1 MB view hashes)

Uploaded Source

Built Distributions

simsopt-1.3.0-cp311-cp311-musllinux_1_1_x86_64.whl (1.8 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

simsopt-1.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

simsopt-1.3.0-cp311-cp311-macosx_11_0_arm64.whl (1.1 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

simsopt-1.3.0-cp311-cp311-macosx_10_9_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

simsopt-1.3.0-cp310-cp310-musllinux_1_1_x86_64.whl (1.8 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

simsopt-1.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

simsopt-1.3.0-cp310-cp310-macosx_11_0_arm64.whl (1.1 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

simsopt-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

simsopt-1.3.0-cp39-cp39-musllinux_1_1_x86_64.whl (1.8 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

simsopt-1.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

simsopt-1.3.0-cp39-cp39-macosx_11_0_arm64.whl (1.1 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

simsopt-1.3.0-cp39-cp39-macosx_10_9_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

simsopt-1.3.0-cp38-cp38-musllinux_1_1_x86_64.whl (1.8 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

simsopt-1.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

simsopt-1.3.0-cp38-cp38-macosx_11_0_arm64.whl (1.1 MB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

simsopt-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page