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

Better defaults for production (in particular adaptive time step) #893

Merged
merged 9 commits into from
Mar 14, 2023

Conversation

MaxThevenet
Copy link
Member

@MaxThevenet MaxThevenet commented Mar 12, 2023

  • Turn on predict and phase options of adaptive time step by default. They make a huge difference in the presence of density ramps, see below.
  • Turn on beam sub cycling by default
  • Decrease nt_per_betatron default. Should be hardly less accurate and 2x faster
  • Fix a few print statements.

The figure below shows the final emittance after a PWFA stage, as a function of nt_per_betatron (the number of time steps per betatron period with adaptive time step), with the original adaptive time step, with feature predict on, with feature phase on, and with both. It clearly converges much faster with both. The right plot shows the effect of the tolerance of the phase feature.
adaptive_new.pdf

@MaxThevenet MaxThevenet changed the title [WIP] better defaults for production (in particular adaptive time step) Better defaults for production (in particular adaptive time step) Mar 13, 2023
@MaxThevenet
Copy link
Member Author

CI fails probably because sub-cycling is now on by default. I could reset the 3 failing tests.

@MaxThevenet
Copy link
Member Author

After some more test, I observed little difference with the subcycling. We could put this up to 5, but that can be done in another PR.

Copy link
Member

@SeverinDiederichs SeverinDiederichs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you for the detailed study and drastically improving the adaptive time step 🚀

@MaxThevenet MaxThevenet merged commit 9c73bff into Hi-PACE:development Mar 14, 2023
@MaxThevenet MaxThevenet deleted the defaults_adaptive branch March 14, 2023 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants