Repository navigation
Conversation
… Roe scheme Only the diagonal was zeroed (index [iVar][iVar] inside the jVar loop), so the off-diagonal entries kept the values of the previous edge. The guard of CUpwRoeBase_Flow already clears all entries. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
… explicit general-gas Roe In 3D the first three columns of the P matrix combine the entropy wave, weighted by n_j, with the shear waves. Their strengths are n_j (Delta rho - Delta p / c^2) + (Delta u x n)_j; the entropy jump was used unweighted in the first one only, so a contact or shear layer on a face not aligned with x got a wrong flux. The standard Roe scheme already projects the jump with P^-1 since #299. Unit test roe_contact_tests.cpp: a contact and a shear layer give the upwind flux in 2D and 3D. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
This was referenced Sep 30, 2026
joshkellyjak
requested changes
Oct 12, 2026
| delta_wave[2] = (UnitNormal[1]*delta_vel[0]-UnitNormal[0]*delta_vel[1])*zeta; | ||
| /*--- The first three columns of the 3D P matrix combine the entropy wave (weighted by the normal) with the | ||
| shear waves, so their strengths are n_j (Delta rho - Delta p / c^2) + (Delta u x n)_j. ---*/ | ||
| const su2double delta_entropy = delta_rho - delta_p/RoeSoundSpeed2; |
| delta_wave[2] = (UnitNormal[1]*delta_vel[0]-UnitNormal[0]*delta_vel[1]); | ||
| /*--- The first three columns of the 3D P matrix combine the entropy wave (weighted by the normal) with the | ||
| shear waves, so their strengths are n_j (Delta rho - Delta p / c^2) + (Delta u x n)_j. ---*/ | ||
| const su2double delta_entropy = delta_rho - delta_p/RoeSoundSpeed2; |
| delta_wave[2] = UnitNormal[1]*delta_vel[0]-UnitNormal[0]*delta_vel[1]; | ||
| /*--- The first three columns of the 3D P matrix combine the entropy wave (weighted by the normal) with the | ||
| shear waves, so their strengths are n_j (Delta rho - Delta p / c^2) + (Delta u x n)_j. ---*/ | ||
| const su2double delta_entropy = delta_rho - delta_p/(RoeSoundSpeed*RoeSoundSpeed); |
Contributor
Author
Contributor
Author
|
Propagated the ideal-gas HLLC supersonic face-enthalpy Jacobian fix and the regression test covering both Jacobian modes from #2943 (4960dd03be). The HLLC unit tests pass with 784 assertions. The convergence comparison and its scope are documented in #2943. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
3D flux. Three Roe-type schemes computed part of their numerical dissipation with a 2D formula, also in 3D: L2Roe, LMRoe and the explicit general-gas Roe. So a jump of density or of tangential velocity across a face (a contact or a shear layer) got a wrong flux on faces that are not aligned with the x axis. The standard Roe scheme is already correct (since Consistent calculation of dissipation terms for Roe #299), and 2D is not affected. The three schemes now use the same 3D formula as the standard Roe.
SU2/SU2_CFD/src/numerics/flow/convection/roe.cpp
Lines 337 to 339 in a6b7496
SU2/SU2_CFD/src/numerics/flow/convection/roe.cpp
Lines 410 to 412 in a6b7496
SU2/SU2_CFD/src/numerics/flow/convection/roe.cpp
Lines 904 to 906 in a6b7496
In 3D, the first three columns of the eigenvector matrix used by SU2 ($j = x, y, z$ ) are
so their wave strengths must be
With these,$\sum_j \alpha_j P_j$ is exactly the entropy wave plus the shear wave, $\left(\Delta\rho - \Delta p/c^2\right)(1, \mathbf{u}, q^2/2) + \rho,(0, \Delta\mathbf{u}_t, \mathbf{u}\cdot\Delta\mathbf{u}_t)$ , where $\Delta\mathbf{u}_t$ is the tangential part of the velocity jump. The three schemes used $\alpha_x = \Delta\rho - \Delta p/c^2$ , $\alpha_y = (\Delta\mathbf{u}\times\mathbf{n})_y$ , $\alpha_z = (\Delta\mathbf{u}\times\mathbf{n})_z$ , which is right only when $\mathbf{n} = \mathbf{e}_x$ . This is the standard 3D Roe dissipation (Roe 1981; Blazek 2015). L2Roe and LMRoe keep their low-Mach scaling of the velocity jumps (Oßwald et al. 2016; Rieper 2011).
General-gas Roe, protection for non-physical states. When the averaged speed of sound is not valid, the scheme should set the whole Jacobian to zero. Because of a wrong loop index it cleared only the diagonal, and the rest kept the values of the previous face.
SU2/SU2_CFD/src/numerics/flow/convection/roe.cpp
Lines 811 to 816 in a6b7496
A new unit test checks that a contact and a shear layer give the correct (upwind) flux in 2D and 3D for all four Roe variants. Without the fix, 50 of its checks fail.
This PR builds on #2943. It is part of the split of #2941.
References
Related Work
PR Checklist
pre-commit run --allto format old commits.🤖 Generated with Claude Code
https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6