C7H8.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 | Copyright (C) 2011 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::C7H8
26 
27 Description
28  toluene
29 
30 SourceFiles
31  C7H8.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef C7H8_H
36 #define C7H8_H
37 
38 #include "liquidProperties.H"
39 #include "NSRDSfunc0.H"
40 #include "NSRDSfunc1.H"
41 #include "NSRDSfunc2.H"
42 #include "NSRDSfunc3.H"
43 #include "NSRDSfunc4.H"
44 #include "NSRDSfunc5.H"
45 #include "NSRDSfunc6.H"
46 #include "NSRDSfunc7.H"
47 #include "NSRDSfunc14.H"
48 #include "APIdiffCoefFunc.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class C7H8 Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class C7H8
60 :
61  public liquidProperties
62 {
63  // Private data
64 
65  NSRDSfunc5 rho_;
66  NSRDSfunc1 pv_;
67  NSRDSfunc6 hl_;
68  NSRDSfunc0 Cp_;
69  NSRDSfunc0 h_;
70  NSRDSfunc7 Cpg_;
71  NSRDSfunc4 B_;
72  NSRDSfunc1 mu_;
73  NSRDSfunc2 mug_;
74  NSRDSfunc0 K_;
75  NSRDSfunc2 Kg_;
76  NSRDSfunc6 sigma_;
77  APIdiffCoefFunc D_;
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("C7H8");
84 
85 
86  // Constructors
87 
88  //- Construct null
89  C7H8();
90 
91  //- Construct from components
92  C7H8
93  (
94  const liquidProperties& l,
95  const NSRDSfunc5& density,
96  const NSRDSfunc1& vapourPressure,
97  const NSRDSfunc6& heatOfVapourisation,
98  const NSRDSfunc0& heatCapacity,
99  const NSRDSfunc0& enthalpy,
100  const NSRDSfunc7& idealGasHeatCapacity,
101  const NSRDSfunc4& secondVirialCoeff,
102  const NSRDSfunc1& dynamicViscosity,
103  const NSRDSfunc2& vapourDynamicViscosity,
104  const NSRDSfunc0& thermalConductivity,
105  const NSRDSfunc2& vapourThermalConductivity,
106  const NSRDSfunc6& surfaceTension,
107  const APIdiffCoefFunc& vapourDiffussivity
108  );
109 
110  //- Construct from Istream
111  C7H8(Istream& is);
112 
113  //- Construct from dictionary
114  C7H8(const dictionary& dict);
115 
116  //- Construct copy
117  C7H8(const C7H8& liq);
118 
119  //- Construct and return clone
120  virtual autoPtr<liquidProperties> clone() const
121  {
122  return autoPtr<liquidProperties>(new C7H8(*this));
123  }
124 
125 
126  // Member Functions
127 
128  //- Liquid density [kg/m^3]
129  inline scalar rho(scalar p, scalar T) const;
130 
131  //- Vapour pressure [Pa]
132  inline scalar pv(scalar p, scalar T) const;
133 
134  //- Heat of vapourisation [J/kg]
135  inline scalar hl(scalar p, scalar T) const;
136 
137  //- Liquid heat capacity [J/(kg K)]
138  inline scalar Cp(scalar p, scalar T) const;
139 
140  //- Liquid Enthalpy [J/(kg)]
141  inline scalar h(scalar p, scalar T) const;
142 
143  //- Ideal gas heat capacity [J/(kg K)]
144  inline scalar Cpg(scalar p, scalar T) const;
145 
146  //- Second Virial Coefficient [m^3/kg]
147  inline scalar B(scalar p, scalar T) const;
148 
149  //- Liquid viscosity [Pa s]
150  inline scalar mu(scalar p, scalar T) const;
151 
152  //- Vapour viscosity [Pa s]
153  inline scalar mug(scalar p, scalar T) const;
154 
155  //- Liquid thermal conductivity [W/(m K)]
156  inline scalar K(scalar p, scalar T) const;
157 
158  //- Vapour thermal conductivity [W/(m K)]
159  inline scalar Kg(scalar p, scalar T) const;
160 
161  //- Surface tension [N/m]
162  inline scalar sigma(scalar p, scalar T) const;
163 
164  //- Vapour diffussivity [m2/s]
165  inline scalar D(scalar p, scalar T) const;
166 
167  //- Vapour diffussivity [m2/s] with specified binary pair
168  inline scalar D(scalar p, scalar T, scalar Wb) const;
169 
170 
171  // I-O
172 
173  //- Write the function coefficients
174  void writeData(Ostream& os) const
175  {
176  liquidProperties::writeData(os); os << nl;
177  rho_.writeData(os); os << nl;
178  pv_.writeData(os); os << nl;
179  hl_.writeData(os); os << nl;
180  Cp_.writeData(os); os << nl;
181  h_.writeData(os); os << nl;
182  Cpg_.writeData(os); os << nl;
183  B_.writeData(os); os << nl;
184  mu_.writeData(os); os << nl;
185  mug_.writeData(os); os << nl;
186  K_.writeData(os); os << nl;
187  Kg_.writeData(os); os << nl;
188  sigma_.writeData(os); os << nl;
189  D_.writeData(os); os << endl;
190  }
191 
192  //- Ostream Operator
193  friend Ostream& operator<<(Ostream& os, const C7H8& l)
194  {
195  l.writeData(os);
196  return os;
197  }
198 };
199 
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 } // End namespace Foam
204 
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 
207 #include "C7H8I.H"
208 
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 
211 #endif
212 
213 // ************************************************************************* //
NSRDS function number 101.
Definition: NSRDSfunc1.H:67
The thermophysical properties of a liquidProperties.
scalar K(scalar p, scalar T) const
Liquid thermal conductivity [W/(m K)].
Definition: C7H8I.H:80
virtual autoPtr< liquidProperties > clone() const
Construct and return clone.
Definition: C7H8.H:119
scalar Cpg(scalar p, scalar T) const
Ideal gas heat capacity [J/(kg K)].
Definition: C7H8I.H:56
virtual void writeData(Ostream &os) const
Write the function coefficients.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void writeData(Ostream &os) const
Write the function coefficients.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
API function for vapour mass diffusivity.
scalar rho(scalar p, scalar T) const
Liquid density [kg/m^3].
Definition: C7H8I.H:26
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc2.H:110
NSRDS function number 106.
Definition: NSRDSfunc6.H:67
toluene
Definition: C7H8.H:58
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
scalar Kg(scalar p, scalar T) const
Vapour thermal conductivity [W/(m K)].
Definition: C7H8I.H:86
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc1.H:111
NSRDS function number 102.
Definition: NSRDSfunc2.H:67
dictionary dict
static const char nl
Definition: Ostream.H:260
scalar Cp(scalar p, scalar T) const
Liquid heat capacity [J/(kg K)].
Definition: C7H8I.H:44
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
volScalarField & p
Definition: createFields.H:51
TypeName("C7H8")
Runtime type information.
C7H8()
Construct null.
Definition: C7H8.C:41
scalar B(scalar p, scalar T) const
Second Virial Coefficient [m^3/kg].
Definition: C7H8I.H:62
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc7.H:111
scalar D(scalar p, scalar T) const
Vapour diffussivity [m2/s].
Definition: C7H8I.H:98
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc6.H:113
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc0.H:112
NSRDS function number 105.
Definition: NSRDSfunc5.H:67
scalar mug(scalar p, scalar T) const
Vapour viscosity [Pa s].
Definition: C7H8I.H:74
scalar hl(scalar p, scalar T) const
Heat of vapourisation [J/kg].
Definition: C7H8I.H:38
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc4.H:111
friend Ostream & operator<<(Ostream &os, const C7H8 &l)
Ostream Operator.
Definition: C7H8.H:192
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
void writeData(Ostream &os) const
Write the function coefficients.
Definition: C7H8.H:173
NSRDS function number 100.
Definition: NSRDSfunc0.H:67
void writeData(Ostream &os) const
Write the function coefficients.
Definition: NSRDSfunc5.H:110
NSRDS function number 104.
Definition: NSRDSfunc4.H:67
scalar pv(scalar p, scalar T) const
Vapour pressure [Pa].
Definition: C7H8I.H:32
scalar sigma(scalar p, scalar T) const
Surface tension [N/m].
Definition: C7H8I.H:92
scalar h(scalar p, scalar T) const
Liquid Enthalpy [J/(kg)].
Definition: C7H8I.H:50
scalar mu(scalar p, scalar T) const
Liquid viscosity [Pa s].
Definition: C7H8I.H:68
NSRDS-AICHE function number 107.
Definition: NSRDSfunc7.H:67
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117