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

Poloidal degree change #162

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Poloidal degree change #162

wants to merge 7 commits into from

Conversation

FusionSandwich
Copy link
Contributor

@connoramoreno please take a look and let us know what you think.

Copy link
Collaborator

@connoramoreno connoramoreno left a comment

Choose a reason for hiding this comment

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

Just a small suggestion for the computation of positive angles; otherwise LGTM!

parastell/nwl_utils.py Outdated Show resolved Hide resolved
Co-authored-by: Connor Moreno <camoreno@wisc.edu>
@connoramoreno
Copy link
Collaborator

I can't merge until this is formatted with black

@connoramoreno
Copy link
Collaborator

My suggestion must've done something to the formatting

@@ -186,6 +186,9 @@ def flux_coords(plas_eq, wall_s, coords, num_threads):
for theta_coord_chunk in theta_coord_chunks
for theta_coord in theta_coord_chunk
]
# Ensures theta_coords are all positive (add 360 degrees where needed)
theta_coords = (theta_coords + 2 * np.pi) % 2*np.pi
Copy link
Member

Choose a reason for hiding this comment

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

will they need to be reordered/sorted?

Copy link
Collaborator

@connoramoreno connoramoreno Sep 30, 2024

Choose a reason for hiding this comment

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

@Edgar-21 correct me if I'm wrong but I don't believe theta_coords is sorted

Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't need to be reordered, theta_coords is just a list of the same length as the list of surface crossings from the surface source that stores the poloidal angle for each surface crossing, all we are doing here is changing the notation of theta, each theta_coord still corresponds to the same surface crossing.

For reference, here is what the NWL looks like from before:
image
And after:
image

The first has been rescaled as noted in its title, but looking at the overall profile the coordinate shift can be seen

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.

4 participants