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 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  phases (particles vapour);
44 
45  species (TiO2);
46 
47  energySemiImplicit no;
48  }
49  \endverbatim
50 
51 SourceFiles
52  reactionDrivenPhaseChange.C
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef reactionDrivenPhaseChange_H
57 #define reactionDrivenPhaseChange_H
58 
59 #include "phaseChange.H"
60 #include "phaseSystem.H"
61 
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64 namespace Foam
65 {
66 namespace fv
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class reactionDrivenPhaseChange Declaration
71 \*---------------------------------------------------------------------------*/
72 
74 :
75  public phaseChange
76 {
77 private:
78 
79  // Private Data
80 
81  //- Phase system
82  const phaseSystem& fluid_;
83 
84  //- Phase 1
85  const phaseModel& phase1_;
86 
87  //- Phase 2
88  const phaseModel& phase2_;
89 
90 
91  // Private Member Functions
92 
93  //- Non-virtual read
94  void readCoeffs(const dictionary& dict);
95 
96 
97 public:
98 
99  //- Runtime type information
100  TypeName("reactionDrivenPhaseChange");
101 
102 
103  // Constructors
104 
105  //- Construct from explicit source name and mesh
107  (
108  const word& name,
109  const word& modelType,
110  const fvMesh& mesh,
111  const dictionary& dict
112  );
113 
114 
115  // Member Functions
116 
117  // Sources
118 
119  //- Return the mass transfer rate of a specie
121  (
122  const label mDoti
123  ) const;
124 
125 
126  // IO
127 
128  //- Read source dictionary
129  virtual bool read(const dictionary& dict);
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace fv
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
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:96
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, volMesh > > mDot() const
Return the total phase change rate.
Definition: phaseChange.C:498
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:62
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