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