ENH: nutUBlended wall function - added protection for uTau. See #696

This commit is contained in:
Andrew Heather
2018-01-08 10:33:56 +00:00
parent f02783b986
commit 4781193e31

View File

@ -93,6 +93,8 @@ Foam::nutUBlendedWallFunctionFvPatchScalarField::calcUTau
forAll(uTaup, facei)
{
scalar ut = sqrt((nutw[facei] + nuw[facei])*magGradU[facei]);
if (mag(ut) > ROOTVSMALL)
{
scalar error = GREAT;
label iter = 0;
while (iter++ < 10 && error > 0.001)
@ -105,6 +107,7 @@ Foam::nutUBlendedWallFunctionFvPatchScalarField::calcUTau
error = mag(ut - utNew)/(ut + ROOTVSMALL);
ut = 0.5*(ut + utNew);
}
}
uTaup[facei] = ut;
}