DESC icon indicating copy to clipboard operation
DESC copied to clipboard

Add Contract Equilibrium Utilities

Open dpanici opened this issue 1 year ago • 9 comments

TODO

  • [x] NO LONGER DOING, is not obvious/well-posed add expand utility (what should this be? should the current surface just be scaled to the larger rho? what about pressure/current/iota, should they be extrapolated? probably not)
  • [x] Make contract utility initialize new equilibrium with Fourier Zernike coefficients such that the new surfaces are the same as the old
    • either through explicitly calculating the new coefficients
    • or through evaluating the R,Z, lambda of the old equilibrium in a volumetric grid that ends at the desired rho value, then passing those points into the new equilibrium for it to fit its new R,Z lambda
    • https://opg.optica.org/josaa/fulltext.cfm?uri=josaa-23-3-539&id=88096 try this formula
    • Ended up just doing a simple fit which works surprisingly well, |B| is exact when compared between the contracted and full eq, and |F| is the same to rtol of 1e-4
  • [x] tests

Resolves #467

dpanici avatar Mar 30 '23 02:03 dpanici