NSRDSfunc14.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::NSRDSfunc14
28
29Description
30 NSRDS function number 114
31
32 Source:
33 \verbatim
34 NSRDS - AICHE
35 Data Compilation Tables
36 of Properties of
37 Pure Compounds
38
39 Design Institute for Physical Property Data
40 American Institute of Chemical Engineers
41 345 East 47th Street
42 New York, New York 10017
43
44 National Standard Reference Data System
45 American Institute of Chemical Engineers
46
47 T.E. Daubert - R.P. Danner
48
49 Department of Chemical Engineering
50 The Pennsylvania State University
51 University Park, PA 16802
52 \endverbatim
53
54\*---------------------------------------------------------------------------*/
55
56#ifndef NSRDSfunc14_H
57#define NSRDSfunc14_H
58
60
61// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62
63namespace Foam
64{
65
66/*---------------------------------------------------------------------------*\
67 Class NSRDSfunc14 Declaration
68\*---------------------------------------------------------------------------*/
70class NSRDSfunc14
71:
73{
74 // Private data
75
76 // NSRDS function 114 coefficients
77 scalar Tc_, a_, b_, c_, d_;
78
79
80public:
81
82 //- Runtime type information
83 TypeName("NSRDSfunc14");
84
85
86 // Constructors
87
88 //- Construct from components
90 (
91 const scalar Tc,
92 const scalar a,
93 const scalar b,
94 const scalar c,
95 const scalar d
96 );
97
98 //- Construct from dictionary
100
101
102 // Member Functions
103
104 //- Evaluate the function and return the result
105 scalar f(scalar, scalar T) const
106 {
107 scalar Tdash = min(T, Tc_ - ROOTVSMALL);
108
109 scalar t = 1.0 - Tdash/Tc_;
110 return
111 a_*a_/(t + ROOTVSMALL) + b_ - t
112 *(
113 2.0*a_*c_
114 + t*(a_*d_ + t*(c_*c_/3.0 + t*(0.5*c_*d_ + 0.2*d_*d_*t)))
115 );
116 }
117
118 //- Write the function coefficients
119 void writeData(Ostream& os) const
120 {
121 os << Tc_ << token::SPACE
122 << a_ << token::SPACE
123 << b_ << token::SPACE
124 << c_ << token::SPACE
125 << d_;
126 }
127
128
129 // Ostream Operator
131 friend Ostream& operator<<(Ostream& os, const NSRDSfunc14& f)
132 {
133 f.writeData(os);
134 return os;
135 }
136};
137
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141} // End namespace Foam
142
143// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144
145#endif
146
147// ************************************************************************* //
NSRDS function number 114.
Definition: NSRDSfunc14.H:72
friend Ostream & operator<<(Ostream &os, const NSRDSfunc14 &f)
Definition: NSRDSfunc14.H:130
scalar f(scalar, scalar T) const
Evaluate the function and return the result.
Definition: NSRDSfunc14.H:104
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc14.H:118
TypeName("NSRDSfunc14")
Runtime type information.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base class for thermo-physical functions.
@ SPACE
Space [isspace].
Definition: token.H:125
const volScalarField & T
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
dictionary dict
volScalarField & b
Definition: createFields.H:27
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73