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
00030
00031 namespace Foam
00032 {
00033
00034
00035
00036
00037 template<class ReactionRate, class FallOffFunction>
00038 inline FallOffReactionRate<ReactionRate, FallOffFunction>::FallOffReactionRate
00039 (
00040 const ReactionRate& k0,
00041 const ReactionRate& kInf,
00042 const FallOffFunction& F,
00043 const thirdBodyEfficiencies& tbes
00044 )
00045 :
00046 k0_(k0),
00047 kInf_(kInf),
00048 F_(F),
00049 thirdBodyEfficiencies_(tbes)
00050 {}
00051
00052
00053
00054 template<class ReactionRate, class FallOffFunction>
00055 inline FallOffReactionRate<ReactionRate, FallOffFunction>::FallOffReactionRate
00056 (
00057 const speciesTable& species,
00058 Istream& is
00059 )
00060 :
00061 k0_(species, is.readBegin("FallOffReactionRate(Istream&)")),
00062 kInf_(species, is),
00063 F_(is),
00064 thirdBodyEfficiencies_(species, is)
00065 {
00066 is.readEnd("FallOffReactionRate(Istream&)");
00067 }
00068
00069
00070
00071
00072 template<class ReactionRate, class FallOffFunction>
00073 inline scalar FallOffReactionRate<ReactionRate, FallOffFunction>::operator()
00074 (
00075 const scalar T,
00076 const scalar p,
00077 const scalarField& c
00078 ) const
00079 {
00080 scalar k0 = k0_(T, p, c);
00081 scalar kInf = kInf_(T, p, c);
00082
00083 scalar Pr = k0*thirdBodyEfficiencies_.M(c)/kInf;
00084
00085 return kInf*(Pr/(1 + Pr))*F_(T, Pr);
00086 }
00087
00088
00089 template<class ReactionRate, class FallOffFunction>
00090 inline Ostream& operator<<
00091 (
00092 Ostream& os,
00093 const FallOffReactionRate<ReactionRate, FallOffFunction>& forr
00094 )
00095 {
00096 os << token::BEGIN_LIST
00097 << forr.k0_ << token::SPACE
00098 << forr.kInf_ << token::SPACE
00099 << forr.F_ << token::SPACE
00100 << forr.thirdBodyEfficiencies_
00101 << token::END_LIST;
00102 return os;
00103 }
00104
00105
00106
00107
00108 }
00109
00110