NSRDSfunc6.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 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::NSRDSfunc6
28 
29 Description
30  NSRDS function number 106
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 NSRDSfunc6_H
57 #define NSRDSfunc6_H
58 
59 #include "thermophysicalFunction.H"
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class NSRDSfunc6 Declaration
68 \*---------------------------------------------------------------------------*/
69 
70 class NSRDSfunc6
71 :
73 {
74  // Private data
75 
76  // NSRDS function 106 coefficients
77  scalar Tc_, a_, b_, c_, d_, e_;
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("NSRDSfunc6");
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  const scalar e
97  );
98 
99  //- Construct from dictionary
100  NSRDSfunc6(const dictionary& dict);
101 
102 
103  // Member Functions
104 
105  //- Evaluate the function and return the result
106  scalar f(scalar, scalar T) const
107  {
108  scalar Tr = T/Tc_;
109  return a_*pow(1 - Tr, ((e_*Tr + d_)*Tr + c_)*Tr + b_);
110  }
111 
112  //- Write the function coefficients
113  void writeData(Ostream& os) const
114  {
115  os << Tc_ << token::SPACE
116  << a_ << token::SPACE
117  << b_ << token::SPACE
118  << c_ << token::SPACE
119  << d_ << token::SPACE
120  << e_;
121  }
122 
123 
124  // Ostream Operator
125 
126  friend Ostream& operator<<(Ostream& os, const NSRDSfunc6& f)
127  {
128  f.writeData(os);
129  return os;
130  }
131 };
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
Foam::thermophysicalFunction
Abstract base class for thermo-physical functions.
Definition: thermophysicalFunction.H:53
Foam::NSRDSfunc6::NSRDSfunc6
NSRDSfunc6(const scalar Tc, const scalar a, const scalar b, const scalar c, const scalar d, const scalar e)
Construct from components.
Definition: NSRDSfunc6.C:42
Foam::constant::physicoChemical::b
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:27
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition: dimensionedScalar.C:75
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::NSRDSfunc6::TypeName
TypeName("NSRDSfunc6")
Runtime type information.
Foam::NSRDSfunc6::operator<<
friend Ostream & operator<<(Ostream &os, const NSRDSfunc6 &f)
Definition: NSRDSfunc6.H:125
os
OBJstream os(runTime.globalPath()/outputName)
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::token::SPACE
Space [isspace].
Definition: token.H:125
Foam::NSRDSfunc6::writeData
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc6.H:112
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
Foam::constant::universal::c
const dimensionedScalar c
Speed of light in a vacuum.
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::NSRDSfunc6::f
scalar f(scalar, scalar T) const
Evaluate the function and return the result.
Definition: NSRDSfunc6.H:105
Foam::NSRDSfunc6
NSRDS function number 106.
Definition: NSRDSfunc6.H:69
thermophysicalFunction.H