kqRWallFunctionFvPatchField.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-2017, 2019 OpenFOAM Foundation
9  Copyright (C) 2019 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::kqRWallFunctionFvPatchField
29 
30 Group
31  grpWallFunctions
32 
33 Description
34  This boundary condition provides a simple wrapper around the zero-gradient
35  condition, which can be used for \c k, \c q, and \c R fields for
36  the case of high Reynolds number flow using wall functions.
37 
38 Usage
39  Example of the boundary condition specification:
40  \verbatim
41  <patchName>
42  {
43  // Mandatory entries
44  type kqRWallFunction;
45  }
46  \endverbatim
47 
48 See also
49  Foam::zeroGradientFvPatchField
50 
51 SourceFiles
52  kqRWallFunctionFvPatchField.C
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef kqRWallFunctionFvPatchField_H
57 #define kqRWallFunctionFvPatchField_H
58 
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class kqRWallFunctionFvPatchField Declaration
68 \*---------------------------------------------------------------------------*/
69 
70 template<class Type>
72 :
73  public zeroGradientFvPatchField<Type>
74 {
75 public:
76 
77  //- Runtime type information
78  TypeName("kqRWallFunction");
79 
80 
81  // Constructors
82 
83  //- Construct from patch and internal field
85  (
86  const fvPatch&,
88  );
89 
90  //- Construct from patch, internal field and dictionary
92  (
93  const fvPatch&,
95  const dictionary&
96  );
97 
98  //- Construct by mapping given
99  //- kqRWallFunctionFvPatchField
100  //- onto a new patch
102  (
104  const fvPatch&,
106  const fvPatchFieldMapper&
107  );
108 
109  //- Construct as copy
111  (
113  );
114 
115  //- Construct and return a clone
116  virtual tmp<fvPatchField<Type>> clone() const
117  {
118  return tmp<fvPatchField<Type>>
119  (
120  new kqRWallFunctionFvPatchField(*this)
121  );
122  }
123 
124  //- Construct as copy setting internal field reference
126  (
129  );
130 
131  //- Construct and return a clone setting internal field reference
133  (
135  ) const
136  {
137  return tmp<fvPatchField<Type>>
138  (
139  new kqRWallFunctionFvPatchField(*this, iF)
140  );
141  }
142 
143 
144  // Member Functions
145 
146  //- Evaluate the patchField
147  virtual void evaluate
148  (
150  );
151 
152  //- Write
153  virtual void write(Ostream&) const;
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace Foam
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #ifdef NoRepository
165 #endif
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
Foam::UPstream::commsTypes::blocking
Foam::kqRWallFunctionFvPatchField::kqRWallFunctionFvPatchField
kqRWallFunctionFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: kqRWallFunctionFvPatchField.C:35
Foam::kqRWallFunctionFvPatchField::evaluate
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patchField.
Definition: kqRWallFunctionFvPatchField.C:94
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::kqRWallFunctionFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: kqRWallFunctionFvPatchField.H:115
Foam::kqRWallFunctionFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: kqRWallFunctionFvPatchField.C:103
zeroGradientFvPatchField.H
Foam::zeroGradientFvPatchField
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
Definition: zeroGradientFvPatchField.H:64
Foam::kqRWallFunctionFvPatchField::TypeName
TypeName("kqRWallFunction")
Runtime type information.
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:63
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
kqRWallFunctionFvPatchField.C
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:66
Foam::kqRWallFunctionFvPatchField
This boundary condition provides a simple wrapper around the zero-gradient condition,...
Definition: kqRWallFunctionFvPatchField.H:70
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54