1 // Set the dissipation in the near-wall cell to the value prescribed by the
2 // Lien-Leschziner low-Re model with Wolfstein length-scale prescription
5 labelList cellBoundaryFaceCount(epsilon_.size(), 0);
7 //- use constant Cmu for epsilon in the near-wall cell
8 scalar Cmu75 = pow(Cmu_.value(), 0.75);
10 const fvPatchList& patches = mesh_.boundary();
12 //- Initialise the near-wall epsilon field to zero
13 forAll(patches, patchi)
15 const fvPatch& curPatch = patches[patchi];
17 if (isA<wallFvPatch>(curPatch))
19 forAll(curPatch, facei)
21 label faceCelli = curPatch.faceCells()[facei];
23 epsilon_[faceCelli] = 0.0;
28 forAll(patches, patchi)
30 const fvPatch& curPatch = patches[patchi];
32 if (isA<wallFvPatch>(curPatch))
34 forAll(curPatch, facei)
36 label faceCelli = curPatch.faceCells()[facei];
38 // For corner cells (with two boundary or more faces),
39 // epsilon in the near-wall cell are calculated as an average
41 cellBoundaryFaceCount[faceCelli]++;
43 epsilon_[faceCelli] +=
44 Cmu75*pow(k_[faceCelli], 1.5)
46 kappa_.value()*y_[faceCelli]
47 *(1.0 - exp(-Aepsilon_.value()*yStar_[faceCelli]))
49 *exp(-Amu_.value()*sqr(yStar_[faceCelli]));
55 // perform the averaging
57 forAll(patches, patchi)
59 const fvPatch& curPatch = patches[patchi];
61 if (isA<wallFvPatch>(curPatch))
63 forAll(curPatch, facei)
65 label faceCelli = curPatch.faceCells()[facei];
67 epsilon_[faceCelli] /= cellBoundaryFaceCount[faceCelli];