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

LienLeschzinerLowReSetWallDissipation.H

Go to the documentation of this file.
00001 // Set the dissipation in the near-wall cell to the value prescribed by the
00002 // Lien-Leschziner low-Re model with Wolfstein length-scale prescription
00003 
00004 {
00005     labelList cellBoundaryFaceCount(epsilon_.size(), 0);
00006 
00007     //- use constant Cmu for epsilon in the near-wall cell
00008     scalar Cmu75 = pow(Cmu_.value(), 0.75);
00009 
00010     const fvPatchList& patches = mesh_.boundary();
00011 
00012     //- Initialise the near-wall epsilon field to zero
00013     forAll(patches, patchi)
00014     {
00015         const fvPatch& curPatch = patches[patchi];
00016 
00017         if (isA<wallFvPatch>(curPatch))
00018         {
00019             forAll(curPatch, facei)
00020             {
00021                 label faceCelli = curPatch.faceCells()[facei];
00022 
00023                 epsilon_[faceCelli] = 0.0;
00024             }
00025         }
00026     }
00027 
00028     forAll(patches, patchi)
00029     {
00030         const fvPatch& curPatch = patches[patchi];
00031 
00032         if (isA<wallFvPatch>(curPatch))
00033         {
00034             forAll(curPatch, facei)
00035             {
00036                 label faceCelli = curPatch.faceCells()[facei];
00037 
00038                 // For corner cells (with two boundary or more faces),
00039                 // epsilon in the near-wall cell are calculated as an average
00040 
00041                 cellBoundaryFaceCount[faceCelli]++;
00042 
00043                 epsilon_[faceCelli] +=
00044                      Cmu75*pow(k_[faceCelli], 1.5)
00045                     /(
00046                          kappa_.value()*y_[faceCelli]
00047                          *(1.0 - exp(-Aepsilon_.value()*yStar_[faceCelli]))
00048                      )
00049                     *exp(-Amu_.value()*sqr(yStar_[faceCelli]));
00050 
00051             }
00052         }
00053     }
00054 
00055     // perform the averaging
00056 
00057     forAll(patches, patchi)
00058     {
00059         const fvPatch& curPatch = patches[patchi];
00060 
00061         if (isA<wallFvPatch>(curPatch))
00062         {
00063             forAll(curPatch, facei)
00064             {
00065                 label faceCelli = curPatch.faceCells()[facei];
00066 
00067                 epsilon_[faceCelli] /= cellBoundaryFaceCount[faceCelli];
00068             }
00069         }
00070     }
00071 }
00072 
00073 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines