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

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