Merged
Conversation
d7919
reviewed
Mar 3, 2026
| >>> x = rs_phi.x.data | ||
| >>> theta = rs_phi.theta.data | ||
| >>> rho0 = pyro.local_geometry.rho | ||
| >>> rhostar = 0.005 * pyro.norms.lref / pyro.norms.rhoref |
Collaborator
There was a problem hiding this comment.
0.005 being a placeholder rho* value?
Collaborator
Author
There was a problem hiding this comment.
Yes, could clarify this or set it as an input
Collaborator
Author
|
Will merge for now and fix problems later on! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A simple script to plot 3D visualisation of a flux tube. We do the fourier transform to real space and make the flux tube go from$-\pi$ to $\pi$ by appending on the end of the theta grid a phase shifted first value in theta. This makes the interpolation done for the mapping from field aligned to cartesian a lot easier.
The code currently plots at$\theta=0$ , then a flux 3D torus of the data and then finally at a fixed toroidal angle $\zeta=0$ by interpolating onto that surface.
This does a simple mapping from the code's$y$ -> $\alpha$ -> $\zeta$ (at a given $\theta$ ) via
However we currently don't account for the radial variation of$\alpha(r)$ , $q(r)$ and the flux surface mapping with $\partial R/\partial r$ and $\partial Z/\partial r$ . That is likely the only thing that is really missing. Essentially for each $x$ we need to expand the above expression to cover this. We do have $\partial \alpha/\partial r$ and $\partial \alpha/\partial \theta$ so it is possible.
Essentially the mapping from field aligned$(x,y,\theta)$ to cartesian $(X,Y,Z)$ is mostly right but could be improved
+pibecause its periodic)xrftAdded a ChatGPT generated docs on this. Accidentally branched from the wrong branch though so a kinetics doc is in there...