initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / multiphase / bubbleFoam / wallViscosity.H
blob21ea94d8d7808964dd285c5cb2f0df55ba62d240
2     scalar Cmu25 = ::pow(Cmu.value(), 0.25);
3     scalar kappa_ = kappa.value();
4     scalar E_ = E.value();
5     scalar nub_ = nub.value();
7     const fvPatchList& patches = mesh.boundary();
9     forAll(patches, patchi)
10     {
11         const fvPatch& currPatch = patches[patchi];
13         if (isType<wallFvPatch>(currPatch))
14         {
15             scalarField& nutw = nutb.boundaryField()[patchi];
17             forAll(currPatch, facei)
18             {
19                 label faceCelli = currPatch.faceCells()[facei];
21                 // calculate yPlus
22                 scalar yPlus =
23                     Cmu25*y[patchi][facei]
24                    *::sqrt(k[faceCelli])
25                    /nub_;
27                 if (yPlus > 11.6)
28                 {
29                     nutw[facei] =
30                         yPlus*nub_*kappa_
31                        /::log(E_*yPlus)
32                       - nub_;
33                 }
34                 else
35                 {
36                     nutw[facei] = 0.0;
37                 }
38             }
39         }
40     }