FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

wallViscosity.H

Go to the documentation of this file.
00001 {
00002     scalar Cmu25 = ::pow(Cmu.value(), 0.25);
00003     scalar kappa_ = kappa.value();
00004     scalar E_ = E.value();
00005 
00006     const fvPatchList& patches = mesh.boundary();
00007 
00008     forAll(patches, patchi)
00009     {
00010         const fvPatch& curPatch = patches[patchi];
00011 
00012         if (isA<wallFvPatch>(curPatch))
00013         {
00014             const scalarField& rhow = rho.boundaryField()[patchi];
00015 
00016             const scalarField muw = mul.boundaryField()[patchi];
00017             scalarField& mutw = mut.boundaryField()[patchi];
00018 
00019             forAll(curPatch, facei)
00020             {
00021                 label faceCelli = curPatch.faceCells()[facei];
00022 
00023                 scalar yPlus =
00024                     Cmu25*y[patchi][facei]*::sqrt(k[faceCelli])
00025                    /(muw[facei]/rhow[facei]);
00026 
00027                 if (yPlus > 11.6)
00028                 {
00029                     mutw[facei] =
00030                         muw[facei]
00031                        *(yPlus*kappa_/::log(E_*yPlus) - 1);
00032                 }
00033                 else
00034                 {
00035                     mutw[facei] = 0.0;
00036                 }
00037             }
00038         }
00039     }
00040 }
00041 
00042 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines