You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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?
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 parameterswarpx.max_omegap_dtandwarpx.max_omegac_dtfor 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_dtorwarpx.cflwith speedcis 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: