Skip to content

Support VAN_ALBADA_EDGE limiter for turbulence and species - #2908

Closed
ManasBagul23 wants to merge 1 commit into
su2code:developfrom
ManasBagul23:add-van-albada-scalar-limiter
Closed

ManasBagul23 wants to merge 1 commit into
su2code:developfrom
ManasBagul23:add-van-albada-scalar-limiter

Conversation

@ManasBagul23

Copy link
Copy Markdown

Proposed Changes

Setting SLOPE_LIMITER_TURB or SLOPE_LIMITER_SPECIES to VAN_ALBADA_EDGE currently aborts with Unknown limiter type., because CScalarSolver always computes point-based limiters.

  • The edge limiter is applied during the MUSCL reconstruction in CScalarSolver::Upwind_Residual, using LimiterHelpers<>::vanAlbadaFunction as CEulerSolver and CIncEulerSolver do, and SetSolution_Limiter is skipped for it.
  • The LIMITER volume outputs of the turbulence and species solvers are not registered for VAN_ALBADA_EDGE, as for the flow solver, since there are no point limiter values.
  • config_template.cfg no longer says that SLOPE_LIMITER_TURB excludes VAN_ALBADA_EDGE.

Tested with TestCases/rans/flatplate/turb_SA_flatplate_species.cfg with MUSCL_TURB= YES and MUSCL_SPECIES= YES, 50 iterations, serial and on 2 MPI ranks: the case runs with VAN_ALBADA_EDGE for both scalars and the residuals differ from both VENKATAKRISHNAN and NONE. The residual history with VENKATAKRISHNAN is identical to develop.

I did not add a regression test yet, I can add one if you would like one for this.

Related Work

Closes #2416.

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.

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.

🟡 Changes recommended

Add regression coverage for VAN_ALBADA_EDGE in scalar turbulence and species cases.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds VAN_ALBADA_EDGE support for turbulence and species scalar MUSCL reconstruction.

Changes:

  • Applies edge-based Van Albada limiting in CScalarSolver.
  • Adjusts limiter output registration.
  • Updates limiter configuration documentation.
File summaries
File Description
SU2_CFD/src/output/CFlowOutput.cpp Adjusts limiter output handling.
SU2_CFD/include/solvers/CScalarSolver.inl Implements scalar edge-limiter reconstruction.
config_template.cfg Removes the outdated limiter restriction.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +274 to +276
if (van_albada) {
Project_Grad_i *= LimiterHelpers<>::vanAlbadaFunction(Project_Grad_i, U_ij, EPS);
Project_Grad_j *= LimiterHelpers<>::vanAlbadaFunction(Project_Grad_j, U_ij, EPS);
@pcarruscag

Copy link
Copy Markdown
Member

Can be done #2878 more easily

@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