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  }
170 
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 // ************************************************************************* //
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::uniformInterpolationTable< scalar >
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::nutUTabulatedWallFunctionFvPatchScalarField
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions....
Definition: nutUTabulatedWallFunctionFvPatchScalarField.H:88
nutWallFunctionFvPatchScalarField.H
Foam::nutUTabulatedWallFunctionFvPatchScalarField::calcNut
virtual tmp< scalarField > calcNut() const
Calculate the turbulence viscosity.
Definition: nutUTabulatedWallFunctionFvPatchScalarField.C:39
uniformInterpolationTable.H
Foam::nutUTabulatedWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: nutUTabulatedWallFunctionFvPatchScalarField.H:153
Foam::nutUTabulatedWallFunctionFvPatchScalarField::calcUPlus
virtual tmp< scalarField > calcUPlus(const scalarField &Rey) const
Calculate wall u+ from table.
Definition: nutUTabulatedWallFunctionFvPatchScalarField.C:70
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::nutUTabulatedWallFunctionFvPatchScalarField::uPlusTable_
uniformInterpolationTable< scalar > uPlusTable_
U+ table.
Definition: nutUTabulatedWallFunctionFvPatchScalarField.H:100
Foam::nutUTabulatedWallFunctionFvPatchScalarField::yPlus
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
Definition: nutUTabulatedWallFunctionFvPatchScalarField.C:181
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::nutUTabulatedWallFunctionFvPatchScalarField::nutUTabulatedWallFunctionFvPatchScalarField
nutUTabulatedWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: nutUTabulatedWallFunctionFvPatchScalarField.C:90
Foam::nutUTabulatedWallFunctionFvPatchScalarField::TypeName
TypeName("nutTabulatedWallFunction")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::nutUTabulatedWallFunctionFvPatchScalarField::write
virtual void write(Ostream &os) const
Write.
Definition: nutUTabulatedWallFunctionFvPatchScalarField.C:204
Foam::nutUTabulatedWallFunctionFvPatchScalarField::uPlusTableName_
word uPlusTableName_
Name of u+ table.
Definition: nutUTabulatedWallFunctionFvPatchScalarField.H:97
Rey
scalar Rey
Definition: evaluateNearWall.H:28
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::nutWallFunctionFvPatchScalarField
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions,...
Definition: nutWallFunctionFvPatchScalarField.H:101
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51