DESC
DESC copied to clipboard
How to compute quantities along a fieldline
There have been several applications recently that need data from the equilibrium evaluated along a fieldline (stability stuff from @rahulgaur104 , GX stuff from @pkim1818, gamma_c from @JaxCrocker)
Right now this isn't super easy to do so we have some hacky stuff for it, but it would be good to decide on a common API for this.
One possibility:
- add an attribute to each
Grid
labelling what coordinates its using,rtz
for regular DESC computational coordinates,raz
for rho, alpha, zeta etc. - When calling
desc.compute.compute
we check the grid type and do any coordinate mapping to computational coordinates there. - quantities that use field aligned grids would need some logic in their individual compute functions to handle multiple fieldlines (ie multiple values of rho, alpha)
Issues:
- the low level
desc.compute.compute
currently expects pre-built transforms and profiles. If we're doing grid mapping inside that function we would need to add an option to just pass in the grid and build transforms from that and the equilibrium - for grids based on alpha we would need to know iota to map it to computational coordinates which adds an extra layer of complication for fixed current equilibria
Any other thoughts? @ddudt @dpanici @unalmis