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-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::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  \heading Patch usage
35 
36  \table
37  Property | Description | Required | Default value
38  Prt | turbulent Prandtl number | no | 0.85
39  Cmu | model coefficient | no | 0.09
40  kappa | Von Karman constant | no | 0.41
41  E | model coefficient | no | 9.8
42  \endtable
43 
44  Example of the boundary condition specification:
45  \verbatim
46  myPatch
47  {
48  type alphatJayatillekeWallFunction;
49  }
50  \endverbatim
51 
52 Note
53  The units of kinematic turbulent thermal conductivity are [m2/s]
54 
55 SeeAlso
56  Foam::fixedValueFvPatchField
57 
58 SourceFiles
59  alphatJayatillekeWallFunctionFvPatchScalarField.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef alphatJayatillekeWallFunctionFvPatchScalarField_H
64 #define alphatJayatillekeWallFunctionFvPatchScalarField_H
65 
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 namespace incompressible
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class alphatJayatillekeWallFunctionFvPatchScalarField Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 class alphatJayatillekeWallFunctionFvPatchScalarField
80 :
81  public fixedValueFvPatchScalarField
82 {
83 protected:
84 
85  // Protected data
86 
87  //- Turbulent Prandtl number
88  scalar Prt_;
89 
90  //- Cmu coefficient
91  scalar Cmu_;
92 
93  //- Von Karman constant
94  scalar kappa_;
95 
96  //- E coefficient
97  scalar E_;
98 
99 
100  // Solution parameters
101 
102  static scalar tolerance_;
103  static label maxIters_;
104 
105 
106  // Protected member functions
107 
108  //- Check the type of the patch
109  virtual void checkType();
110 
111  //- `P' function
112  scalar Psmooth(const scalar Prat) const;
113 
114  //- Calculate y+ at the edge of the thermal laminar sublayer
115  scalar yPlusTherm
116  (
117  const scalar P,
118  const scalar Prat
119  ) const;
120 
121 
122 public:
123 
124  //- Runtime type information
125  TypeName("alphatJayatillekeWallFunction");
126 
127 
128  // Constructors
129 
130  //- Construct from patch and internal field
132  (
133  const fvPatch&,
135  );
136 
137  //- Construct from patch, internal field and dictionary
139  (
140  const fvPatch&,
142  const dictionary&
143  );
144 
145  //- Construct by mapping given
146  // alphatJayatillekeWallFunctionFvPatchScalarField
147  // onto a new patch
149  (
151  const fvPatch&,
153  const fvPatchFieldMapper&
154  );
155 
156  //- Construct as copy
158  (
160  );
161 
162  //- Construct and return a clone
163  virtual tmp<fvPatchScalarField> clone() const
164  {
166  (
168  );
169  }
170 
171  //- Construct as copy setting internal field reference
173  (
176  );
177 
178  //- Construct and return a clone setting internal field reference
180  (
182  ) const
183  {
185  (
187  );
188  }
189 
190 
191  // Member functions
192 
193  // Evaluation functions
194 
195  //- Update the coefficients associated with the patch field
196  virtual void updateCoeffs();
197 
198 
199  // I-O
200 
201  //- Write
202  virtual void write(Ostream&) const;
203 };
204 
205 
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 
208 } // End namespace incompressible
209 } // End namespace Foam
210 
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 
213 #endif
214 
215 // ************************************************************************* //
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::checkType
virtual void checkType()
Check the type of the patch.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:47
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:187
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::Cmu_
scalar Cmu_
Cmu coefficient.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:115
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::tolerance_
static scalar tolerance_
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:126
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:193
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField
This boundary condition provides a kinematic turbulent thermal conductivity for using wall functions,...
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:103
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::Psmooth
scalar Psmooth(const scalar Prat) const
`P' function
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:62
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:268
Foam::label
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
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::alphatJayatillekeWallFunctionFvPatchScalarField
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:106
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::Prt_
scalar Prt_
Turbulent Prandtl number.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:112
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::TypeName
TypeName("alphatJayatillekeWallFunction")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::yPlusTherm
scalar yPlusTherm(const scalar P, const scalar Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:71
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::E_
scalar E_
E coefficient.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:121
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::maxIters_
static label maxIters_
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:127
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::kappa_
scalar kappa_
Von Karman constant.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:118
fixedValueFvPatchFields.H
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