From db34e3687e9c095e066052a6ad2f2b6d0b5145b9 Mon Sep 17 00:00:00 2001 From: Syphonicc Date: Fri, 16 Oct 2026 18:21:17 +0530 Subject: [PATCH 1/2] Remove dead axisymmetric Jacobian terms from the SST source --- SU2_CFD/include/numerics/turbulent/turb_sources.hpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp index 9f72b6e37cc4..a521fb5b9cf8 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp @@ -798,11 +798,9 @@ class CSourcePieceWise_TurbSST final : public CNumerics { Residual[0] -= yinv * Volume * cdk_axi; Residual[1] -= yinv * Volume * cdw_axi; - Jacobian_i[0][0] -= yinv * Volume * rhov; - Jacobian_i[0][1] -= 0.0; - Jacobian_i[1][0] -= 0.0; - Jacobian_i[1][1] -= yinv * Volume * rhov; - + /*--- These terms are not added to the Jacobian. Their derivative w.r.t. (rho k, rho w) is + * yinv * Volume * v, which reduces diagonal dominance for flow towards the axis (v < 0). Including + * the full term stalls the convergence of axisymmetric cases, keeping only v > 0 brings no benefit. ---*/ } public: From d51d2c143f3ba185a2ca8f5bfc46eb108bb9f05a Mon Sep 17 00:00:00 2001 From: Syphonicc Date: Sun, 18 Oct 2026 13:18:00 +0530 Subject: [PATCH 2/2] Keep the stabilizing part of the axisymmetric SST Jacobian, update regression values --- .../numerics/turbulent/turb_sources.hpp | 18 +++++++++++------- TestCases/parallel_regression.py | 2 +- TestCases/serial_regression.py | 4 ++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp index a521fb5b9cf8..14e4c808d993 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp @@ -798,9 +798,12 @@ class CSourcePieceWise_TurbSST final : public CNumerics { Residual[0] -= yinv * Volume * cdk_axi; Residual[1] -= yinv * Volume * cdw_axi; - /*--- These terms are not added to the Jacobian. Their derivative w.r.t. (rho k, rho w) is - * yinv * Volume * v, which reduces diagonal dominance for flow towards the axis (v < 0). Including - * the full term stalls the convergence of axisymmetric cases, keeping only v > 0 brings no benefit. ---*/ + /*--- Derivative w.r.t. the conservative variables (rho k, rho w), only the part that increases + * diagonal dominance (v > 0) is kept, as the term is destabilizing for flow towards the axis. ---*/ + const su2double jac_axi = yinv * Volume * max(V_i[idx.Velocity() + 1], 0.0); + Jacobian_i[0][0] -= jac_axi; + Jacobian_i[1][1] -= jac_axi; + } public: @@ -1014,16 +1017,17 @@ class CSourcePieceWise_TurbSST final : public CNumerics { /*--- Cross diffusion is included in the viscous fluxes, not this source term. ---*/ - /*--- Contribution due to 2D axisymmetric formulation ---*/ - - if (axisymmetric) ResidualAxisymmetricConvectionDiffusion(alfa_blended, zeta); - /*--- Implicit part ---*/ Jacobian_i[0][0] = -beta_star * ScalarVar_i[1] * Volume * (1.0 + zetaFMt); Jacobian_i[0][1] = -beta_star * ScalarVar_i[0] * Volume * (1.0 + zetaFMt); Jacobian_i[1][0] = 0.0; Jacobian_i[1][1] = -2.0 * beta_blended * ScalarVar_i[1] * Volume * (1.0 - 0.09/beta_blended * zetaFMt); + + /*--- Contribution due to 2D axisymmetric formulation, after the implicit part since it + * adds to the Jacobian (which the assignments above would otherwise overwrite). ---*/ + + if (axisymmetric) ResidualAxisymmetricConvectionDiffusion(alfa_blended, zeta); } AD::SetPreaccOut(Residual, nVar); diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 30824edc691b..26200f156611 100755 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -660,7 +660,7 @@ def main(): axi_rans_air_nozzle_restart.cfg_dir = "axisymmetric_rans/air_nozzle" axi_rans_air_nozzle_restart.cfg_file = "air_nozzle_restart.cfg" axi_rans_air_nozzle_restart.test_iter = 10 - axi_rans_air_nozzle_restart.test_vals = [-5.144760, 0.426779, -2.900513, 1.606061, 0.000000] + axi_rans_air_nozzle_restart.test_vals = [-5.144831, 0.426691, -2.894552, 1.607260, 0.000000] axi_rans_air_nozzle_restart.test_vals_aarch64 = [-14.143310, -9.163287, -10.858232, -5.787715, 0.000000] axi_rans_air_nozzle_restart.tol = 0.0001 test_list.append(axi_rans_air_nozzle_restart) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 1edd0378ab2a..30750625f89f 100755 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -375,7 +375,7 @@ def main(): axi_rans_air_nozzle_restart.cfg_dir = "axisymmetric_rans/air_nozzle" axi_rans_air_nozzle_restart.cfg_file = "air_nozzle_restart.cfg" axi_rans_air_nozzle_restart.test_iter = 10 - axi_rans_air_nozzle_restart.test_vals = [-5.135350, 0.436347, -2.878865, 1.663300, 0.000000] + axi_rans_air_nozzle_restart.test_vals = [-5.135423, 0.436257, -2.874139, 1.664112, 0.000000] axi_rans_air_nozzle_restart.test_vals_aarch64 = [-14.143715, -9.170705, -10.848554, -5.776746, 0.000000] axi_rans_air_nozzle_restart.tol = 0.0001 test_list.append(axi_rans_air_nozzle_restart) @@ -385,7 +385,7 @@ def main(): axi_rans_air_nozzle_species.cfg_dir = "axisymmetric_rans/air_nozzle" axi_rans_air_nozzle_species.cfg_file = "air_nozzle_species.cfg" axi_rans_air_nozzle_species.test_iter = 10 - axi_rans_air_nozzle_species.test_vals = [-2.243181, 3.273075, -1.958732, 5.883857, -2.469621, 0.000000] + axi_rans_air_nozzle_species.test_vals = [-2.243059, 3.273177, -1.947544, 5.883852, -2.469401, 0.000000] axi_rans_air_nozzle_species.tol = 0.0001 test_list.append(axi_rans_air_nozzle_species)