Open dpanici opened 10 months ago
I have tried this for SIMSOPT to convert a geqdsk to VMEC and then optimize it but I got stuck, probably due to the deficiencies of VMEC. I think I can do this with the help of SangKyeun Kim for DESC. Here's a document that helped me understand the units used by EFIT geqdsk. This document requires you to have access to the PPPL server but I swear it used to be open source. I had a copy of this page on a bulletin board in my old office.
This is what I had way back when: https://github.com/PlasmaControl/DESC/blob/v0.2.0/desc/gfile_helpers.py
It's probably not super useful, I don't think it did any conversion between DESC and EFIT, it was just for plotting comparisons.
I think converting a gfile to DESC should be easyish:
rbbs
and zbbs
(could do simple linear spaced probably) and fit that to a DoubleFourierSeries
basis.Just added a barebones function for doing this in #732
Preferably someone else can double check the units etc and make a testcase for it.
There are a lot of pitfalls (regarding units and conventions) between converting grad-shafranov inputs to inputs expected by DESC. It would be good to have a central utility that can take these in (say in the form of a EFIT geqdsk) and do the conversion correctly, and this would be useful for reconstruction work as well.
@f0uriest did you have one of these a while back? @rahulgaur104 it sounds like you have done this before so maybe if you already have the code we can just modify it for DESC and then add it to the codebase.