Detect non-physical solutions in a statistic way instead of just P or T <= 0#2830
Open
pcarruscag wants to merge 3 commits into
Open
Detect non-physical solutions in a statistic way instead of just P or T <= 0#2830pcarruscag wants to merge 3 commits into
pcarruscag wants to merge 3 commits into
Conversation
|
|
||
| /*--- Revert to first order if the state is non-physical. ---*/ | ||
| Double bad_recon = fmax(neg_p_or_rho, neg_sound_speed); | ||
| Double nonPhysical = fmax(neg_p_or_rho, neg_sound_speed); |
| for (int i = -nSigma; i < nSigma; ++i) { | ||
| const int jump = (i == -1); | ||
| outlierTable.AddColumn(std::to_string(i) + " to " + std::to_string(i + 1 + jump), 12); | ||
| i += jump; |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed Changes
I went back to the HLCRM (everything but the Nacelle's version), and there are areas (sharp corners) behind the pylons where temperature becomes either very low or very high.
Eventually, these unstable points (about 100 out of ~4M) lead to divergence despite the automatic relaxation and CFL adaptation. Solution limiters are not enough, probably because within these regions the solution appears smooth relative to the large changes between points.
So the idea here is to find these points from the mean temperature and standard deviation and treat them as first order; we already had something like this for edges where the reconstructed states become non-physical.
Off by default. I don't have a small enough case that triggers this.
It may not work very well for flows with huge temperature ranges.
PR Checklist
pre-commit run --allto format old commits.