OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

nC3H8O.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-2009 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::nC3H8O
00027 
00028 Description
00029     propanol
00030 
00031 SourceFiles
00032     nC3H8O.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef nC3H8O_H
00037 #define nC3H8O_H
00038 
00039 #include "liquid.H"
00040 #include "NSRDSfunc0.H"
00041 #include "NSRDSfunc1.H"
00042 #include "NSRDSfunc2.H"
00043 #include "NSRDSfunc3.H"
00044 #include "NSRDSfunc4.H"
00045 #include "NSRDSfunc5.H"
00046 #include "NSRDSfunc6.H"
00047 #include "NSRDSfunc7.H"
00048 #include "NSRDSfunc14.H"
00049 
00050 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00051 
00052 namespace Foam
00053 {
00054 
00055 /*---------------------------------------------------------------------------*\
00056                            Class nC3H8O Declaration
00057 \*---------------------------------------------------------------------------*/
00058 
00059 class nC3H8O
00060 :
00061     public liquid
00062 {
00063     // Private data
00064 
00065         NSRDSfunc5 rho_;
00066         NSRDSfunc1 pv_;
00067         NSRDSfunc6 hl_;
00068         NSRDSfunc0 cp_;
00069         NSRDSfunc0 h_;
00070         NSRDSfunc7 cpg_;
00071         NSRDSfunc4 B_;
00072         NSRDSfunc1 mu_;
00073         NSRDSfunc2 mug_;
00074         NSRDSfunc0 K_;
00075         NSRDSfunc2 Kg_;
00076         NSRDSfunc0 sigma_;
00077         NSRDSfunc1 D_;
00078 
00079 public:
00080 
00081     //- Runtime type information
00082     TypeName("nC3H8O");
00083 
00084 
00085     // Constructors
00086 
00087         //- Construct null
00088         nC3H8O();
00089 
00090         //- Construct from components
00091         nC3H8O
00092         (
00093             const liquid& l,
00094             const NSRDSfunc5& density,
00095             const NSRDSfunc1& vapourPressure,
00096             const NSRDSfunc6& heatOfVapourisation,
00097             const NSRDSfunc0& heatCapacity,
00098             const NSRDSfunc0& enthalpy,
00099             const NSRDSfunc7& idealGasHeatCapacity,
00100             const NSRDSfunc4& secondVirialCoeff,
00101             const NSRDSfunc1& dynamicViscosity,
00102             const NSRDSfunc2& vapourDynamicViscosity,
00103             const NSRDSfunc0& thermalConductivity,
00104             const NSRDSfunc2& vapourThermalConductivity,
00105             const NSRDSfunc0& surfaceTension,
00106             const NSRDSfunc1& vapourDiffussivity
00107         );
00108 
00109         //- Construct from Istream
00110         nC3H8O(Istream& is);
00111 
00112 
00113     // Member Functions
00114 
00115         //- Liquid density [kg/m^3]
00116         inline scalar rho(scalar p, scalar T) const;
00117 
00118         //- Vapour pressure [Pa]
00119         inline scalar pv(scalar p, scalar T) const;
00120 
00121         //- Heat of vapourisation [J/kg]
00122         inline scalar hl(scalar p, scalar T) const;
00123 
00124         //- Liquid heat capacity [J/(kg K)]
00125         inline scalar cp(scalar p, scalar T) const;
00126 
00127         //- Liquid Enthalpy [J/(kg)]
00128         inline scalar h(scalar p, scalar T) const;
00129 
00130         //- Ideal gas heat capacity [J/(kg K)]
00131         inline scalar cpg(scalar p, scalar T) const;
00132 
00133         //- Second Virial Coefficient [m^3/kg]
00134         inline scalar B(scalar p, scalar T) const;
00135 
00136         //- Liquid viscosity [Pa s]
00137         inline scalar mu(scalar p, scalar T) const;
00138 
00139         //- Vapour viscosity [Pa s]
00140         inline scalar mug(scalar p, scalar T) const;
00141 
00142         //- Liquid thermal conductivity [W/(m K)]
00143         inline scalar K(scalar p, scalar T) const;
00144 
00145         //- Vapour thermal conductivity [W/(m K)]
00146         inline scalar Kg(scalar p, scalar T) const;
00147 
00148         //- Surface tension [N/m]
00149         inline scalar sigma(scalar p, scalar T) const;
00150 
00151         //- Vapour diffussivity [m2/s]
00152         inline scalar D(scalar p, scalar T) const;
00153 
00154 
00155     // I-O
00156 
00157         //- Write the function coefficients
00158         void writeData(Ostream& os) const
00159         {
00160             liquid::writeData(os); os << nl;
00161             rho_.writeData(os); os << nl;
00162             pv_.writeData(os); os << nl;
00163             hl_.writeData(os); os << nl;
00164             cp_.writeData(os); os << nl;
00165             cpg_.writeData(os); os << nl;
00166             B_.writeData(os); os << nl;
00167             mu_.writeData(os); os << nl;
00168             mug_.writeData(os); os << nl;
00169             K_.writeData(os); os << nl;
00170             Kg_.writeData(os); os << nl;
00171             sigma_.writeData(os); os << nl;
00172             D_.writeData(os); os << endl;
00173         }
00174 
00175         //- Ostream Operator
00176         friend Ostream& operator<<(Ostream& os, const nC3H8O& l)
00177         {
00178             l.writeData(os);
00179             return os;
00180         }
00181 };
00182 
00183 
00184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00185 
00186 } // End namespace Foam
00187 
00188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00189 
00190 #include "nC3H8OI.H"
00191 
00192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00193 
00194 #endif
00195 
00196 // ************************************************************************* //
00197 
Copyright © 2000-2009 OpenCFD Ltd