v0.11.0
New Features
- Adds functionality to optimize for omnigenity. This includes the
OmnigenousField
magnetic field class, theOmnigenityobjective function, and an accompanying tutorial. - Adds new objectives for free boundary equilibria:
BoundaryErrorand
VacuumBoundaryError, along with a new tutorial notebook demonstrating their usage. - Objectives
Volume,AspectRatio,Elongationnow work for
FourierRZToroidalSurfaceobjects as well asEquilibrium. MagneticFieldobjects now have a methodsave_mgridfor saving field data
in the MAKEGRID format for use with other codes.SplineMagneticField.from_mgridnow defaults to usingextcurfrom 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_integratedefined bybounds_Randbounds_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
DommaschkPotentialFieldwhich 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
CoilSetis now more efficient when stellarator or field period symmetry is used.- Improves the efficiency of
proximaloptimizers 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_integratedefined bybounds_Randbounds_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
ForceBalanceobjective when the grid contained nodes at
the magnetic axis. - When saving VMEC output,
bucoandbvcoare 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
Curveobjects not being optimizable. - Fixed incorrect rotation matrix for
FourierPlanarCurve. - Fixed bug where
plot_boundarieswith a singlephivalue would return an
empty plot.
Breaking Changes
- Renames the method for comparing equivalence between DESC objects from
eqtoequiv
to avoid confusion with the common shorthand forEquilibrium. - Minimum Python version is now 3.9