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 | 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::kqRWallFunctionFvPatchField
26 
27 Group
28  grpWallFunctions
29 
30 Description
31  This boundary condition provides a suitable condition for turbulence
32  \c k, \c q, and \c R fields for the case of high Reynolds number flow using
33  wall functions.
34 
35  It is a simple wrapper around the zero-gradient condition.
36 
37  \heading Patch usage
38 
39  Example of the boundary condition specification:
40  \verbatim
41  myPatch
42  {
43  type kqRWallFunction;
44  }
45  \endverbatim
46 
47 SeeAlso
48  Foam::zeroGradientFvPatchField
49 
50 SourceFiles
51  kqRWallFunctionFvPatchField.C
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef kqRWallFunctionFvPatchField_H
56 #define kqRWallFunctionFvPatchField_H
57 
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 
65 /*---------------------------------------------------------------------------*\
66  Class kqRWallFunctionFvPatchField Declaration
67 \*---------------------------------------------------------------------------*/
68 
69 template<class Type>
71 :
72  public zeroGradientFvPatchField<Type>
73 {
74 
75  // Private Member Functions
76 
77  //- Check the type of the patch
78  void checkType();
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("kqRWallFunction");
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  // kqRWallFunctionFvPatchField
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<fvPatchField<Type> > clone() const
123  {
124  return tmp<fvPatchField<Type> >
125  (
126  new kqRWallFunctionFvPatchField(*this)
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  {
143  return tmp<fvPatchField<Type> >
144  (
145  new kqRWallFunctionFvPatchField(*this, iF)
146  );
147  }
148 
149 
150  // Member functions
151 
152  // Evaluation functions
153 
154  //- Evaluate the patchField
155  virtual void evaluate
156  (
157  const Pstream::commsTypes commsType=Pstream::Pstream::blocking
158  );
159 
160 
161  // I-O
162 
163  //- Write
164  virtual void write(Ostream&) const;
165 };
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 } // End namespace Foam
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 #ifdef NoRepository
176 #endif
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
Foam::kqRWallFunctionFvPatchField::kqRWallFunctionFvPatchField
kqRWallFunctionFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: kqRWallFunctionFvPatchField.C:58
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::kqRWallFunctionFvPatchField::evaluate
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::Pstream::blocking)
Evaluate the patchField.
Definition: kqRWallFunctionFvPatchField.C:127
Foam::kqRWallFunctionFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: kqRWallFunctionFvPatchField.H:121
Foam::kqRWallFunctionFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: kqRWallFunctionFvPatchField.C:136
zeroGradientFvPatchField.H
Foam::zeroGradientFvPatchField
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
Definition: zeroGradientFvPatchField.H:63
Foam::kqRWallFunctionFvPatchField::TypeName
TypeName("kqRWallFunction")
Runtime type information.
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::kqRWallFunctionFvPatchField::checkType
void checkType()
Check the type of the patch.
Definition: kqRWallFunctionFvPatchField.C:39
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
kqRWallFunctionFvPatchField.C
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:64
Foam::kqRWallFunctionFvPatchField
This boundary condition provides a suitable condition for turbulence k, q, and R fields for the case ...
Definition: kqRWallFunctionFvPatchField.H:69
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::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51