Skip to content

Comments

Routines to compute field line displacement and correlation length#389

Open
mgiacomin wants to merge 17 commits intounstablefrom
enhancements/nonzonal_transition
Open

Routines to compute field line displacement and correlation length#389
mgiacomin wants to merge 17 commits intounstablefrom
enhancements/nonzonal_transition

Conversation

@mgiacomin
Copy link
Collaborator

@mgiacomin mgiacomin commented Oct 23, 2024

This PR adds a couple of routines to the Diagnostics, which can be used to evaluate the radial displacement of magnetic field lines after half poloidal turn and the radial correlation length of magnetic perturbations. These quantities are linked to the nonzonal transition described in Pueschel et al. Phys. Rev. Lett. 110, 155005 (2013) .

@bpatel2107 I don't know while tests failed in the last commit where I simply added an example. Note that tests passed in the commit before and the example is not covered by any test.

@dake0795 Did you try these new routines? Are they working smoothly?

" before using any diagnostic"
)

if self.pyro.gk_code not in ["CGYRO", "GS2", "GENE"]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is it only available for these codes? The 4D fields are spit out for other codes too (STELLA/GKW)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that's legacy. I will took that out.

@bpatel2107
Copy link
Collaborator

@mgiacomin the tests are failing due to an issue in the Freeqdsk library. Try merging unstable into this branch and then pushing again

Overall this looks nice! I think it all works but it may be worth looking at if we can speed this up if this is quite slow. Haven't tried it myself yet. Have you benchmarked it against a "known" case?

@dake0795
Copy link
Collaborator

Haven't looked this myself yet unfortunately.

I managed to talk to MJ Pueschel at APS and he is planning to have a look at a STEP simulation (/marconi_scratch/userexternal/dkennedy/contribs/MJ/) with his own NZT diagnostics. We could benchmark against this.

@mgiacomin
Copy link
Collaborator Author

After merging unstable, tests are successful, thanks!

I have only tested these routines on STEP data. As Dan just wrote, he will carry out a proper benchmark with MJ Pueschel.

@bpatel2107
Copy link
Collaborator

Will wait for @dake0795 to check but happy to merge and then optimise later as needed.

@dake0795 dake0795 force-pushed the enhancements/nonzonal_transition branch from a3064dd to e95d14d Compare April 30, 2025 15:34
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