00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 {
00034 labelList cellBoundaryFaceCount(epsilon_.size(), 0);
00035
00036 const fvPatchList& patches = mesh_.boundary();
00037
00038
00039 forAll(patches, patchi)
00040 {
00041 const fvPatch& curPatch = patches[patchi];
00042
00043 if (isType<wallFvPatch>(curPatch))
00044 {
00045 forAll(curPatch, facei)
00046 {
00047 label faceCelli = curPatch.faceCells()[facei];
00048
00049 epsilon_[faceCelli] = 0.0;
00050 G[faceCelli] = 0.0;
00051 }
00052 }
00053 }
00054
00055
00056
00057 forAll(patches, patchi)
00058 {
00059 const fvPatch& curPatch = patches[patchi];
00060
00061 if (isType<wallFvPatch>(curPatch))
00062 {
00063 # include "checkPatchFieldTypes.H"
00064
00065 const scalarField& nuw = nu().boundaryField()[patchi];
00066 const scalarField& nutw = nut_.boundaryField()[patchi];
00067
00068 scalarField magFaceGradU = mag(U_.boundaryField()[patchi].snGrad());
00069
00070 forAll(curPatch, facei)
00071 {
00072 label faceCelli = curPatch.faceCells()[facei];
00073
00074
00075 scalar Cmu25 = pow(Cmu[faceCelli], 0.25);
00076 scalar Cmu75 = pow(Cmu[faceCelli], 0.75);
00077
00078 scalar yPlus =
00079 Cmu25*y_[patchi][facei]
00080 *sqrt(k_[faceCelli])
00081 /nuw[facei];
00082
00083
00084
00085
00086
00087 cellBoundaryFaceCount[faceCelli]++;
00088
00089 epsilon_[faceCelli] +=
00090 Cmu75*pow(k_[faceCelli], 1.5)
00091 /(kappa_*y_[patchi][facei]);
00092
00093 if (yPlus > yPlusLam_)
00094 {
00095 G[faceCelli] +=
00096 nutw[facei]*magFaceGradU[facei]
00097
00098 *Cmu25*sqrt(k_[faceCelli])
00099 /(kappa_*y_[patchi][facei])
00100 - (nonlinearStress[faceCelli] && gradU[faceCelli]);
00101
00102
00103 }
00104 }
00105 }
00106 }
00107
00108
00109
00110 forAll(patches, patchi)
00111 {
00112 const fvPatch& curPatch = patches[patchi];
00113
00114 if (isType<wallFvPatch>(curPatch))
00115 {
00116 forAll(curPatch, facei)
00117 {
00118 label faceCelli = curPatch.faceCells()[facei];
00119
00120 epsilon_[faceCelli] /= cellBoundaryFaceCount[faceCelli];
00121 G[faceCelli] /= cellBoundaryFaceCount[faceCelli];
00122 }
00123 }
00124 }
00125 }
00126
00127
00128