wallPhaseChange.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::fv::wallPhaseChange
26 
27 Description
28  Base class for fvModels that represent phase change at a wall
29 
30 See also
31  Foam::alphatPhaseChangeWallFunctionFvPatchScalarField
32 
33 SourceFiles
34  wallPhaseChange.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef wallPhaseChange_H
39 #define wallPhaseChange_H
40 
41 #include "phaseChange.H"
42 #include "phaseSystem.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace fv
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class wallPhaseChange Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class wallPhaseChange
56 :
57  public phaseChange
58 {
59  // Private Data
60 
61  //- Reference to the phase system
62  const phaseSystem& fluid_;
63 
64  //- References to the phases
65  const Pair<const phaseModel&> phases_;
66 
67  //- References to the turbulent thermal diffusivities
68  const Pair<const volScalarField&> alphats_;
69 
70 
71 protected:
72 
73  // Protected Member Functions
74 
75  //- Return boundary conditions for the phase change rate field. Use the
76  // specified active type for all phase-changing boundaries, and a
77  // zero-fixed-value type for others.
78  wordList mDotBoundaryTypes(const word& activeType) const;
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("wallPhaseChange");
85 
86 
87  // Constructors
88 
89  //- Construct from explicit source name and mesh
91  (
92  const word& name,
93  const word& modelType,
94  const fvMesh& mesh,
95  const dictionary& dict,
96  const wordList& species
97  );
98 
99 
100  // Member Functions
101 
102  // Access
103 
104  //- Access the phase system
105  inline const phaseSystem& fluid() const;
106 
107  //- Access the phases
108  inline const Pair<const phaseModel&>& phases() const;
109 
110  //- Access the turbulent thermal diffusivities
111  inline const Pair<const volScalarField&>& alphats() const;
112 
113  //- Return whether phase change can occur on the given patch
114  bool isPatchActive(const label patchi) const;
115 
116  //- Return a mask indicating whether phase change is occurring
117  virtual const scalarField& active(const label patchi) const = 0;
118 
119  //- Access the turbulent thermal diffusivities for a patch
120  virtual Pair<const scalarField&> alphats(const label) const = 0;
121 };
122 
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace fv
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #include "wallPhaseChangeI.H"
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
An ordered pair of two objects of type <Type> with first() and second() elements.
Definition: Pair.H:67
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:98
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:69
const word & name() const
Return const access to the source name.
Definition: fvModelI.H:57
Base class for phase change models.
Definition: phaseChange.H:61
const hashedWordList & species() const
Return the names of the transferring species. Empty if neither.
Definition: phaseChangeI.H:44
Base class for fvModels that represent phase change at a wall.
const phaseSystem & fluid() const
Access the phase system.
bool isPatchActive(const label patchi) const
Return whether phase change can occur on the given patch.
TypeName("wallPhaseChange")
Runtime type information.
virtual const scalarField & active(const label patchi) const =0
Return a mask indicating whether phase change is occurring.
const Pair< const volScalarField & > & alphats() const
Access the turbulent thermal diffusivities.
const Pair< const phaseModel & > & phases() const
Access the phases.
wordList mDotBoundaryTypes(const word &activeType) const
Return boundary conditions for the phase change rate field. Use the.
wallPhaseChange(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict, const wordList &species)
Construct from explicit source name and mesh.
Class to represent a system of phases.
Definition: phaseSystem.H:74
A class for handling words, derived from string.
Definition: word.H:63
label patchi
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
labelList fv(nPoints)
dictionary dict