alphatWallBoilingWallFunctionFvPatchScalarField.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-2018 OpenFOAM Foundation
9  Copyright (C) 2018 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::compressible::alphatWallBoilingWallFunctionFvPatchScalarField
29 
30 Description
31  A thermal wall function for simulation of boiling wall.
32 
33  This alpha wall function can handle the following regimes:
34  single phase
35  subcooled nucleate wall boiling
36  transitional boiling
37  film boiling.
38 
39  The wall function uses a partition method to transfer heat either
40  to the liquid or vapor phase. At the moment, this function works
41  in a wall temperature fixed mode. i.e, there is no consideration
42  for the sudden change of heat transfer coefficient (htc) after
43  reaching TDBN (deviation from nucleate boiling temperature).
44 
45  References:
46  \verbatim
47  Numerical simulation of immersion quenching process of an engine cylinder head
48  Vedanth Srinivasan, Kil-Min Moon, David Greif, De Ming Wang, Myung-hwan Kim
49  Applied Mathematical Modelling 34 (2010) 2111-2128
50  \endverbatim
51 
52 
53  For the single phase non-boiling regime the standard
54  JayatillekeWallFunction is used.
55 
56  For the sub-cool nucleate boiling regime the following runtime
57  selectable submodels are used:
58  - nucleation site density
59  - bubble departure frequency
60  - bubble departure diameter
61 
62  Implements a version of the well-known RPI wall boiling model
63  (Kurul & Podowski, 1991). The model implementation is similar to the model
64  described by Peltola & Pättikangas (2012) but has been extended with the
65  wall heat flux partitioning models.
66 
67  References:
68  \verbatim
69  "On the modeling of multidimensional effects in boiling channels"
70  Kurul, N., Podowski, M.Z.,
71  ANS Proceedings, National Heat Transfer Conference,
72  Minneapolis, Minnesota, USA, July 28-31, 1991,
73  ISBN: 0-89448-162-1, pp. 30-40
74  \endverbatim
75 
76  \verbatim
77  "Development and validation of a boiling model for OpenFOAM
78  multiphase solver"
79  Peltola, J., Pättikangas, T.J.H.,
80  CFD4NRS-4 Conference Proceedings, paper 59,
81  Daejeon, Korea, September 10-12 2012
82  \endverbatim
83 
84 
85  The transition boiling regime flux (TBF) is modelled following
86  a temperature based linear interpolation between the critical heat flux
87  (CHF) and the minimum heat flux (MHF) in such a way that when the wall
88  temperature is between the range of TDBN and the Leidenfrost temperature
89  (TLeiden) a linear interpolation is used between CHF and MHF.
90 
91  Thus, the following models are required:
92  LeidenfrostModel
93  CHFModel
94  CHFSubCoolModel
95  MHFModel
96  TDNBModel
97  filmBoilingModel
98 
99  The linear interpolation is as follows:
100 
101  TBF = CHF*phi + (1 - phi)*MHF
102 
103  where phi:
104 
105  phi = wp*(Tw - TDNB)/(TLeiden - TDNB),
106 
107  where:
108  wp model constant
109  Tw wall temperature
110 
111 
112  The film boiling regime is applied when Tw is larger than TLeiden. In
113  this regime the corrlation from the filmBoilingModel is used for
114  calculating the cht from the wall.
115 
116  The filmBoilingModel is needed in the vapor field in order to calculate
117  the heat transfer to the vapor phase in film boiling regime.
118 
119 
120 Usage
121  \table
122  Property | Description | Required | Default value
123  phaseType | 'vapor' or 'liquid' | yes |
124  relax |wall boiling model relaxation| yes |
125  Prt | inherited from alphatPhaseChangeJayatillekeWallFunction
126  Cmu | inherited from alphatPhaseChangeJayatillekeWallFunction
127  kappa | inherited from alphatPhaseChangeJayatillekeWallFunction
128  E | inherited from alphatPhaseChangeJayatillekeWallFunction
129  dmdt | phase change mass flux | no |
130  value | initial alphat value | yes |
131 
132  if phaseType 'vapor':
133 
134  partitioningModel| | yes |
135  filmBoilingModel | | yes |
136  LeidenfrostModel | | yes |
137 
138  if phaseType 'liquid':
139 
140  partitioningModel| | yes |
141  nucleationSiteModel| | yes |
142  departureDiamModel| | yes |
143  departureFreqModel| | yes |
144  K | bubbles area constant| no | 4
145 
146  LeidenfrostModel | | no |
147  CHFModel | | no |
148  CHFSubCoolModel | | no |
149  MHFModel | | no |
150  TDNBModel | | no |
151  filmBoilingModel | | no |
152  wp | | no | 1
153  \endtable
154 
155  NOTE: Runtime selectabale submodels may require model specific entries
156 
157  Example usage:
158  \verbatim
159  hotWall
160  {
161  type compressible::alphatWallBoilingWallFunction;
162  phaseType liquid;
163  Prt 0.85;
164  Cmu 0.09;
165  kappa 0.41;
166  E 9.8;
167  relax 0.1;
168  dmdt uniform 0;
169  partitioningModel
170  {
171  type Lavieville;
172  alphaCrit 0.2;
173  }
174  nucleationSiteModel
175  {
176  type LemmertChawla;
177  }
178  departureDiamModel
179  {
180  type TolubinskiKostanchuk;
181  }
182  departureFreqModel
183  {
184  type Cole;
185  }
186 
187  LeidenfrostModel
188  {
189  type Spiegler;
190  Tcrit 647;
191  }
192  CHFModel
193  {
194  type Zuber;
195  }
196  CHFSubCoolModel
197  {
198  type HuaXu;
199  Kburn 0.5;
200  }
201  MHFModel
202  {
203  type Jeschar;
204  Kmhf 1;
205  }
206  TDNBModel
207  {
208  type Schroeder;
209  }
210  filmBoilingModel
211  {
212  type Bromley;
213  }
214  value uniform 0.01;
215  \endverbatim
216 
217 See also
218  Foam::alphatPhaseChangeJayatillekeWallFunctionFvPatchField
219 
220 SourceFiles
221  alphatWallBoilingWallFunctionFvPatchScalarField.C
222 
223 \*---------------------------------------------------------------------------*/
224 
225 #ifndef compressible_alphatWallBoilingWallFunctionFvPatchScalarField_H
226 #define compressible_alphatWallBoilingWallFunctionFvPatchScalarField_H
227 
228 #include "Function1.H"
229 
231 #include "partitioningModel.H"
232 #include "nucleationSiteModel.H"
233 #include "departureDiameterModel.H"
234 #include "departureFrequencyModel.H"
235 
236 #include "LeidenfrostModel.H"
237 #include "filmBoilingModel.H"
238 #include "CHFModel.H"
239 #include "CHFSubCoolModel.H"
240 #include "MHFModel.H"
241 #include "TDNBModel.H"
242 
243 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
244 
245 namespace Foam
246 {
247 namespace compressible
248 {
249 
250 /*---------------------------------------------------------------------------*\
251  Class alphatWallBoilingWallFunctionFvPatchScalarField Declaration
252 \*---------------------------------------------------------------------------*/
253 
254 class alphatWallBoilingWallFunctionFvPatchScalarField
255 :
256  public alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
257 {
258 public:
259 
260  // Data types
261 
262  //- Enumeration listing the possible operational modes
263  enum phaseType
264  {
265  vaporPhase,
267  };
268 
269 
270 private:
271 
272  // Private data
273 
274  //- Enumeration of regimes per face
275  enum regimeType
276  {
277  subcool,
278  transient,
279  film,
280  nonBoiling
281  };
282 
283  //- name of the other phase (vapor/liquid phase)
284  word otherPhaseName_;
285 
286  //- Heat source type names
287  static const Enum<phaseType> phaseTypeNames_;
288 
289  //- Heat source type
290  phaseType phaseType_;
291 
292  //- dmdt relaxationFactor
293  autoPtr<Function1<scalar>> relax_;
294 
295  //- Patch face area by cell volume
296  scalarField AbyV_;
297 
298  // Sub-cooling nucleating boiling
299 
300  //- Convective turbulent thermal diffusivity
301  scalarField alphatConv_;
302 
303  //- Departure diameter field
304  scalarField dDep_;
305 
306  //- Quenching surface heat flux
307  scalarField qq_;
308 
309  //- Model constant for area of bubbles
310  scalar K_;
311 
312  //- Run-time selected heat flux partitioning model
313  autoPtr<wallBoilingModels::partitioningModel>
314  partitioningModel_;
315 
316  //- Run-time selected nucleation site density model
317  autoPtr<wallBoilingModels::nucleationSiteModel>
318  nucleationSiteModel_;
319 
320  //- Run-time selected bubble departure diameter model
321  autoPtr<wallBoilingModels::departureDiameterModel>
322  departureDiamModel_;
323 
324  //- Run-time selected bubble departure frequency model
325  autoPtr<wallBoilingModels::departureFrequencyModel>
326  departureFreqModel_;
327 
328 
329  // Film boiling model
330 
331  //- Run-time selected for filmBoiling model
332  autoPtr<wallBoilingModels::filmBoilingModel>
333  filmBoilingModel_;
334 
335  // Transition boiling model
336 
337  //- Run-time selected for Leidenfrost temperature
338  autoPtr<wallBoilingModels::LeidenfrostModel>
339  LeidenfrostModel_;
340 
341  //- Run-time selected for CHF
342  autoPtr<wallBoilingModels::CHFModel> CHFModel_;
343 
344  //- Run-time selected for CHF sub-cool
345  autoPtr<wallBoilingModels::CHFSubCoolModel> CHFSoobModel_;
346 
347  //- Run-time selected for MHF
348  autoPtr<wallBoilingModels::MHFModel> MHFModel_;
349 
350  //- Run-time selected for MHF
351  autoPtr<wallBoilingModels::TDNBModel> TDNBModel_;
352 
353  //- Wetting parameter for transient boiling
354  scalar wp_;
355 
356 
357 public:
358 
359  //- Runtime type information
360  TypeName("compressible::alphatWallBoilingWallFunction");
361 
362 
363  // Constructors
364 
365  //- Construct from patch and internal field
367  (
368  const fvPatch&,
369  const DimensionedField<scalar, volMesh>&
370  );
371 
372  //- Construct from patch, internal field and dictionary
374  (
375  const fvPatch&,
377  const dictionary&
378  );
379 
380  //- Construct by mapping given
381  // alphatWallBoilingWallFunctionFvPatchScalarField
382  // onto a new patch
384  (
386  const fvPatch&,
388  const fvPatchFieldMapper&
389  );
390 
391  //- Construct as copy
393  (
395  );
396 
397  //- Construct and return a clone
398  virtual tmp<fvPatchScalarField> clone() const
399  {
401  (
403  );
404  }
405 
406  //- Construct as copy setting internal field reference
408  (
411  );
412 
413  //- Construct and return a clone setting internal field reference
415  (
417  ) const
418  {
420  (
422  );
423  }
424 
425 
426  // Member functions
427 
429 
430  //- Is there phase change mass transfer for this phasePair
431  virtual bool activePhasePair(const phasePairKey&) const;
432 
433  //- Return the rate of phase-change for specific phase pair
434  virtual const scalarField& dmdt(const phasePairKey&) const;
435 
436  //- Return the rate of phase-change for specific phase pair
437  virtual const scalarField& mDotL(const phasePairKey&) const;
438 
439  //- Return the departure diameter field
440  const scalarField& dDeparture() const
441  {
442  return dDep_;
443  }
444 
445  //- Return the quenching surface heat flux [W/m2]
446  const scalarField& qq() const
447  {
448  return qq_;
449  }
450 
451  //- Return the evaporation surface heat flux [W/m2]
452  tmp<scalarField> qe() const
453  {
454  return mDotL_/AbyV_;
455  }
456 
457  // Evaluation functions
458 
459  //- Update the coefficients associated with the patch field
460  virtual void updateCoeffs();
461 
462 
463  // I-O
464 
465  //- Write
466  virtual void write(Ostream&) const;
467 };
468 
469 
470 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
471 
472 } // End namespace compressible
473 } // End namespace Foam
474 
475 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
476 
477 #endif
478 
479 // ************************************************************************* //
nucleationSiteModel.H
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:52
Foam::Enum< phaseType >
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::mDotL
virtual const scalarField & mDotL() const
Return the enthalpy source due to phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:131
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
LeidenfrostModel.H
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
This boundary condition provides a thermal wall function for turbulent thermal diffusivity (usuallyal...
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:103
Function1.H
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H
partitioningModel.H
departureDiameterModel.H
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::activePhasePair
virtual bool activePhasePair(const phasePairKey &) const
Is there phase change mass transfer for this phasePair.
Definition: alphatWallBoilingWallFunctionFvPatchScalarField.C:364
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField
A thermal wall function for simulation of boiling wall.
Definition: alphatWallBoilingWallFunctionFvPatchScalarField.H:374
TDNBModel.H
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::vaporPhase
Definition: alphatWallBoilingWallFunctionFvPatchScalarField.H:385
Foam::Field< scalar >
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::phasePairKey
Definition: phasePairKey.H:57
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: alphatWallBoilingWallFunctionFvPatchScalarField.C:1117
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::dDeparture
const scalarField & dDeparture() const
Return the departure diameter field.
Definition: alphatWallBoilingWallFunctionFvPatchScalarField.H:560
CHFSubCoolModel.H
compressible
bool compressible
Definition: pEqn.H:2
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::alphatWallBoilingWallFunctionFvPatchScalarField
alphatWallBoilingWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: alphatWallBoilingWallFunctionFvPatchScalarField.C:70
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::qq
const scalarField & qq() const
Return the quenching surface heat flux [W/m2].
Definition: alphatWallBoilingWallFunctionFvPatchScalarField.H:566
CHFModel.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::mDotL_
scalarField mDotL_
Latent heat of the phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:69
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: alphatWallBoilingWallFunctionFvPatchScalarField.H:518
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::liquidPhase
Definition: alphatWallBoilingWallFunctionFvPatchScalarField.H:386
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: alphatWallBoilingWallFunctionFvPatchScalarField.C:410
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::TypeName
TypeName("compressible::alphatWallBoilingWallFunction")
Runtime type information.
departureFrequencyModel.H
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::phaseType
phaseType
Enumeration listing the possible operational modes.
Definition: alphatWallBoilingWallFunctionFvPatchScalarField.H:383
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::qe
tmp< scalarField > qe() const
Return the evaporation surface heat flux [W/m2].
Definition: alphatWallBoilingWallFunctionFvPatchScalarField.H:572
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::dmdt
virtual const scalarField & dmdt() const
Return the rate of phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:125
MHFModel.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
filmBoilingModel.H
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54