From 776f31b9a7acabb8fed3c62f849f8e66827b75e4 Mon Sep 17 00:00:00 2001 From: andy <a.heather@opencfd.co.uk> Date: Tue, 23 Sep 2008 15:13:12 +0100 Subject: [PATCH] correct incorrect use of wall distance --- .../omegaWallFunctionFvPatchScalarField.C | 10 +++++++--- .../omegaWallFunctionFvPatchScalarField.C | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index a156b44da39..5b0ee67630f 100644 --- a/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -162,10 +162,10 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs() label faceCellI = patch().faceCells()[faceI]; scalar yPlus = - Cmu25*y[faceCellI]*sqrt(k[faceCellI]) + Cmu25*y[faceI]*sqrt(k[faceCellI]) /(muw[faceI]/rhow[faceI]); - omega[faceCellI] = sqrt(k[faceCellI])/(Cmu25*kappa*y[faceCellI]); + omega[faceCellI] = sqrt(k[faceCellI])/(Cmu25*kappa*y[faceI]); if (yPlus > yPlusLam) { @@ -173,7 +173,11 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs() (mutw[faceI] + muw[faceI]) *magGradUw[faceI] *Cmu25*sqrt(k[faceCellI]) - /(kappa*y[faceCellI]); + /(kappa*y[faceI]); + } + else + { + G[faceCellI] = 0.0; } } diff --git a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 63bdc2e7d4e..2fed92c105a 100644 --- a/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -158,7 +158,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs() { label faceCellI = patch().faceCells()[faceI]; - scalar yPlus = Cmu25*y[faceCellI]*sqrt(k[faceCellI])/nuw[faceI]; + scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/nuw[faceI]; omega[faceCellI] = sqrt(k[faceCellI])/(Cmu25*kappa*y[faceCellI]); @@ -170,6 +170,10 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs() *Cmu25*sqrt(k[faceCellI]) /(kappa*y[faceCellI]); } + else + { + G[faceCellI] = 0.0; + } } // TODO: perform averaging for cells sharing more than one boundary face -- GitLab