You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Circuits are saved to HDF5 files as an array of dtypes, which are created using Coil.dtype: https://github.com/bendudson/freegs/blob/master/freegs/machine.py#L74
Unfortunately, circuits may include different types of coils, e.g. ShapedCoil and MultiCoil. This means that e.g. machine.MASTU can't be written to HDF5. Some possibilities:
Use groups to represent circuits. In principle circuits could contain other circuits, so groups could be nested
Define a coil dtype which is a superset of all the coil types which could be added. This would then not be future-proof, for adding new coil types, and I don't think would work with circuits which contain circuits.
The text was updated successfully, but these errors were encountered:
Looking at how to convert to/from IMAS, there are two relevant data structures: pf_active and pf_passive. Note that the schemas on the website are not the most recent versions, so you might need to look through the actual schemas.
They're slightly different, pf_active has coils while pf_passive has loops, but they are both made up of elements:
Each PF coil is comprised of a number of cross-section elements described individually
And each element has area and geometry properties, with geometry being a structure itself, with a geometry_type property:
Type used to describe the element shape (1:'outline', 2:'rectangle', 3:'oblique', 4:'arcs of circle, 5: 'annulus', 6 : 'thick line')
Each of these corresponds to a separate structure with its own properties, e.g.:
"pf_active.coil[:].element[:].geometry.outline": {
"data_type": "STRUCTURE",
"documentation": "Irregular outline of the element. Do NOT repeat the first point.",
},
"pf_active.coil[:].element[:].geometry.outline.r": {
"coordinates": [
"1...N"
],
"data_type": "FLT_1D",
"documentation": "Major radius",
"type": "static",
"units": "m"
},
"pf_active.coil[:].element[:].geometry.outline.z": {
"coordinates": [
"pf_active.coil[:].element[:].geometry.outline.r"
],
"data_type": "FLT_1D",
"documentation": "Height",
"type": "static",
"units": "m"
},
There's definitely some correspondence between FreeGS coil types and IMAS geometry types, but maybe not one-to-one.
Circuits are saved to HDF5 files as an array of dtypes, which are created using
Coil.dtype
:https://github.com/bendudson/freegs/blob/master/freegs/machine.py#L74
Unfortunately, circuits may include different types of coils, e.g.
ShapedCoil
andMultiCoil
. This means that e.g.machine.MASTU
can't be written to HDF5. Some possibilities:The text was updated successfully, but these errors were encountered: