db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
38 lines
1,006 B
C
38 lines
1,006 B
C
{
|
|
scalar Cmu25 = ::pow(Cmu, 0.25);
|
|
|
|
const fvPatchList& patches = mesh.boundary();
|
|
|
|
forAll(patches, patchi)
|
|
{
|
|
const fvPatch& curPatch = patches[patchi];
|
|
|
|
if (isType<wallFvPatch>(curPatch))
|
|
{
|
|
const scalarField& rhow = rho.boundaryField()[patchi];
|
|
|
|
const scalarField muw = mul.boundaryField()[patchi];
|
|
scalarField& mutw = mut.boundaryField()[patchi];
|
|
|
|
forAll(curPatch, facei)
|
|
{
|
|
label faceCelli = curPatch.faceCells()[facei];
|
|
|
|
scalar yPlus =
|
|
Cmu25*y[patchi][facei]*::sqrt(k[faceCelli])
|
|
/(muw[facei]/rhow[facei]);
|
|
|
|
if (yPlus > 11.6)
|
|
{
|
|
mutw[facei] =
|
|
muw[facei]
|
|
*(yPlus*kappa/::log(E*yPlus) - 1);
|
|
}
|
|
else
|
|
{
|
|
mutw[facei] = 0.0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|