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

Speed up field line tracing #79

Open
krystophny opened this issue Oct 10, 2019 · 5 comments
Open

Speed up field line tracing #79

krystophny opened this issue Oct 10, 2019 · 5 comments

Comments

@krystophny
Copy link
Collaborator

After discussion at ISHW with @jonathanschilling we had the idea to speed up field line tracing by using symplectic integration.

Another, possibly even faster and simpler alternative would be to construct an interpolation of the single-turn map between Poincaré cuts and then evaluate the map for the number of turns. Construction requires 1e4-1e6 field lines to be traced over a single toroidal turn with the existing Runge-Kutta scheme and can be done in parallel.

See e.g. Kasilov et al, Phys. Plasmas 9, 3508 (2002); https://doi.org/10.1063/1.1493793 which is already much more complicated as particle orbits are mapped instead of field lines. This is also related to #47 as on can start tracing at arbitrary theta based on such a map.

@acerfon
Copy link
Collaborator

acerfon commented Oct 10, 2019 via email

@krystophny
Copy link
Collaborator Author

Dear Antoine,

thanks for your fast reply. Whether symplectic or non-symplectic schemes are faster at a given accuracy depends mostly on how long you trace the orbit. For alpha particles in stellarators that are traced over 100.000s to millions of toroidal turns we saw that low-order symplectic schemes outperform RK4/5 by factor 3-5 in computation time. However, if you need only 10.000 turns it is likely that adaptive schemes are faster. Anyway, I would propose to use direct integration only for a single turn and then immediately switch to an interpolated mapping, which will be orders of magnitude faster to evaluate than any numerical integration. We have a working Fortran code for that in Graz and I will play a bit with it and let you know if it is as useful as I think it is.

Best,

Chris

@acerfon
Copy link
Collaborator

acerfon commented Oct 10, 2019 via email

@krystophny
Copy link
Collaborator Author

Hi Antoine,

sure - didn't mean to dismiss the SDC methods and I would also call myself rather a user than an expert with regard to numerical integrators.

Best,
Chris

@jloizu
Copy link
Collaborator

jloizu commented Oct 14, 2019

This is also related to #47 as on can start tracing at arbitrary theta based on such a map.
I just want to say that @abaillod has already implemented a small change in the poincare routines so that one can choose in the input file the starting poloidal angle for the field-line tracing. It is currently only in his branch #75 but should be merged into master soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants