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::SRIFallOffFunction::SRIFallOffFunction
00033 (
00034 const scalar a,
00035 const scalar b,
00036 const scalar c,
00037 const scalar d,
00038 const scalar e
00039 )
00040 :
00041 a_(a),
00042 b_(b),
00043 c_(c),
00044 d_(d),
00045 e_(e)
00046 {}
00047
00048
00049
00050 inline Foam::SRIFallOffFunction::SRIFallOffFunction(Istream& is)
00051 :
00052 a_(readScalar(is.readBegin("SRIFallOffFunction(Istream&)"))),
00053 b_(readScalar(is)),
00054 c_(readScalar(is)),
00055 d_(readScalar(is)),
00056 e_(readScalar(is))
00057 {
00058 is.readEnd("SRIFallOffFunction(Istream&)");
00059 }
00060
00061
00062
00063
00064 inline Foam::scalar Foam::SRIFallOffFunction::operator()
00065 (
00066 const scalar T,
00067 const scalar Pr
00068 ) const
00069 {
00070 scalar X = 1.0/(1.0 + sqr(log10(max(Pr, SMALL))));
00071 return d_*pow(a_*exp(-b_/T) + exp(-T/c_), X)*pow(T, e_);
00072 }
00073
00074
00075
00076
00077 inline Foam::Ostream& Foam::operator<<
00078 (
00079 Foam::Ostream& os,
00080 const Foam::SRIFallOffFunction& srifof
00081 )
00082 {
00083 os << token::BEGIN_LIST
00084 << srifof.a_
00085 << token::SPACE << srifof.b_
00086 << token::SPACE << srifof.c_
00087 << token::SPACE << srifof.d_
00088 << token::SPACE << srifof.e_
00089 << token::END_LIST;
00090
00091 return os;
00092 }
00093
00094
00095