wallCondensationPhaseChangeRateFvPatchScalarField.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) 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::wallCondensationPhaseChangeRateFvPatchScalarField
26 
27 Description
28  This boundary condition is used for the phase change rate field of the wall
29  condensation fvModel. It contains the phase change rate, and also all the
30  other state fields used by the wall condensation model. The phase change
31  rate field and its boundary conditions are constructed automatically so
32  the user need never manually specify this condition.
33 
34 See also
35  Foam::fv::wallCondensation
36 
37 SourceFiles
38  wallCondensationPhaseChangeRateFvPatchScalarField.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef wallCondensationPhaseChangeRateFvPatchScalarField_H
43 #define wallCondensationPhaseChangeRateFvPatchScalarField_H
44 
45 #include "wallCondensation.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class wallCondensationPhaseChangeRateFvPatchScalarField Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
58  public calculatedFvPatchScalarField
59 {
60  // Private Data
61 
62  //- Mask which indicates which faces are condensing
63  scalarField condensing_;
64 
65  //- Liquid turbulent thermal diffusivity
66  scalarField alphatLiquid_;
67 
68  //- Vapour turbulent thermal diffusivity
69  scalarField alphatVapour_;
70 
71 
72 public:
73 
74  //- Allow the wall condensation model to access and modify the state fields
75  friend class fv::wallCondensation;
76 
77 
78  //- Runtime type information
79  TypeName("wallCondensationPhaseChangeRate");
80 
81 
82  // Constructors
83 
84  //- Construct from patch and internal field
86  (
87  const fvPatch&,
89  );
90 
91  //- Construct from patch, internal field and dictionary
93  (
94  const fvPatch&,
96  const dictionary&
97  );
98 
99  //- Construct by mapping given
100  // wallCondensationPhaseChangeRateFvPatchScalarField
101  // onto a new patch
103  (
105  const fvPatch&,
107  const fieldMapper&
108  );
109 
110  //- Disallow copy without setting internal field reference
112  (
114  ) = delete;
115 
116  //- Copy constructor setting internal field reference
118  (
121  );
122 
123  //- Construct and return a clone setting internal field reference
125  (
127  ) const
128  {
130  (
132  );
133  }
134 
135 
136  // Member Functions
137 
138  //- Access the liquid turbulent thermal diffusivity
139  const scalarField& alphatLiquid() const;
140 
141  //- Access the vapour turbulent thermal diffusivity
142  const scalarField& alphatVapour() const;
143 
144 
145  // Mapping functions
146 
147  //- Map the given fvPatchField onto this fvPatchField
148  virtual void map(const fvPatchScalarField&, const fieldMapper&);
149 
150  //- Reset the fvPatchField to the given fvPatchField
151  // Used for mesh to mesh mapping
152  virtual void reset(const fvPatchScalarField&);
153 
154 
155  // Evaluation functions
156 
157  //- Update the coefficients associated with the patch field
158  virtual void updateCoeffs();
159 
160 
161  // I-O
162 
163  //- Write
164  virtual void write(Ostream&) const;
165 
166 
167  // Member Operators
168 
169  //- Inherit assignment
170  using calculatedFvPatchScalarField::operator=;
171 };
172 
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 } // End namespace Foam
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
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
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 mass diffusion limited wall condensation between two phases on the surface of a number of w...
A class for managing temporary objects.
Definition: tmp.H:55
This boundary condition is used for the phase change rate field of the wall condensation fvModel....
wallCondensationPhaseChangeRateFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, fvMesh > &)
Construct from patch and internal field.
const scalarField & alphatVapour() const
Access the vapour turbulent thermal diffusivity.
TypeName("wallCondensationPhaseChangeRate")
Runtime type information.
virtual void reset(const fvPatchScalarField &)
Reset the fvPatchField to the given fvPatchField.
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.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, fvMesh > &iF) const
Construct and return a clone setting internal field reference.
Namespace for OpenFOAM.