alphatJayatillekeWallFunctionFvPatchScalarField.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-2016 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::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField
26 
27 Group
28  grpIcoWallFunctions
29 
30 Description
31  This boundary condition provides a kinematic turbulent thermal conductivity
32  for using wall functions, using the Jayatilleke 'P' function.
33 
34 Usage
35  \table
36  Property | Description | Required | Default value
37  Prt | turbulent Prandtl number | no | 0.85
38  Cmu | model coefficient | no | 0.09
39  kappa | Von Karman constant | no | 0.41
40  E | model coefficient | no | 9.8
41  \endtable
42 
43  Example of the boundary condition specification:
44  \verbatim
45  <patchName>
46  {
47  type alphatJayatillekeWallFunction;
48  }
49  \endverbatim
50 
51 Note
52  The units of kinematic turbulent thermal conductivity are [m2/s]
53 
54 See also
55  Foam::fixedValueFvPatchField
56 
57 SourceFiles
58  alphatJayatillekeWallFunctionFvPatchScalarField.C
59 
60 \*---------------------------------------------------------------------------*/
61 
62 #ifndef alphatJayatillekeWallFunctionFvPatchScalarField_H
63 #define alphatJayatillekeWallFunctionFvPatchScalarField_H
64 
66 
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 
69 namespace Foam
70 {
71 namespace incompressible
72 {
73 
74 /*---------------------------------------------------------------------------*\
75  Class alphatJayatillekeWallFunctionFvPatchScalarField Declaration
76 \*---------------------------------------------------------------------------*/
77 
78 class alphatJayatillekeWallFunctionFvPatchScalarField
79 :
80  public fixedValueFvPatchScalarField
81 {
82 protected:
83 
84  // Protected data
85 
86  //- Turbulent Prandtl number
87  scalar Prt_;
88 
89  //- Cmu coefficient
90  scalar Cmu_;
91 
92  //- Von Karman constant
93  scalar kappa_;
94 
95  //- E coefficient
96  scalar E_;
97 
98 
99  // Solution parameters
100 
101  static scalar tolerance_;
102  static label maxIters_;
103 
104 
105  // Protected member functions
106 
107  //- Check the type of the patch
108  virtual void checkType();
109 
110  //- `P' function
111  scalar Psmooth(const scalar Prat) const;
112 
113  //- Calculate y+ at the edge of the thermal laminar sublayer
114  scalar yPlusTherm
115  (
116  const scalar P,
117  const scalar Prat
118  ) const;
119 
121 public:
122 
123  //- Runtime type information
124  TypeName("alphatJayatillekeWallFunction");
127  // Constructors
128 
129  //- Construct from patch and internal field
131  (
132  const fvPatch&,
134  );
135 
136  //- Construct from patch, internal field and dictionary
138  (
139  const fvPatch&,
141  const dictionary&
142  );
143 
144  //- Construct by mapping given
145  // alphatJayatillekeWallFunctionFvPatchScalarField
146  // onto a new patch
148  (
150  const fvPatch&,
152  const fvPatchFieldMapper&
153  );
154 
155  //- Construct as copy
157  (
159  );
160 
161  //- Construct and return a clone
162  virtual tmp<fvPatchScalarField> clone() const
163  {
165  (
167  );
168  }
169 
170  //- Construct as copy setting internal field reference
172  (
175  );
176 
177  //- Construct and return a clone setting internal field reference
179  (
181  ) const
182  {
184  (
186  );
187  }
188 
189 
190  // Member functions
191 
192  // Evaluation functions
193 
194  //- Update the coefficients associated with the patch field
195  virtual void updateCoeffs();
196 
197 
198  // I-O
199 
200  //- Write
201  virtual void write(Ostream&) const;
202 };
204 
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 
207 } // End namespace incompressible
208 } // End namespace Foam
209 
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 
212 #endif
213 
214 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
This boundary condition provides a kinematic turbulent thermal conductivity for using wall functions...
Foam::fvPatchFieldMapper.
scalar yPlusTherm(const scalar P, const scalar Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
TypeName("alphatJayatillekeWallFunction")
Runtime type information.
A class for managing temporary objects.
Definition: PtrList.H:54
Namespace for OpenFOAM.