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