-
Notifications
You must be signed in to change notification settings - Fork 0
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
Enable XMH geometry for TGLF in TGYRO runs #434
Conversation
…m TGYRO into TGLF, using a new integer input tgyro_tglf_geometry_flag ( == 1 for Miller geometry (default), == 4 for XMH geometry )
Thanks Federico! Would it be better to call this TGYRO_TGLF_MXH_FLAG? |
My original idea was to subsequently add a Hence the name Maybe an even better idea is to match what |
I am not sure a new flag is needed unless you want to have TGYRO reduce the XHM shape functions to the standard Miller (i.e. zero the extra ones) before calling tglf. I guess if the default is for all of the shape coefficients to be computed then it would be necessary to use this flag to recover the original Miller. Note that standard Miller has zmaj_loc=0, dzmajdx_loc=0 , zeta_loc=0 and zeta_s_loc=0. These were added by Jeff before XHM so there are really three version of Miller. |
I would like to have you both agree about these changes, at least so you both know exactly what the new behaviour will be. I am happy with whatever is agreed upon. |
@gmstaebler that was my original idea -- the TGYRO regression tests are converging more slowly with the XHM shape functions. My concern is whether existing TGYRO+TGLF workflows would be disrupted by this upgrade. I'm inclined to at least have a parameter to preserve the existing behavior. Let me know what you prefer, also a shoutout @tomneiser who is another TGYRO/TGLF user. I'm happy to go with the flow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me, other than the discussion of tglf geometry variable flag names which I have no strong feeling one way or the other.
It is good to be able to recover the previous default. The way I had miller_geo set up in TGLF before the XHM was added set zmaj_loc and dzmaj_dx_loc to zero. This should be done to the inputs from TGYRO as well as zeroing the shape and shape_s functions if the flag is set. |
to be clear the TGYRO flag TGYRO_TGLF_MXH_FLAG would be 1 if you want to use XHM and 0 if you want the previous Miller model. The coding in tgyro_tglf_map.f90 would need to be added to cover these options. |
…glf_mxh_flag=1) or off (0 or else)
Changed the TGYRO inputs so that it follows the behavior preferred by Gary
Last comment: only harmonics up to sin3/cos3 are included in TGYRO, but can be added easily |
It would make the formulation more elegant if someday we could replace triangularity and squareness with s1 and s2 (now, delta = sin(s1) and zeta = -s2). |
The following changes have been made
tgyro_tglf_geometry_flag
intgyro
inputstgyro
totglf
intgyro_tglf_map
if new input flag is set to 4tgyro_tglf_geometry_flag
has default1
to preserve backwards compatibility.