1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::NonEquilibriumReversibleReaction
29 Simple extension of Reaction to handle reversible reactions using
30 equilibrium thermodynamics.
33 NonEquilibriumReversibleReaction.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef NonEquilibriumReversibleReaction_H
38 #define NonEquilibriumReversibleReaction_H
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class NonEquilibriumReversibleReaction Declaration
49 \*---------------------------------------------------------------------------*/
51 template<class ReactionThermo, class ReactionRate>
52 class NonEquilibriumReversibleReaction
54 public Reaction<ReactionThermo>
62 // Private Member Functions
64 //- Disallow default bitwise assignment
67 const NonEquilibriumReversibleReaction
68 <ReactionThermo, ReactionRate>&
74 //- Runtime type information
75 TypeName("nonEquilibriumReversible");
80 //- Construct from components
81 NonEquilibriumReversibleReaction
83 const Reaction<ReactionThermo>& reaction,
84 const ReactionRate& forwardReactionRate,
85 const ReactionRate& reverseReactionRate
88 //- Construct as copy given new speciesTable
89 NonEquilibriumReversibleReaction
91 const NonEquilibriumReversibleReaction
92 <ReactionThermo, ReactionRate>&,
93 const speciesTable& species
96 //- Construct from Istream
97 NonEquilibriumReversibleReaction
99 const speciesTable& species,
100 const HashPtrTable<ReactionThermo>& thermoDatabase,
104 //- Construct and return a clone
105 virtual autoPtr<Reaction<ReactionThermo> > clone() const
107 return autoPtr<Reaction<ReactionThermo> >
109 new NonEquilibriumReversibleReaction
110 <ReactionThermo, ReactionRate>(*this)
114 //- Construct and return a clone with new speciesTable
115 virtual autoPtr<Reaction<ReactionThermo> > clone
117 const speciesTable& species
120 return autoPtr<Reaction<ReactionThermo> >
122 new NonEquilibriumReversibleReaction
123 <ReactionThermo, ReactionRate>
131 virtual ~NonEquilibriumReversibleReaction()
137 // NonEquilibriumReversibleReaction rate coefficients
139 //- Forward rate constant
147 //- Reverse rate constant from the given formard rate constant
156 //- Reverse rate constant.
157 // Note this evaluates the forward rate constant and divides by the
158 // equilibrium constant
168 virtual void write(Ostream&) const;
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 } // End namespace Foam
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 # include "NonEquilibriumReversibleReaction.C"
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 // ************************************************************************* //