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
00032 namespace Foam
00033 {
00034
00035
00036
00037
00038 inline LangmuirHinshelwoodReactionRate::LangmuirHinshelwoodReactionRate
00039 (
00040 const scalar A[],
00041 const scalar Ta[],
00042 const label co,
00043 const label c3h6,
00044 const label no
00045 )
00046 :
00047 co_(co),
00048 c3h6_(c3h6),
00049 no_(no)
00050 {
00051 for (int i=0; i<n_; i++)
00052 {
00053 A_[i] = A[i];
00054 Ta_[i] = Ta[i];
00055 }
00056 }
00057
00058
00059
00060 inline LangmuirHinshelwoodReactionRate::LangmuirHinshelwoodReactionRate
00061 (
00062 const speciesTable& st,
00063 Istream& is
00064 )
00065 :
00066 co_(st["CO"]),
00067 c3h6_(st["C3H6"]),
00068 no_(st["NO"])
00069 {
00070 is.readBegin("LangmuirHinshelwoodReactionRate(Istream&)");
00071
00072 for (int i=0; i<n_; i++)
00073 {
00074 is >> A_[i] >> Ta_[i];
00075 }
00076
00077 is.readEnd("LangmuirHinshelwoodReactionRate(Istream&)");
00078 }
00079
00080
00081
00082
00083 inline scalar LangmuirHinshelwoodReactionRate::operator()
00084 (
00085 const scalar T,
00086 const scalar,
00087 const scalarField& c
00088 ) const
00089 {
00090 return A_[0]*exp(-Ta_[0]/T)/
00091 (
00092 T
00093 *sqr(1 + A_[1]*exp(-Ta_[1]/T)*c[co_] + A_[2]*exp(-Ta_[2]/T)*c[c3h6_])
00094 *(1 + A_[3]*exp(-Ta_[3]/T)*sqr(c[co_])*sqr(c[c3h6_]))
00095 *(1 + A_[4]*exp(-Ta_[4]/T)*pow(c[no_], 0.7))
00096 );
00097 }
00098
00099
00100 inline Ostream& operator<<
00101 (
00102 Ostream& os,
00103 const LangmuirHinshelwoodReactionRate& lhrr
00104 )
00105 {
00106 os << token::BEGIN_LIST;
00107
00108 for (int i=0; i<LangmuirHinshelwoodReactionRate::n_; i++)
00109 {
00110 os << token::SPACE << lhrr.A_[i] << token::SPACE << lhrr.Ta_[i];
00111 }
00112
00113 os << token::END_LIST;
00114
00115 return os;
00116 }
00117
00118
00119
00120
00121 }
00122
00123