Refactored mutLowReWallFunction according to the new interface
This commit is contained in:
parent
e7af83c8da
commit
0726060d77
3 changed files with 40 additions and 2 deletions
|
@ -18,6 +18,7 @@ $(alphatWallFunctions)/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C
|
|||
|
||||
mutWallFunctions = $(wallFunctions)/mutWallFunctions
|
||||
$(mutWallFunctions)/mutWallFunction/mutWallFunctionFvPatchScalarField.C
|
||||
$(mutWallFunctions)/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C
|
||||
|
||||
epsilonWallFunctions = $(wallFunctions)/epsilonWallFunctions
|
||||
$(epsilonWallFunctions)/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
|
||||
|
|
|
@ -100,6 +100,25 @@ mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField
|
|||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<scalarField> mutLowReWallFunctionFvPatchScalarField::yPlus() const
|
||||
{
|
||||
const label patchI = patch().index();
|
||||
const turbulenceModel& turbModel =
|
||||
db().lookupObject<turbulenceModel>("turbulenceModel");
|
||||
|
||||
const scalarField& y = turbModel.y()[patchI];
|
||||
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchI];
|
||||
const scalarField& muw = turbModel.mu().boundaryField()[patchI];
|
||||
const scalarField& rhow = turbModel.rho().boundaryField()[patchI];
|
||||
|
||||
const scalarField nuw = muw/rhow;
|
||||
|
||||
return y*sqrt(nuw*mag(Uw.snGrad()))/nuw;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makePatchTypeField
|
||||
|
|
|
@ -28,7 +28,19 @@ Description
|
|||
Boundary condition for turbulent (kinematic) viscosity when for use with
|
||||
low Reynolds number models.
|
||||
|
||||
Sets mut to zero, and provides an access to calculate y+.
|
||||
Sets mut to zero, and provides an access function to calculate y+.
|
||||
|
||||
Usage
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
<patchName>
|
||||
{
|
||||
type mutLowReWallFunction;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
See also
|
||||
Foam::nutWallFunctionFvPatchScalarField
|
||||
|
||||
SourceFiles
|
||||
mutLowReWallFunctionFvPatchScalarField.C
|
||||
|
@ -59,7 +71,7 @@ class mutLowReWallFunctionFvPatchScalarField
|
|||
{
|
||||
protected:
|
||||
|
||||
// Private member functions
|
||||
// Protected Member Functions
|
||||
|
||||
//- Calculate the turbulence viscosity
|
||||
virtual tmp<scalarField> calcMut() const;
|
||||
|
@ -132,6 +144,12 @@ public:
|
|||
new mutLowReWallFunctionFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Calculate and return the yPlus at the boundary
|
||||
virtual tmp<scalarField> yPlus() const;
|
||||
};
|
||||
|
||||
|
||||
|
|
Reference in a new issue