reactionDrivenPhaseChange.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::fv::reactionDrivenPhaseChange
26 
27 Description
28  Model for mass-diffusion rate limited phase change between two phases.
29 
30  This model will transfer species out of a reacting phase at exactly the
31  rate at which the reactions produce them. It facilitates a rough
32  approximation to surface reactions for which certain species get consumed
33  at the interface.
34 
35 Usage
36  Example usage:
37  \verbatim
38  phaseChange
39  {
40  type reactionDrivenPhaseChange;
41  libs ("libmultiphaseEulerFvModels.so");
42 
43  // Note: Order is important. The reactions in the first phase define
44  // the rate of phase change. If phase change also occurs as a result of
45  // reactions in the second phase then a second model should be added
46  // with the phases reversed.
47  phases (vapour particles);
48 
49  species (TiO2);
50 
51  energySemiImplicit no;
52  }
53  \endverbatim
54 
55 SourceFiles
56  reactionDrivenPhaseChange.C
57 
58 \*---------------------------------------------------------------------------*/
59 
60 #ifndef reactionDrivenPhaseChange_H
61 #define reactionDrivenPhaseChange_H
62 
63 #include "phaseChange.H"
64 #include "phaseSystem.H"
65 
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 
68 namespace Foam
69 {
70 namespace fv
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class reactionDrivenPhaseChange Declaration
75 \*---------------------------------------------------------------------------*/
76 
78 :
79  public phaseChange
80 {
81 private:
82 
83  // Private Data
84 
85  //- Phase system
86  const phaseSystem& fluid_;
87 
88  //- Phase 1
89  const phaseModel& phase1_;
90 
91  //- Phase 2
92  const phaseModel& phase2_;
93 
94 
95  // Private Member Functions
96 
97  //- Non-virtual read
98  void readCoeffs(const dictionary& dict);
99 
100 
101 public:
102 
103  //- Runtime type information
104  TypeName("reactionDrivenPhaseChange");
105 
106 
107  // Constructors
108 
109  //- Construct from explicit source name and mesh
111  (
112  const word& name,
113  const word& modelType,
114  const fvMesh& mesh,
115  const dictionary& dict
116  );
117 
118 
119  // Member Functions
120 
121  // Sources
122 
123  //- Return the mass transfer rate of a specie
125  (
126  const label mDoti
127  ) const;
128 
129 
130  // IO
131 
132  //- Read source dictionary
133  virtual bool read(const dictionary& dict);
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace fv
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
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
virtual tmp< DimensionedField< scalar, fvMesh > > mDot() const
Return the total phase change rate.
Definition: phaseChange.C:476
Model for mass-diffusion rate limited phase change between two phases.
virtual bool read(const dictionary &dict)
Read source dictionary.
TypeName("reactionDrivenPhaseChange")
Runtime type information.
reactionDrivenPhaseChange(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
Class to represent a system of phases.
Definition: phaseSystem.H:74
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:63
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