nutLowReWallFunctionFvPatchScalarField.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, 2019 OpenFOAM Foundation
9  Copyright (C) 2019-2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::nutLowReWallFunctionFvPatchScalarField
29 
30 Group
31  grpWallFunctions
32 
33 Description
34  This boundary condition provides a simple wrapper around a zero
35  fixed-value condition for the turbulent viscosity (i.e. \c nut)
36  for low-Reynolds number applications. It sets \c nut to zero,
37  and provides an access function to calculate \c y+.
38 
39 Usage
40  Example of the boundary condition specification:
41  \verbatim
42  <patchName>
43  {
44  // Mandatory entries
45  type nutLowReWallFunction;
46 
47  // Inherited entries
48  ...
49  }
50  \endverbatim
51 
52  where the entries mean:
53  \table
54  Property | Description | Type | Reqd | Deflt
55  type | Type name: nutLowReWallFunction | word | yes | -
56  \endtable
57 
58  The inherited entries are elaborated in:
59  - \link nutWallFunctionFvPatchScalarField.H \endlink
60 
61 SourceFiles
62  nutLowReWallFunctionFvPatchScalarField.C
63 
64 \*---------------------------------------------------------------------------*/
65 
66 #ifndef nutLowReWallFunctionFvPatchScalarField_H
67 #define nutLowReWallFunctionFvPatchScalarField_H
68 
70 
71 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72 
73 namespace Foam
74 {
75 
76 /*---------------------------------------------------------------------------*\
77  Class nutLowReWallFunctionFvPatchScalarField Declaration
78 \*---------------------------------------------------------------------------*/
79 
80 class nutLowReWallFunctionFvPatchScalarField
81 :
82  public nutWallFunctionFvPatchScalarField
83 {
84 protected:
85 
86  // Protected Member Functions
87 
88  //- Calculate the turbulent viscosity
89  virtual tmp<scalarField> calcNut() const;
90 
91 
92 public:
93 
94  //- Runtime type information
95  TypeName("nutLowReWallFunction");
96 
97 
98  // Constructors
99 
100  //- Construct from patch and internal field
102  (
103  const fvPatch&,
105  );
106 
107  //- Construct from patch, internal field and dictionary
109  (
110  const fvPatch&,
112  const dictionary&
113  );
114 
115  //- Construct by mapping given
116  //- nutLowReWallFunctionFvPatchScalarField
117  //- onto a new patch
119  (
121  const fvPatch&,
123  const fvPatchFieldMapper&
124  );
125 
126  //- Construct as copy
128  (
130  );
131 
132  //- Construct and return a clone
133  virtual tmp<fvPatchScalarField> clone() const
134  {
136  (
138  );
139  }
140 
141  //- Construct as copy setting internal field reference
143  (
146  );
147 
148  //- Construct and return a clone setting internal field reference
150  (
152  ) const
153  {
155  (
157  );
158  }
159 
160 
161  // Member Functions
162 
163  //- Calculate and return the yPlus at the boundary
164  virtual tmp<scalarField> yPlus() const;
165 
166 
167  // I-O
168 
169  //- Write
170  virtual void write(Ostream&) const;
171 };
172 
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 } // End namespace Foam
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
virtual tmp< scalarField > calcNut() const
Calculate the turbulent viscosity.
This boundary condition provides a simple wrapper around a zero fixed-value condition for the turbule...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
TypeName("nutLowReWallFunction")
Runtime type information.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
A FieldMapper for finite-volume patch fields.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: areaFieldsFwd.H:42
A class for managing temporary objects.
Definition: HashPtrTable.H:50
nutLowReWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Namespace for OpenFOAM.