From 9563607e01c0cd8f49c355bf0a78cf7fb11128d5 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Fri, 13 May 2022 19:19:56 +0100 Subject: [PATCH] ENH: Turbulence IDDES models - added option to switch fe term in dTilda calc Default is fe = true, yielding the original form given be Shur (2008) --- .../SpalartAllmarasIDDES.C | 40 +++++++++++++------ .../SpalartAllmarasIDDES.H | 1 + .../DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C | 39 ++++++++++++------ .../DES/kOmegaSSTIDDES/kOmegaSSTIDDES.H | 1 + 4 files changed, 55 insertions(+), 26 deletions(-) diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C index cd12c26e15..03f7ea3517 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C @@ -108,24 +108,28 @@ tmp SpalartAllmarasIDDES::dTilda const volScalarField expTerm(exp(sqr(alpha))); tmp fB = min(2*pow(expTerm, -9.0), scalar(1)); - tmp fe1 = - 2*(pos0(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.0)); - tmp fe2 = 1 - max(ft(magGradU), fl(magGradU)); - tmp fe = max(fe1 - 1, scalar(0))*psi*fe2; - const volScalarField fdTilda(max(1 - fdt(magGradU), fB)); - // Simplified formulation from Gritskevich et al. paper (2011) where fe = 0 - // return max - // ( - // fdTilda*lRAS + (1 - fdTilda)*lLES, - // dimensionedScalar("SMALL", dimLength, SMALL) - // ); + if (fe_) + { + tmp fe1 = + 2*(pos0(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.)); + tmp fe2 = 1 - max(ft(magGradU), fl(magGradU)); + tmp fe = max(fe1 - 1, scalar(0))*psi*fe2; - // Original formulation from Shur et al. paper (2008) + // Original formulation from Shur et al. paper (2008) + return max + ( + fdTilda*(1 + fe)*lRAS + (1 - fdTilda)*lLES, + dimensionedScalar("SMALL", dimLength, SMALL) + ); + } + + + // Simplified formulation from Gritskevich et al. paper (2011) where fe = 0 return max ( - fdTilda*(1 + fe)*lRAS + (1 - fdTilda)*lLES, + fdTilda*lRAS + (1 - fdTilda)*lLES, dimensionedScalar("SMALL", dimLength, SMALL) ); } @@ -194,6 +198,16 @@ SpalartAllmarasIDDES::SpalartAllmarasIDDES 1.63 ) ), + fe_ + ( + Switch::getOrAddToDict + ( + "fe", + this->coeffDict_, + true + ) + ), + IDDESDelta_(setDelta()) { if (type == typeName) diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H index 9f13f607b0..470a05647f 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H @@ -100,6 +100,7 @@ protected: dimensionedScalar Cdt2_; dimensionedScalar Cl_; dimensionedScalar Ct_; + Switch fe_; //- IDDES delta diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C index 7340e3b9be..5b18937f9e 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C @@ -104,24 +104,27 @@ tmp kOmegaSSTIDDES::dTilda const volScalarField expTerm(exp(sqr(alpha))); tmp fB = min(2*pow(expTerm, -9.0), scalar(1)); - tmp fe1 = - 2*(pos0(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.0)); - tmp fe2 = 1 - max(ft(magGradU), fl(magGradU)); - tmp fe = max(fe1 - 1, scalar(0))*fe2; - const volScalarField fdTilda(max(1 - fdt(magGradU), fB)); - // Simplified formulation from Gritskevich et al. paper (2011) where fe = 0 - // return max - // ( - // fdTilda*lRAS + (1 - fdTilda)*lLES, - // dimensionedScalar("SMALL", dimLength, SMALL) - // ); + if (fe_) + { + tmp fe1 = + 2*(pos0(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.)); + tmp fe2 = 1 - max(ft(magGradU), fl(magGradU)); + tmp fe = max(fe1 - 1, scalar(0))*fe2; - // Original formulation from Shur et al. paper (2008) + // Original formulation from Shur et al. paper (2008) + return max + ( + fdTilda*(1 + fe)*lRAS + (1 - fdTilda)*lLES, + dimensionedScalar("SMALL", dimLength, SMALL) + ); + } + + // Simplified formulation from Gritskevich et al. paper (2011) where fe = 0 return max ( - fdTilda*(1 + fe)*lRAS + (1 - fdTilda)*lLES, + fdTilda*lRAS + (1 - fdTilda)*lLES, dimensionedScalar("SMALL", dimLength, SMALL) ); } @@ -190,6 +193,16 @@ kOmegaSSTIDDES::kOmegaSSTIDDES 1.87 ) ), + fe_ + ( + Switch::getOrAddToDict + ( + "fe", + this->coeffDict_, + true + ) + ), + IDDESDelta_(setDelta()) { if (type == typeName) diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.H b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.H index 2da9cd3485..7b9d4b7d05 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.H +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.H @@ -97,6 +97,7 @@ protected: dimensionedScalar Cdt2_; dimensionedScalar Cl_; dimensionedScalar Ct_; + Switch fe_; //- IDDES delta