nutUWallFunctionFvPatchScalarField.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::nutUWallFunctionFvPatchScalarField
26 
27 Group
28  grpWallFunctions
29 
30 Description
31  This boundary condition provides a turbulent kinematic viscosity condition
32  when using wall functions, based on velocity.
33 
34  \heading Patch usage
35 
36  Example of the boundary condition specification:
37  \verbatim
38  myPatch
39  {
40  type nutUWallFunction;
41  }
42  \endverbatim
43 
44 SeeAlso
45  Foam::nutWallFunctionFvPatchScalarField
46 
47 SourceFiles
48  nutUWallFunctionFvPatchScalarField.C
49 
50 \*---------------------------------------------------------------------------*/
51 
52 #ifndef nutUWallFunctionFvPatchScalarField_H
53 #define nutUWallFunctionFvPatchScalarField_H
54 
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 
62 /*---------------------------------------------------------------------------*\
63  Class nutUWallFunctionFvPatchScalarField Declaration
64 \*---------------------------------------------------------------------------*/
65 
67 :
69 {
70 protected:
71 
72  // Protected Member Functions
73 
74  //- Calculate yPLus
75  virtual tmp<scalarField> calcYPlus(const scalarField& magUp) const;
76 
77  //- Calculate the turbulence viscosity
78  virtual tmp<scalarField> calcNut() const;
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("nutUWallFunction");
85 
86 
87  // Constructors
88 
89  //- Construct from patch and internal field
91  (
92  const fvPatch&,
94  );
95 
96  //- Construct from patch, internal field and dictionary
98  (
99  const fvPatch&,
101  const dictionary&
102  );
103 
104  //- Construct by mapping given
105  // nutUWallFunctionFvPatchScalarField
106  // onto a new patch
108  (
110  const fvPatch&,
112  const fvPatchFieldMapper&
113  );
114 
115  //- Construct as copy
117  (
119  );
120 
121  //- Construct and return a clone
122  virtual tmp<fvPatchScalarField> clone() const
123  {
125  (
127  );
128  }
129 
130  //- Construct as copy setting internal field reference
132  (
135  );
136 
137  //- Construct and return a clone setting internal field reference
139  (
141  ) const
142  {
144  (
146  );
147  }
148 
149 
150  // Member functions
151 
152  // Evaluation functions
153 
154  //- Calculate and return the yPlus at the boundary
155  virtual tmp<scalarField> yPlus() const;
156 
157 
158  // I-O
159 
160  //- Write
161  virtual void write(Ostream& os) const;
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
scalar magUp
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...
virtual tmp< scalarField > calcNut() const
Calculate the turbulence viscosity.
Foam::fvPatchFieldMapper.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual tmp< scalarField > calcYPlus(const scalarField &magUp) const
Calculate yPLus.
Namespace for OpenFOAM.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
nutUWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
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
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions...
TypeName("nutUWallFunction")
Runtime type information.
A class for managing temporary objects.
Definition: PtrList.H:118