DESC
DESC copied to clipboard
generalized radial coordinate
We assume $\psi = \rho^2$, so that $\rho$ is proportional to the minor radius. This is necessary for the Zernike polynomials to properly resolve the magnetic axis. However, it is not necessary far from the axis and might come at the cost of accuracy near the LCFS.
We should generalize the radial coordinate. One option could be $\psi = \rho^2 + \rho^3 - \rho^4$, so that it still has $\rho^2$ scaling near the axis but also $\psi \propto \rho$ near the boundary for better accuracy there.
I had tried simply changing the definition of $\psi(\rho)$ in the compute funtion, but that didn't seem to work well for basic tokamak equilibrium solves. It's difficult to compare because changing this definition also changes the initial guess for the flux surfaces.
We probably don't have to find the "perfect" scaling (and there likely isnt one for all cases). We could just allow Psi(rho) to be a profile like the others, defaulting to rho**2 but in theory allowing users to override that (maybe with some checks to make sure it scales correctly at the axis and is monotonic etc)
Biggest issue is we need to find everywhere that we may assume psi derivs are zero or constant (i.e. assuming the quadratic scaling)
#1015 could remove need for this issue
Use SOLOVEV analytic to test this
Make generic psi profile