Skip to content

Commit

Permalink
Merge branch 'fix_dShat' of github.com:emaberman/SU2 into fix_dShat
Browse files Browse the repository at this point in the history
  • Loading branch information
emaberman committed Dec 18, 2024
2 parents bc59826 + fe49159 commit aa6137e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions SU2_CFD/include/numerics/turbulent/turb_sources.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,16 +345,15 @@ 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;
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;
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;
Expand Down

0 comments on commit aa6137e

Please sign in to comment.