00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include <specie/NonEquilibriumReversibleReaction.H>
00029
00030
00031
00032 namespace Foam
00033 {
00034
00035
00036
00037
00038 template<class ReactionThermo, class ReactionRate>
00039 NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
00040 NonEquilibriumReversibleReaction
00041 (
00042 const Reaction<ReactionThermo>& reaction,
00043 const ReactionRate& forwardReactionRate,
00044 const ReactionRate& reverseReactionRate
00045 )
00046 :
00047 Reaction<ReactionThermo>(reaction),
00048 fk_(forwardReactionRate),
00049 rk_(reverseReactionRate)
00050 {}
00051
00052
00053
00054 template<class ReactionThermo, class ReactionRate>
00055 NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
00056 NonEquilibriumReversibleReaction
00057 (
00058 const speciesTable& species,
00059 const HashPtrTable<ReactionThermo>& thermoDatabase,
00060 Istream& is
00061 )
00062 :
00063 Reaction<ReactionThermo>(species, thermoDatabase, is),
00064 fk_(species, is),
00065 rk_(species, is)
00066 {}
00067
00068
00069 template<class ReactionThermo, class ReactionRate>
00070 NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
00071 NonEquilibriumReversibleReaction
00072 (
00073 const NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>& nerr,
00074 const speciesTable& species
00075 )
00076 :
00077 Reaction<ReactionThermo>(nerr, species),
00078 fk_(nerr.fk_),
00079 rk_(nerr.rk_)
00080 {}
00081
00082
00083
00084
00085 template<class ReactionThermo, class ReactionRate>
00086 scalar NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kf
00087 (
00088 const scalar T,
00089 const scalar p,
00090 const scalarField& c
00091 ) const
00092 {
00093 return fk_(T, p, c);
00094 }
00095
00096
00097 template<class ReactionThermo, class ReactionRate>
00098 scalar NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kr
00099 (
00100 const scalar,
00101 const scalar T,
00102 const scalar p,
00103 const scalarField& c
00104 ) const
00105 {
00106 return rk_(T, p, c);
00107 }
00108
00109
00110 template<class ReactionThermo, class ReactionRate>
00111 scalar NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kr
00112 (
00113 const scalar T,
00114 const scalar p,
00115 const scalarField& c
00116 ) const
00117 {
00118 return rk_(T, p, c);
00119 }
00120
00121
00122 template<class ReactionThermo, class ReactionRate>
00123 void NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::write
00124 (
00125 Ostream& os
00126 ) const
00127 {
00128 Reaction<ReactionThermo>::write(os);
00129 os << token::SPACE << fk_ << token::SPACE << rk_;
00130 }
00131
00132
00133
00134
00135 }
00136
00137