nutUTabulatedWallFunctionFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 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 Description
28  This boundary condition provides a turbulent kinematic viscosity condition
29  when using wall functions. As input, the user specifies a look-up table
30  of U+ as a function of near-wall Reynolds number. The table should be
31  located in the $FOAM_CASE/constant directory.
32 
33 Usage
34  \table
35  Property | Description | Required | Default value
36  uPlusTable | U+ as a function of Re table name | yes |
37  \endtable
38 
39  Example of the boundary condition specification:
40  \verbatim
41  <patchName>
42  {
43  type nutTabulatedWallFunction;
44  uPlusTable myUPlusTable;
45  value uniform 0;
46  }
47  \endverbatim
48 
49 Note
50  The tables are not registered since the same table object may be used for
51  more than one patch.
52 
53 See also
54  Foam::nutWallFunctionFvPatchScalarField
55 
56 SourceFiles
57  nutUTabulatedWallFunctionFvPatchScalarField.C
58 
59 \*---------------------------------------------------------------------------*/
60 
61 #ifndef nutUTabulatedWallFunctionFvPatchScalarField_H
62 #define nutUTabulatedWallFunctionFvPatchScalarField_H
63 
66 
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 
69 namespace Foam
70 {
71 
72 /*---------------------------------------------------------------------------*\
73  Class nutUTabulatedWallFunctionFvPatchScalarField Declaration
74 \*---------------------------------------------------------------------------*/
75 
76 class nutUTabulatedWallFunctionFvPatchScalarField
77 :
78  public nutWallFunctionFvPatchScalarField
79 {
80 protected:
81 
82  // Protected data
83 
84  //- Name of u+ table
86 
87  //- U+ table
89 
90 
91  // Protected Member Functions
92 
93  //- Calculate the turbulence viscosity
94  virtual tmp<scalarField> nut() const;
95 
96  //- Calculate wall u+ from table
97  virtual tmp<scalarField> calcUPlus(const scalarField& Rey) const;
98 
99 
100 public:
101 
102  //- Runtime type information
103  TypeName("nutTabulatedWallFunction");
104 
105 
106  // Constructors
107 
108  //- Construct from patch and internal field
110  (
111  const fvPatch&,
113  );
114 
115  //- Construct from patch, internal field and dictionary
117  (
118  const fvPatch&,
120  const dictionary&
121  );
122 
123  //- Construct by mapping given
124  // nutUTabulatedWallFunctionFvPatchScalarField
125  // onto a new patch
127  (
129  const fvPatch&,
131  const fvPatchFieldMapper&
132  );
133 
134  //- Copy constructor
136  (
138  );
139 
140  //- Construct and return a clone
141  virtual tmp<fvPatchScalarField> clone() const
142  {
144  (
146  );
147  }
148 
149  //- Copy constructor setting internal field reference
151  (
154  );
155 
156  //- Construct and return a clone setting internal field reference
158  (
160  ) const
161  {
163  (
165  );
166  }
168 
169  // Member Functions
170 
171  // Evaluation functions
172 
173  //- Calculate and return the yPlus at the boundary
174  virtual tmp<scalarField> yPlus() const;
175 
176 
177  // I-O
178 
179  //- Write
180  virtual void write(Ostream& os) const;
181 };
182 
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 } // End namespace Foam
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 #endif
191 
192 // ************************************************************************* //
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions...
scalar Rey
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
A class for handling words, derived from string.
Definition: word.H:59
Foam::fvPatchFieldMapper.
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
nutUTabulatedWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual tmp< scalarField > calcUPlus(const scalarField &Rey) const
Calculate wall u+ from table.
virtual tmp< scalarField > nut() const
Calculate the turbulence viscosity.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: PtrList.H:53
TypeName("nutTabulatedWallFunction")
Runtime type information.
Namespace for OpenFOAM.