Skip to content

Add new time step size limiters#6840

Merged
dpgrote merged 14 commits intoBLAST-WarpX:developmentfrom
dpgrote:add_dt_limiters
May 9, 2026
Merged

Add new time step size limiters#6840
dpgrote merged 14 commits intoBLAST-WarpX:developmentfrom
dpgrote:add_dt_limiters

Conversation

@dpgrote
Copy link
Copy Markdown
Member

@dpgrote dpgrote commented May 5, 2026

This add time step limiters based on the plasma frequency and cyclotron frequency. This is in addition to the existing limiter based on the particle speed and controlled by the parameter warpx.dt_update_interval. This adds two new input parameters warpx.max_omegap_dt and warpx.max_omegac_dt for the plasma and cyclotron frequency limits.

For this PR, when calculating the cyclotron frequency, only the B-field MultiFabs and the constant external fields are used when finding the maximum B-field. This ignores the rest of the external fields due to the complication or cost required to include them. If required, a later PR could include them, perhaps by fetching the B-field for the particles (which could be expensive) or by calculating the external B-fields at the grid locations, which would be complicated.

Also, currently, for the initial time steps the warpx.max_dt or warpx.cfl with speed c is used. It would be better to apply the limiters initially rather that requiring the user to specify the initial step. This can be done in this PR or a separate PR.

Todo:

  • Add CI test
  • Add documentation

@dpgrote dpgrote requested a review from JustinRayAngus May 5, 2026 22:50
@dpgrote dpgrote added the enhancement New feature or request label May 5, 2026
@dpgrote dpgrote changed the title [WIP]Add new time step size limiters Add new time step size limiters May 6, 2026
Comment thread Source/Evolve/WarpXComputeDt.cpp Outdated
@JustinRayAngus
Copy link
Copy Markdown
Contributor

JustinRayAngus commented May 7, 2026

This mostly looks good. In addition to the comment above, I have another thing for you to consider. It would be nice to have a reduced diagnostic for the time step that could include the products of the time step with the three restrictions, (\omega_p \Delta t, \omega_c \Delta t, and |v|dt/dx). This is probably best left to a future PR, but is there anything in this PR that you would do differently with this diagnostic in mind?

@dpgrote
Copy link
Copy Markdown
Member Author

dpgrote commented May 8, 2026

This mostly looks good. In addition to the comment above, I have another thing for you to consider. It would be nice to have a reduced diagnostic for the time step that could include the products of the time step with the three restrictions, (\omega_p \Delta t, \omega_c \Delta t, and |v|dt/dx). This is probably best left to a future PR, but is there anything in this PR that you would do differently with this diagnostic in mind?

I went ahead and added the diagnostic output since it would be needed to verify the changes anyway.

Comment thread Source/Evolve/WarpXComputeDt.cpp Fixed
@dpgrote dpgrote enabled auto-merge (squash) May 8, 2026 23:26
@dpgrote dpgrote merged commit 8938d09 into BLAST-WarpX:development May 9, 2026
47 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants