Repository navigation
Conversation
The factor compares the old and new internal energy, computed as rho*E - 0.5*|rho*u|^2 without the division by rho (the code comment already refers to the static energy). For dimensional cases this value can be negative, and those points got a zero update: in the axisymmetric air nozzle 28 % of the points were frozen, and the case could not re-converge from a restart. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
Test casesBoth cases: axisymmetric air nozzle, dimensional, 2 MPI ranks, develop against this PR. Files and scripts: pr1 (see the README). Restart from a converged solution (SST). The start solution was converged with this PR. Develop does not stay converged: the density residual rises from -12 to -10.2 in 300 iterations, because the points with a "negative internal energy" are frozen. With this PR the residual stays at -12 and the run stops after 10 iterations. Start from rest (SA, CFL adaptation). Develop stays at a density residual of -2 for 20 000 iterations, with a wrong outlet pressure (5.1 bar). With this PR it reaches -11 in 11 647 iterations (outlet pressure 1.64 bar). |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
|
@rois1995 if this PR is finished can you update the regression tests? looks like it's a small PR that can be merged soon. |


Proposed Changes
The implicit compressible solver limits the update of each point with an under-relaxation factor. To decide how much to limit, it compares the internal energy before and after the update. This internal energy was computed wrongly: the kinetic energy was not divided by the density.
SU2/SU2_CFD/src/solvers/CEulerSolver.cpp
Lines 2555 to 2556 in a6b7496
In cases run with dimensional values the wrong internal energy can become negative. When it does, the point gets no update at all and stays frozen. In an air nozzle about a quarter of the points were frozen, so the case could not converge.
The fix is 5 lines: the kinetic energy is divided by the density, using the old and the new density.
Almost all compressible implicit regression cases converge a little differently, so most regression values change. They are updated from the CI.
This is the first of four PRs that replace #2941, to make the review easier. The other three build on this one:
Related Work
PR Checklist
pre-commit run --allto format old commits.🤖 Generated with Claude Code
https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6