HeatTransferModel.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2020-2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::HeatTransferModel
29
30Group
31 grpLagrangianIntermediateHeatTransferSubModels
32
33Description
34 Templated class to calculate the fluid-particle heat transfer
35 coefficients based on a specified Nusselt-number model.
36
37 \f[
38 h = \frac{\mathrm{Nu} \, \kappa}{d_p}
39 \f]
40 where
41
42 \vartable
43 h | Convective heat transfer coefficient of the flow
44 \mathrm{Nu} | Nusselt number
45 \kappa | Thermal conductivity of carrier in the film
46 d_p | Particle diameter
47 \endvartable
48
49 Optionally, Bird-Stewart-Lightfoot correction can be applied
50 to correct the heat transfer coefficient for evaporation:
51
52 \f[
53 h_{corr} = h \, \frac{\beta}{ \exp(\beta) + 1 }
54 \f]
55 with
56
57 \f[
58 \beta = \frac{N \, C_p \, W}{h}
59 \f]
60 where
61
62 \vartable
63 \beta | Correction factor
64 N | Molar flux
65 C_p | Specific heat capacity
66 W | Molecular weight
67 \endvartable
68
69 Reference:
70 \verbatim
71 Bird, R. B., Stewart, W. E., & Lightfoot, E. N. (1960).
72 Transport phenomena.
73 John Wiley & Sons., New York.
74 DOI:10.1002/aic.690070245
75 \endverbatim
76
77Usage
78 Minimal example by using \c constant/<CloudProperties>:
79 \verbatim
80 subModels
81 {
82 heatTransferModel <model>;
83
84 <model>Coeffs
85 {
86 BirdCorrection true;
87 }
88 }
89 \endverbatim
90
91 where the entries mean:
92 \table
93 Property | Description | Type | Reqd | Deflt
94 heatTransferModel | Type name: <model> | word | yes | -
95 <model>Coeffs | Model properties | dict | cndtnl | -
96 BirdCorrection | Flag to apply Bird-Stewart-Lightfoot's <!--
97 --> correction to the heat transfer coefficient | bool | cndtnl | -
98 \endtable
99
100 Options for the \c <model> entry:
101 \verbatim
102 RanzMarshall | Ranz-Marshall correlation for Nusselt number
103 none | No active model
104 \endverbatim
105
106SourceFiles
107 HeatTransferModel.C
108 HeatTransferModelNew.C
109
110\*---------------------------------------------------------------------------*/
111
112#ifndef HeatTransferModel_H
113#define HeatTransferModel_H
114
115#include "IOdictionary.H"
116#include "autoPtr.H"
118#include "CloudSubModelBase.H"
119
120// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121
122namespace Foam
123{
124
125/*---------------------------------------------------------------------------*\
126 Class HeatTransferModel Declaration
127\*---------------------------------------------------------------------------*/
128
129template<class CloudType>
130class HeatTransferModel
131:
132 public CloudSubModelBase<CloudType>
133{
134 // Private Data
135
136 //- Flag to apply Bird-Stewart-Lightfoot's correction to the htc
137 const Switch BirdCorrection_;
138
139
140public:
141
142 //- Runtime type information
143 TypeName("heatTransferModel");
144
145 //- Declare runtime constructor selection table
147 (
148 autoPtr,
149 HeatTransferModel,
150 dictionary,
151 (
152 const dictionary& dict,
154 ),
155 (dict, owner)
156 );
157
158
159 // Generated Methods
160
161 //- No copy assignment
162 void operator=(const HeatTransferModel<CloudType>&) = delete;
163
164
165 // Constructors
166
167 //- Construct null from owner
169
170 //- Construct from dictionary
172 (
173 const dictionary& dict,
175 const word& type
176 );
177
178 //- Copy construct
179 HeatTransferModel(const HeatTransferModel<CloudType>& htm);
180
181 //- Construct and return a clone
182 virtual autoPtr<HeatTransferModel<CloudType>> clone() const = 0;
183
184
185 //- Destructor
186 virtual ~HeatTransferModel() = default;
188
189 //- Selector
191 (
192 const dictionary& dict,
194 );
195
196
197 // Member Functions
198
199 //- The Bird HTC correction flag
201 {
202 return BirdCorrection_;
204
205
206 // Evaluation
207
208 //- Return Nusselt number
209 virtual scalar Nu
210 (
211 const scalar Re,
212 const scalar Pr
213 ) const = 0;
214
215 //- Return heat transfer coefficient
216 virtual scalar htc
217 (
218 const scalar dp,
219 const scalar Re,
220 const scalar Pr,
221 const scalar kappa,
222 const scalar NCpW
223 ) const;
224};
225
226
227// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
228
229} // End namespace Foam
230
231// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
232
233#define makeHeatTransferModel(CloudType) \
234 \
235 typedef Foam::CloudType::thermoCloudType thermoCloudType; \
236 defineNamedTemplateTypeNameAndDebug \
237 ( \
238 Foam::HeatTransferModel<thermoCloudType>, \
239 0 \
240 ); \
241 namespace Foam \
242 { \
243 defineTemplateRunTimeSelectionTable \
244 ( \
245 HeatTransferModel<thermoCloudType>, \
246 dictionary \
247 ); \
248 }
249
250
251#define makeHeatTransferModelType(SS, CloudType) \
252 \
253 typedef Foam::CloudType::thermoCloudType thermoCloudType; \
254 defineNamedTemplateTypeNameAndDebug(Foam::SS<thermoCloudType>, 0); \
255 \
256 Foam::HeatTransferModel<thermoCloudType>:: \
257 adddictionaryConstructorToTable<Foam::SS<thermoCloudType>> \
258 add##SS##CloudType##thermoCloudType##ConstructorToTable_;
259
260
261// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
262
263#ifdef NoRepository
264 #include "HeatTransferModel.C"
265#endif
267// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
268
269#endif
270
271// ************************************************************************* //
Base class for cloud sub-models.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
Templated class to calculate the fluid-particle heat transfer coefficients based on a specified Nusse...
bool BirdCorrection() const noexcept
The Bird HTC correction flag.
void operator=(const HeatTransferModel< CloudType > &)=delete
No copy assignment.
declareRunTimeSelectionTable(autoPtr, HeatTransferModel, dictionary,(const dictionary &dict, CloudType &owner),(dict, owner))
Declare runtime constructor selection table.
static autoPtr< HeatTransferModel< CloudType > > New(const dictionary &dict, CloudType &owner)
Selector.
virtual ~HeatTransferModel()=default
Destructor.
virtual autoPtr< HeatTransferModel< CloudType > > clone() const =0
Construct and return a clone.
virtual scalar htc(const scalar dp, const scalar Re, const scalar Pr, const scalar kappa, const scalar NCpW) const
Return heat transfer coefficient.
TypeName("heatTransferModel")
Runtime type information.
virtual scalar Nu(const scalar Re, const scalar Pr) const =0
Return Nusselt number.
HeatTransferModel(CloudType &owner)
Construct null from owner.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:78
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
DSMCCloud< dsmcParcel > CloudType
scalarField Re(const UList< complex > &cf)
Extract real component.
Definition: complexField.C:159
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
const direction noexcept
Definition: Scalar.H:223
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
dimensionedScalar Pr("Pr", dimless, laminarTransport)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73