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