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