Skip to content

Releases: hiddenSymmetries/simsopt

Graph Optimization framework for all of simsopt classes

16 Oct 22:45
00f2336
Compare
Choose a tag to compare

This release extends the graph Optimizable framework to surface and MHD classes.

Changes Implemented:

  1. Enhancements to graph Optimizable class to keep order of the dependent functions
  2. ObjectiveFailure added to LeastSquaresProblem
  3. Tolerances can be specified as part of the solver
  4. Surface classes and the corresponding tests are separated into different modules
  5. Surface modules converted to graph framework
  6. MHD modules converted to graph framework
  7. New classes for finite differences based (both serial and MPI) Jacobian
  8. Weak references to enable garbage collection of out-of-scope optimizable objects
  9. SPEC CI issues fixed

New Coil-n-Currents, Derivatives, and stage II coil optimization

17 Sep 16:44
a59940b
Compare
Choose a tag to compare

Courtesy @florianwechsung, this release introduces new Coil, Current, and Derivative classes and allows for stage-II optimization

  • A new Coil class that represents a Curve and a Current. A list of Coil objects is now passed to BiotSavart (instead of separate curves and currents in the past). These objects are built on top of the new graph framework

  • A new Derivative object is introduced, that is essentially a dictionary containing the partial derivative of a scalar objective wrt to all the Optimizable objects (with >0 DOFs) that it depends on.

  • Simsopt can now solve the Stage II coil optimisation problem.

Addition of adjoint methods, vmec residuals and improved plotting

09 Sep 16:51
2aac036
Compare
Choose a tag to compare

This release adds adjoint methods (courtesy E J Paul), additional VMEC related residuals (courtesy M Landreman) and improved plotting options (courtesy C. Zhu).

v0.4.2 Released

19 Jul 22:26
e273760
Compare
Choose a tag to compare

This release introduces

  1. The ability to compute fieldlines as well as particle trajectories using the guiding center approximation.
    Credits to Florian Wechsung.

  2. A quadratic-flux minimizing surface solver, defined as the minimizer of the objective function

    f = int d^2 x (B \cdot n)^2/int d^2 x B^2

    at fixed flux surface label (e.g., volume, area, or toroidal flux). This optimization problem can be solved using a
    penalty formulation with LBFGS or with the SLSQP constrained optimization algorithm. Much of the code was
    modeled after the Boozer surfaces.
    Credits to Elizabeth J Paul

v0.4.0 Released

04 Jul 22:36
eb60e22
Compare
Choose a tag to compare

This release adds conda package recipe for simsopt, toroidal surface using the parameterization in Henneberg, Helander, and Drevlak ( arXiv:2105.00768 (2021), and bug fixes.

v0.3.03 Released

15 Jun 22:27
77d62f6
Compare
Choose a tag to compare

This release fixes bugs and reorganizes examples.

  1. Earlier releases of simsopt required all optional packages to be installed. This release fixes issues in importing simsopt when optional packages are not installed.
  2. The examples are reorganized into simple, intermediate, advanced, and stellarator_benchmarks.

Docker and coverage features added to simsopt

08 Jun 13:46
7f76230
Compare
Choose a tag to compare

This release eases the use of simsopt for end users. A docker container with simsopt and vmec preinstalled is available. It can be downloaded from DockerHub using the name hiddensymmetries/simsopt.

The coverage report is now avaialble and can be accessed from the codecov badge on the main README.me

v0.2.02

06 May 21:07
Compare
Choose a tag to compare
Version bumped to v0.2.02 for zenodo release

simsopt v0.2.0

04 May 21:09
71d6d11
Compare
Choose a tag to compare

This release introduces some additions and bug fixes for majority of modules in simsopt.

Changes introduced:

  1. New class for Reiman magnetic field (see section 5 of Reiman, Greenside (1986), "Calculation of three-dimensional MHD equilibria with islands and stochastic regions", Computer Physics Communications 43 (157-167)) is added by Rogerio. This field has the advantage of allowing an exact calculation of the island width which can be used for island width optimization (example: https://arxiv.org/abs/2102.04497).
  2. Faster Biot-Savart code by Florian
  3. A simplified logging interface is introduced by Bharat. Logging can be enabled by using the following two lines in your driver script:
from simsopt import initialize_logging
initialize_logging(filename="simsopt.log")  # Filename option can be omitted in which case the default name is default.log
  1. Some modules are rearranged.
  2. Top-level imports for important classes are introduced.
  3. Automatic linting script implemented by Florian. Before you submit your additions/changes to simsopt as PR, please run the run_autopep script. Requires autopep8 and flake8.
  4. A new exception class to handle failures in objective function (credits to Matt Landremann).
  5. Bug fixes.
  6. Improved documentation.

Boozer surfaces in simsopt

12 Apr 00:47
Compare
Choose a tag to compare

This release introduces boozer surface and computation of aspect ratio of surfaces and some major refactoring of surfaces-related code.

Major changes:

  1. SurfaceXYZFourier surfaces are introduced, where (phi, theta) correspond to the Boozer angles on the surface, by solving a nonlinear least squares problem in boozersurface.py.

  2. minimizeBoozerScalarizedLBFGS solves a scalarized constrained optimization problem using LBFGS, where
    min 0.5* || f(x) ||^2_2 + 0.5 * constraint_weight * (label - labeltarget)^2
    +0.5constraint_weight * (y(varphi=0,theta=0) -0)^2+0.5constraint_weight * (z(varphi=0,theta=0) -0)^2
    where || f(x)||^2_2 is the sum of squares of the Boozer residual at
    a set of quadrature points.
    The final two terms in the objective function are boundary conditions to ensure that the parametrization of the surface is unique.

  3. minimizeBoozerScalarizedNewton solves the same scalarized constrained optimization problem as above, but instead of LBFGS, Newton's method is used.

  4. minimizeBoozerConstrainedNewton solves the full constrained optimization problem using Newton's method.
    min 0.5*|| f(x) ||^2_2
    subject to
    label - labeltarget = 0
    y(varphi=0,theta=0) - 0 = 0
    z(varphi=0,theta=0) - 0 = 0
    The user is free to choose either a geometric constraint, e.g. area, or a toroidal flux constraint.
    objectives.py is split into coilobjectives.py and surfaceobjectives.py

  5. Computation of aspect ratio of surfaces using the VMEC definition of aspect ratio is done in the Surface.aspect_ratio.

  6. New capability of computing cross-sections of surfaces at a given cylindrical angle. This is done using bisection in the Surface.cross_section.

  7. An implementation of SurfaceXYZFourier.to_RZFourier using Surface.cross_section. This is done by computing cross-sections of the SurfaceXYZFourier object and then fitting a SurfaceRZFourier to those cross-sections.