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 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  //- Wall liquid fraction
78  scalarField wetFraction_;
79 
80  //- Departure diameter
81  scalarField dDeparture_;
82 
83  //- Departure frequency
84  scalarField fDeparture_;
85 
86  //- Nucleation site density
87  scalarField nucleationSiteDensity_;
88 
89  //- Quenching surface heat flux
90  scalarField qQuenching_;
91 
92  //- Evaporative surface heat flux
93  scalarField qEvaporative_;
94 
95  //- Liquid turbulent thermal diffusivity
96  scalarField alphatLiquid_;
97 
98  //- Vapour turbulent thermal diffusivity
99  scalarField alphatVapour_;
100 
101 
102 public:
103 
104  //- Allow the wall boiling model to access and modify the state fields
105  friend class fv::wallBoiling;
106 
107 
108  //- Runtime type information
109  TypeName("wallBoilingPhaseChangeRate");
110 
111 
112  // Constructors
113 
114  //- Construct from patch and internal field
116  (
117  const fvPatch&,
119  );
120 
121  //- Construct from patch, internal field and dictionary
123  (
124  const fvPatch&,
126  const dictionary&
127  );
128 
129  //- Construct by mapping given
130  // wallBoilingPhaseChangeRateFvPatchScalarField
131  // onto a new patch
133  (
135  const fvPatch&,
137  const fieldMapper&
138  );
139 
140  //- Disallow copy without setting internal field reference
142  (
144  ) = delete;
145 
146  //- Copy constructor setting internal field reference
148  (
151  );
152 
153  //- Construct and return a clone setting internal field reference
155  (
157  ) const
158  {
160  (
162  );
163  }
164 
165 
166  // Member Functions
167 
168  //- Access one of the property fields by name
169  const scalarField& property(const word& name) const;
170 
171  //- Access one of the property fields' dimensions by name
172  static const dimensionSet& propertyDimensions(const word& name);
173 
174  //- Access the liquid turbulent thermal diffusivity
175  const scalarField& alphatLiquid() const;
176 
177  //- Access the vapour turbulent thermal diffusivity
178  const scalarField& alphatVapour() const;
179 
180 
181  // Mapping functions
182 
183  //- Map the given fvPatchField onto this fvPatchField
184  virtual void map(const fvPatchScalarField&, const fieldMapper&);
185 
186  //- Reset the fvPatchField to the given fvPatchField
187  // Used for mesh to mesh mapping
188  virtual void reset(const fvPatchScalarField&);
189 
190 
191  // Evaluation functions
192 
193  //- Update the coefficients associated with the patch field
194  virtual void updateCoeffs();
195 
196 
197  // I-O
198 
199  //- Write
200  virtual void write(Ostream&) const;
201 };
202 
203 
204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 
206 } // End namespace Foam
207 
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 #endif
211 
212 // ************************************************************************* //
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:91
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
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.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
const scalarField & alphatLiquid() const
Access the liquid turbulent thermal diffusivity.
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.
wallBoilingPhaseChangeRateFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
TypeName("wallBoilingPhaseChangeRate")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.