Refactored nutLowReWallFunction according to the new interface
This commit is contained in:
parent
5c16db8055
commit
27ddb9849c
2 changed files with 35 additions and 1 deletions
|
@ -100,6 +100,22 @@ nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField
|
|||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<scalarField> nutLowReWallFunctionFvPatchScalarField::yPlus() const
|
||||
{
|
||||
const label patchI = patch().index();
|
||||
const turbulenceModel& turbModel =
|
||||
db().lookupObject<turbulenceModel>("turbulenceModel");
|
||||
|
||||
const scalarField& y = turbModel.y()[patchI];
|
||||
const scalarField& nuw = turbModel.nu().boundaryField()[patchI];
|
||||
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchI];
|
||||
|
||||
return y*sqrt(nuw*mag(Uw.snGrad()))/nuw;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makePatchTypeField(fvPatchScalarField, nutLowReWallFunctionFvPatchScalarField);
|
||||
|
|
|
@ -30,6 +30,18 @@ Description
|
|||
|
||||
Sets nut to zero, and provides an access function to calculate y+.
|
||||
|
||||
Usage
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
<patchName>
|
||||
{
|
||||
type nutLowReWallFunction;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
See also
|
||||
Foam::nutWallFunctionFvPatchScalarField
|
||||
|
||||
SourceFiles
|
||||
nutLowReWallFunctionFvPatchScalarField.C
|
||||
|
||||
|
@ -59,7 +71,7 @@ class nutLowReWallFunctionFvPatchScalarField
|
|||
{
|
||||
protected:
|
||||
|
||||
// Protected member functions
|
||||
// Protected Member Functions
|
||||
|
||||
//- Calculate the turbulence viscosity
|
||||
virtual tmp<scalarField> calcNut() const;
|
||||
|
@ -132,6 +144,12 @@ public:
|
|||
new nutLowReWallFunctionFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Calculate and return the yPlus at the boundary
|
||||
virtual tmp<scalarField> yPlus() const;
|
||||
};
|
||||
|
||||
|
||||
|
|
Reference in a new issue