Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove multiple redefinitions of variables when reading equilibrium files? #45

Open
holm10 opened this issue Jul 31, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@holm10
Copy link
Collaborator

holm10 commented Jul 31, 2023

Some of the parameters defined in the EFIT a- and g-files are re-defined multiple times when reading the files. This causes confusion in case there are issues with any such parameter.

E.g. simagx, rmagx, and zmagx are defined in multiple places in both the a- and g-file

read (iunit,1040) rmagx,zmagx,simagx,taumhd

read(iunit,2020) rmagx,zmagx,simagx,sibdry,bcentr

read(iunit,2020) cpasma,simagx,xdum,rmagx,xdum

read(iunit,2020) zmagx,xdum,sibdry,xdum,xdum

Proposed solution:
Define each variable once during reading of the files, store other duplicate definition in dummy variables. Currently, the last instance of each variable in the g-file are used, although the EFIT files sometimes only define the variables in the first row. Thus, I suggest only the first occurrences in the g-file are used, the remainder being read into dummy variables. This way, the dependency on the a-file is minimized.

Alternatively, manual definitions could be used, using simple Python scripts to pick variables (such as magnetic axis and X-point locations) could be utilized.

Currently, only strike-point locations seem to be uniquely defined in the a-file, and are the only required values from the a-file. An internal routine (using e.g. Python) could be implemented to completely remove the need for an a-file.

@holm10 holm10 added the enhancement New feature or request label Jul 31, 2023
@holm10
Copy link
Collaborator Author

holm10 commented Sep 15, 2023

As an alternative to re-working the UEDGE internal routines, maybe the code could be interfaced with FreeQDSK?
https://github.com/freegs-plasma/FreeQDSK/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant