v0.11.0
New Features
- Adds functionality to optimize for omnigenity. This includes the
OmnigenousField
magnetic field class, theOmnigenity
objective function, and an accompanying tutorial. - Adds new objectives for free boundary equilibria:
BoundaryError
and
VacuumBoundaryError
, along with a new tutorial notebook demonstrating their usage. - Objectives
Volume
,AspectRatio
,Elongation
now work for
FourierRZToroidalSurface
objects as well asEquilibrium
. MagneticField
objects now have a methodsave_mgrid
for saving field data
in the MAKEGRID format for use with other codes.SplineMagneticField.from_mgrid
now defaults to usingextcur
from the mgrid file.- When converting a near axis solution from QSC/QIC to a desc
Equilibrium
, the
least squares fit is now weighted inversely with the distance from the axis to improve
the accuracy for low aspect ratio. - Adds a bounding box to the
field_line_integrate
defined bybounds_R
andbounds_Z
keyword arguments, which form a hollow cylindrical bounding box. If the field line
trajectory exits these bounds, the RHS will be multiplied by an exponentially decaying
function of the distance to the box to stop the trajectory and prevent tracing the field
line out to infinity, which is both costly and unnecessary when making a Poincare plot,
the principle purpose of the function. - Adds a new class
DommaschkPotentialField
which allows creation of magnetic fields based
off of the vacuum potentials detailed in Representations for Vacuum Potentials in Stellarators
https://doi.org/10.1016/0010-4655(86)90109-8.
Speed Improvements
CoilSet
is now more efficient when stellarator or field period symmetry is used.- Improves the efficiency of
proximal
optimizers by reducing the number of objective
derivative evaluations. Optimization steps should now be 2-5x faster. - Improved performance of Zernike polynomial evaluation.
- Adds a bounding box to the
field_line_integrate
defined bybounds_R
andbounds_Z
keyword arguments, which form a hollow cylindrical bounding box. If the field line
trajectory exits these bounds, the RHS will be multiplied by an exponentially decaying
function of the distance to the box to stop the trajectory and prevent tracing the
field line out to infinity, which is both costly and unnecessary when making a Poincare
plot, the principle purpose of the function.
Bug Fixes
- Fix bug causing NaN in
ForceBalance
objective when the grid contained nodes at
the magnetic axis. - When saving VMEC output,
buco
andbvco
are now correctly saved on the half
mesh. Previously they were saved on the full mesh. - Fixed a bug where hdf5 files were not properly closed after reading.
- Fixed bugs relating to
Curve
objects not being optimizable. - Fixed incorrect rotation matrix for
FourierPlanarCurve
. - Fixed bug where
plot_boundaries
with a singlephi
value would return an
empty plot.
Breaking Changes
- Renames the method for comparing equivalence between DESC objects from
eq
toequiv
to avoid confusion with the common shorthand forEquilibrium
. - Minimum Python version is now 3.9