Skip to content

Keep applying the frozen scalar limiter after LIMITER_ITER - #2910

Closed
ManasBagul23 wants to merge 2 commits into
su2code:developfrom
ManasBagul23:fix-scalar-limiter-iter
Closed

ManasBagul23 wants to merge 2 commits into
su2code:developfrom
ManasBagul23:fix-scalar-limiter-iter

Conversation

@ManasBagul23

Copy link
Copy Markdown

Proposed Changes

LIMITER_ITER is 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 in Upwind_Residual. CScalarSolver::Upwind_Residual also checked LIMITER_ITER, so after that iteration the turbulence and species reconstruction was not limited at all.

This PR only uses LIMITER_ITER to 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), comparing LIMITER_ITER= 5 with a recomputed limiter and with NONE. 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 set LIMITER_ITER use 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

  • 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.

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.
Copilot AI lite review requested due to automatic review settings September 16, 2026 20:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

@pcarruscag

Copy link
Copy Markdown
Member

PR doesn't do what you describe

@pcarruscag pcarruscag closed this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants