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

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-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::C8H10
00026 
00027 Description
00028     ethylBenzene
00029 
00030 SourceFiles
00031     C8H10.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef C8H10_H
00036 #define C8H10_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/APIdiffCoefFunc.H>
00048 
00049 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00050 
00051 namespace Foam
00052 {
00053 
00054 /*---------------------------------------------------------------------------*\
00055                            Class C8H10 Declaration
00056 \*---------------------------------------------------------------------------*/
00057 
00058 class C8H10
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         NSRDSfunc6 sigma_;
00076         APIdiffCoefFunc D_;
00077 
00078 
00079 public:
00080 
00081     //- Runtime type information
00082     TypeName("C8H10");
00083 
00084 
00085     // Constructors
00086 
00087         //- Construct null
00088         C8H10();
00089 
00090         // Construct from components
00091         C8H10
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 NSRDSfunc6& surfaceTension,
00106             const APIdiffCoefFunc& vapourDiffussivity
00107         );
00108 
00109         //- Construct from Istream
00110         C8H10(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         //- Vapour diffussivity [m2/s] with specified binary pair
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 C8H10& l)
00180         {
00181             l.writeData(os);
00182             return os;
00183         }
00184 };
00185 
00186 
00187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00188 
00189 } // End namespace Foam
00190 
00191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00192 
00193 #include "C8H10I.H"
00194 
00195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00196 
00197 #endif
00198 
00199 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines