-
Notifications
You must be signed in to change notification settings - Fork 0
Update Vacuum code to use M.S. Chance's 2007 improvements #229
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
Conversation
…d to high toroidal mode number, detailed in Chance 2007
…he old formulation of the vacuum green's function
@logan-nc oops... It looks like the new vacuum green's function was in our code after all, albeit not in use, lying around in aleg_new.f. |
@JaeBeom1019 You may be interested in this. |
![]() @matt-pharr Interesting. I've plotted the minimum and maximum values of devices = { ---n value when maximum ---n value when minimum |
Isn't new routine slow? I recall I've tested the new vacuum for NSTX high n and found no big difference but with noticeably slow computational speed. I can't find any record (so far) since we were using ancient code repository like cvs or svn at that time before git migration. Thanks for this systematic testing by the way. |
@parkjk it is not noticeably slow in my experience running it now. I can benchmark it, but at least comparatively it is instant next to kinetic DCON. If we find a case where it is particularly slow, we could consider parallelizing it in the Julia version. |
And regarding accuracy, you are correct there is no noticeable difference for low n, but in the two high n cases there are elements with a very large (>>100%) changes. They are only single elements, but they could definitely change an eigenvalue spectrum. This was only tried with a wall at infinity, notably. |
@JaeBeom1019 is the min an max |
@parkjk I think the Chance paper does a very good job of proving that this new technique is necessary for high @matt-pharr has all the times for the runs above in the dcon netcdf files, and will supply a plot comparing runtimes vs n with and without the new technique. |
I would add to this that we do not want users to have to make this decision themselves. We need the code to automatically select the appropriate method based on |
@logan-nc The number of points corresponds to mths. The term ρ_hat represents the normalized distance between the source point and the observation point of the Green's function; it emerges naturally when you follow the Green's function formula. My plot was made assuming a no-wall. So it shows the maximum and minimum normalized distance (ρ_hat) between all pairs of the mths points on the plasma boundary, plotted against n. If we consider a scenario with a wall, we must assume the vacuum can be either a source or an observation point. In that case, the maximum value will increase. |
I agree. |
Thank you everyone for getting this implemented, documented, and tested so quickly!
So, in summary, this is a great addition that automatically reproduces the old behavior where we have been running things to date but enables our future plans to extend to higher n, with little meaningful cost in terms of runtime. Thanks everyone! |
Updated Vacuum using new code provided by M. S. Chance, which is based on the following reference:
M. S. Chance, A. D. Turnbull, and P. B. Snyder, Journal of Computational Physics 221, 330 (2007).
Should include improvements of accuracy in high toroidal mode number cases. Benchmarking plots will follow.