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 {
00035 labelList cellBoundaryFaceCount(epsilon_.size(), 0);
00036
00037 const fvPatchList& patches = mesh_.boundary();
00038
00039
00040 forAll(patches, patchi)
00041 {
00042 const fvPatch& curPatch = patches[patchi];
00043
00044 if (isType<wallFvPatch>(curPatch))
00045 {
00046 forAll(curPatch, facei)
00047 {
00048 label faceCelli = curPatch.faceCells()[facei];
00049
00050 epsilon_[faceCelli] = 0.0;
00051 G[faceCelli] = 0.0;
00052 }
00053 }
00054 }
00055
00056
00057
00058 forAll(patches, patchi)
00059 {
00060 const fvPatch& curPatch = patches[patchi];
00061
00062 if (isType<wallFvPatch>(curPatch))
00063 {
00064 # include "checkPatchFieldTypes.H"
00065
00066 const scalarField& nuw = nu().boundaryField()[patchi];
00067 const scalarField& nutw = nut_.boundaryField()[patchi];
00068
00069 scalarField magFaceGradU = mag(U_.boundaryField()[patchi].snGrad());
00070
00071 forAll(curPatch, facei)
00072 {
00073 label faceCelli = curPatch.faceCells()[facei];
00074
00075
00076 scalar Cmu25 = pow(Cmu[faceCelli], 0.25);
00077 scalar Cmu75 = pow(Cmu[faceCelli], 0.75);
00078
00079 scalar yPlus =
00080 Cmu25*y_[patchi][facei]
00081 *sqrt(k_[faceCelli])
00082 /nuw[facei];
00083
00084
00085
00086
00087
00088 cellBoundaryFaceCount[faceCelli]++;
00089
00090 epsilon_[faceCelli] +=
00091 Cmu75*pow(k_[faceCelli], 1.5)
00092 /(kappa_*y_[patchi][facei]);
00093
00094 if (yPlus > yPlusLam_)
00095 {
00096 G[faceCelli] +=
00097 (nutw[facei] + nuw[facei])
00098 *magFaceGradU[facei]
00099 *Cmu25*sqrt(k_[faceCelli])
00100 /(kappa_*y_[patchi][facei])
00101 - (nonlinearStress[faceCelli] && gradU[faceCelli]);
00102 }
00103 }
00104 }
00105 }
00106
00107
00108
00109 forAll(patches, patchi)
00110 {
00111 const fvPatch& curPatch = patches[patchi];
00112
00113 if (isType<wallFvPatch>(curPatch))
00114 {
00115 forAll(curPatch, facei)
00116 {
00117 label faceCelli = curPatch.faceCells()[facei];
00118
00119 epsilon_[faceCelli] /= cellBoundaryFaceCount[faceCelli];
00120 G[faceCelli] /= cellBoundaryFaceCount[faceCelli];
00121 }
00122 }
00123 }
00124 }
00125
00126
00127
Copyright © 2000-2007 OpenCFD Ltd