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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::nutUTabulatedWallFunctionFvPatchScalarField
26 
27 Group
28  grpWallFunctions
29 
30 Description
31  This boundary condition provides a turbulent kinematic viscosity condition
32  when using wall functions. As input, the user specifies a look-up table
33  of U+ as a function of near-wall Reynolds number. The table should be
34  located in the $FOAM_CASE/constant directory.
35 
36  \heading Patch usage
37 
38  \table
39  Property | Description | Required | Default value
40  uPlusTable | U+ as a function of Re table name | yes |
41  \endtable
42 
43  Example of the boundary condition specification:
44  \verbatim
45  myPatch
46  {
47  type nutTabulatedWallFunction;
48  uPlusTable myUPlusTable;
49  }
50  \endverbatim
51 
52 Note
53  The tables are not registered since the same table object may be used for
54  more than one patch.
55 
56 SeeAlso
57  Foam::nutWallFunctionFvPatchScalarField
58 
59 SourceFiles
60  nutUTabulatedWallFunctionFvPatchScalarField.C
61 
62 \*---------------------------------------------------------------------------*/
63 
64 #ifndef nutUTabulatedWallFunctionFvPatchScalarField_H
65 #define nutUTabulatedWallFunctionFvPatchScalarField_H
66 
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 namespace Foam
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class nutUTabulatedWallFunctionFvPatchScalarField Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 class nutUTabulatedWallFunctionFvPatchScalarField
80 :
81  public nutWallFunctionFvPatchScalarField
82 {
83 protected:
84 
85  // Protected data
86 
87  //- Name of u+ table
89 
90  //- U+ table
92 
93 
94  // Protected Member Functions
95 
96  //- Calculate the turbulence viscosity
97  virtual tmp<scalarField> calcNut() const;
98 
99  //- Calculate wall u+ from table
100  virtual tmp<scalarField> calcUPlus(const scalarField& Rey) const;
101 
102 
103 public:
104 
105  //- Runtime type information
106  TypeName("nutTabulatedWallFunction");
107 
108 
109  // Constructors
110 
111  //- Construct from patch and internal field
113  (
114  const fvPatch&,
116  );
117 
118  //- Construct from patch, internal field and dictionary
120  (
121  const fvPatch&,
123  const dictionary&
124  );
125 
126  //- Construct by mapping given
127  // nutUTabulatedWallFunctionFvPatchScalarField
128  // onto a new patch
130  (
132  const fvPatch&,
134  const fvPatchFieldMapper&
135  );
136 
137  //- Construct as copy
139  (
141  );
142 
143  //- Construct and return a clone
144  virtual tmp<fvPatchScalarField> clone() const
145  {
147  (
149  );
150  }
151 
152  //- Construct as copy setting internal field reference
154  (
157  );
158 
159  //- Construct and return a clone setting internal field reference
161  (
163  ) const
164  {
166  (
168  );
169  }
171 
172  // Member functions
173 
174  // Evaluation functions
175 
176  //- Calculate and return the yPlus at the boundary
177  virtual tmp<scalarField> yPlus() const;
178 
179 
180  // I-O
181 
182  //- Write
183  virtual void write(Ostream& os) const;
184 };
185 
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 } // End namespace Foam
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
virtual tmp< scalarField > calcNut() const
Calculate the turbulence viscosity.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions...
TypeName("nutTabulatedWallFunction")
Runtime type information.
nutUTabulatedWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A class for handling words, derived from string.
Definition: word.H:59
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Foam::fvPatchFieldMapper.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
virtual tmp< scalarField > calcUPlus(const scalarField &Rey) const
Calculate wall u+ from table.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
scalar Rey
A class for managing temporary objects.
Definition: PtrList.H:118
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.