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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2017 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::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField
29 
30 Group
31  grpIcoWallFunctions
32 
33 Description
34  This boundary condition provides a kinematic turbulent thermal conductivity
35  for using wall functions, using the Jayatilleke 'P' function.
36 
37 Usage
38  \table
39  Property | Description | Required | Default value
40  Prt | turbulent Prandtl number | no | 0.85
41  kappa | Von Karman constant | no | 0.41
42  E | model coefficient | no | 9.8
43  \endtable
44 
45  Example of the boundary condition specification:
46  \verbatim
47  <patchName>
48  {
49  type alphatJayatillekeWallFunction;
50  }
51  \endverbatim
52 
53 Note
54  The units of kinematic turbulent thermal conductivity are [m2/s]
55 
56 See also
57  Foam::fixedValueFvPatchField
58 
59 SourceFiles
60  alphatJayatillekeWallFunctionFvPatchScalarField.C
61 
62 \*---------------------------------------------------------------------------*/
63 
64 #ifndef incompressible_alphatJayatillekeWallFunctionFvPatchScalarField_H
65 #define incompressible_alphatJayatillekeWallFunctionFvPatchScalarField_H
66 
68 #include "turbulenceModel.H"
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 namespace Foam
73 {
74 namespace incompressible
75 {
76 
77 /*---------------------------------------------------------------------------*\
78  Class alphatJayatillekeWallFunctionFvPatchScalarField Declaration
79 \*---------------------------------------------------------------------------*/
80 
81 class alphatJayatillekeWallFunctionFvPatchScalarField
82 :
83  public fixedValueFvPatchScalarField
84 {
85 protected:
86 
87  // Protected data
88 
89  //- Turbulent Prandtl number
90  scalar Prt_;
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  //- Return the patch y+
111  tmp<scalarField> yPlus(const turbulenceModel& turbModel) const;
112 
113  //- `P' function
114  scalar Psmooth(const scalar Prat) const;
115 
116  //- Calculate y+ at the edge of the thermal laminar sublayer
117  scalar yPlusTherm
118  (
119  const scalar P,
120  const scalar Prat
121  ) const;
122 
123 
124 public:
125 
126  //- Runtime type information
127  TypeName("alphatJayatillekeWallFunction");
128 
129 
130  // Constructors
131 
132  //- Construct from patch and internal field
134  (
135  const fvPatch&,
137  );
138 
139  //- Construct from patch, internal field and dictionary
141  (
142  const fvPatch&,
144  const dictionary&
145  );
146 
147  //- Construct by mapping given
148  // alphatJayatillekeWallFunctionFvPatchScalarField
149  // onto a new patch
151  (
153  const fvPatch&,
155  const fvPatchFieldMapper&
156  );
157 
158  //- Construct as copy
160  (
162  );
163 
164  //- Construct and return a clone
165  virtual tmp<fvPatchScalarField> clone() const
166  {
168  (
170  );
171  }
172 
173  //- Construct as copy setting internal field reference
175  (
178  );
179 
180  //- Construct and return a clone setting internal field reference
182  (
184  ) const
185  {
187  (
189  );
190  }
191 
192 
193  // Member functions
194 
195  // Evaluation functions
196 
197  //- Update the coefficients associated with the patch field
198  virtual void updateCoeffs();
199 
200 
201  // I-O
202 
203  //- Write
204  virtual void write(Ostream&) const;
205 };
206 
207 
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 } // End namespace incompressible
211 } // End namespace Foam
212 
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 
215 #endif
216 
217 // ************************************************************************* //
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::checkType
virtual void checkType()
Check the type of the patch.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:50
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:184
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::tolerance_
static scalar tolerance_
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:120
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::yPlus
tmp< scalarField > yPlus(const turbulenceModel &turbModel) const
Return the patch y+.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:65
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:222
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField
This boundary condition provides a kinematic turbulent thermal conductivity for using wall functions,...
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:100
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::Psmooth
scalar Psmooth(const scalar Prat) const
`P' function
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:96
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:287
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::alphatJayatillekeWallFunctionFvPatchScalarField
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:140
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::Prt_
scalar Prt_
Turbulent Prandtl number.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:109
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::TypeName
TypeName("alphatJayatillekeWallFunction")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
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:105
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::E_
scalar E_
E coefficient.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:115
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::maxIters_
static label maxIters_
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:121
Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::kappa_
scalar kappa_
Von Karman constant.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:112
fixedValueFvPatchFields.H
Foam::IncompressibleTurbulenceModel
Templated abstract base class for single-phase incompressible turbulence models.
Definition: IncompressibleTurbulenceModel.H:55
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
turbulenceModel.H
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54