Closed lazersos closed 2 weeks ago
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.
I made a draft PR #273 as a start. LMK if you want to handle the rest and I can test it or visa-versa. I think you would be better equipped to perform the testing; I mostly just have the one test case (using a VMEC input) working.
@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
andS4D
toRHO_spl
andRHO4D
where s=rho*rho (rho=r/a). This then results in fewerSQRT
calls and only modest changes to the code. BEASM3D will still outputS_lines
correctly so to the user there should be no significant changes in the post-processing routines.