Skip to content

Conversation

@bendudson
Copy link
Contributor

Reads ffprime, pprime from geqdsk file; passes through to regions, calculates Jpar0, and saves to the output grid.

  • Closes #xxxx
  • Tests added
  • Udated manual
  • Updated doc/whats-new.md with a summary of the changes

bendudson added 9 commits July 5, 2024 15:38
Reads ffprime, pprime from geqdsk file;
passes through to regions, calculates Jpar0
and saves to the output grid
H.Seto noted that in the COCOS +1 convention that Hypnotoad assumes,
Jpar has a minus sign.
Used to detect when outside the core plasma. Test cases have no
X-points so no psi_bdry.
Use Scipy.interpolate to differentiate w.r.t psi and save
to the output geqdsk file.
Jpar0 isn't in the reference grid files so integrated tests fail.
InterpolatedUnivariateSpline requires monotonically increasing X axis,
so reverse sign of psi in negative Bp case.
Copy link
Collaborator

@johnomotani johnomotani left a comment

Choose a reason for hiding this comment

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

Happy for this to go in, guess it will need updating when #183 is merged.

Updated implementation of 'fpolprime' changes the calculated
curvature-related outputs outside the separatrix.
Should return 0, but in an array with the same size as the argument
`psi`, not just as a float, for compatibility with later use.
@johnomotani
Copy link
Collaborator

johnomotani commented Aug 28, 2025

This PR changes the implementation of fpolprime. On a quick skim, it looks like the new version is 'better' because quantities expected to be zero outside the separatrix are actually forced to be. This change affects the calculated curvature, $\nabla(\boldsymbol{b}/B)$, at least enough to require updating the expected results for the integrated tests. @bendudson should someone check whether the differences are significant between this PR and master? The quantities that changed in the integrated tests were curl_bOverB_y, curl_bOverB_z, bxcvz_xlow, curl_bOverB_z_xlow, bxcvz_ylow, curl_bOverB_y_xlow, bxcvy_ylow, bxcvz, curl_bOverB_y_ylow, bxcvy, curl_bOverB_z_ylow, bxcvy_xlow. Otherwise, this should be ready to merge.

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