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-2022 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 selectable 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 based on implementation
37  described in Peltola et al. (2019) and is similar to the model described by
38  Peltola & Pättikangas (2012). The present implementation includes simplified
39  support for presence of non-volatile components in addition to a single
40  volatile component.
41 
42  References:
43  \verbatim
44  Kurul, N., & Podowski, M.Z. (1991).
45  On the modeling of multidimensional effects in boiling channels.
46  ANS. Proc. National Heat Transfer Con. Minneapolis, Minnesota, USA,
47  1991.
48  ISBN: 0-89448-162-1, pp. 30-40.
49  \endverbatim
50 
51  \verbatim
52  Peltola, J., Pättikangas, T., Bainbridge, W., Lehnigk, R., Schlegel, F.
53  (2019).
54  On Development and validation of subcooled nucleate boiling models for
55  OpenFOAM Foundation Release.
56  NURETH-18 Conference Proceedings, Portland, Oregon, United States, 2019.
57  \endverbatim
58 
59  \verbatim
60  Peltola, J., & Pättikangas, T.J.H. (2012).
61  Development and validation of a boiling model for OpenFOAM multiphase
62  solver.
63  CFD4NRS-4 Conference Proceedings, Daejeon, Korea, 2012.
64  paper 59.
65  \endverbatim
66 
67 Usage
68  \table
69  Property | Description | Required | Default value
70  phaseType | 'vapor' or 'liquid' | yes |
71  relax | wall boiling model relaxation| yes |
72  Prt | inherited from alphatPhaseChangeJayatillekeWallFunction | yes |
73  Cmu | inherited from alphatPhaseChangeJayatillekeWallFunction | yes |
74  kappa | inherited from alphatPhaseChangeJayatillekeWallFunction | yes |
75  E | inherited from alphatPhaseChangeJayatillekeWallFunction | yes |
76  dmdt | phase change mass flux | yes |
77  value | initial alphat value | yes |
78  \endtable
79 
80  if phaseType 'vapor':
81  \table
82  partitioningModel| | yes |
83  \endtable
84 
85  if phaseType 'liquid':
86  \table
87  partitioningModel| | yes |
88  nucleationSiteModel| | yes |
89  departureDiamModel| | yes |
90  departureFreqModel| | yes |
91  \endtable
92 
93  NOTE: Runtime selectable submodels may require model specific entries
94 
95  Example usage:
96  \verbatim
97  hotWall
98  {
99  type compressible::alphatWallBoiling2WallFunction;
100  phaseType liquid;
101  Prt 0.85;
102  Cmu 0.09;
103  kappa 0.41;
104  E 9.8;
105  relax 0.1;
106  dmdt uniform 0;
107  partitioningModel
108  {
109  type Lavieville;
110  alphaCrit 0.2;
111  }
112  nucleationSiteModel
113  {
114  type LemmertChawla;
115  }
116  departureDiamModel
117  {
118  type TolubinskiKostanchuk;
119  }
120  departureFreqModel
121  {
122  type Cole;
123  }
124  value uniform 0.01;
125  \endverbatim
126 
127 See also
128  Foam::alphatPhaseChangeJayatillekeWallFunctionFvPatchField
129 
130 SourceFiles
131  alphatWallBoilingWallFunctionFvPatchScalarField.C
132 
133 \*---------------------------------------------------------------------------*/
134 
135 #ifndef compressible_alphatWallBoilingWallFunctionFvPatchScalarField_H
136 #define compressible_alphatWallBoilingWallFunctionFvPatchScalarField_H
137 
139 #include "partitioningModel.H"
140 #include "nucleationSiteModel.H"
141 #include "departureDiameterModel.H"
142 #include "departureFrequencyModel.H"
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 namespace Foam
147 {
148 namespace compressible
149 {
150 
151 /*---------------------------------------------------------------------------*\
152  Class alphatWallBoilingWallFunctionFvPatchScalarField Declaration
153 \*---------------------------------------------------------------------------*/
154 
155 class alphatWallBoilingWallFunctionFvPatchScalarField
156 :
157  public alphatPhaseChangeWallFunctionFvPatchScalarField
158 {
159 public:
160 
161  // Data types
162 
163  //- Enumeration listing the possible operational modes
164  enum phaseType
165  {
166  vaporPhase,
168  };
169 
170  //- Heat source type names
171  static const NamedEnum<phaseType, 2> phaseTypeNames_;
172 
173 
174 private:
175 
176  // Private Data
177 
178  //- Heat source type
179  phaseType phaseType_;
180 
181  //- Patch face area by cell volume
182  scalarField AbyV_;
183 
184  //- Convective turbulent thermal diffusivity
185  scalarField alphatConv_;
186 
187  //- Departure diameter field
188  scalarField dDep_;
189 
190  //- Quenching surface heat flux
191  scalarField qq_;
192 
193  //- Run-time selected heat flux partitioning model
194  autoPtr<wallBoilingModels::partitioningModel>
195  partitioningModel_;
196 
197  //- Run-time selected nucleation site density model
198  autoPtr<wallBoilingModels::nucleationSiteModel>
199  nucleationSiteModel_;
200 
201  //- Run-time selected bubble departure diameter model
202  autoPtr<wallBoilingModels::departureDiameterModel>
203  departureDiamModel_;
204 
205  //- Run-time selected bubble departure frequency model
206  autoPtr<wallBoilingModels::departureFrequencyModel>
207  departureFreqModel_;
208 
209 
210 public:
211 
212  //- Runtime type information
213  TypeName("compressible::alphatWallBoilingWallFunction");
214 
215 
216  // Constructors
217 
218  //- Construct from patch and internal field
220  (
221  const fvPatch&,
222  const DimensionedField<scalar, volMesh>&
223  );
225  //- Construct from patch, internal field and dictionary
227  (
228  const fvPatch&,
230  const dictionary&
231  );
232 
233  //- Construct by mapping given
234  // alphatWallBoilingWallFunctionFvPatchScalarField
235  // onto a new patch
237  (
239  const fvPatch&,
241  const fvPatchFieldMapper&
242  );
243 
244  //- Disallow copy without setting internal field reference
246  (
248  ) = delete;
249 
250  //- Copy constructor setting internal field reference
252  (
255  );
256 
257  //- Construct and return a clone setting internal field reference
259  (
261  ) const
262  {
264  (
266  );
267  }
268 
269 
270  // Member Functions
271 
272  //- Return the departure diameter field
273  const scalarField& dDeparture() const
274  {
275  return dDep_;
276  }
277 
278 
279  // Mapping functions
280 
281  //- Map (and resize as needed) from self given a mapping object
282  // Used to update fields following mesh topology change
283  virtual void autoMap(const fvPatchFieldMapper&);
284 
285  //- Reverse map the given fvPatchField onto this fvPatchField
286  // Used to reconstruct fields
287  virtual void rmap(const fvPatchScalarField&, const labelList&);
288 
289  //- Reset the fvPatchField to the given fvPatchField
290  // Used for mesh to mesh mapping
291  virtual void reset(const fvPatchScalarField&);
292 
293 
294  // Evaluation functions
295 
296  //- Update the coefficients associated with the patch field
297  virtual void updateCoeffs();
298 
299 
300  // I-O
301 
302  //- Write
303  virtual void write(Ostream&) const;
304 };
305 
306 
307 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
308 
309 } // End namespace compressible
310 } // End namespace Foam
311 
312 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
313 
314 #endif
315 
316 // ************************************************************************* //
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:156
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:63
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:66
A thermal wall function for simulation of subcooled nucleate wall boiling with runtime selectable sub...
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Foam::fvPatchFieldMapper.
TypeName("compressible::alphatWallBoilingWallFunction")
Runtime type information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
alphatWallBoilingWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void reset(const fvPatchScalarField &)
Reset the fvPatchField to the given fvPatchField.
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
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Namespace for OpenFOAM.