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::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  \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  Prt 0.85;
50  kappa 0.41;
51  E 9.8;
52  value uniform 0; // optional value entry
53  }
54  \endverbatim
55 
56 SeeAlso
57  Foam::fixedValueFvPatchField
58 
59 SourceFiles
60  alphatJayatillekeWallFunctionFvPatchScalarField.C
61 
62 \*---------------------------------------------------------------------------*/
63 
64 #ifndef alphatJayatillekeWallFunctionFvPatchScalarField_H
65 #define alphatJayatillekeWallFunctionFvPatchScalarField_H
66 
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 namespace Foam
72 {
73 namespace compressible
74 {
75 
76 /*---------------------------------------------------------------------------*\
77  Class alphatJayatillekeWallFunctionFvPatchScalarField Declaration
78 \*---------------------------------------------------------------------------*/
79 
80 class alphatJayatillekeWallFunctionFvPatchScalarField
81 :
82  public fixedValueFvPatchScalarField
83 {
84  // Private 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 maxExp_;
102  static scalar tolerance_;
103  static label maxIters_;
104 
105 
106  // Private Member Functions
107 
108  //- Check the type of the patch
109  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("compressible::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 an
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  *this,
189  iF
190  )
191  );
192  }
193 
194 
195  // Member functions
196 
197  // Evaluation functions
198 
199  //- Update the coefficients associated with the patch field
200  virtual void updateCoeffs();
201 
202 
203  // I-O
204 
205  //- Write
206  void write(Ostream&) const;
207 };
208 
209 
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 
212 } // End namespace compressible
213 } // End namespace Foam
214 
215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 
217 #endif
218 
219 // ************************************************************************* //
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:190
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::Prt_
scalar Prt_
Turbulent Prandtl number.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:111
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::yPlusTherm
scalar yPlusTherm(const scalar P, const scalar Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:70
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::Cmu_
scalar Cmu_
Cmu coefficient.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:114
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::tolerance_
static scalar tolerance_
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:126
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::Psmooth
scalar Psmooth(const scalar Prat) const
`P' function
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:61
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:187
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField
This boundary condition provides a thermal wall function for turbulent thermal diffusivity (usuallyal...
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:104
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::write
void write(Ostream &) const
Write.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:300
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::kappa_
scalar kappa_
Von Karman constant.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:117
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::E_
scalar E_
E coefficient.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:120
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::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::alphatJayatillekeWallFunctionFvPatchScalarField
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:105
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::checkType
void checkType()
Check the type of the patch.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:48
fixedValueFvPatchFields.H
compressible
bool compressible
Definition: pEqn.H:40
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::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::maxIters_
static label maxIters_
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:127
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::maxExp_
static scalar maxExp_
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:125
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::TypeName
TypeName("compressible::alphatJayatillekeWallFunction")
Runtime type information.
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51