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

Switch IMASDD to IMAS and make adaptations #78

Merged
merged 13 commits into from
Aug 5, 2024
Merged

Switch IMASDD to IMAS and make adaptations #78

merged 13 commits into from
Aug 5, 2024

Conversation

eldond
Copy link
Collaborator

@eldond eldond commented Jul 25, 2024

This PR should be squashed.

Switch IMASDD to IMAS

  • Replace all IMASDD references with IMAS
  • Add flux map grid type info so IMAS expressions can work
  • Adjust keywords in imas2json to make it not take forever

- keywords in imas2json to make it not take forever
- This is needed for some IMAS expressions and utility functions
@eldond eldond marked this pull request as ready for review July 29, 2024 15:34
@eldond
Copy link
Collaborator Author

eldond commented Jul 29, 2024

@anchal-physics it's failing because it can't clone IMAS; I think that's okay because we expect IMAS to go public later.

@eldond eldond changed the title WIP: Switch IMASDD to IMAS and make adaptations Switch IMASDD to IMAS and make adaptations Jul 29, 2024
@anchal-physics
Copy link
Collaborator

I can't test this branch locally either as IMAS has not been shared with me yet. It would be better to wait for IMAS to go public before merging this with our master branch. Meanwhile, if you need IMAS features for some other development you can rebase from this imas branch.

@eldond
Copy link
Collaborator Author

eldond commented Jul 29, 2024

@orso82 did you intend to share IMAS with Anchal?

@orso82
Copy link
Member

orso82 commented Jul 29, 2024

yes, @anchal-physics should have access

…d flux surface

- with small errors or low res flux maps, g.simag in the GEQDSK might result in
  a contour that doesn't close with Julia's countor following. This breaks some
  IMAS calculations
@anchal-physics
Copy link
Collaborator

One test failed on set tolerance on my computer:

% julia --project test/runtests.jl --geqdsk_to_imas
/Users/gupta/Git/ProjectTorreyPines/SD4SOLPS/src/../sample/g184833.03600
 --- 
(65, 65)(65, 65)
/Users/gupta/Git/ProjectTorreyPines/SD4SOLPS/src/../sample/geqdsk_iter_small_sample
 --- 
(65, 65)(65, 65)
geqdsk_to_imas: Test Failed at /Users/gupta/Git/ProjectTorreyPines/SD4SOLPS/test/runtests.jl:404
  Expression: maximum(psin_bry) < 1.0 + tolerance
   Evaluated: 1.0023268315692309 < 1.002

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/Git/ProjectTorreyPines/SD4SOLPS/test/runtests.jl:404 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] top-level scope
   @ ~/Git/ProjectTorreyPines/SD4SOLPS/test/runtests.jl:330
/Users/gupta/Git/ProjectTorreyPines/SD4SOLPS/test/../sample/ITER_Lore_2296_00000/EQDSK/g002296.00200
 --- 
(257, 513)(257, 513)
Test Summary:  | Pass  Fail  Total  Time
geqdsk_to_imas |   74     1     75  7.2s
ERROR: LoadError: Some tests did not pass: 74 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /Users/gupta/Git/ProjectTorreyPines/SD4SOLPS/test/runtests.jl:328

@eldond
Copy link
Collaborator Author

eldond commented Jul 31, 2024

This could be because I tried to adjust the boundary flux. The sample is very low res and the psin=1 contour was showing up as an open field line outboard of the X-point, which broke some IMAS calculations. So I made an option to correct it until the contour line would close. I should've just upsampled the EFIT mesh, I guess. I'll turn that option off by default.

@anchal-physics
Copy link
Collaborator

All dependencies are now public for this branch, so the CI tests should pass if everything is ok. Currently, 6 tests are failing in geqdsk_to_imas:
https://github.com/ProjectTorreyPines/SD4SOLPS.jl/actions/runs/10223457708/job/28289787457?pr=78#step:10:889

Copy link
Collaborator

@anchal-physics anchal-physics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most changes are sed for IMASDD to IMAS

New feature includes boundary flux correction using IMAS.flux_surface().

@anchal-physics anchal-physics merged commit d4a2edd into master Aug 5, 2024
3 checks passed
@eldond eldond deleted the imas branch August 5, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants