humidityTemperatureCoupledMixedFvPatchScalarField.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) 2015-2022 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::
28 compressible::
29 humidityTemperatureCoupledMixedFvPatchScalarField
30
31Description
32 Mixed boundary condition for temperature to be used at the coupling
33 interface between fluid solid regions.
34
35 This boundary condition can operate in four modes:
36 - \c constantMass: thermal inertia only
37 - requires \c rho, \c thickness and \c cp
38 - \c condensation: condensation only
39 - when the wall temperature (Tw) is below the dew temperature (Tdew)
40 condesation takes place and the resulting condensed mass is stored
41 on the wall
42 - \c evaporation: evaporation only
43 - initial mass is vaporized when Tw is above the input vaporization
44 temperature (Tvap).
45 - \c condensationAndEvaporation : condensation and evaporation take place
46 simultaneously.
47
48 There is no mass flow on the wall, i.e. the mass condensed on a face
49 remains on that face. It uses a 'lumped mass' model to include thermal
50 inertia effects.
51
52 It assumes a drop-wise type of condensation, whereby its heat transfer
53 Nusselt number is calculated using:
54 \f{eqnarray*}{
55 51104 + 2044 (T - 273.15) & T > 295 & T < 373 \\
56 255510 & T > 373 &
57 \f}
58
59 References:
60 \verbatim
61 Standard models (tag:BLID):
62 Bergman, T. L., Lavine, A. S.,
63 Incropera, F. P., & Dewitt, D. P. (2011).
64 Fundamentals of heat and mass transfer.
65 John Wiley & Sons. 7th Edition. Chapter 10.
66 ISBN:9780470501979
67 \endverbatim
68
69 The mass transfer correlation used is:
70
71 \f[ h_m = D_{ab} \frac{Sh}{L} \f]
72
73 where:
74 \vartable
75 D_{ab} | mass vapour difussivity
76 L | characteristic length
77 Sh | Sherwood number
78 \endvartable
79
80 The Sherwood number is calculated using:
81
82 \f{eqnarray*}{
83 0.664 Re^\frac{1}{2} Sc^\frac{1}{3} & Re < 5.0E+05 \\
84 0.037 Re^\frac{4}{5} Sc^\frac{1}{3} & Re > 5.0E+05
85 \f}
86 where:
87 \vartable
88 Re | Reynolds number
89 Sc | Schmidt number
90 \endvartable
91
92 NOTE:
93 - The correlation used to calculate Tdew is for water vapour.
94 - A scalar transport equation for the carrier specie is required, e.g.
95 supplied via a function object or in the main solver. This specie
96 transports the vapour phase in the main ragion.
97 - The boundary condition of this specie on the coupled wall must be
98 fixedGradient in order to allow condensation or evaporation of the
99 vapour in or out of this wall
100 - Addition of extra layers in possible using thicknessLayers and
101 kappaLayers
102
103
104 Example usage:
105
106 On the fluid side
107 \verbatim
108 myInterfacePatchName
109 {
110 type thermalHumidityCoupledMixed;
111 kappaMethod fluidThermo;
112 kappa none;
113
114 // Modes of operation: inert, condensation, vaporization, condEvap
115 mode condEvap;
116
117 // Carrier species name
118 specieName H2O;
119
120 // Carrier molecular weight
121 carrierMolWeight 28.9;
122
123 // Characteristic length of the wall
124 L 0.1;
125
126 // Vaporisation temperature
127 Tvap 273;
128
129 // Liquid properties for the condensed mass
130 liquid
131 {
132 H2O
133 {
134 defaultCoeffs yes;
135 }
136 }
137
138 thicknessLayers (0.1 0.2 0.3 0.4);
139 kappaLayers (1 2 3 4);
140
141 // thickness, density and cp required for inert and condensation
142 // modes
143
144 //thickness uniform 0;
145 //cp uniform 0;
146 //rho uniform 0;
147
148 value $internalField;
149 }
150 \endverbatim
151
152 On the solid side:
153 \verbatim
154 myInterfacePatchName
155 {
156 type thermalInertiaMassTransferCoupledMixed;
157 kappaMethod solidThermo;
158 kappa none;
159 value uniform 260;
160 }
161 \endverbatim
162
163
164SourceFiles
165 humidityTemperatureCoupledMixedFvPatchScalarField.C
166
167\*---------------------------------------------------------------------------*/
168
169#ifndef humidityTemperatureCoupledMixedFvPatchScalarField_H
170#define humidityTemperatureCoupledMixedFvPatchScalarField_H
171
172#include "mixedFvPatchFields.H"
174#include "liquidProperties.H"
175#include "autoPtr.H"
176
177// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178
179namespace Foam
180{
181
182/*---------------------------------------------------------------------------*\
183 Class humidityTemperatureCoupledMixedFvPatchScalarField Declaration
184\*---------------------------------------------------------------------------*/
185
187:
188 public mixedFvPatchScalarField,
189 public temperatureCoupledBase
190{
191public:
192
193 // Public enumeration
194
195 //- Modes of mass transfer
197 {
202 };
204
205private:
206
207 // Private data
208
209 static const Enum<massTransferMode> massModeTypeNames_;
210
211 //- Operating mode
212 massTransferMode mode_;
214
215 // Field names
217 //- Name of the pressure field
218 const word pName_;
220 //- Name of the velocity field
221 const word UName_;
222
223 //- Name of the density field
224 const word rhoName_;
225
226 //- Name of the dynamic viscosity field
227 const word muName_;
228
229 //- Name of temperature field on the neighbour region
230 const word TnbrName_;
231
232 //- Name of the radiative heat flux in the neighbour region
233 const word qrNbrName_;
234
235 //- Name of the radiative heat flux field
236 const word qrName_;
237
238 //- Name of the species on which the mass transferred (default H2O)
239 const word specieName_;
240
241
242 //- Liquid properties
244
245 //- Liquid dictionary
246 dictionary liquidDict_;
247
248 //- Mass accumulated on faces
249 scalarField mass_;
250
251 //- Vaporization temperature
252 scalar Tvap_;
253
254 //- Cache myDelta
255 scalarField myKDelta_;
256
257 //- Phase change energy
258 scalarField dmHfg_;
259
260 //- Thermal inertia
261 scalarField mpCpTp_;
262
263 //- Average molecular weight for the carrier mixture in the gas phase
264 scalar Mcomp_;
265
266 //- Characteristic length scale
267 scalar L_;
268
269 //- Fluid side
270 bool fluid_;
271
272 //- Cp field for inert mode
273 scalarField cp_;
274
275 //- Thickness field for inert mode
276 scalarField thickness_;
277
278 //- Density field for inert mode
279 scalarField rho_;
280
281 //- Thickness of layers
282 scalarList thicknessLayers_;
283
284 //- Conductivity of layers
285 scalarList kappaLayers_;
286
287
288 // Private members
289
290 //- Calculation of Sh
291 scalar Sh(const scalar Re, const scalar Sc) const;
292
293 //- Calculation of htc from the condensed surface
294 scalar htcCondensation(const scalar TSat, const scalar Re) const;
295
296 //- Lookup (or create) thickness field for output
297 volScalarField& thicknessField(const word&, const fvMesh&);
298
299
300public:
301
302 //- Runtime type information
303 TypeName("humidityTemperatureCoupledMixed");
304
305
306 // Constructors
307
308 //- Construct from patch and internal field
310 (
311 const fvPatch&,
313 );
314
315 //- Construct from patch, internal field and dictionary
317 (
318 const fvPatch&,
321 );
322
323 //- Construct by mapping given
324 // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
325 // new patch
327 (
328 const
330 const fvPatch&,
332 const fvPatchFieldMapper&
333 );
334
335 //- Construct and return a clone
336 virtual tmp<fvPatchScalarField> clone() const
337 {
339 (
341 (
342 *this
343 )
344 );
345 }
346
347 //- Construct as copy setting internal field reference
349 (
352 );
354 //- Construct and return a clone setting internal field reference
356 (
358 ) const
359 {
361 (
363 (
364 *this,
365 iF
366 )
367 );
368 }
369
370
371 // Member functions
373 // Mapping functions
374
375 //- Map (and resize as needed) from self given a mapping object
376 virtual void autoMap
377 (
378 const fvPatchFieldMapper&
379 );
380
381 //- Reverse map the given fvPatchField onto this fvPatchField
382 virtual void rmap
383 (
384 const fvPatchScalarField&,
385 const labelList&
386 );
387
388
389 //- Return myKDelta
390 const scalarField myKDelta() const
391 {
392 return myKDelta_;
393 }
394
395 //- Return mpCpTp
396 const scalarField mpCpTp() const
397 {
398 return mpCpTp_;
399 }
400
401 //- Return dmHfg
402 const scalarField dmHfg() const
403 {
404 return dmHfg_;
405 }
406
407 //- Update the coefficients associated with the patch field
408 virtual void updateCoeffs();
409
410 //- Write
411 virtual void write(Ostream&) const;
412};
414
415// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
416
417} // End namespace Foam
418
419// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
420
421#endif
422
423// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition: Enum.H:61
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Mixed boundary condition for temperature to be used at the coupling interface between fluid solid reg...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("humidityTemperatureCoupledMixed")
Runtime type information.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Common functions used in temperature coupled boundaries.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
scalarField Re(const UList< complex > &cf)
Extract real component.
Definition: complexField.C:159
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73