Merge branch 'upstream/OpenFOAM' into master
[freefoam.git] / src / thermophysicalModels / liquids / iC3H8O / iC3H8O.H
blob054e859dc3f0f30c18b59f870324661f53521d7a
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::iC3H8O
28 Description
29     iso-propanol
31 SourceFiles
32     iC3H8O.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef iC3H8O_H
37 #define iC3H8O_H
39 #include <liquids/liquid.H>
40 #include <thermophysicalFunctions/NSRDSfunc0.H>
41 #include <thermophysicalFunctions/NSRDSfunc1.H>
42 #include <thermophysicalFunctions/NSRDSfunc2.H>
43 #include <thermophysicalFunctions/NSRDSfunc3.H>
44 #include <thermophysicalFunctions/NSRDSfunc4.H>
45 #include <thermophysicalFunctions/NSRDSfunc5.H>
46 #include <thermophysicalFunctions/NSRDSfunc6.H>
47 #include <thermophysicalFunctions/NSRDSfunc7.H>
48 #include <thermophysicalFunctions/NSRDSfunc14.H>
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 namespace Foam
55 /*--------------------->-----------------------------------------------------*\
56                            Class iC3H8O Declaration
57 \*---------------------------------------------------------------------------*/
59 class iC3H8O
61     public liquid
63     // Private data
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         NSRDSfunc0 sigma_;
77         NSRDSfunc1 D_;
79 public:
81     //- Runtime type information
82     TypeName("iC3H8O");
85     // Constructors
87         //- Construct null
88         iC3H8O();
90         //- Constrcut from components
91         iC3H8O
92         (
93             const liquid& l,
94             const NSRDSfunc5& density,
95             const NSRDSfunc1& vapourPressure,
96             const NSRDSfunc6& heatOfVapourisation,
97             const NSRDSfunc0& heatCapacity,
98             const NSRDSfunc0& enthalpy,
99             const NSRDSfunc7& idealGasHeatCapacity,
100             const NSRDSfunc4& secondVirialCoeff,
101             const NSRDSfunc1& dynamicViscosity,
102             const NSRDSfunc2& vapourDynamicViscosity,
103             const NSRDSfunc0& thermalConductivity,
104             const NSRDSfunc2& vapourThermalConductivity,
105             const NSRDSfunc0& surfaceTension,
106             const NSRDSfunc1& vapourDiffussivity
107         );
109         //- Construct from Istream
110         iC3H8O(Istream& is);
113     // Member Functions
115         //- Liquid density [kg/m^3]
116         inline scalar rho(scalar p, scalar T) const;
118         //- Vapour pressure [Pa]
119         inline scalar pv(scalar p, scalar T) const;
121         //- Heat of vapourisation [J/kg]
122         inline scalar hl(scalar p, scalar T) const;
124         //- Liquid heat capacity [J/(kg K)]
125         inline scalar cp(scalar p, scalar T) const;
127         //- Liquid Enthalpy [J/(kg)]
128         inline scalar h(scalar p, scalar T) const;
130         //- Ideal gas heat capacity [J/(kg K)]
131         inline scalar cpg(scalar p, scalar T) const;
133         //- Second Virial Coefficient [m^3/kg]
134         inline scalar B(scalar p, scalar T) const;
136         //- Liquid viscosity [Pa s]
137         inline scalar mu(scalar p, scalar T) const;
139         //- Vapour viscosity [Pa s]
140         inline scalar mug(scalar p, scalar T) const;
142         //- Liquid thermal conductivity  [W/(m K)]
143         inline scalar K(scalar p, scalar T) const;
145         //- Vapour thermal conductivity  [W/(m K)]
146         inline scalar Kg(scalar p, scalar T) const;
148         //- Surface tension [N/m]
149         inline scalar sigma(scalar p, scalar T) const;
151         //- Vapour diffussivity [m2/s]
152         inline scalar D(scalar p, scalar T) const;
155     // I-O
157         //- Write the function coefficients
158         void writeData(Ostream& os) const
159         {
160             liquid::writeData(os); os << nl;
161             rho_.writeData(os); os << nl;
162             pv_.writeData(os); os << nl;
163             hl_.writeData(os); os << nl;
164             cp_.writeData(os); os << nl;
165             cpg_.writeData(os); os << nl;
166             B_.writeData(os); os << nl;
167             mu_.writeData(os); os << nl;
168             mug_.writeData(os); os << nl;
169             K_.writeData(os); os << nl;
170             Kg_.writeData(os); os << nl;
171             sigma_.writeData(os); os << nl;
172             D_.writeData(os); os << endl;
173         }
175         //- Ostream Operator
176         friend Ostream& operator<<(Ostream& os, const iC3H8O& l)
177         {
178             l.writeData(os);
179             return os;
180         }
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 } // End namespace Foam
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 #include "iC3H8OI.H"
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 #endif
196 // ************************ vim: set sw=4 sts=4 et: ************************ //