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-2020 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 
46 class phasePair;
47 class phaseModel;
48 
49 namespace phaseTransferModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class reactionDriven Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class reactionDriven
57 :
58  public phaseTransferModel
59 {
60 private:
61 
62  // Private Data
63 
64  //- The name of the phase where the reactions occur
65  const word reactingName_;
66 
67  //- Const reference to the reacting phase
68  const phaseModel& reactingPhase_;
69 
70  //- Const reference to the other phase
71  const phaseModel& otherPhase_;
72 
73  //- Sign used to multiply the source terms
74  const scalar sign_;
75 
76  //- List of species changing phase
77  const hashedWordList species_;
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("reactionDriven");
84 
85 
86  // Constructors
87 
88  //- Construct from components
90  (
91  const dictionary& dict,
92  const phasePair& pair
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 // ************************************************************************* //
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
A HashTable specialisation for hashing pointers.
Definition: HashPtrTable.H:50
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.
reactionDriven(const dictionary &dict, const phasePair &pair)
Construct from components.
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.