Keep applying the frozen scalar limiter after LIMITER_ITER - #2910
Closed
ManasBagul23 wants to merge 2 commits into
Closed
ManasBagul23 wants to merge 2 commits into
ManasBagul23 wants to merge 2 commits into
Conversation
Setting SLOPE_LIMITER_TURB or SLOPE_LIMITER_SPECIES to VAN_ALBADA_EDGE aborted with "Unknown limiter type", because CScalarSolver always computed point-based limiters. Apply the edge limiter during the MUSCL reconstruction in Upwind_Residual, the same way the flow solvers do, and skip the point limiter computation for it. The LIMITER volume outputs of the scalar solvers are not registered for VAN_ALBADA_EDGE, as for the flow solver, since there are no point limiter values to write.
LIMITER_ITER is documented to freeze the limiter after a number of iterations. The flow solvers stop recomputing the limiter at that point but keep applying the stored values, whereas CScalarSolver also stopped applying it in Upwind_Residual, so the turbulence and species reconstruction became unlimited. Only use LIMITER_ITER to decide when the limiter is recomputed, as in the flow solvers.
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review comments remain, and the supplied assessments indicate approval readiness.
Pull request overview
This pull request keeps scalar limiter values applied after LIMITER_ITER, matching flow-solver behavior.
Changes:
- Preserves frozen scalar limiter values.
- Adds edge-based Van Albada handling.
- Updates limiter output handling and configuration documentation.
File summaries
| File | Summary |
|---|---|
SU2_CFD/src/output/CFlowOutput.cpp |
Excludes unavailable edge limiter fields from output. |
SU2_CFD/include/solvers/CScalarSolver.inl |
Updates scalar limiter recomputation and application. |
config_template.cfg |
Documents supported limiter options. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
|
PR doesn't do what you describe |
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
LIMITER_ITERis documented to "freeze the value of the limiter after a number of iterations". The flow solvers stop recomputing the limiter after that iteration but keep applying the stored values inUpwind_Residual.CScalarSolver::Upwind_Residualalso checkedLIMITER_ITER, so after that iteration the turbulence and species reconstruction was not limited at all.This PR only uses
LIMITER_ITERto decide when the scalar limiter is recomputed, as in the flow solvers.Checked with
TestCases/rans/flatplate/turb_SA_flatplate_species.cfg(MUSCL_TURB= YES,MUSCL_SPECIES= YES,VENKATAKRISHNAN), comparingLIMITER_ITER= 5with a recomputed limiter and withNONE. In the first frozen iteration (iteration 6) the species residual differs from the recomputed-limiter run by 1.2e-2 on develop, moving towards the unlimited run, and by 1.5e-3 with this change. The TestCases that setLIMITER_ITERuse 99999 or more, so the regression tests are not affected.Related Work
This branch is based on #2908, which touches the neighboring lines, so the first commit belongs to #2908 and only the last commit is part of this PR. I will rebase once #2908 is merged.
PR Checklist
pre-commit run --allto format old commits.