Add unphysical checks for high speed or high energy in Flu_Close() #505
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.
Motivations
Currently, the unphysically high velocity and energy can be obtained by the fluid solver without being caught and corrected.
For example, when the density is$+\varepsilon$ to machine precision while the momentum density is finite after the update, we can get huge kinetic energy, which is not physical. And this high energy can have a tremendous dynamical effect in the simulations later. With the check, we can avoid keeping running with an unrealistic explosion.
In non-relativistic simulations, we expect the speed of the fluid to be much less than the speed of light and the energy much less than the rest-mass energy. When these cases happen, it usually hints that there is an unphysical update numerically, and we should invoke the correction for it. The relativistic limit here is just a bottom-line check. We hope that when the numerical issue happens, the speed/energy will be much larger than this limit. Otherwise, it will be hard to catch it, as there is no general upper limit for the speed and energy.
Changes