powerSeriesReactionRateI.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 powerSeriesReactionRate::powerSeriesReactionRate
00036 (
00037 const scalar A,
00038 const scalar beta,
00039 const scalar Ta,
00040 const scalar b[]
00041 )
00042 :
00043 A_(A),
00044 beta_(beta),
00045 Ta_(Ta)
00046 {
00047 for (int n=0; n<nb_; n++)
00048 {
00049 b_[n] = b[n];
00050 }
00051 }
00052
00053
00054
00055 inline powerSeriesReactionRate::powerSeriesReactionRate
00056 (
00057 const speciesTable&,
00058 Istream& is
00059 )
00060 :
00061 A_(readScalar(is.readBegin("powerSeriesReactionRate(Istream&)"))),
00062 beta_(readScalar(is)),
00063 Ta_(readScalar(is))
00064 {
00065 for (int n=0; n<nb_; n++)
00066 {
00067 is >> b_[n];
00068 }
00069
00070 is.readEnd("powerSeriesReactionRate(Istream&)");
00071 }
00072
00073
00074
00075
00076 inline scalar powerSeriesReactionRate::operator()
00077 (
00078 const scalar T,
00079 const scalar,
00080 const scalarField&
00081 ) const
00082 {
00083 scalar lta = A_;
00084
00085 if (mag(beta_) > VSMALL)
00086 {
00087 lta *= pow(T, beta_);
00088 }
00089
00090 scalar expArg = 0.0;
00091
00092 for (int n=0; n<nb_; n++)
00093 {
00094 expArg += b_[n]/pow(T, n);
00095 }
00096
00097 lta *= exp(expArg);
00098
00099 return lta;
00100 }
00101
00102
00103 inline Ostream& operator<<(Ostream& os, const powerSeriesReactionRate& psrr)
00104 {
00105 os << token::BEGIN_LIST
00106 << psrr.A_ << token::SPACE << psrr.beta_ << token::SPACE << psrr.Ta_;
00107
00108 for (int n=0; n<powerSeriesReactionRate::nb_; n++)
00109 {
00110 os << token::SPACE << psrr.b_[n];
00111 }
00112
00113 os << token::END_LIST;
00114
00115 return os;
00116 }
00117
00118
00119
00120
00121 }
00122
00123
Copyright © 2000-2009 OpenCFD Ltd