kappaEff.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) 2020-2023 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::wallHeatTransferCoeffModels::kappaEff
26 
27 Description
28  Calculates the estimated flow heat transfer coefficient at wall patches
29  as the volScalarField field 'kappaEff' using one of equations below.
30 
31  kappaEff model, given by:
32 
33  \f[
34  htc = \rho*C_p*({\frac{\nu}{Pr} + \frac{\nu_t}{Prt}})
35  \f]
36 
37  kappaEff model with characteristic length, given by:
38 
39  \f[
40  htc =
41  \rho*C_p*({\frac{\nu}{Pr} + \frac{\nu_t}{Prt}})\frac{1}{L_{char}};
42  \f]
43 
44  where
45  \vartable
46  rho | Density [kg/m^3]
47  Cp | Specific heat capacity [m^2/K/s^2)]
48  Pr | Fluid laminar Prandtl number []
49  Prt | Fluid turbulent Prandtl number []
50  Lchar | Characteristic length [m]
51  \endvartable
52 
53  Example of function object specification:
54  \verbatim
55  kappaEff1
56  {
57  type wallHeatTransferCoeff;
58  libs ("libfieldFunctionObjects.so");
59  model kappaEff;
60  ...
61  region fluid;
62  patches (".*Wall");
63  rho 1.225;
64  Cp 1005;
65  Pr 0.707;
66  Prt 0.9;
67  }
68  \endverbatim
69 
70  \verbatim
71  kappaEff2
72  {
73  type wallHeatTransferCoeff;
74  libs ("libfieldFunctionObjects.so");
75  model kappaEff;
76  ...
77  region fluid;
78  patches (".*Wall");
79  rho 1.225;
80  Cp 1005;
81  Pr 0.707;
82  Prt 0.9;
83  Lchar 0.001;
84  }
85  \endverbatim
86 
87 Usage
88  \table
89  Property | Description | Required | Default value
90  type | Type name: wallHeatTransferCoeff | yes |
91  model | Type name: kappaEff | no | kappaEff
92  patches | List of patches to process | no | all wall patches
93  region | Region to be evaluated | no | default region
94  rho | Fluid density | yes |
95  Cp | Fluid heat capacity | yes |
96  Pr | Fluid laminar Prandtl number | yes |
97  Prt | Fluid turbulent Prandtl number| yes |
98  Lchar | Characteristic length | no | no
99  \endtable
100 
101  Note:
102  Cp and rho are required only for incompressible flow calculations.
103 
104 SourceFiles
105  kappaEff.C
106 
107 \*---------------------------------------------------------------------------*/
108 
109 #ifndef wallHeatTransferCoeffModels_kappaEff_H
110 #define wallHeatTransferCoeffModels_kappaEff_H
111 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 namespace Foam
117 {
118 namespace wallHeatTransferCoeffModels
119 {
120 
121 /*---------------------------------------------------------------------------*\
122  Class kappaEff Declaration
123 \*---------------------------------------------------------------------------*/
124 
125 class kappaEff
126 :
127  public wallHeatTransferCoeffModel
128 {
129  // Private data
130 
131  //- Reference to mesh
132  const fvMesh& mesh_;
133 
134  //- Fluid laminar Prandtl number
135  dimensionedScalar Pr_;
136 
137  //- Fluid turbulent Prandtl number
138  dimensionedScalar Prt_;
139 
140  //- Characteristic length
141  dimensionedScalar Lchar_;
142 
143  //- Is characteristic length used?
144  bool isCharLength_;
145 
146 
147 public:
148 
149  //- Runtime type information
150  TypeName("kappaEff");
151 
152 
153  // Constructors
154 
155  //- Construct from name, mesh and dict
156  kappaEff
157  (
158  const word& name,
159  const fvMesh& mesh,
160  const dictionary&
161  );
162 
163  //- Disallow default bitwise copy construction
164  kappaEff(const kappaEff&) = delete;
165 
166 
167  //- Destructor
168  virtual ~kappaEff();
169 
170 
171  // Member Functions
172 
173  //- Read the kappaEff data
174  virtual bool read(const dictionary&);
175 
176  //- Calculate the wall heat transfer coefficient
177  virtual tmp<volScalarField> htcByRhoCp
178  (
179  const momentumTransportModel& mmtm,
180  const labelHashSet& patches
181  ) const;
182 
183 
184  // Member Operators
185 
186  //- Disallow default bitwise assignment
187  void operator=(const kappaEff&) = delete;
188 };
189 
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 } // End namespace wallHeatTransferCoeffModels
194 } // End namespace Foam
195 
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 
198 #endif
199 
200 // ************************************************************************* //
kappaEff(const word &name, const fvMesh &mesh, const dictionary &)
Construct from name, mesh and dict.
Definition: kappaEff.C:50
void operator=(const kappaEff &)=delete
Disallow default bitwise assignment.
virtual tmp< volScalarField > htcByRhoCp(const momentumTransportModel &mmtm, const labelHashSet &patches) const
Calculate the wall heat transfer coefficient.
Definition: kappaEff.C:97
TypeName("kappaEff")
Runtime type information.
virtual bool read(const dictionary &)
Read the kappaEff data.
Definition: kappaEff.C:80
const fvPatchList & patches
compressibleMomentumTransportModel momentumTransportModel
Namespace for OpenFOAM.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
word name(const bool)
Return a word representation of a bool.
Definition: boolIO.C:39
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
Definition: HashSet.H:211