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

Improve adaptive time step #883

Closed
MaxThevenet opened this issue Mar 3, 2023 · 1 comment
Closed

Improve adaptive time step #883

MaxThevenet opened this issue Mar 3, 2023 · 1 comment
Labels
component: beam About the beam species Parallelization Longitudinal and transverse MPI decomposition

Comments

@MaxThevenet
Copy link
Member

MaxThevenet commented Mar 3, 2023

In the current adaptive time step, Rank r computes step s and calculates (from beam properties at step s) the time step it will use to go from step s+nranks to s+nranks+1. At step s, rank r does not know what the physical time will be at step s+nranks (it will receive when starting step s+nranks), it just calculates the dt it will use then. An easy improvement would be to use the current Ez (at step s) to better estimate what will be the energy at the beginning of step s+nranks. A rough estimate would be min(uz-Ez*nranks*dt). This will not be too accurate because the time step is adaptive, so a better estimate would be obtained by also including adaptive time steps (just analytically calculate how much deceleration occurred after nranks/nt_per_betatron betatron periods or so). Note that, as we do a prediction of the momentum at s+nranks, we should also do a prediction of the position, to evaluate better the density and avoid artifacts, see #884. A soon-to-be-open PR will also store the min_uz (over beams and slices etc.). For now it will contain the min_uz at step s, but should also be updated to contain min_uz at step s+nranks.

@MaxThevenet MaxThevenet added component: beam About the beam species Parallelization Longitudinal and transverse MPI decomposition labels Mar 3, 2023
@MaxThevenet
Copy link
Member Author

Done in #893

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: beam About the beam species Parallelization Longitudinal and transverse MPI decomposition
Projects
None yet
Development

No branches or pull requests

1 participant