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-2022 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  //- The name of the phase where the reactions occur
64  const word reactingName_;
65 
66  //- Const reference to the reacting phase
67  const phaseModel& reactingPhase_;
68 
69  //- Const reference to the other phase
70  const phaseModel& otherPhase_;
71 
72  //- Sign used to multiply the source terms
73  const scalar sign_;
74 
75  //- List of species changing phase
76  const hashedWordList species_;
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("reactionDriven");
83 
84 
85  // Constructors
86 
87  //- Construct from a dictionary and an interface
89  (
90  const dictionary& dict,
91  const phaseInterface& interface
92  );
93 
94 
95  //- Destructor
96  virtual ~reactionDriven();
97 
98 
99  // Member Functions
100 
101  //- The list of individual species that are transferred
102  virtual const hashedWordList& species() const;
103 
104  //- The mass transfer rate for individual species
105  virtual HashPtrTable<volScalarField> dmidtf() const;
106 };
107 
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace phaseTransferModels
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #endif
117 
118 // ************************************************************************* //
dictionary dict
TypeName("reactionDriven")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
reactionDriven(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
A HashTable specialisation for hashing pointers.
Definition: HashPtrTable.H:50
Class to represent an interface between phases. Derivations can further specify the configuration of ...
A class for handling words, derived from string.
Definition: word.H:59
Phase transfer model representing change from one phase to another due to reactions. Intended for irreversible reactions.
virtual const hashedWordList & species() const
The list of individual species that are transferred.
virtual HashPtrTable< volScalarField > dmidtf() const
The mass transfer rate for individual species.
A wordList with hashed indices for faster lookup by name.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
Namespace for OpenFOAM.