-
Notifications
You must be signed in to change notification settings - Fork 909
Fix solver initialization and multigrid logic bugs #2662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Fix solver initialization and multigrid logic bugs #2662
Conversation
- 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 <[email protected]>
| if (ReducerStrategy) { | ||
| EdgeFluxes.Initialize(geometry->GetnEdge(), geometry->GetnEdge(), nVar, nullptr); | ||
| EdgeFluxesDiff.Initialize(geometry->GetnEdge(), geometry->GetnEdge(), nVar, nullptr); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary, only turbulence solvers use the EdgeFluxesDiff variable at the moment.
|
|
||
| if (config->GetKind_Turb_Model() != TURB_MODEL::NONE) | ||
| solver[iMesh][TURB_SOL]->Postprocessing(geometry[MESH_0], solver[MESH_0], config, MESH_0); | ||
| solver[iMesh][TURB_SOL]->Postprocessing(geometry[iMesh], solver[iMesh], config, iMesh); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We currently do not have MG active for scalars, and there is no mesh dependent stuff in PostProcessing so this does not do anything.
Co-authored-by: Pedro Gomes <[email protected]>
Co-authored-by: Pedro Gomes <[email protected]>
Co-authored-by: Pedro Gomes <[email protected]>
Proposed Changes
This PR fixes initialization inconsistencies, numerical robustness issues, and a critical copy-paste logic bug across multiple solver files:
CTransLMSolver.cpp:
EdgeFluxesDiff.Initialize()call in ReducerStrategy block for consistency with CTurbSSTSolver and CTurbSASolverVelocityMagto prevent division by zero at stagnation pointsCTurbSSTSolver.cpp:
wall_distdivision usingmax(wall_dist, EPS)FrictionVelocityusingmax(..., 1e-10)CSpeciesSolver.cpp (Critical Bug Fix):
MESH_0was incorrectly used instead ofiMesh, causing turbulence and species solvers to post-process on the wrong mesh level during multigrid iterationsRelated Work
PR Checklist
pre-commit run --allto format old commits.