Skip to content
Snippets Groups Projects
Commit ba5ad1a3 authored by Luca Cornolti's avatar Luca Cornolti Committed by Kutalmış Berçin
Browse files

BUG: wallFunctions: correct blending terms (fixes #2770)

parent 7c8daed1
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2021 OpenCFD Ltd.
Copyright (C) 2019-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -68,12 +68,11 @@ Foam::nutUWallFunctionFvPatchScalarField::calcNut() const
forAll(yPlus, facei)
{
// Viscous sublayer contribution
const scalar nutVis = 0;
const scalar nutVis = nuw[facei];
// Inertial sublayer contribution
const scalar nutLog =
nuw[facei]
*(yPlus[facei]*kappa/log(max(E*yPlus[facei], 1 + 1e-4)) - 1.0);
nuw[facei]*yPlus[facei]*kappa/log(max(E*yPlus[facei], 1 + 1e-4));
switch (blender_)
{
......@@ -132,6 +131,8 @@ Foam::nutUWallFunctionFvPatchScalarField::calcNut() const
break;
}
}
nutw[facei] -= nuw[facei];
}
return tnutw;
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd.
Copyright (C) 2019-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -72,11 +72,11 @@ calcNut() const
const scalar yPlus = Cmu25*y[facei]*sqrt(k[celli])/nuw[facei];
// Viscous sublayer contribution
const scalar nutVis = 0;
const scalar nutVis = nuw[facei];
// Inertial sublayer contribution
const scalar nutLog =
nuw[facei]*(yPlus*kappa/log(max(E*yPlus, 1 + 1e-4)) - 1.0);
nuw[facei]*yPlus*kappa/log(max(E*yPlus, 1 + 1e-4));
switch (blender_)
{
......@@ -134,6 +134,8 @@ calcNut() const
break;
}
}
nutw[facei] -= nuw[facei];
}
return tnutw;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment