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::compressible::alphatJayatillekeWallFunctionFvPatchScalarField
26 
27 Group
28  grpCmpWallFunctions
29 
30 Description
31  This boundary condition provides a thermal wall function for turbulent
32  thermal diffusivity (usually\c alphat) based on the Jayatilleke model.
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  Prt 0.85;
49  kappa 0.41;
50  E 9.8;
51  value uniform 0; // optional value entry
52  }
53  \endverbatim
54 
55 See also
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 compressible
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class alphatJayatillekeWallFunctionFvPatchScalarField Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 class alphatJayatillekeWallFunctionFvPatchScalarField
80 :
81  public fixedValueFvPatchScalarField
82 {
83  // Private data
84 
85  //- Turbulent Prandtl number
86  scalar Prt_;
87 
88  //- Cmu coefficient
89  scalar Cmu_;
90 
91  //- Von Karman constant
92  scalar kappa_;
93 
94  //- E coefficient
95  scalar E_;
96 
97 
98  // Solution parameters
99 
100  static scalar maxExp_;
101  static scalar tolerance_;
102  static label maxIters_;
104 
105  // Private Member Functions
106 
107  //- Check the type of the patch
108  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 
120 
121 public:
122 
123  //- Runtime type information
124  TypeName("compressible::alphatJayatillekeWallFunction");
125 
126 
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 an
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  *this,
188  iF
189  )
190  );
191  }
192 
193 
194  // Member functions
195 
196  // Evaluation functions
197 
198  //- Update the coefficients associated with the patch field
199  virtual void updateCoeffs();
200 
201 
202  // I-O
204  //- Write
205  void write(Ostream&) const;
206 };
207 
208 
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 
211 } // End namespace compressible
212 } // End namespace Foam
213 
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 
216 #endif
217 
218 // ************************************************************************* //
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
This boundary condition provides a thermal wall function for turbulent thermal diffusivity (usuallyal...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
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...
A class for managing temporary objects.
Definition: PtrList.H:54
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("compressible::alphatJayatillekeWallFunction")
Runtime type information.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Namespace for OpenFOAM.
bool compressible
Definition: pEqn.H:30