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 inline Foam::TroeFallOffFunction::TroeFallOffFunction
00033 (
00034 const scalar alpha,
00035 const scalar Tsss,
00036 const scalar Ts,
00037 const scalar Tss
00038 )
00039 :
00040 alpha_(alpha),
00041 Tsss_(Tsss),
00042 Ts_(Ts),
00043 Tss_(Tss)
00044 {}
00045
00046
00047
00048 inline Foam::TroeFallOffFunction::TroeFallOffFunction(Istream& is)
00049 :
00050 alpha_(readScalar(is.readBegin("TroeFallOffFunction(Istream&)"))),
00051 Tsss_(readScalar(is)),
00052 Ts_(readScalar(is)),
00053 Tss_(readScalar(is))
00054 {
00055 is.readEnd("TroeFallOffFunction(Istream&)");
00056 }
00057
00058
00059
00060
00061 inline Foam::scalar Foam::TroeFallOffFunction::operator()
00062 (
00063 const scalar T,
00064 const scalar Pr
00065 ) const
00066 {
00067 scalar logFcent = log10
00068 (
00069 max
00070 (
00071 (1 - alpha_)*exp(-T/Tsss_) + alpha_*exp(-T/Ts_) + exp(-Tss_/T),
00072 SMALL
00073 )
00074 );
00075
00076 scalar c = -0.4 - 0.67*logFcent;
00077 static const scalar d = 0.14;
00078 scalar n = 0.75 - 1.27*logFcent;
00079
00080 scalar logPr = log10(max(Pr, SMALL));
00081 return pow(10.0, logFcent/(1.0 + sqr((logPr + c)/(n - d*(logPr + c)))));
00082 }
00083
00084
00085
00086
00087 inline Foam::Ostream& Foam::operator<<
00088 (
00089 Foam::Ostream& os,
00090 const Foam::TroeFallOffFunction& tfof
00091 )
00092 {
00093 os << token::BEGIN_LIST
00094 << tfof.alpha_
00095 << token::SPACE << tfof.Tsss_
00096 << token::SPACE << tfof.Ts_
00097 << token::SPACE << tfof.Tss_
00098 << token::END_LIST;
00099
00100 return os;
00101 }
00102
00103
00104