37 namespace compressible
44 void mutkWallFunctionFvPatchScalarField::checkType()
46 if (!isA<wallFvPatch>(patch()))
48 FatalErrorIn(
"mutkWallFunctionFvPatchScalarField::checkType()")
49 <<
"Invalid wall function specification" <<
nl
50 <<
" Patch type for patch " << patch().name()
51 <<
" must be wall" <<
nl
52 <<
" Current patch type is " << patch().type() <<
nl <<
endl
58 scalar mutkWallFunctionFvPatchScalarField::calcYPlusLam
66 for (
int i=0; i<10; i++)
77 const label patchI = patch().index();
85 const scalar Cmu25 =
pow(Cmu_, 0.25);
92 label faceCellI = patch().faceCells()[faceI];
95 Cmu25*y[faceI]*
sqrt(k[faceCellI])/(muw[faceI]/rhow[faceI]);
97 if (yPlus > yPlusLam_)
99 mutw[faceI] = muw[faceI]*(yPlus*kappa_/
log(E_*yPlus) - 1);
107 void mutkWallFunctionFvPatchScalarField::writeLocalEntries(
Ostream& os)
const
117 mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
123 fixedValueFvPatchScalarField(p, iF),
127 yPlusLam_(calcYPlusLam(kappa_, E_))
131 mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
139 fixedValueFvPatchScalarField(ptf, p, iF, mapper),
147 mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
154 fixedValueFvPatchScalarField(p, iF, dict),
158 yPlusLam_(calcYPlusLam(kappa_, E_))
162 mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
167 fixedValueFvPatchScalarField(wfpsf),
175 mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
181 fixedValueFvPatchScalarField(wfpsf, iF),
191 void mutkWallFunctionFvPatchScalarField::updateCoeffs()
200 fixedValueFvPatchScalarField::updateCoeffs();
206 const label patchI = patch().index();
217 return pow(Cmu_, 0.25)*y*
sqrt(kwc)/(muw/rhow);
221 void mutkWallFunctionFvPatchScalarField::write(
Ostream& os)
const
224 writeLocalEntries(os);
225 writeEntry(
"value", os);