alphatWallBoilingWallFunctionFvPatchScalarField.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) 2015-2018 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::compressible::alphatWallBoilingWallFunctionFvPatchScalarField
26 
27 Description
28  A thermal wall function for simulation of subcooled nucleate wall boiling
29  with runtime selctable submodels for:
30  - wall heat flux partitioning model
31  - nucleation site density
32  - bubble departure frequency
33  - bubble departure diameter
34 
35  Implements a version of the well-known RPI wall boiling model
36  (Kurul & Podowski, 1991). The model implementation is similar to the model
37  described by Peltola & Pättikangas (2012) but has been extended with the
38  wall heat flux partitioning models.
39 
40  References:
41  \verbatim
42  "On the modeling of multidimensional effects in boiling channels"
43  Kurul, N., Podowski, M.Z.,
44  ANS Proceedings, National Heat Transfer Conference,
45  Minneapolis, Minnesota, USA, July 28-31, 1991,
46  ISBN: 0-89448-162-1, pp. 30-40
47  \endverbatim
48 
49  \verbatim
50  "Development and validation of a boiling model for OpenFOAM
51  multiphase solver"
52  Peltola, J., Pättikangas, T.J.H.,
53  CFD4NRS-4 Conference Proceedings, paper 59,
54  Daejeon, Korea, September 10-12 2012
55  \endverbatim
56 
57 Usage
58  \table
59  Property | Description | Required | Default value
60  phaseType | 'vapor' or 'liquid' | yes |
61  relax |wall boiling model relaxation| yes |
62  Prt | inherited from alphatPhaseChangeJayatillekeWallFunction
63  Cmu | inherited from alphatPhaseChangeJayatillekeWallFunction
64  kappa | inherited from alphatPhaseChangeJayatillekeWallFunction
65  E | inherited from alphatPhaseChangeJayatillekeWallFunction
66  dmdt | phase change mass flux | yes |
67  value | initial alphat value | yes |
68 
69  if phaseType 'vapor':
70 
71  partitioningModel| | yes |
72 
73  if phaseType 'liquid':
74 
75  partitioningModel| | yes |
76  nucleationSiteModel| | yes |
77  departureDiamModel| | yes |
78  departureFreqModel| | yes |
79  \endtable
80 
81  NOTE: Runtime selectabale submodels may require model specific entries
82 
83  Example usage:
84  \verbatim
85  hotWall
86  {
87  type compressible::alphatWallBoiling2WallFunction;
88  phaseType liquid;
89  Prt 0.85;
90  Cmu 0.09;
91  kappa 0.41;
92  E 9.8;
93  relax 0.001;
94  dmdt uniform 0;
95  partitioningModel
96  {
97  type Lavieville;
98  alphaCrit 0.2;
99  }
100  nucleationSiteModel
101  {
102  type LemmertChawla;
103  }
104  departureDiamModel
105  {
106  type TolubinskiKostanchuk;
107  }
108  departureFreqModel
109  {
110  type Cole;
111  }
112  value uniform 0.01;
113  \endverbatim
114 
115 See also
116  Foam::alphatPhaseChangeJayatillekeWallFunctionFvPatchField
117 
118 SourceFiles
119  alphatWallBoilingWallFunctionFvPatchScalarField.C
120 
121 \*---------------------------------------------------------------------------*/
122 
123 #ifndef compressible_alphatWallBoilingWallFunctionFvPatchScalarField_H
124 #define compressible_alphatWallBoilingWallFunctionFvPatchScalarField_H
125 
127 #include "partitioningModel.H"
128 #include "nucleationSiteModel.H"
129 #include "departureDiameterModel.H"
130 #include "departureFrequencyModel.H"
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 namespace Foam
135 {
136 namespace compressible
137 {
138 
139 /*---------------------------------------------------------------------------*\
140  Class alphatWallBoilingWallFunctionFvPatchScalarField Declaration
141 \*---------------------------------------------------------------------------*/
142 
143 class alphatWallBoilingWallFunctionFvPatchScalarField
144 :
145  public alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
146 {
147 public:
148 
149  // Data types
150 
151  //- Enumeration listing the possible operational modes
152  enum phaseType
153  {
154  vaporPhase,
156  };
157 
158 
159 private:
160 
161  // Private data
162 
163  //- name of the other phase (vapor/liquid phase)
164  word otherPhaseName_;
165 
166  //- Heat source type names
167  static const NamedEnum<phaseType, 2> phaseTypeNames_;
168 
169  //- Heat source type
170  phaseType phaseType_;
171 
172  //- dmdt relaxationFactor
173  scalar relax_;
174 
175  //- Patch face area by cell volume
176  scalarField AbyV_;
177 
178  //- Convective turbulent thermal diffusivity
179  scalarField alphatConv_;
180 
181  //- Departure diameter field
182  scalarField dDep_;
183 
184  //- Quenching surface heat flux
185  scalarField qq_;
186 
187  //- Run-time selected heat flux partitioning model
188  autoPtr<wallBoilingModels::partitioningModel>
189  partitioningModel_;
190 
191  //- Run-time selected nucleation site density model
192  autoPtr<wallBoilingModels::nucleationSiteModel>
193  nucleationSiteModel_;
194 
195  //- Run-time selected bubble departure diameter model
196  autoPtr<wallBoilingModels::departureDiameterModel>
197  departureDiamModel_;
198 
199  //- Run-time selected bubble departure frequency model
200  autoPtr<wallBoilingModels::departureFrequencyModel>
201  departureFreqModel_;
202 
203 
204 public:
205 
206  //- Runtime type information
207  TypeName("compressible::alphatWallBoilingWallFunction");
208 
209 
210  // Constructors
211 
212  //- Construct from patch and internal field
214  (
215  const fvPatch&,
217  );
218 
219  //- Construct from patch, internal field and dictionary
221  (
222  const fvPatch&,
224  const dictionary&
225  );
226 
227  //- Construct by mapping given
228  // alphatWallBoilingWallFunctionFvPatchScalarField
229  // onto a new patch
231  (
233  const fvPatch&,
235  const fvPatchFieldMapper&
236  );
237 
238  //- Construct as copy
240  (
242  );
243 
244  //- Construct and return a clone
245  virtual tmp<fvPatchScalarField> clone() const
246  {
248  (
250  );
251  }
252 
253  //- Construct as copy setting internal field reference
255  (
258  );
259 
260  //- Construct and return a clone setting internal field reference
262  (
264  ) const
265  {
267  (
269  );
270  }
271 
272 
273  // Member functions
274 
276 
277  //- Is there phase change mass transfer for this phasePair
278  virtual bool activePhasePair(const phasePairKey&) const;
279 
280  //- Return the rate of phase-change for specific phase pair
281  virtual const scalarField& dmdt(const phasePairKey&) const;
282 
283  //- Return the rate of phase-change for specific phase pair
284  virtual const scalarField& mDotL(const phasePairKey&) const;
285 
286  //- Return the departure diameter field
287  const scalarField& dDeparture() const
288  {
289  return dDep_;
290  }
291 
292  //- Return the quenching surface heat flux [W/m2]
293  const scalarField& qq() const
294  {
295  return qq_;
296  }
297 
298  //- Return the evaporation surface heat flux [W/m2]
299  tmp<scalarField> qe() const
300  {
301  return mDotL_/AbyV_;
302  }
303 
304  // Evaluation functions
305 
306  //- Update the coefficients associated with the patch field
307  virtual void updateCoeffs();
308 
309 
310  // I-O
311 
312  //- Write
313  virtual void write(Ostream&) const;
314 };
315 
316 
317 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
318 
319 } // End namespace compressible
320 } // End namespace Foam
321 
322 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
323 
324 #endif
325 
326 // ************************************************************************* //
virtual const scalarField & dmdt() const
Return the rate of phase-change.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
virtual const scalarField & mDotL() const
Return the enthalpy source due to phase-change.
virtual bool activePhasePair(const phasePairKey &) const
Is there phase change mass transfer for this phasePair.
A thermal wall function for simulation of subcooled nucleate wall boiling with runtime selctable subm...
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Foam::fvPatchFieldMapper.
TypeName("compressible::alphatWallBoilingWallFunction")
Runtime type information.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
alphatWallBoilingWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
const scalarField & qq() const
Return the quenching surface heat flux [W/m2].
tmp< scalarField > qe() const
Return the evaporation surface heat flux [W/m2].
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.