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