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-2020 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
73  Cmu | inherited from alphatPhaseChangeJayatillekeWallFunction
74  kappa | inherited from alphatPhaseChangeJayatillekeWallFunction
75  E | inherited from alphatPhaseChangeJayatillekeWallFunction
76  dmdt | phase change mass flux | yes |
77  value | initial alphat value | yes |
78 
79  if phaseType 'vapor':
80 
81  partitioningModel| | yes |
82 
83  if phaseType 'liquid':
84 
85  partitioningModel| | yes |
86  nucleationSiteModel| | yes |
87  departureDiamModel| | yes |
88  departureFreqModel| | yes |
89  \endtable
90 
91  NOTE: Runtime selectable submodels may require model specific entries
92 
93  Example usage:
94  \verbatim
95  hotWall
96  {
97  type compressible::alphatWallBoiling2WallFunction;
98  phaseType liquid;
99  Prt 0.85;
100  Cmu 0.09;
101  kappa 0.41;
102  E 9.8;
103  relax 0.1;
104  dmdt uniform 0;
105  partitioningModel
106  {
107  type Lavieville;
108  alphaCrit 0.2;
109  }
110  nucleationSiteModel
111  {
112  type LemmertChawla;
113  }
114  departureDiamModel
115  {
116  type TolubinskiKostanchuk;
117  }
118  departureFreqModel
119  {
120  type Cole;
121  }
122  value uniform 0.01;
123  \endverbatim
124 
125 See also
126  Foam::alphatPhaseChangeJayatillekeWallFunctionFvPatchField
127 
128 SourceFiles
129  alphatWallBoilingWallFunctionFvPatchScalarField.C
130 
131 \*---------------------------------------------------------------------------*/
132 
133 #ifndef compressible_alphatWallBoilingWallFunctionFvPatchScalarField_H
134 #define compressible_alphatWallBoilingWallFunctionFvPatchScalarField_H
135 
137 #include "partitioningModel.H"
138 #include "nucleationSiteModel.H"
139 #include "departureDiameterModel.H"
140 #include "departureFrequencyModel.H"
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 namespace Foam
145 {
146 namespace compressible
147 {
148 
149 /*---------------------------------------------------------------------------*\
150  Class alphatWallBoilingWallFunctionFvPatchScalarField Declaration
151 \*---------------------------------------------------------------------------*/
152 
153 class alphatWallBoilingWallFunctionFvPatchScalarField
154 :
155  public alphatPhaseChangeWallFunctionFvPatchScalarField
156 {
157 public:
158 
159  // Data types
160 
161  //- Enumeration listing the possible operational modes
162  enum phaseType
163  {
164  vaporPhase,
166  };
167 
168  //- Heat source type names
169  static const NamedEnum<phaseType, 2> phaseTypeNames_;
170 
171 
172 private:
173 
174  // Private Data
175 
176  //- Heat source type
177  phaseType phaseType_;
178 
179  //- Patch face area by cell volume
180  scalarField AbyV_;
181 
182  //- Convective turbulent thermal diffusivity
183  scalarField alphatConv_;
184 
185  //- Departure diameter field
186  scalarField dDep_;
187 
188  //- Quenching surface heat flux
189  scalarField qq_;
190 
191  //- Run-time selected heat flux partitioning model
192  autoPtr<wallBoilingModels::partitioningModel>
193  partitioningModel_;
194 
195  //- Run-time selected nucleation site density model
196  autoPtr<wallBoilingModels::nucleationSiteModel>
197  nucleationSiteModel_;
198 
199  //- Run-time selected bubble departure diameter model
200  autoPtr<wallBoilingModels::departureDiameterModel>
201  departureDiamModel_;
202 
203  //- Run-time selected bubble departure frequency model
204  autoPtr<wallBoilingModels::departureFrequencyModel>
205  departureFreqModel_;
206 
207 
208 public:
209 
210  //- Runtime type information
211  TypeName("compressible::alphatWallBoilingWallFunction");
212 
213 
214  // Constructors
215 
216  //- Construct from patch and internal field
218  (
219  const fvPatch&,
220  const DimensionedField<scalar, volMesh>&
221  );
223  //- Construct from patch, internal field and dictionary
225  (
226  const fvPatch&,
228  const dictionary&
229  );
230 
231  //- Construct by mapping given
232  // alphatWallBoilingWallFunctionFvPatchScalarField
233  // onto a new patch
235  (
237  const fvPatch&,
239  const fvPatchFieldMapper&
240  );
241 
242  //- Copy constructor
244  (
246  );
247 
248  //- Construct and return a clone
249  virtual tmp<fvPatchScalarField> clone() const
250  {
252  (
254  );
255  }
256 
257  //- Copy constructor setting internal field reference
259  (
262  );
263 
264  //- Construct and return a clone setting internal field reference
266  (
268  ) const
269  {
271  (
273  );
274  }
275 
276 
277  // Member Functions
278 
279  //- Return the departure diameter field
280  const scalarField& dDeparture() const
281  {
282  return dDep_;
283  }
284 
285  //- Return the quenching surface heat flux [W/m^2]
286  const scalarField& qq() const
287  {
288  return qq_;
289  }
290 
291  //- Return the evaporation surface heat flux [W/m^2]
292  tmp<scalarField> qe() const
293  {
294  return dmdtLf_/AbyV_;
295  }
296 
297 
298  // Mapping functions
299 
300  //- Map (and resize as needed) from self given a mapping object
301  // Used to update fields following mesh topology change
302  virtual void autoMap(const fvPatchFieldMapper&);
303 
304  //- Reverse map the given fvPatchField onto this fvPatchField
305  // Used to reconstruct fields
306  virtual void rmap(const fvPatchScalarField&, const labelList&);
307 
308 
309  // Evaluation functions
310 
311  //- Update the coefficients associated with the patch field
312  virtual void updateCoeffs();
313 
314 
315  // I-O
316 
317  //- Write
318  virtual void write(Ostream&) const;
319 };
320 
321 
322 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
323 
324 } // End namespace compressible
325 } // End namespace Foam
326 
327 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
328 
329 #endif
330 
331 // ************************************************************************* //
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:158
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
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.
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:54
alphatWallBoilingWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
const scalarField & qq() const
Return the quenching surface heat flux [W/m^2].
tmp< scalarField > qe() const
Return the evaporation surface heat flux [W/m^2].
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.