From 75a520099c0d40f23df96e64e50342568d53f4fb Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 6 Feb 2015 17:38:04 +0000 Subject: [PATCH] turbulenceModels/RAS/LRR: Added optional Gibson-Launder wall-reflection --- .../turbulenceModels/RAS/LRR/LRR.C | 106 +++++++++++++----- .../turbulenceModels/RAS/LRR/LRR.H | 42 +++++-- 2 files changed, 112 insertions(+), 36 deletions(-) diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C index 98e11cf880..3bfa8a34c0 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "LRR.H" +#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -80,31 +81,13 @@ LRR::LRR 0.09 ) ), - Clrr1_ - ( - dimensioned::lookupOrAddToDict - ( - "Clrr1", - this->coeffDict_, - 1.8 - ) - ), - Clrr2_ - ( - dimensioned::lookupOrAddToDict - ( - "Clrr2", - this->coeffDict_, - 0.6 - ) - ), C1_ ( dimensioned::lookupOrAddToDict ( "C1", this->coeffDict_, - 1.44 + 1.8 ) ), C2_ @@ -113,6 +96,24 @@ LRR::LRR ( "C2", this->coeffDict_, + 0.6 + ) + ), + Ceps1_ + ( + dimensioned::lookupOrAddToDict + ( + "Ceps1", + this->coeffDict_, + 1.44 + ) + ), + Ceps2_ + ( + dimensioned::lookupOrAddToDict + ( + "Ceps2", + this->coeffDict_, 1.92 ) ), @@ -135,6 +136,43 @@ LRR::LRR ) ), + wallReflection_ + ( + Switch::lookupOrAddToDict + ( + "wallReflection", + this->coeffDict_, + true + ) + ), + kappa_ + ( + dimensioned::lookupOrAddToDict + ( + "kappa", + this->coeffDict_, + 0.41 + ) + ), + Cref1_ + ( + dimensioned::lookupOrAddToDict + ( + "Cref1", + this->coeffDict_, + 0.5 + ) + ), + Cref2_ + ( + dimensioned::lookupOrAddToDict + ( + "Cref2", + this->coeffDict_, + 0.3 + ) + ), + k_ ( IOobject @@ -179,10 +217,10 @@ bool LRR::read() if (ReynoldsStress >::read()) { Cmu_.readIfPresent(this->coeffDict()); - Clrr1_.readIfPresent(this->coeffDict()); - Clrr2_.readIfPresent(this->coeffDict()); C1_.readIfPresent(this->coeffDict()); C2_.readIfPresent(this->coeffDict()); + Ceps1_.readIfPresent(this->coeffDict()); + Ceps2_.readIfPresent(this->coeffDict()); Cs_.readIfPresent(this->coeffDict()); Ceps_.readIfPresent(this->coeffDict()); @@ -228,8 +266,8 @@ void LRR::correct() + fvm::div(alphaRhoPhi, epsilon_) - fvm::laplacian(Ceps_*alpha*rho*(k_/epsilon_)*R, epsilon_) == - C1_*alpha*rho*G*epsilon_/k_ - - fvm::Sp(C2_*alpha*rho*epsilon_/k_, epsilon_) + Ceps1_*alpha*rho*G*epsilon_/k_ + - fvm::Sp(Ceps2_*alpha*rho*epsilon_/k_, epsilon_) ); epsEqn().relax(); @@ -268,13 +306,29 @@ void LRR::correct() fvm::ddt(alpha, rho, R) + fvm::div(alphaRhoPhi, R) - fvm::laplacian(Cs_*alpha*rho*(k_/epsilon_)*R, R) - + fvm::Sp(Clrr1_*alpha*rho*epsilon_/k_, R) + + fvm::Sp(C1_*alpha*rho*epsilon_/k_, R) == alpha*rho*P - - (2.0/3.0*(1 - Clrr1_)*I)*alpha*rho*epsilon_ - - Clrr2_*alpha*rho*dev(P) + - (2.0/3.0*(1 - C1_)*I)*alpha*rho*epsilon_ + - C2_*alpha*rho*dev(P) ); + // Optionally add wall-refection term + if (wallReflection_) + { + const volVectorField& n_(wallDist::New(this->mesh_).n()); + const volScalarField& y_(wallDist::New(this->mesh_).y()); + + const volSymmTensorField reflect + ( + Cref1_*R - ((Cref2_*C2_)*(k_/epsilon_))*dev(P) + ); + + REqn() += + ((3*pow(Cmu_, 0.75)/kappa_)*(alpha*rho*sqrt(k_)/y_)) + *dev(symm((n_ & reflect)*n_)); + } + REqn().relax(); solve(REqn); diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.H b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.H index 1752db7926..cf30feebb6 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.H @@ -46,17 +46,31 @@ Description Physics of Fluids (1958-1988), 13(11), 2634-2649. \endverbatim + Optional Gibson-Launder wall-reflection is also provided: + \verbatim + Gibson, M. M., & Launder, B. E. (1978). + Ground effects on pressure fluctuations in the + atmospheric boundary layer. + Journal of Fluid Mechanics, 86(03), 491-511. + \endverbatim + The default model coefficients are: \verbatim LRRCoeffs { - Cmu 0.09; - Clrr1 1.8; - Clrr2 0.6; - C1 1.44; - C2 1.92; - Cs 0.25; - Ceps 0.15; + Cmu 0.09; + C1 1.8; + C2 0.6; + Ceps1 1.44; + Ceps2 1.92; + Cs 0.25; + Ceps 0.15; + + wallReflection yes; + kappa 0.41 + Cref1 0.5; + Cref2 0.3; + couplingFactor 0.0; } \endverbatim @@ -103,15 +117,23 @@ protected: dimensionedScalar Cmu_; - dimensionedScalar Clrr1_; - dimensionedScalar Clrr2_; - dimensionedScalar C1_; dimensionedScalar C2_; + + dimensionedScalar Ceps1_; + dimensionedScalar Ceps2_; dimensionedScalar Cs_; dimensionedScalar Ceps_; + // Wall-refection coefficients + + Switch wallReflection_; + dimensionedScalar kappa_; + dimensionedScalar Cref1_; + dimensionedScalar Cref2_; + + // Fields volScalarField k_;