wallBoilingPhaseChangeRateFvPatchScalarField.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) 2025-2026 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::wallBoilingPhaseChangeRateFvPatchScalarField
26 
27 Description
28  This boundary condition is used for the phase change rate field of the wall
29  boiling fvModel. It contains the phase change rate, and also all the other
30  state fields used by the wall boiling model. The phase change rate field
31  and its boundary conditions are constructed automatically so the user need
32  never manually specify this condition.
33 
34 See also
35  Foam::fv::wallBoiling
36 
37 SourceFiles
38  wallBoilingPhaseChangeRateFvPatchScalarField.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef wallBoilingPhaseChangeRateFvPatchScalarField_H
43 #define wallBoilingPhaseChangeRateFvPatchScalarField_H
44 
45 #include "wallBoiling.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class wallBoilingPhaseChangeRateFvPatchScalarField Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
58  public calculatedFvPatchScalarField
59 {
60  // Private Static Data
61 
62  //- Name-to-index map for the property names
63  static const hashedWordList propertyNames_;
64 
65  //- Property pointers
66  static const List
67  <
69  > propertyPtrs_;
70 
71  //- Property dimensions
72  static const List<const dimensionSet*> propertyDimensions_;
73 
74 
75  // Private Data
76 
77  //- Mask which indicates which faces are boiling
78  scalarField boiling_;
79 
80  //- Wall liquid fraction
81  scalarField wetFraction_;
82 
83  //- Departure diameter
84  scalarField dDeparture_;
85 
86  //- Departure frequency
87  scalarField fDeparture_;
88 
89  //- Nucleation site density
90  scalarField nucleationSiteDensity_;
91 
92  //- Quenching surface heat flux
93  scalarField qQuenching_;
94 
95  //- Evaporative surface heat flux
96  scalarField qEvaporative_;
97 
98  //- Liquid turbulent thermal diffusivity
99  scalarField alphatLiquid_;
100 
101  //- Vapour turbulent thermal diffusivity
102  scalarField alphatVapour_;
103 
104 
105 public:
106 
107  //- Allow the wall boiling model to access and modify the state fields
108  friend class fv::wallBoiling;
109 
110 
111  //- Runtime type information
112  TypeName("wallBoilingPhaseChangeRate");
113 
114 
115  // Constructors
116 
117  //- Construct from patch and internal field
119  (
120  const fvPatch&,
122  );
123 
124  //- Construct from patch, internal field and dictionary
126  (
127  const fvPatch&,
129  const dictionary&
130  );
131 
132  //- Construct by mapping given
133  // wallBoilingPhaseChangeRateFvPatchScalarField
134  // onto a new patch
136  (
138  const fvPatch&,
140  const fieldMapper&
141  );
142 
143  //- Disallow copy without setting internal field reference
145  (
147  ) = delete;
148 
149  //- Copy constructor setting internal field reference
151  (
154  );
155 
156  //- Construct and return a clone setting internal field reference
158  (
160  ) const
161  {
163  (
165  );
166  }
167 
168 
169  // Member Functions
170 
171  //- Access one of the property fields by name
172  const scalarField& property(const word& name) const;
173 
174  //- Access one of the property fields' dimensions by name
175  static const dimensionSet& propertyDimensions(const word& name);
176 
177  //- Access the liquid turbulent thermal diffusivity
178  const scalarField& alphatLiquid() const;
179 
180  //- Access the vapour turbulent thermal diffusivity
181  const scalarField& alphatVapour() const;
182 
183 
184  // Mapping functions
185 
186  //- Map the given fvPatchField onto this fvPatchField
187  virtual void map(const fvPatchScalarField&, const fieldMapper&);
188 
189  //- Reset the fvPatchField to the given fvPatchField
190  // Used for mesh to mesh mapping
191  virtual void reset(const fvPatchScalarField&);
192 
193 
194  // Evaluation functions
195 
196  //- Update the coefficients associated with the patch field
197  virtual void updateCoeffs();
198 
199 
200  // I-O
201 
202  //- Write
203  virtual void write(Ostream&) const;
204 
205 
206  // Member Operators
207 
208  //- Inherit assignment
209  using calculatedFvPatchScalarField::operator=;
210 };
211 
212 
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 
215 } // End namespace Foam
216 
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 
219 #endif
220 
221 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:91
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Dimension set for the base types.
Definition: dimensionSet.H:125
Abstract base class for field mapping.
Definition: fieldMapper.H:48
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:90
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:58
Model for nucleate wall boiling between two phases on the surface of a number of wall patches.
Definition: wallBoiling.H:158
A wordList with hashed indices for faster lookup by name.
A class for managing temporary objects.
Definition: tmp.H:55
This boundary condition is used for the phase change rate field of the wall boiling fvModel....
const scalarField & alphatVapour() const
Access the vapour turbulent thermal diffusivity.
static const dimensionSet & propertyDimensions(const word &name)
Access one of the property fields' dimensions by name.
virtual void reset(const fvPatchScalarField &)
Reset the fvPatchField to the given fvPatchField.
const scalarField & alphatLiquid() const
Access the liquid turbulent thermal diffusivity.
wallBoilingPhaseChangeRateFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, fvMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void map(const fvPatchScalarField &, const fieldMapper &)
Map the given fvPatchField onto this fvPatchField.
const scalarField & property(const word &name) const
Access one of the property fields by name.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, fvMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("wallBoilingPhaseChangeRate")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.