FreeFOAM The Cross-Platform CFD Toolkit
IrreversibleReaction.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
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::IrreversibleReaction
26 
27 Description
28  Simple extension of Reaction to handle reversible reactions using
29  equilibrium thermodynamics.
30 
31 SourceFiles
32  IrreversibleReaction.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef IrreversibleReaction_H
37 #define IrreversibleReaction_H
38 
39 #include <specie/Reaction.H>
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class IrreversibleReaction Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class ReactionThermo, class ReactionRate>
52 :
53  public Reaction<ReactionThermo>
54 {
55  // Private data
56 
57  ReactionRate k_;
58 
59 
60  // Private Member Functions
61 
62  //- Disallow default bitwise assignment
63  void operator=
64  (
66  );
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("irreversible");
73 
74 
75  // Constructors
76 
77  //- Construct from components
79  (
80  const Reaction<ReactionThermo>& reaction,
81  const ReactionRate& reactionRate
82  );
83 
84  //- Construct as copy given new speciesTable
86  (
88  const speciesTable& species
89  );
90 
91  //- Construct from Istream
93  (
94  const speciesTable& species,
95  const HashPtrTable<ReactionThermo>& thermoDatabase,
96  Istream& is
97  );
98 
99  //- Construct and return a clone
101  {
103  (
105  );
106  }
107 
108  //- Construct and return a clone with new speciesTable
110  (
111  const speciesTable& species
112  ) const
113  {
115  (
117  (
118  *this,
119  species
120  )
121  );
122  }
123 
124 
125  // Destructor
126 
128  {}
129 
130 
131  // Member Functions
132 
133  // IrreversibleReaction rate coefficients
134 
135  //- Forward rate constant
136  virtual scalar kf
137  (
138  const scalar T,
139  const scalar p,
140  const scalarField& c
141  ) const;
142 
143 
144  //- Write
145  virtual void write(Ostream&) const;
146 };
147 
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #ifdef NoRepository
157 #endif
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************ vim: set sw=4 sts=4 et: ************************ //