v0.6.0
Major changes
- Can now solve equilibria with fixed toroidal current, as opposed to fixed rotational transform.
- input file now accepts
c
parameter for toroidal current profile (in Amps - note it should be an even polynomial and 0 on axis) Equilibrium
now has attributecurrent
which can be set to anyProfile
type (orNone
if using rotational transform)- Default
Equilibrium
is now fixed zero current rather than zero rotational transform. - For equilibria with both
iota
andcurrent
assigned, which to fix should be specified manually by using eitherFixIota
orFixCurrent
constraints - Note that computing
iota
from fixed current requires flux surface averages, so more oversampling in real space may be required to get correct values.
- input file now accepts
- Near axis interface:
Equilibrium.from_near_axis
allows users to load in a solution frompyQSC
orpyQIC
.FourierRZToroidalSurface.from_near_axis
allows users to create boundary surfaces that are approximately QP/QI based on an unpublished analytic model shared by Matt Landreman.
Minor changes
- Plotting:
- Document kwargs, according to matplotlib-style documentation
- Add kwargs to plotting functions missing sensible/useful kwargs
- Add check for unused kwargs to most plotting functions
- Add
norm_F
option toplot_fsa
- Transform:
- Modifies
Transform.fit
to use the inverse of the forward method transform method (ie,direct1
,direct2
,fft
) rather than always the full matrix inverse as indirect1
- Removes weighting from
transform.fit
, to ensure that the inverse transform is the actual inverse of the forward transform.
- Modifies
- Profiles:
- Add methods and classes for adding, subtracting, multiplying, scaling profiles
- Add class for anisotropic profiles using Fourier-Zernike basis (though the compute functions don't make use of the anisotropy yet)
- Input/Output:
- VMEC input conversion now allows for:
- comma-separated lists of numbers, such as:
AC = 1.0, 0.5, 0.2
- non-stellarator symmetric axis initial guesses using the inputs
RAXIS_CS
andZAXIS_CC
- comma-separated lists of numbers, such as:
- Add the Boozer currents
I
andG
and the Mercier stability fields to VMEC outputs. - Make DESC input file reader agnostic to the case of the input options (i.e.
spectral_indexing=ANSI
in the input file will work now and register asansi
internally)
- VMEC input conversion now allows for:
- Misc:
- Allow applying boundary conditions on interior surfaces: Adds a
surface_label
arg toFixBoundaryR
andFixBoundaryZ
, defaulting to the label of the given surface. That surface is fixed, instead of always the rho=1 surface. - Remove
use_jit
fromDerivative
class in favor ofjit
ing attributes ofObjectiveFunction
- Add
jit
toObjectiveFunction.jvp
, to hopefully speed up perturbations a bit - Enforce odd number of theta nodes for
ConcentricGrid
, to ensure correct flux surface averages - Remove
ConcentricGrid
rotation
option, as this was generally unused and caused some issues with surface averages.
- Allow applying boundary conditions on interior surfaces: Adds a
Bug fixes
- Fix bug in derivative of abs(
sqrt(g)
) (thanks to Matt Landreman for reporting). Affected quantities areV_rr(r)
,D_well
,D_Mercier
,magnetic well
- Fix a bug with using
Transform.fit()
for double Fourier series on multiple surfaces simultaneously. Performing the fit one surface at a time corrects this, but there could be room for speed improvements. - Rescale the Jacobian saved as
gmnc
&gmns
when saving a VMEC output to reflect the VMEC radial coordinate convention ofs = rho^2
.
Full Changelog: v0.5.2...v0.6.0