1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 Foam::incompressible::RASModels::nutUTabulatedWallFunctionFvPatchScalarField
28 Wall function boundary condition for turbulence kinematic viscosity. Uses a
29 table to return the value of U+ as a function of near-wall Reynolds number.
31 Note: the tables are not registered since the same table object may be used
32 for more than one patch.
35 nutUTabulatedWallFunctionFvPatchScalarField.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef nutUTabulatedWallFunctionFvPatchScalarField_H
40 #define nutUTabulatedWallFunctionFvPatchScalarField_H
42 #include "nutkWallFunctionFvPatchScalarField.H"
43 #include "uniformInterpolationTable.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 namespace incompressible
54 /*---------------------------------------------------------------------------*\
55 Class nutUTabulatedWallFunctionFvPatchScalarField Declaration
56 \*---------------------------------------------------------------------------*/
58 class nutUTabulatedWallFunctionFvPatchScalarField
60 public nutkWallFunctionFvPatchScalarField
70 uniformInterpolationTable<scalar> uPlusTable_;
73 // Protected Member Functions
75 //- Calculate the turbulence viscosity
76 virtual tmp<scalarField> calcNut() const;
78 //- Calculate wall u+ from table
79 virtual tmp<scalarField> calcUPlus(const scalarField& Rey) const;
84 //- Runtime type information
85 TypeName("nutTabulatedWallFunction");
90 //- Construct from patch and internal field
91 nutUTabulatedWallFunctionFvPatchScalarField
94 const DimensionedField<scalar, volMesh>&
97 //- Construct from patch, internal field and dictionary
98 nutUTabulatedWallFunctionFvPatchScalarField
101 const DimensionedField<scalar, volMesh>&,
105 //- Construct by mapping given
106 // nutUTabulatedWallFunctionFvPatchScalarField
108 nutUTabulatedWallFunctionFvPatchScalarField
110 const nutUTabulatedWallFunctionFvPatchScalarField&,
112 const DimensionedField<scalar, volMesh>&,
113 const fvPatchFieldMapper&
116 //- Construct as copy
117 nutUTabulatedWallFunctionFvPatchScalarField
119 const nutUTabulatedWallFunctionFvPatchScalarField&
122 //- Construct and return a clone
123 virtual tmp<fvPatchScalarField> clone() const
125 return tmp<fvPatchScalarField>
127 new nutUTabulatedWallFunctionFvPatchScalarField(*this)
131 //- Construct as copy setting internal field reference
132 nutUTabulatedWallFunctionFvPatchScalarField
134 const nutUTabulatedWallFunctionFvPatchScalarField&,
135 const DimensionedField<scalar, volMesh>&
138 //- Construct and return a clone setting internal field reference
139 virtual tmp<fvPatchScalarField> clone
141 const DimensionedField<scalar, volMesh>& iF
144 return tmp<fvPatchScalarField>
146 new nutUTabulatedWallFunctionFvPatchScalarField(*this, iF)
153 // Evaluation functions
155 //- Calculate and return the yPlus at the boundary
156 virtual tmp<scalarField> yPlus() const;
162 virtual void write(Ostream& os) const;
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 } // End namespace RASModels
169 } // End namespace incompressible
170 } // End namespace Foam
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 // ************************************************************************* //