From f549e28fb825c4a96fed61a10d6f5d85b9ada93b Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Thu, 7 Sep 2017 14:57:10 +0100 Subject: [PATCH] INT: Updated code related to change in pos(x) function --- src/OpenFOAM/orientedType/orientedType.C | 12 ++++++++++++ src/OpenFOAM/orientedType/orientedType.H | 2 ++ .../DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C | 2 +- .../DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/orientedType/orientedType.C b/src/OpenFOAM/orientedType/orientedType.C index eac0f9527d..71f68726d7 100644 --- a/src/OpenFOAM/orientedType/orientedType.C +++ b/src/OpenFOAM/orientedType/orientedType.C @@ -362,12 +362,24 @@ Foam::orientedType Foam::pos(const orientedType& ot) } +Foam::orientedType Foam::pos0(const orientedType& ot) +{ + return ot; +} + + Foam::orientedType Foam::neg(const orientedType& ot) { return ot; } +Foam::orientedType Foam::neg0(const orientedType& ot) +{ + return ot; +} + + Foam::orientedType Foam::posPart(const orientedType& ot) { return ot; diff --git a/src/OpenFOAM/orientedType/orientedType.H b/src/OpenFOAM/orientedType/orientedType.H index 31805f4a0d..22723ced04 100644 --- a/src/OpenFOAM/orientedType/orientedType.H +++ b/src/OpenFOAM/orientedType/orientedType.H @@ -169,7 +169,9 @@ orientedType magSqr(const orientedType& ot); orientedType mag(const orientedType& ot); orientedType sign(const orientedType& ot); orientedType pos(const orientedType& ot); +orientedType pos0(const orientedType& ot); orientedType neg(const orientedType& ot); +orientedType neg0(const orientedType& ot); orientedType posPart(const orientedType& ot); orientedType negPart(const orientedType& ot); orientedType inv(const orientedType& ot); diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C index 06208c288e..416af2cf6b 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C @@ -135,7 +135,7 @@ tmp SpalartAllmarasIDDES::dTilda tmp fB = min(2*pow(expTerm, -9.0), scalar(1)); tmp fe1 = - 2*(pos(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.0)); + 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; diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C index 87010f689c..4dd6d674b4 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C @@ -134,7 +134,7 @@ tmp kOmegaSSTIDDES::dTilda tmp fB = min(2*pow(expTerm, -9.0), scalar(1)); tmp fe1 = - 2*(pos(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.0)); + 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;