1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "NonEquilibriumReversibleReaction.H"
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
30 template<class ReactionThermo, class ReactionRate>
31 Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
32 NonEquilibriumReversibleReaction
34 const Reaction<ReactionThermo>& reaction,
35 const ReactionRate& forwardReactionRate,
36 const ReactionRate& reverseReactionRate
39 Reaction<ReactionThermo>(reaction),
40 fk_(forwardReactionRate),
41 rk_(reverseReactionRate)
46 template<class ReactionThermo, class ReactionRate>
47 Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
48 NonEquilibriumReversibleReaction
50 const speciesTable& species,
51 const HashPtrTable<ReactionThermo>& thermoDatabase,
55 Reaction<ReactionThermo>(species, thermoDatabase, is),
61 template<class ReactionThermo, class ReactionRate>
62 Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
63 NonEquilibriumReversibleReaction
65 const speciesTable& species,
66 const HashPtrTable<ReactionThermo>& thermoDatabase,
67 const dictionary& dict
70 Reaction<ReactionThermo>(species, thermoDatabase, dict),
71 fk_(species, dict.subDict("forward")),
72 rk_(species, dict.subDict("reverse"))
76 template<class ReactionThermo, class ReactionRate>
77 Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
78 NonEquilibriumReversibleReaction
80 const NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>& nerr,
81 const speciesTable& species
84 Reaction<ReactionThermo>(nerr, species),
90 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
92 template<class ReactionThermo, class ReactionRate>
94 Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kf
105 template<class ReactionThermo, class ReactionRate>
107 Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kr
119 template<class ReactionThermo, class ReactionRate>
121 Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kr
132 template<class ReactionThermo, class ReactionRate>
133 void Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::write
138 Reaction<ReactionThermo>::write(os);
140 os << indent << "forward" << nl;
141 os << indent << token::BEGIN_BLOCK << nl;
145 os << indent << token::END_BLOCK << nl;
147 os << indent << "reverse" << nl;
148 os << indent << token::BEGIN_BLOCK << nl;
152 os << indent << token::END_BLOCK << nl;
156 // ************************************************************************* //