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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::HeatTransferModel
29 
30 Group
31  grpLagrangianIntermediateHeatTransferSubModels
32 
33 Description
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 
77 Usage
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 
106 SourceFiles
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"
117 #include "runTimeSelectionTables.H"
118 #include "CloudSubModelBase.H"
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 namespace Foam
123 {
124 
125 /*---------------------------------------------------------------------------*\
126  Class HeatTransferModel Declaration
127 \*---------------------------------------------------------------------------*/
128 
129 template<class CloudType>
130 class 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 
140 public:
141 
142  //- Runtime type information
143  TypeName("heatTransferModel");
144 
145  //- Declare runtime constructor selection table
147  (
148  autoPtr,
150  dictionary,
151  (
152  const dictionary& dict,
153  CloudType& owner
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,
174  CloudType& owner,
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;
187 
188 
189  //- Selector
190  static autoPtr<HeatTransferModel<CloudType>> New
191  (
192  const dictionary& dict,
193  CloudType& owner
194  );
195 
196 
197  // Member Functions
198 
199  //- The Bird HTC correction flag
200  bool BirdCorrection() const noexcept
201  {
202  return BirdCorrection_;
203  }
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
266 
267 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
268 
269 #endif
270 
271 // ************************************************************************* //
Foam::HeatTransferModel::HeatTransferModel
HeatTransferModel(CloudType &owner)
Construct null from owner.
Definition: HeatTransferModel.C:34
Foam::constant::electromagnetic::kappa
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Foam::HeatTransferModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, HeatTransferModel, dictionary,(const dictionary &dict, CloudType &owner),(dict, owner))
Declare runtime constructor selection table.
Foam::HeatTransferModel::Nu
virtual scalar Nu(const scalar Re, const scalar Pr) const =0
Return Nusselt number.
HeatTransferModel.C
CloudSubModelBase.H
Pr
dimensionedScalar Pr("Pr", dimless, laminarTransport)
Foam::CloudType
DSMCCloud< dsmcParcel > CloudType
Definition: makeDSMCParcelBinaryCollisionModels.C:38
Foam::HeatTransferModel::TypeName
TypeName("heatTransferModel")
Runtime type information.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::HeatTransferModel::operator=
void operator=(const HeatTransferModel< CloudType > &)=delete
No copy assignment.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
IOdictionary.H
Foam::HeatTransferModel::BirdCorrection
bool BirdCorrection() const noexcept
The Bird HTC correction flag.
Definition: HeatTransferModel.H:257
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::Re
scalarField Re(const UList< complex > &cf)
Extract real component.
Definition: complexField.C:159
Foam::HeatTransferModel::clone
virtual autoPtr< HeatTransferModel< CloudType > > clone() const =0
Construct and return a clone.
Foam::HeatTransferModel::~HeatTransferModel
virtual ~HeatTransferModel()=default
Destructor.
Foam::HeatTransferModel::htc
virtual scalar htc(const scalar dp, const scalar Re, const scalar Pr, const scalar kappa, const scalar NCpW) const
Return heat transfer coefficient.
Definition: HeatTransferModel.C:69
Foam::HeatTransferModel::New
static autoPtr< HeatTransferModel< CloudType > > New(const dictionary &dict, CloudType &owner)
Selector.
Definition: HeatTransferModelNew.C:36
autoPtr.H