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

WIP: handling of negative poloidal field #57

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bendudson
Copy link
Contributor

@bendudson bendudson commented Dec 8, 2020

Checking calculations for negative poloidal magnetic field (Jacobian < 0)
Following checking of the coordinate system in boutproject/BOUT-dev#2165

TODO

  • Metric components
    • Test with forward & reverse fields (Bpol, Btor)
  • zShift, TwistShift
    • Test with forward & reverse fields (Bpol, Btor)
  • Curvature components
    • Test with forward & reverse fields (Bpol, Btor)

Were already present in the non-orthogonal metric, but not the
orthogonal case.

Still remaining to check:

- zShift, TwistShift
- Curvature components
@bendudson bendudson added the wip Work in progress label Dec 8, 2020
@bendudson bendudson changed the title WIP: WIP: handling of negative poloidal field Dec 8, 2020
Because the direction of Z reverses when Bθ reverses,
zShift also needs to be reversed.
flake8 upset by overly long line length
@johnomotani
Copy link
Collaborator

Possible alternative to this PR that might be simpler to implement: modify hypnotoad/cases/tokamak.py so that if 'reversed current' is detected, the gridding starts from the outer, lower divertor and winds anti-clockwise. That would mean that the y-direction on the grid is always parallel to the magnetic field (not anti-parallel), which is probably less likely to suffer from sign errors than fully supporting 'negative Bp'.

@bendudson
Copy link
Contributor Author

Hey @johnomotani That sounds like a good option to have, at least as an alternative to a negative-Jacobian coordinate system. Even having that capability would allow us to compare simulation results with and without a reversed (anticlockwise) grid to check that these coordinate system issues are handled correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants