From 147da5d4eda752f84512a7b260b2f2594d7042a7 Mon Sep 17 00:00:00 2001 From: Eitan Aberman <139676851+emaberman@users.noreply.github.com> Date: Tue, 10 Dec 2024 08:02:44 +0200 Subject: [PATCH 1/3] Update SU2_CFD/include/numerics/turbulent/turb_sources.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/numerics/turbulent/turb_sources.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp index 5a173f6aeea..8698e2822c7 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp @@ -345,6 +345,7 @@ struct Bsl { /*--- Limiting of \hat{S} based on "Modifications and Clarifications for the Implementation of the Spalart-Allmaras Turbulence Model" * Note 1 option c in https://turbmodels.larc.nasa.gov/spalart.html ---*/ + const su2double d_Sbar = (var.fv2 + nue * var.d_fv2) * var.inv_k2_d2; if (Sbar >= - c2 * var.Omega) { var.Shat = var.Omega + Sbar; var.d_Shat = (var.fv2 + nue * var.d_fv2) * var.inv_k2_d2; From b6ebcc5c725b6c72f13141626d115937e239b297 Mon Sep 17 00:00:00 2001 From: Eitan Aberman <139676851+emaberman@users.noreply.github.com> Date: Tue, 10 Dec 2024 08:02:52 +0200 Subject: [PATCH 2/3] Update SU2_CFD/include/numerics/turbulent/turb_sources.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/numerics/turbulent/turb_sources.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp index 8698e2822c7..f2e3d1c3809 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp @@ -348,7 +348,7 @@ struct Bsl { const su2double d_Sbar = (var.fv2 + nue * var.d_fv2) * var.inv_k2_d2; if (Sbar >= - c2 * var.Omega) { var.Shat = var.Omega + Sbar; - var.d_Shat = (var.fv2 + nue * var.d_fv2) * var.inv_k2_d2; + var.d_Shat = d_Sbar; } else { const su2double Num = var.Omega * (c2 * c2 * var.Omega + c3 * Sbar); const su2double Den = (c3 - 2 * c2) * var.Omega - Sbar; From 8214318f56150b3e9c7648e13aef1689fef4b628 Mon Sep 17 00:00:00 2001 From: Eitan Aberman <139676851+emaberman@users.noreply.github.com> Date: Tue, 10 Dec 2024 08:02:58 +0200 Subject: [PATCH 3/3] Update SU2_CFD/include/numerics/turbulent/turb_sources.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- SU2_CFD/include/numerics/turbulent/turb_sources.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp index f2e3d1c3809..4e5f1cd51f3 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp @@ -353,9 +353,7 @@ struct Bsl { const su2double Num = var.Omega * (c2 * c2 * var.Omega + c3 * Sbar); const su2double Den = (c3 - 2 * c2) * var.Omega - Sbar; var.Shat = var.Omega + Num / Den; - - const su2double d_SB = (var.fv2 + nue * var.d_fv2) * var.inv_k2_d2; - var.d_Shat = d_SB * (c3 * var.Omega + Num / Den) / Den; + var.d_Shat = d_Sbar * (c3 * var.Omega + Num / Den) / Den; } if (var.Shat <= 1e-10) { var.Shat = 1e-10;