FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

iC3H8O.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::iC3H8O
00026 
00027 Description
00028     iso-propanol
00029 
00030 SourceFiles
00031     iC3H8O.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef iC3H8O_H
00036 #define iC3H8O_H
00037 
00038 #include <liquids/liquid.H>
00039 #include <thermophysicalFunctions/NSRDSfunc0.H>
00040 #include <thermophysicalFunctions/NSRDSfunc1.H>
00041 #include <thermophysicalFunctions/NSRDSfunc2.H>
00042 #include <thermophysicalFunctions/NSRDSfunc3.H>
00043 #include <thermophysicalFunctions/NSRDSfunc4.H>
00044 #include <thermophysicalFunctions/NSRDSfunc5.H>
00045 #include <thermophysicalFunctions/NSRDSfunc6.H>
00046 #include <thermophysicalFunctions/NSRDSfunc7.H>
00047 #include <thermophysicalFunctions/NSRDSfunc14.H>
00048 
00049 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00050 
00051 namespace Foam
00052 {
00053 
00054 /*--------------------->-----------------------------------------------------*\
00055                            Class iC3H8O Declaration
00056 \*---------------------------------------------------------------------------*/
00057 
00058 class iC3H8O
00059 :
00060     public liquid
00061 {
00062     // Private data
00063 
00064         NSRDSfunc5 rho_;
00065         NSRDSfunc1 pv_;
00066         NSRDSfunc6 hl_;
00067         NSRDSfunc0 cp_;
00068         NSRDSfunc0 h_;
00069         NSRDSfunc7 cpg_;
00070         NSRDSfunc4 B_;
00071         NSRDSfunc1 mu_;
00072         NSRDSfunc2 mug_;
00073         NSRDSfunc0 K_;
00074         NSRDSfunc2 Kg_;
00075         NSRDSfunc0 sigma_;
00076         NSRDSfunc1 D_;
00077 
00078 public:
00079 
00080     //- Runtime type information
00081     TypeName("iC3H8O");
00082 
00083 
00084     // Constructors
00085 
00086         //- Construct null
00087         iC3H8O();
00088 
00089         //- Constrcut from components
00090         iC3H8O
00091         (
00092             const liquid& l,
00093             const NSRDSfunc5& density,
00094             const NSRDSfunc1& vapourPressure,
00095             const NSRDSfunc6& heatOfVapourisation,
00096             const NSRDSfunc0& heatCapacity,
00097             const NSRDSfunc0& enthalpy,
00098             const NSRDSfunc7& idealGasHeatCapacity,
00099             const NSRDSfunc4& secondVirialCoeff,
00100             const NSRDSfunc1& dynamicViscosity,
00101             const NSRDSfunc2& vapourDynamicViscosity,
00102             const NSRDSfunc0& thermalConductivity,
00103             const NSRDSfunc2& vapourThermalConductivity,
00104             const NSRDSfunc0& surfaceTension,
00105             const NSRDSfunc1& vapourDiffussivity
00106         );
00107 
00108         //- Construct from Istream
00109         iC3H8O(Istream& is);
00110 
00111 
00112     // Member Functions
00113 
00114         //- Liquid density [kg/m^3]
00115         inline scalar rho(scalar p, scalar T) const;
00116 
00117         //- Vapour pressure [Pa]
00118         inline scalar pv(scalar p, scalar T) const;
00119 
00120         //- Heat of vapourisation [J/kg]
00121         inline scalar hl(scalar p, scalar T) const;
00122 
00123         //- Liquid heat capacity [J/(kg K)]
00124         inline scalar cp(scalar p, scalar T) const;
00125 
00126         //- Liquid Enthalpy [J/(kg)]
00127         inline scalar h(scalar p, scalar T) const;
00128 
00129         //- Ideal gas heat capacity [J/(kg K)]
00130         inline scalar cpg(scalar p, scalar T) const;
00131 
00132         //- Second Virial Coefficient [m^3/kg]
00133         inline scalar B(scalar p, scalar T) const;
00134 
00135         //- Liquid viscosity [Pa s]
00136         inline scalar mu(scalar p, scalar T) const;
00137 
00138         //- Vapour viscosity [Pa s]
00139         inline scalar mug(scalar p, scalar T) const;
00140 
00141         //- Liquid thermal conductivity  [W/(m K)]
00142         inline scalar K(scalar p, scalar T) const;
00143 
00144         //- Vapour thermal conductivity  [W/(m K)]
00145         inline scalar Kg(scalar p, scalar T) const;
00146 
00147         //- Surface tension [N/m]
00148         inline scalar sigma(scalar p, scalar T) const;
00149 
00150         //- Vapour diffussivity [m2/s]
00151         inline scalar D(scalar p, scalar T) const;
00152 
00153         //- Vapour diffussivity [m2/s] with specified binary pair
00154         // Note: behaves the same as D(p, T)
00155         inline scalar D(scalar p, scalar T, scalar Wb) const;
00156 
00157 
00158     // I-O
00159 
00160         //- Write the function coefficients
00161         void writeData(Ostream& os) const
00162         {
00163             liquid::writeData(os); os << nl;
00164             rho_.writeData(os); os << nl;
00165             pv_.writeData(os); os << nl;
00166             hl_.writeData(os); os << nl;
00167             cp_.writeData(os); os << nl;
00168             cpg_.writeData(os); os << nl;
00169             B_.writeData(os); os << nl;
00170             mu_.writeData(os); os << nl;
00171             mug_.writeData(os); os << nl;
00172             K_.writeData(os); os << nl;
00173             Kg_.writeData(os); os << nl;
00174             sigma_.writeData(os); os << nl;
00175             D_.writeData(os); os << endl;
00176         }
00177 
00178         //- Ostream Operator
00179         friend Ostream& operator<<(Ostream& os, const iC3H8O& l)
00180         {
00181             l.writeData(os);
00182             return os;
00183         }
00184 };
00185 
00186 
00187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00188 
00189 } // End namespace Foam
00190 
00191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00192 
00193 #include "iC3H8OI.H"
00194 
00195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00196 
00197 #endif
00198 
00199 // ************************ vim: set sw=4 sts=4 et: ************************ //
00200 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines