Loading...
Searching...
No Matches
nutUTabulatedWallFunctionFvPatchScalarField.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2019-2022 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::nutUTabulatedWallFunctionFvPatchScalarField
29
30Group
31 grpWallFunctions
32
33Description
34 This boundary condition provides a wall constraint on the turbulent
35 viscosity (i.e. \c nut) based on velocity (i.e. \c U), for low- and
36 high-Reynolds number applications.
37
38 As input, the user specifies a look-up table of \c u+ as a function of
39 near-wall Reynolds number.
40
41 The table should be located in the \c $FOAM_CASE/constant directory.
42
43Usage
44 Example of the boundary condition specification:
45 \verbatim
46 <patchName>
47 {
48 // Mandatory entries
49 type nutTabulatedWallFunction;
50 uPlusTable myUPlusTable;
51
52 // Inherited entries
53 ...
54 }
55 \endverbatim
56
57 where the entries mean:
58 \table
59 Property | Description | Type | Reqd | Deflt
60 type | Type name: nutUTabulatedWallFunction | word | yes | -
61 uPlusTable | u+ as a function of Re table name | word | yes | -
62 \endtable
63
64 The inherited entries are elaborated in:
65 - \link nutWallFunctionFvPatchScalarField.H \endlink
66 - \link uniformInterpolationTable.H \endlink
67
68Note
69 - The tables are not registered since the same table object may be used for
70 more than one patch.
71
72SourceFiles
73 nutUTabulatedWallFunctionFvPatchScalarField.C
74
75\*---------------------------------------------------------------------------*/
76
77#ifndef nutUTabulatedWallFunctionFvPatchScalarField_H
78#define nutUTabulatedWallFunctionFvPatchScalarField_H
79
82
83// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
84
85namespace Foam
86{
87
88/*---------------------------------------------------------------------------*\
89 Class nutUTabulatedWallFunctionFvPatchScalarField Declaration
90\*---------------------------------------------------------------------------*/
91
93:
95{
96protected:
97
98 // Protected Data
99
100 //- Name of u+ table
101 word uPlusTableName_;
102
103 //- u+ table
104 uniformInterpolationTable<scalar> uPlusTable_;
106
107 // Protected Member Functions
108
109 //- Calculate the turbulent viscosity
110 virtual tmp<scalarField> calcNut() const;
111
112 //- Calculate wall u+ from table
114
115 //- Write local wall function variables
117
118
119public:
120
121 //- Runtime type information
122 TypeName("nutTabulatedWallFunction");
123
124
125 // Constructors
126
127 //- Construct from patch and internal field
129 (
130 const fvPatch&,
132 );
133
134 //- Construct from patch, internal field and dictionary
136 (
137 const fvPatch&,
139 const dictionary&
140 );
141
142 //- Construct by mapping given
143 //- nutUTabulatedWallFunctionFvPatchScalarField
144 //- onto a new patch
146 (
148 const fvPatch&,
150 const fvPatchFieldMapper&
151 );
152
153 //- Construct as copy
155 (
157 );
158
159 //- Construct as copy setting internal field reference
161 (
164 );
165
166 //- Return a clone
167 virtual tmp<fvPatchField<scalar>> clone() const
168 {
169 return fvPatchField<scalar>::Clone(*this);
170 }
171
172 //- Clone with an internal field reference
174 (
176 ) const
177 {
178 return fvPatchField<scalar>::Clone(*this, iF);
179 }
180
181
182 // Member Functions
183
184 // Evaluation
185
186 //- Calculate and return the yPlus at the boundary
187 virtual tmp<scalarField> yPlus() const;
188
189
190 // I-O
191
192 //- Write
193 virtual void write(Ostream& os) const;
194};
195
196
197// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198
199} // End namespace Foam
200
201// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202
203#endif
205// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
This boundary condition provides a wall constraint on the turbulent viscosity (i.e....
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
void writeLocalEntries(Ostream &) const
Write local wall function variables.
TypeName("nutTabulatedWallFunction")
Runtime type information.
nutUTabulatedWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
tmp< scalarField > calcUPlus(const scalarField &Rey) const
Calculate wall u+ from table.
virtual tmp< scalarField > calcNut() const
Calculate the turbulent viscosity.
The class nutWallFunction is an abstract base class that hosts calculation methods and common functi...
nutWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition tmp.H:75
Table with uniform interval in independent variable, with linear interpolation.
A class for handling words, derived from Foam::string.
Definition word.H:66
scalar Rey
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68