diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C index f86bdb48..f459ff70 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C @@ -215,6 +215,9 @@ void kLowReWallFunctionFvPatchScalarField::updateCoeffs() kw[faceI] *= sqr(uTau); } + // Limit kw to avoid failure of the turbulence model due to division by kw + kw = max(kw, SMALL); + fixedValueFvPatchField::updateCoeffs(); // TODO: perform averaging for cells sharing more than one boundary face diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C index 72a987b6..1d34c395 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C @@ -213,6 +213,9 @@ void kLowReWallFunctionFvPatchScalarField::updateCoeffs() kw[faceI] *= sqr(uTau); } + // Limit kw to avoid failure of the turbulence model due to division by kw + kw = max(kw, SMALL); + fixedValueFvPatchField::updateCoeffs(); // TODO: perform averaging for cells sharing more than one boundary face diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C index 437ea762..c23f8d74 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C @@ -211,6 +211,9 @@ void kLowReWallFunctionFvPatchScalarField::updateCoeffs() kw[faceI] *= sqr(uTau); } + // Limit kw to avoid failure of the turbulence model due to division by kw + kw = max(kw, SMALL); + fixedValueFvPatchField::updateCoeffs(); // TODO: perform averaging for cells sharing more than one boundary face