alphatJayatillekeWallFunctionFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 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 Description
28  This boundary condition provides a kinematic turbulent thermal conductivity
29  for using wall functions, using the Jayatilleke 'P' function.
30 
31 Usage
32  \table
33  Property | Description | Required | Default value
34  Prt | turbulent Prandtl number | no | 0.85
35  Cmu | model coefficient | no | 0.09
36  kappa | Von Karman constant | no | 0.41
37  E | model coefficient | no | 9.8
38  \endtable
39 
40  Example of the boundary condition specification:
41  \verbatim
42  <patchName>
43  {
44  type alphatJayatillekeWallFunction;
45  }
46  \endverbatim
47 
48 Note
49  The units of kinematic turbulent thermal conductivity are [m2/s]
50 
51 See also
52  Foam::fixedValueFvPatchField
53 
54 SourceFiles
55  alphatJayatillekeWallFunctionFvPatchScalarField.C
56 
57 \*---------------------------------------------------------------------------*/
58 
59 #ifndef alphatJayatillekeWallFunctionFvPatchScalarField_H
60 #define alphatJayatillekeWallFunctionFvPatchScalarField_H
61 
64 
65 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66 
67 namespace Foam
68 {
69 namespace incompressible
70 {
71 
72 /*---------------------------------------------------------------------------*\
73  Class alphatJayatillekeWallFunctionFvPatchScalarField Declaration
74 \*---------------------------------------------------------------------------*/
75 
76 class alphatJayatillekeWallFunctionFvPatchScalarField
77 :
78  public fixedValueFvPatchScalarField
79 {
80 protected:
81 
82  // Protected data
83 
84  //- Turbulent Prandtl number
85  scalar Prt_;
86 
87  //- Cmu coefficient
88  scalar Cmu_;
89 
90  //- Von Karman constant
91  scalar kappa_;
92 
93  //- E coefficient
94  scalar E_;
95 
96 
97  // Solution parameters
98 
99  static scalar tolerance_;
100  static label maxIters_;
101 
102 
103  // Protected member functions
104 
105  //- `P' function
106  scalar Psmooth(const scalar Prat) const;
107 
108  //- Calculate y+ at the edge of the thermal laminar sublayer
109  scalar yPlusTherm
110  (
112  const scalar P,
113  const scalar Prat
114  ) const;
116 
117 public:
119  //- Runtime type information
120  TypeName("alphatJayatillekeWallFunction");
121 
122 
123  // Constructors
125  //- Construct from patch and internal field
127  (
128  const fvPatch&,
130  );
131 
132  //- Construct from patch, internal field and dictionary
134  (
135  const fvPatch&,
137  const dictionary&
138  );
139 
140  //- Construct by mapping given
141  // alphatJayatillekeWallFunctionFvPatchScalarField
142  // onto a new patch
144  (
146  const fvPatch&,
148  const fvPatchFieldMapper&
149  );
150 
151  //- Copy constructor
153  (
155  );
156 
157  //- Construct and return a clone
158  virtual tmp<fvPatchScalarField> clone() const
159  {
161  (
163  );
164  }
165 
166  //- Copy constructor setting internal field reference
168  (
171  );
172 
173  //- Construct and return a clone setting internal field reference
175  (
177  ) const
178  {
180  (
182  );
183  }
184 
185 
186  // Member Functions
187 
188  // Evaluation functions
189 
190  //- Update the coefficients associated with the patch field
191  virtual void updateCoeffs();
192 
193 
194  // I-O
195 
196  //- Write
197  virtual void write(Ostream&) const;
198 };
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 } // End namespace incompressible
204 } // End namespace Foam
205 
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 
208 #endif
209 
210 // ************************************************************************* //
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
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:158
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.
scalar yPlusTherm(const nutWallFunctionFvPatchScalarField &nutw, const scalar P, const scalar Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions...
This boundary condition provides a kinematic turbulent thermal conductivity for using wall functions...
Foam::fvPatchFieldMapper.
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:53
Namespace for OpenFOAM.