Skip to content

Conversation

@shbhmexe
Copy link

Proposed Changes

This PR fixes initialization inconsistencies, numerical robustness issues, and a critical copy-paste logic bug across multiple solver files:

CTransLMSolver.cpp:

  • Added missing EdgeFluxesDiff.Initialize() call in ReducerStrategy block for consistency with CTurbSSTSolver and CTurbSASolver
  • Added zero protection for VelocityMag to prevent division by zero at stagnation points
  • Fixed inconsistent arrow operator spacing
    CTurbSSTSolver.cpp:
  • Added zero protection for wall_dist division using max(wall_dist, EPS)
  • Added zero protection for FrictionVelocity using max(..., 1e-10)
    CSpeciesSolver.cpp (Critical Bug Fix):
  • Fixed copy-paste bug in multigrid loop where MESH_0 was incorrectly used instead of iMesh, causing turbulence and species solvers to post-process on the wrong mesh level during multigrid iterations

Related Work

  • No related issues or PRs
  • Found during code review of solver files for GSoC contribution

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.

- CTransLMSolver: Add EdgeFluxesDiff init, VelocityMag protection
- CTurbSSTSolver: Add wall_dist and FrictionVelocity protection
- CSpeciesSolver: Fix multigrid loop using wrong mesh level

Signed-off-by: shbhmexe <shubhushukla586@gmail.com>
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.

1 participant