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