An EQDSK reader and writer for GEQDSK (more soon), with COCOS identification and conversion.
There is support for writing an eqdsk to a JSON format (which is now preferred).
We have extended the EQDSK standard to optionally allow for the definition of a CoilSet.
We are pip installable therefore for the most recent release:
pip install eqdsk
or for the most recent commit
pip install git+https://github.com/Fusion-Power-Plant-Framework/eqdsk.git
For a developer setup please see CONTRIBUTING.md
To read in an eqdsk (json or eqdsk) in its raw state:
from eqdsk import EQDSKInterface
EQDSKInterface.from_file('file.json', no_cocos=True)
To read in an eqdsk file with a known cocos format and convert it to a given cocos format:
EQDSKInterface.from_file('file.eqdsk', from_cocos=11, to_cocos=17)
Alternatively if the direction (clockwise or anticlockwise) and the units of phi (V.s or V.s/rad) are known, the cocos standard will be calculated for you:
EQDSKInterface.from_file('file.eqdsk', clockwise_phi=True, volt_seconds_per_radian=True)