1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, 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 from dictionary
104 NonEquilibriumReversibleReaction
106 const speciesTable& species,
107 const HashPtrTable<ReactionThermo>& thermoDatabase,
108 const dictionary& dict
111 //- Construct and return a clone
112 virtual autoPtr<Reaction<ReactionThermo> > clone() const
114 return autoPtr<Reaction<ReactionThermo> >
116 new NonEquilibriumReversibleReaction
117 <ReactionThermo, ReactionRate>(*this)
121 //- Construct and return a clone with new speciesTable
122 virtual autoPtr<Reaction<ReactionThermo> > clone
124 const speciesTable& species
127 return autoPtr<Reaction<ReactionThermo> >
129 new NonEquilibriumReversibleReaction
130 <ReactionThermo, ReactionRate>
137 virtual ~NonEquilibriumReversibleReaction()
143 // NonEquilibriumReversibleReaction rate coefficients
145 //- Forward rate constant
153 //- Reverse rate constant from the given formard rate constant
162 //- Reverse rate constant.
163 // Note this evaluates the forward rate constant and divides by the
164 // equilibrium constant
174 virtual void write(Ostream&) const;
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 } // End namespace Foam
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 # include "NonEquilibriumReversibleReaction.C"
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 // ************************************************************************* //