-
Notifications
You must be signed in to change notification settings - Fork 29
Implement Strang splitting with space charge #920
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
base: development
Are you sure you want to change the base?
Implement Strang splitting with space charge #920
Conversation
| 9.029112e-04, | ||
| 9.029112e-04, | ||
| 1.841402e-06, | ||
| 8.94427191e-04, |
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.
Here the targets were tuned to analytically-determined values, instead of being set to coincide with a low-resolution run.
| atol = 0.0 # ignored | ||
| rtol = 2.0e-3 # from random sampling of a smooth distribution | ||
| rtol = 3.5e-3 # from random sampling of a smooth distribution | ||
| print(f" rtol={rtol} (ignored: atol~={atol})") |
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.
The original tolerance was too tight.
|
The attached result illustrates the improvement in numerical convergence obtained when running the expanding beam test with envelope tracking ( |
Add linear return maps for additional elements (BLAST-ImpactX#923)
| << " slice_step=" << slice_step << "\n"; | ||
| } | ||
|
|
||
| std::visit([&ref, &cm](auto&& element) |
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.
Is the reference particle pushed twice now? o.0
Happens again in line 176 below
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.
Clarified in person:
- also includes envelope push
- note the difference in weights (half step for push, full step for SC & CSR, another half step for push)
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.
We have to make sure that thin elements, which only go through this loop body once, are still only kicked once though.
3d57bbb to
dcae328
Compare
This PR modifies the main tracking loop with collective effects to use a second-order Strang splitting.
nslicesis time-symmetric, which is needed for reversible back-trackingClose #846
A follow-up PR will address Issue #794