1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::NonEquilibriumReversibleReaction
28 Simple extension of Reaction to handle reversible reactions using
29 equilibrium thermodynamics.
32 NonEquilibriumReversibleReaction.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef NonEquilibriumReversibleReaction_H
37 #define NonEquilibriumReversibleReaction_H
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class NonEquilibriumReversibleReaction Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class ReactionThermo, class ReactionRate>
51 class NonEquilibriumReversibleReaction
53 public Reaction<ReactionThermo>
61 // Private Member Functions
63 //- Disallow default bitwise assignment
66 const NonEquilibriumReversibleReaction
67 <ReactionThermo, ReactionRate>&
73 //- Runtime type information
74 TypeName("nonEquilibriumReversible");
79 //- Construct from components
80 NonEquilibriumReversibleReaction
82 const Reaction<ReactionThermo>& reaction,
83 const ReactionRate& forwardReactionRate,
84 const ReactionRate& reverseReactionRate
87 //- Construct as copy given new speciesTable
88 NonEquilibriumReversibleReaction
90 const NonEquilibriumReversibleReaction
91 <ReactionThermo, ReactionRate>&,
92 const speciesTable& species
95 //- Construct from Istream
96 NonEquilibriumReversibleReaction
98 const speciesTable& species,
99 const HashPtrTable<ReactionThermo>& thermoDatabase,
103 //- Construct and return a clone
104 virtual autoPtr<Reaction<ReactionThermo> > clone() const
106 return autoPtr<Reaction<ReactionThermo> >
108 new NonEquilibriumReversibleReaction
109 <ReactionThermo, ReactionRate>(*this)
113 //- Construct and return a clone with new speciesTable
114 virtual autoPtr<Reaction<ReactionThermo> > clone
116 const speciesTable& species
119 return autoPtr<Reaction<ReactionThermo> >
121 new NonEquilibriumReversibleReaction
122 <ReactionThermo, ReactionRate>
130 virtual ~NonEquilibriumReversibleReaction()
136 // NonEquilibriumReversibleReaction rate coefficients
138 //- Forward rate constant
146 //- Reverse rate constant from the given formard rate constant
155 //- Reverse rate constant.
156 // Note this evaluates the forward rate constant and divides by the
157 // equilibrium constant
167 virtual void write(Ostream&) const;
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 } // End namespace Foam
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 # include "NonEquilibriumReversibleReaction.C"
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 // ************************************************************************* //