Skip to content

Detect non-physical solutions in a statistic way instead of just P or T <= 0#2830

Open
pcarruscag wants to merge 3 commits into
developfrom
pedro/stats
Open

Detect non-physical solutions in a statistic way instead of just P or T <= 0#2830
pcarruscag wants to merge 3 commits into
developfrom
pedro/stats

Conversation

@pcarruscag

Copy link
Copy Markdown
Member

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

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.


/*--- 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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants