Go to the documentation of this file.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/ReversibleReaction.H>
00029
00030
00031
00032 namespace Foam
00033 {
00034
00035
00036
00037
00038 template<class ReactionThermo, class ReactionRate>
00039 ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
00040 (
00041 const Reaction<ReactionThermo>& reaction,
00042 const ReactionRate& k
00043 )
00044 :
00045 Reaction<ReactionThermo>(reaction),
00046 k_(k)
00047 {}
00048
00049
00050
00051 template<class ReactionThermo, class ReactionRate>
00052 ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
00053 (
00054 const speciesTable& species,
00055 const HashPtrTable<ReactionThermo>& thermoDatabase,
00056 Istream& is
00057 )
00058 :
00059 Reaction<ReactionThermo>(species, thermoDatabase, is),
00060 k_(species, is)
00061 {}
00062
00063
00064
00065 template<class ReactionThermo, class ReactionRate>
00066 ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
00067 (
00068 const ReversibleReaction<ReactionThermo, ReactionRate>& rr,
00069 const speciesTable& species
00070 )
00071 :
00072 Reaction<ReactionThermo>(rr, species),
00073 k_(rr.k_)
00074 {}
00075
00076
00077
00078
00079 template<class ReactionThermo, class ReactionRate>
00080 scalar ReversibleReaction<ReactionThermo, ReactionRate>::kf
00081 (
00082 const scalar T,
00083 const scalar p,
00084 const scalarField& c
00085 ) const
00086 {
00087 return k_(T, p, c);
00088 }
00089
00090
00091 template<class ReactionThermo, class ReactionRate>
00092 scalar ReversibleReaction<ReactionThermo, ReactionRate>::kr
00093 (
00094 const scalar kfwd,
00095 const scalar T,
00096 const scalar p,
00097 const scalarField& c
00098 ) const
00099 {
00100 return kfwd/this->Kc(T);
00101 }
00102
00103
00104 template<class ReactionThermo, class ReactionRate>
00105 scalar ReversibleReaction<ReactionThermo, ReactionRate>::kr
00106 (
00107 const scalar T,
00108 const scalar p,
00109 const scalarField& c
00110 ) const
00111 {
00112 return kr(kf(T, p, c), T, p, c);
00113 }
00114
00115
00116 template<class ReactionThermo, class ReactionRate>
00117 void ReversibleReaction<ReactionThermo, ReactionRate>::write
00118 (
00119 Ostream& os
00120 ) const
00121 {
00122 Reaction<ReactionThermo>::write(os);
00123 os << token::SPACE << k_;
00124 }
00125
00126
00127
00128
00129 }
00130
00131