Change to radial gridding in BEAMS3D
Closed this issue · 2 comments
@cfe316 has pointed out that by switching the internal gridding of flux lookup to rho, the code provides better lookup near the axis and better profile quantities near the axis. My proposal is to change S_spl
and S4D
to RHO_spl
and RHO4D
where s=rho*rho (rho=r/a). This then results in fewer SQRT
calls and only modest changes to the code. BEASM3D will still output S_lines
correctly so to the user there should be no significant changes in the post-processing routines.
The code I used to create the figures I showed you is here:
https://github.com/cfe316/STELLOPT/tree/feature/XYRHO4D
It's not very clean (I still create the largely unneeded X_ARR, Y_ARR and so on, and also just to be super obvious almost my new variables have rho
or RHO
in the name) or complete (only the init_vmec loading path is handled).
I can start a draft pull request if you like.