1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 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::IrreversibleReaction
29 Simple extension of Reaction to handle reversible reactions using
30 equilibrium thermodynamics.
33 IrreversibleReaction.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef IrreversibleReaction_H
38 #define IrreversibleReaction_H
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class IrreversibleReaction Declaration
49 \*---------------------------------------------------------------------------*/
51 template<class ReactionThermo, class ReactionRate>
52 class IrreversibleReaction
54 public Reaction<ReactionThermo>
61 // Private Member Functions
63 //- Disallow default bitwise assignment
66 const IrreversibleReaction<ReactionThermo, ReactionRate>&
72 //- Runtime type information
73 TypeName("irreversible");
78 //- Construct from components
81 const Reaction<ReactionThermo>& reaction,
82 const ReactionRate& reactionRate
85 //- Construct as copy given new speciesTable
88 const IrreversibleReaction<ReactionThermo, ReactionRate>&,
89 const speciesTable& species
92 //- Construct from Istream
95 const speciesTable& species,
96 const HashPtrTable<ReactionThermo>& thermoDatabase,
100 //- Construct and return a clone
101 virtual autoPtr<Reaction<ReactionThermo> > clone() const
103 return autoPtr<Reaction<ReactionThermo> >
105 new IrreversibleReaction<ReactionThermo, ReactionRate>(*this)
109 //- Construct and return a clone with new speciesTable
110 virtual autoPtr<Reaction<ReactionThermo> > clone
112 const speciesTable& species
115 return autoPtr<Reaction<ReactionThermo> >
117 new IrreversibleReaction<ReactionThermo, ReactionRate>
128 virtual ~IrreversibleReaction()
134 // IrreversibleReaction rate coefficients
136 //- Forward rate constant
146 virtual void write(Ostream&) const;
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 } // End namespace Foam
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 # include "IrreversibleReaction.C"
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 // ************************************************************************* //