Go to the documentation of this file.00001 {
00002 labelList cellBoundaryFaceCount(epsilon.size(), 0);
00003
00004 scalar Cmu25 = ::pow(Cmu.value(), 0.25);
00005 scalar Cmu75 = ::pow(Cmu.value(), 0.75);
00006 scalar kappa_ = kappa.value();
00007 scalar nub_ = nub.value();
00008
00009 const fvPatchList& patches = mesh.boundary();
00010
00011
00012 forAll(patches, patchi)
00013 {
00014 const fvPatch& currPatch = patches[patchi];
00015
00016 if (isA<wallFvPatch>(currPatch))
00017 {
00018 forAll(currPatch, facei)
00019 {
00020 label faceCelli = currPatch.faceCells()[facei];
00021
00022 epsilon[faceCelli] = 0.0;
00023 G[faceCelli] = 0.0;
00024 }
00025 }
00026 }
00027
00028
00029
00030 forAll(patches, patchi)
00031 {
00032 const fvPatch& currPatch = patches[patchi];
00033
00034 if (isA<wallFvPatch>(currPatch))
00035 {
00036 const scalarField& nutbw = nutb.boundaryField()[patchi];
00037
00038 scalarField magFaceGradU(mag(Ub.boundaryField()[patchi].snGrad()));
00039
00040 forAll(currPatch, facei)
00041 {
00042 label faceCelli = currPatch.faceCells()[facei];
00043
00044 scalar yPlus =
00045 Cmu25*y[patchi][facei]
00046 *::sqrt(k[faceCelli])
00047 /nub_;
00048
00049
00050
00051
00052
00053
00054 cellBoundaryFaceCount[faceCelli]++;
00055
00056 epsilon[faceCelli] +=
00057 Cmu75*::pow(k[faceCelli], 1.5)
00058 /(kappa_*y[patchi][facei]);
00059
00060 if (yPlus > 11.6)
00061 {
00062 G[faceCelli] +=
00063 (nutbw[facei] + nub_)*magFaceGradU[facei]
00064 *Cmu25*::sqrt(k[faceCelli])
00065 /(kappa_*y[patchi][facei]);
00066 }
00067 }
00068 }
00069 }
00070
00071
00072
00073
00074 forAll(patches, patchi)
00075 {
00076 const fvPatch& curPatch = patches[patchi];
00077
00078 if (isA<wallFvPatch>(curPatch))
00079 {
00080 forAll(curPatch, facei)
00081 {
00082 label faceCelli = curPatch.faceCells()[facei];
00083
00084 epsilon[faceCelli] /= cellBoundaryFaceCount[faceCelli];
00085 G[faceCelli] /= cellBoundaryFaceCount[faceCelli];
00086 }
00087 }
00088 }
00089 }
00090
00091