From db34e3687e9c095e066052a6ad2f2b6d0b5145b9 Mon Sep 17 00:00:00 2001 From: Syphonicc Date: Fri, 16 Oct 2026 18:21:17 +0530 Subject: [PATCH 1/3] 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/3] 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) From e1b561eb272bf00cea88dfb240bddaf0f9754703 Mon Sep 17 00:00:00 2001 From: Syphonicc Date: Mon, 19 Oct 2026 00:14:46 +0530 Subject: [PATCH 3/3] Update regression values for the axisymmetric SST Jacobian change --- TestCases/hybrid_regression.py | 8 ++++---- TestCases/parallel_regression.py | 6 +++--- TestCases/parallel_regression_AD.py | 2 +- TestCases/serial_regression.py | 8 ++++---- TestCases/tutorials.py | 2 +- TestCases/vandv.py | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 21c63694f567..944b66426bce 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -219,7 +219,7 @@ def main(): turb_naca0012_sst.cfg_dir = "rans/naca0012" turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" turb_naca0012_sst.test_iter = 10 - turb_naca0012_sst.test_vals = [-12.094026, -15.250728, -5.906323, 1.070413, 0.015775, -2.854334, 0.000000] + turb_naca0012_sst.test_vals = [-12.093978, -15.250833, -5.906324, 1.070413, 0.015775, -2.854996, 0.000000] turb_naca0012_sst.test_vals_aarch64 = [-12.075928, -15.246732, -5.861249, 1.070036, 0.015841, -2.835263, 0] test_list.append(turb_naca0012_sst) @@ -228,7 +228,7 @@ def main(): turb_naca0012_sst_sust.cfg_dir = "rans/naca0012" turb_naca0012_sst_sust.cfg_file = "turb_NACA0012_sst_sust.cfg" turb_naca0012_sst_sust.test_iter = 10 - turb_naca0012_sst_sust.test_vals = [-12.080919, -14.837175, -5.732906, 1.000893, 0.019109, -2.119961] + turb_naca0012_sst_sust.test_vals = [-12.080835, -14.837175, -5.732908, 1.000893, 0.019109, -2.119767] turb_naca0012_sst_sust.test_vals_aarch64 = [-12.073210, -14.836724, -5.732627, 1.000050, 0.019144, -2.629689] test_list.append(turb_naca0012_sst_sust) @@ -265,7 +265,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.068875, 0.504406, -2.840213, 1.705449, 0.000000] + axi_rans_air_nozzle_restart.test_vals = [-5.068933, 0.504335, -2.835949, 1.707362, 0.000000] axi_rans_air_nozzle_restart.test_vals_aarch64 = [-14.140441, -9.154674, -10.886121, -5.806594, 0.000000] test_list.append(axi_rans_air_nozzle_restart) @@ -602,7 +602,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-11.959252, -12.213981, -19.314222, -13.600248, -19.076384, -13.444335, 73286.000000, 73286.000000, 0.020056, 82.286000] + Jones_tc_restart.test_vals = [-11.959253, -12.213612, -19.314223, -13.600253, -19.077186, -13.444728, 73286.000000, 73286.000000, 0.020056, 82.286000] test_list.append(Jones_tc_restart) # 2D axial stage diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 26200f156611..a03fdfb61039 100755 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -581,7 +581,7 @@ def main(): turb_naca0012_sst.cfg_dir = "rans/naca0012" turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" turb_naca0012_sst.test_iter = 10 - turb_naca0012_sst.test_vals = [-12.094692, -15.251093, -5.906365, 1.070413, 0.015775, -2.376043, 0.000000] + turb_naca0012_sst.test_vals = [-12.094736, -15.251092, -5.906365, 1.070413, 0.015775, -2.376001, 0.000000] turb_naca0012_sst.test_vals_aarch64 = [-12.075620, -15.246688, -5.861276, 1.070036, 0.015841, -1.991001, 0.000000] turb_naca0012_sst.timeout = 3200 test_list.append(turb_naca0012_sst) @@ -1331,7 +1331,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-11.905382, -12.212100, -19.212143, -13.508268, -19.078783, -13.446389, 73286.000000, 73286.000000, 0.020056, 82.286000] + Jones_tc_restart.test_vals = [-11.905370, -12.212031, -19.212143, -13.508267, -19.079216, -13.445953, 73286.000000, 73286.000000, 0.020056, 82.286000] test_list.append(Jones_tc_restart) # 2D axial stage @@ -1639,7 +1639,7 @@ def main(): pywrapper_turb_naca0012_sst.cfg_dir = "rans/naca0012" pywrapper_turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" pywrapper_turb_naca0012_sst.test_iter = 10 - pywrapper_turb_naca0012_sst.test_vals = [-12.094692, -15.251093, -5.906365, 1.070413, 0.015775, -2.376043, 0.000000] + pywrapper_turb_naca0012_sst.test_vals = [-12.094736, -15.251092, -5.906365, 1.070413, 0.015775, -2.376001, 0.000000] pywrapper_turb_naca0012_sst.test_vals_aarch64 = [-12.075620, -15.246688, -5.861276, 1.070036, 0.015841, -1.991001, 0.000000] pywrapper_turb_naca0012_sst.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--parallel -f") pywrapper_turb_naca0012_sst.timeout = 3200 diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index 250f96e66c12..3fa2797ae745 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -150,7 +150,7 @@ def main(): discadj_axisymmetric_rans_nozzle.cfg_dir = "axisymmetric_rans/air_nozzle" discadj_axisymmetric_rans_nozzle.cfg_file = "air_nozzle_restart.cfg" discadj_axisymmetric_rans_nozzle.test_iter = 10 - discadj_axisymmetric_rans_nozzle.test_vals = [9.742490, 5.136585, 7.107742, 2.488366] + discadj_axisymmetric_rans_nozzle.test_vals = [9.742490, 5.136583, 7.106490, 2.488167] discadj_axisymmetric_rans_nozzle.no_restart = True test_list.append(discadj_axisymmetric_rans_nozzle) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 30750625f89f..574fedf84d4c 100755 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -311,7 +311,7 @@ def main(): turb_naca0012_sst.cfg_dir = "rans/naca0012" turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" turb_naca0012_sst.test_iter = 10 - turb_naca0012_sst.test_vals = [-12.094431, -15.251082, -5.906366, 1.070413, 0.015775, -3.178469, 0.000000] + turb_naca0012_sst.test_vals = [-12.094366, -15.251082, -5.906366, 1.070413, 0.015775, -3.178304, 0.000000] turb_naca0012_sst.test_vals_aarch64 = [-12.076068, -15.246740, -5.861280, 1.070036, 0.015841, -3.297854, 0.000000] turb_naca0012_sst.timeout = 3200 test_list.append(turb_naca0012_sst) @@ -343,7 +343,7 @@ def main(): turb_naca0012_sst_sust_restart.cfg_dir = "rans/naca0012" turb_naca0012_sst_sust_restart.cfg_file = "turb_NACA0012_sst_sust.cfg" turb_naca0012_sst_sust_restart.test_iter = 10 - turb_naca0012_sst_sust_restart.test_vals = [-12.080496, -14.837169, -5.733461, 1.000893, 0.019109, -2.634008] + turb_naca0012_sst_sust_restart.test_vals = [-12.080536, -14.837169, -5.733461, 1.000893, 0.019109, -2.633948] turb_naca0012_sst_sust_restart.test_vals_aarch64 = [-12.074189, -14.836725, -5.732398, 1.000050, 0.019144, -3.315560] turb_naca0012_sst_sust_restart.timeout = 3200 test_list.append(turb_naca0012_sst_sust_restart) @@ -966,7 +966,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-11.905642, -12.212181, -19.212554, -13.508053, -19.069991, -13.439494, 73286.000000, 73286.000000, 0.020056, 82.286000] + Jones_tc_restart.test_vals = [-11.905621, -12.212078, -19.212558, -13.508063, -19.069990, -13.439493, 73286.000000, 73286.000000, 0.020056, 82.286000] test_list.append(Jones_tc_restart) # 2D axial stage @@ -1688,7 +1688,7 @@ def main(): pywrapper_turb_naca0012_sst.cfg_dir = "rans/naca0012" pywrapper_turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" pywrapper_turb_naca0012_sst.test_iter = 10 - pywrapper_turb_naca0012_sst.test_vals = [-12.094431, -15.251082, -5.906366, 1.070413, 0.015775, -3.178469, 0.000000] + pywrapper_turb_naca0012_sst.test_vals = [-12.094366, -15.251082, -5.906366, 1.070413, 0.015775, -3.178304, 0.000000] pywrapper_turb_naca0012_sst.test_vals_aarch64 = [-12.076068, -15.246740, -5.861280, 1.070036, 0.015841, -3.297854, 0.000000] pywrapper_turb_naca0012_sst.command = TestCase.Command(exec = "SU2_CFD.py", param = "-f") pywrapper_turb_naca0012_sst.timeout = 3200 diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index 22e9e55fdb03..c671e8b61def 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -259,7 +259,7 @@ def main(): tutorial_trans_flatplate_T3Am.cfg_dir = "../Tutorials/compressible_flow/Transitional_Flat_Plate/Langtry_and_Menter/T3A-" tutorial_trans_flatplate_T3Am.cfg_file = "transitional_LM_model_ConfigFile.cfg" tutorial_trans_flatplate_T3Am.test_iter = 20 - tutorial_trans_flatplate_T3Am.test_vals = [-5.587389, -1.700868, -3.093935, -0.102834, -3.750523, 3.287643, -2.394575, 1.119623] + tutorial_trans_flatplate_T3Am.test_vals = [-5.587370, -1.700868, -3.093907, -0.102817, -3.750523, 3.287643, -2.394575, 1.119623] tutorial_trans_flatplate_T3Am.test_vals_aarch64 = [-5.540938, -1.681627, -2.878831, -0.058224, -3.695533, 3.413628, -2.385345, 1.103633] tutorial_trans_flatplate_T3Am.no_restart = True test_list.append(tutorial_trans_flatplate_T3Am) diff --git a/TestCases/vandv.py b/TestCases/vandv.py index 88602b2d2275..d7ffdd79509d 100644 --- a/TestCases/vandv.py +++ b/TestCases/vandv.py @@ -63,7 +63,7 @@ def main(): flatplate_sst1994m.cfg_dir = "vandv/rans/flatplate" flatplate_sst1994m.cfg_file = "turb_flatplate_sst.cfg" flatplate_sst1994m.test_iter = 5 - flatplate_sst1994m.test_vals = [-13.040943, -10.136971, -10.942764, -7.985181, -10.323857, -4.732487, 0.002801] + flatplate_sst1994m.test_vals = [-13.040942, -10.136971, -10.942969, -7.985184, -10.323857, -4.732487, 0.002801] flatplate_sst1994m.test_vals_aarch64 = [-13.021715, -9.534786, -10.401912, -7.501836, -9.750800, -4.850665, 0.002807] test_list.append(flatplate_sst1994m) @@ -72,7 +72,7 @@ def main(): bump_sst1994m.cfg_dir = "vandv/rans/bump_in_channel" bump_sst1994m.cfg_file = "turb_bump_sst.cfg" bump_sst1994m.test_iter = 5 - bump_sst1994m.test_vals = [-11.928292, -10.095796, -9.512953, -6.445652, -11.774088, -6.988752, 0.004931] + bump_sst1994m.test_vals = [-11.928283, -10.095826, -9.512968, -6.445644, -11.774076, -6.988223, 0.004931] bump_sst1994m.test_vals_aarch64 = [-13.042689, -10.812982, -10.604523, -7.655547, -10.816257, -5.308083, 0.004911] test_list.append(bump_sst1994m) @@ -121,7 +121,7 @@ def main(): sandiajet_sst.cfg_dir = "vandv/species_transport/sandia_jet" sandiajet_sst.cfg_file = "validation.cfg" sandiajet_sst.test_iter = 5 - sandiajet_sst.test_vals = [-4.930056, -3.072757, -3.531917, -3.632319, 1.186060, -6.175518, 5.000000, -1.413277, 5.000000, -4.735257, 5.000000, -1.924560, 0.000256, 0.000000, 0.000000, 0.000256, 4126.200000, 4008.100000, 62.399000, 55.713000] + sandiajet_sst.test_vals = [-4.930056, -3.072757, -3.531917, -3.632034, 1.186060, -6.175515, 5.000000, -1.413277, 5.000000, -4.736007, 5.000000, -1.924583, 0.000256, 0.000000, 0.000000, 0.000256, 4126.200000, 4008.100000, 62.399000, 55.713000] sandiajet_sst.test_vals_aarch64 = [-8.271400, -6.305945, -6.123143, -5.634565, -1.687556, -7.869775, 5.000000, -1.527449, 5.000000, -4.053788, 5.000000, -2.303502, 0.000257, 0.000000, 0.000000, 0.000257, 4020.500000, 3919.900000, 49.151000, 51.436000] test_list.append(sandiajet_sst)