reactionDriven.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) 2019-2024 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::phaseTransferModels::reactionDriven
26 
27 Description
28  Phase transfer model representing change from one phase to another due
29  to reactions. Intended for irreversible reactions.
30 
31 SourceFiles
32  reactionDriven.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef reactionDriven_H
37 #define reactionDriven_H
38 
39 #include "phaseTransferModel.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace phaseTransferModels
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class reactionDriven Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class reactionDriven
53 :
54  public phaseTransferModel
55 {
56 private:
57 
58  // Private Data
59 
60  //- Interface
61  const phaseInterface interface_;
62 
63  //- List of species transferring out of phase 1
64  const hashedWordList species1_;
65 
66  //- List of species transferring out of phase 2
67  const hashedWordList species2_;
68 
69  //- List of all transferring species
70  hashedWordList species_;
71 
72 
73  // Private Member Functions
74 
75  //- Keyword for the list of species
76  template<bool Index>
77  word speciesKey() const;
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("reactionDriven");
84 
85 
86  // Constructors
87 
88  //- Construct from a dictionary and an interface
90  (
91  const dictionary& dict,
92  const phaseInterface& interface
93  );
94 
95 
96  //- Destructor
97  virtual ~reactionDriven();
98 
99 
100  // Member Functions
101 
102  //- The list of individual species that are transferred
103  virtual const hashedWordList& species() const;
104 
105  //- The mass transfer rate for individual species
106  virtual HashPtrTable<volScalarField> dmidtf() const;
107 };
108 
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace phaseTransferModels
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
A HashTable specialisation for hashing pointers.
Definition: HashPtrTable.H:67
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
A wordList with hashed indices for faster lookup by name.
Class to represent an interface between phases. Derivations can further specify the configuration of ...
Phase transfer model representing change from one phase to another due to reactions....
reactionDriven(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
TypeName("reactionDriven")
Runtime type information.
virtual HashPtrTable< volScalarField > dmidtf() const
The mass transfer rate for individual species.
virtual const hashedWordList & species() const
The list of individual species that are transferred.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dictionary dict