Skip to content

v0.6.0

Compare
Choose a tag to compare
@f0uriest f0uriest released this 28 Sep 12:12
· 10581 commits to master since this release
10ff897

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 attribute current which can be set to any Profiletype (or None if using rotational transform)
    • Default Equilibrium is now fixed zero current rather than zero rotational transform.
    • For equilibria with both iota and current assigned, which to fix should be specified manually by using either FixIota or FixCurrent 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.
  • Near axis interface:
    • Equilibrium.from_near_axis allows users to load in a solution from pyQSC or pyQIC.
    • 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 to plot_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 in direct1
    • Removes weighting from transform.fit, to ensure that the inverse transform is the actual inverse of the forward transform.
  • 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 and ZAXIS_CC
    • Add the Boozer currents I and G 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 as ansi internally)
  • Misc:
    • Allow applying boundary conditions on interior surfaces: Adds a surface_label arg to FixBoundaryR and FixBoundaryZ, defaulting to the label of the given surface. That surface is fixed, instead of always the rho=1 surface.
    • Remove use_jit from Derivative class in favor of jiting attributes of ObjectiveFunction
    • Add jit to ObjectiveFunction.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.

Bug fixes

  • Fix bug in derivative of abs(sqrt(g)) (thanks to Matt Landreman for reporting). Affected quantities are V_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 of s = rho^2.

Full Changelog: v0.5.2...v0.6.0