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-2020 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 Description
28  This boundary condition provides a thermal wall function for turbulent
29  thermal diffusivity (usually\c alphat) based on the Jayatilleke model.
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  Prt 0.85;
46  kappa 0.41;
47  E 9.8;
48  value uniform 0; // optional value entry
49  }
50  \endverbatim
51 
52 See also
53  Foam::fixedValueFvPatchField
54 
55 SourceFiles
56  alphatJayatillekeWallFunctionFvPatchScalarField.C
57 
58 \*---------------------------------------------------------------------------*/
59 
60 #ifndef alphatJayatillekeWallFunctionFvPatchScalarField_H
61 #define alphatJayatillekeWallFunctionFvPatchScalarField_H
62 
65 
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 
68 namespace Foam
69 {
70 namespace compressible
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class alphatJayatillekeWallFunctionFvPatchScalarField Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 class alphatJayatillekeWallFunctionFvPatchScalarField
78 :
79  public fixedValueFvPatchScalarField
80 {
81  // Private Data
82 
83  //- Turbulent Prandtl number
84  scalar Prt_;
85 
86 
87  // Solution parameters
88 
89  static scalar maxExp_;
90  static scalar tolerance_;
91  static label maxIters_;
92 
93 
94  // Private Member Functions
95 
96  //- `P' function
97  scalar Psmooth(const scalar Prat) const;
98 
99  //- Calculate y+ at the edge of the thermal laminar sublayer
100  scalar yPlusTherm
101  (
103  const scalar P,
104  const scalar Prat
105  ) const;
106 
107 
108 public:
109 
110  //- Runtime type information
111  TypeName("compressible::alphatJayatillekeWallFunction");
112 
113 
114  // Constructors
115 
116  //- Construct from patch and internal field
118  (
119  const fvPatch&,
121  );
122 
123  //- Construct from patch, internal field and dictionary
125  (
126  const fvPatch&,
128  const dictionary&
129  );
130 
131  //- Construct by mapping given an
132  // alphatJayatillekeWallFunctionFvPatchScalarField
133  // onto a new patch
135  (
137  const fvPatch&,
139  const fvPatchFieldMapper&
140  );
141 
142  //- Copy constructor
144  (
146  );
147 
148  //- Construct and return a clone
149  virtual tmp<fvPatchScalarField> clone() const
150  {
152  (
154  );
155  }
156 
157  //- Copy constructor setting internal field reference
159  (
162  );
163 
164  //- Construct and return a clone setting internal field reference
166  (
168  ) const
169  {
171  (
173  (
174  *this,
175  iF
176  )
177  );
178  }
179 
180 
181  // Member Functions
182 
183  // Evaluation functions
184 
185  //- Update the coefficients associated with the patch field
186  virtual void updateCoeffs();
187 
188 
189  // I-O
191  //- Write
192  void write(Ostream&) const;
193 };
194 
195 
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 
198 } // End namespace compressible
199 } // End namespace Foam
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 #endif
204 
205 // ************************************************************************* //
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
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
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.
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions...
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
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:53
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("compressible::alphatJayatillekeWallFunction")
Runtime type information.
Namespace for OpenFOAM.