Skip to content

Added capabilities around field-following mapping - #1

Open
rhager wants to merge 1 commit into
rmchurch:masterfrom
rhager:rhager/ff_mapping
Open

rhager wants to merge 1 commit into
rmchurch:masterfrom
rhager:rhager/ff_mapping

Conversation

@rhager

@rhager rhager commented Sep 19, 2022

Copy link
Copy Markdown

This PR adds routines:

  • to read field-following mapping data
  • evaluate XGC-gradients, including b.grad(...) (using xgc.grad_rz.bp and field-line mapping data
  • real2ff transformation, i.e., transformation to field-following representation (e.g. As_phi_ff)
  • basic code for ff2real transformation (this is not executed now because it takes a while to generate the matrices for ff2real from the mapping data.
  • a sample script that calculates As_phi_ff and dAs_phi_ff (for rho_i=0) and writes that into an Adios BP file

The purpose of this update is the capability to generate the input data required by Dave Pugmires field-line tracer tool from any XGC simulation.

…p (including parallel), and real2ff transformation."

@rmchurch rmchurch left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Overall looks good, made minor request for changing GradPlane, etc. to have lower-case, and in particular GradPlane whether gradRZ makes more sense.

Comment thread xgc.py
return bdotgrad_field

# Calculates the (psi,theta)/(R,Z) derivative of field.
def GradPlane(self,field):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Perhaps gradRZ a more descriptive name? Also, in general, style-wise I've been lower-casing first letter of method names.

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.

2 participants