FreeFOAM The Cross-Platform CFD Toolkit
kappatJayatillekeWallFunctionFvPatchScalarField.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) 2010-2010 OpenCFD Ltd.
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::RASModels::
26  kappatJayatillekeWallFunctionFvPatchScalarField
27 
28 Description
29  Boundary condition for (kinematic) turbulent thermal conductivity when
30  using wall functions, using Jayatilleke P function.
31 
32  Units of m2/s
33 
34 SourceFiles
35  kappatJayatillekeWallFunctionFvPatchScalarField.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef kappatJayatillekeWallFunctionFvPatchScalarField_H
40 #define kappatJayatillekeWallFunctionFvPatchScalarField_H
41 
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace incompressible
49 {
50 namespace RASModels
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class kappatJayatillekeWallFunctionFvPatchScalarField Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
59  public fixedValueFvPatchScalarField
60 {
61 protected:
62 
63  // Protected data
64 
65  //- Turbulent Prandtl number
66  scalar Prt_;
67 
68  //- Cmu coefficient
69  scalar Cmu_;
70 
71  //- Von Karman constant
72  scalar kappa_;
73 
74  //- E coefficient
75  scalar E_;
76 
77 
78  // Solution parameters
79 
80  static scalar tolerance_;
81  static label maxIters_;
82 
83 
84  // Protected member functions
85 
86  //- Check the type of the patch
87  virtual void checkType();
88 
89  //- `P' function
90  scalar Psmooth(const scalar Prat) const;
91 
92  //- Calculate y+ at the edge of the thermal laminar sublayer
93  scalar yPlusTherm
94  (
95  const scalar P,
96  const scalar Prat
97  ) const;
98 
99 
100 public:
101 
102  //- Runtime type information
103  TypeName("kappatJayatillekeWallFunction");
104 
105 
106  // Constructors
107 
108  //- Construct from patch and internal field
110  (
111  const fvPatch&,
113  );
114 
115  //- Construct from patch, internal field and dictionary
117  (
118  const fvPatch&,
120  const dictionary&
121  );
122 
123  //- Construct by mapping given
124  // kappatJayatillekeWallFunctionFvPatchScalarField
125  // onto a new patch
127  (
129  const fvPatch&,
131  const fvPatchFieldMapper&
132  );
133 
134  //- Construct as copy
136  (
138  );
139 
140  //- Construct and return a clone
142  {
144  (
146  );
147  }
148 
149  //- Construct as copy setting internal field reference
151  (
154  );
155 
156  //- Construct and return a clone setting internal field reference
158  (
160  ) const
161  {
163  (
165  );
166  }
167 
168 
169  // Member functions
170 
171  // Evaluation functions
172 
173  //- Update the coefficients associated with the patch field
174  virtual void updateCoeffs();
175 
176 
177  // I-O
178 
179  //- Write
180  virtual void write(Ostream&) const;
181 };
182 
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 } // End namespace RASModels
187 } // End namespace incompressible
188 } // End namespace Foam
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 #endif
193 
194 // ************************************************************************* //