1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 NSRDS function number 114
34 Data Compilation Tables
38 Design Institute for Physical Property Data
39 American Institute of Chemical Engineers
41 New York, New York 10017
43 National Standard Reference Data System
44 American Institute of Chemical Engineers
46 T.E. Daubert - R.P. Danner
48 Department of Chemical Engineering
49 The Pennsylvania State University
50 University Park, PA 16802
53 \*---------------------------------------------------------------------------*/
58 #include "thermophysicalFunction.H"
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 /*---------------------------------------------------------------------------*\
66 Class NSRDSfunc14 Declaration
67 \*---------------------------------------------------------------------------*/
71 public thermophysicalFunction
75 // NSRDS function 114 coefficients
76 scalar Tc_, a_, b_, c_, d_;
81 //- Runtime type information
82 TypeName("NSRDSfunc14");
87 //- Construct from components
88 NSRDSfunc14(scalar Tc, scalar a, scalar b, scalar c, scalar d)
97 //- Construct from Istream
98 NSRDSfunc14(Istream& is)
110 //- Evaluate the function and return the result
111 scalar f(scalar, scalar T) const
113 scalar t = 1.0 - T/Tc_;
114 return a_*a_/t + b_ - t*(2.0*a_*c_ + t*(a_*d_ + t*(c_*c_/3.0 + t*(0.5*c_*d_ + 0.2*d_*d_*t))));
118 //- Write the function coefficients
119 void writeData(Ostream& os) const
121 os << Tc_ << token::SPACE
122 << a_ << token::SPACE
123 << b_ << token::SPACE
124 << c_ << token::SPACE
131 friend Ostream& operator<<(Ostream& os, const NSRDSfunc14& f)
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace Foam
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 // ************************************************************************* //