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

IDEA.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::IDEA
00027 
00028 Description
00029     The IDEA fuel is constructed by adding 30% alphaMethylNaphthalene
00030     with 70% n-decane.
00031 
00032     The new properties have been calculated by adding the values in these
00033     proportions and making a least square fit, using the same NSRDS-eq.
00034     so that Y = 0.3*Y_naphthalene + 0.7*Y_decane
00035 
00036     The valid Temperature range for n-decane is normally 243.51 - 617.70 K
00037     and for the naphthalene it is 242.67 - 772.04 K
00038     The least square fit was done in the interval 244 - 617 K
00039 
00040     The critical temperature was taken to be 618.074 K, since this
00041     is the 'c'-value in the rho-equation, which corresponds to Tcrit,
00042     This value was then used in the fit for the NSRDS6-eq, which uses Tcrit.
00043     (important for the latent heat and surface tension)
00044 
00045     The molecular weights are 142.20 and 142.285 and for the IDEA fuel
00046     it is thus 142.26 ( approximately 0.3*142.2 + 0.7*142.285 )
00047 
00048     Critical pressure was set to the lowest one (n-Decane)
00049 
00050     Critical volume... also the lowest one (naphthalene) 0.523 m^3/kmol
00051 
00052     Second Virial Coefficient is n-Decane
00053 
00054 SourceFiles
00055     IDEA.C
00056 
00057 \*---------------------------------------------------------------------------*/
00058 
00059 #ifndef IDEA_H
00060 #define IDEA_H
00061 
00062 #include "liquid.H"
00063 #include "NSRDSfunc0.H"
00064 #include "NSRDSfunc1.H"
00065 #include "NSRDSfunc2.H"
00066 #include "NSRDSfunc3.H"
00067 #include "NSRDSfunc4.H"
00068 #include "NSRDSfunc5.H"
00069 #include "NSRDSfunc6.H"
00070 #include "NSRDSfunc7.H"
00071 #include "APIdiffCoefFunc.H"
00072 
00073 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00074 
00075 namespace Foam
00076 {
00077 
00078 /*---------------------------------------------------------------------------*\
00079                            Class IDEA Declaration
00080 \*---------------------------------------------------------------------------*/
00081 
00082 class IDEA
00083 :
00084     public liquid
00085 {
00086     // Private data
00087 
00088         NSRDSfunc5 rho_;
00089         NSRDSfunc1 pv_;
00090         NSRDSfunc6 hl_;
00091         NSRDSfunc0 cp_;
00092         NSRDSfunc0 h_;
00093         NSRDSfunc7 cpg_;
00094         NSRDSfunc4 B_;
00095         NSRDSfunc1 mu_;
00096         NSRDSfunc2 mug_;
00097         NSRDSfunc0 K_;
00098         NSRDSfunc2 Kg_;
00099         NSRDSfunc6 sigma_;
00100         APIdiffCoefFunc D_;
00101 
00102 
00103 public:
00104 
00105     //- Runtime type information
00106     TypeName("IDEA");
00107 
00108 
00109     // Constructors
00110 
00111         //- Construct null
00112         IDEA();
00113 
00114         // Construct from components
00115         IDEA
00116         (
00117             const liquid& l,
00118             const NSRDSfunc5& density,
00119             const NSRDSfunc1& vapourPressure,
00120             const NSRDSfunc6& heatOfVapourisation,
00121             const NSRDSfunc0& heatCapacity,
00122             const NSRDSfunc0& enthalpy,
00123             const NSRDSfunc7& idealGasHeatCapacity,
00124             const NSRDSfunc4& secondVirialCoeff,
00125             const NSRDSfunc1& dynamicViscosity,
00126             const NSRDSfunc2& vapourDynamicViscosity,
00127             const NSRDSfunc0& thermalConductivity,
00128             const NSRDSfunc2& vapourThermalConductivity,
00129             const NSRDSfunc6& surfaceTension,
00130             const APIdiffCoefFunc& vapourDiffussivity
00131         );
00132 
00133         //- Construct from Istream
00134         IDEA(Istream& is);
00135 
00136 
00137     // Member Functions
00138 
00139         //- Liquid density [kg/m^3]
00140         inline scalar rho(scalar p, scalar T) const;
00141 
00142         //- Vapour pressure [Pa]
00143         inline scalar pv(scalar p, scalar T) const;
00144 
00145         //- Heat of vapourisation [J/kg]
00146         inline scalar hl(scalar p, scalar T) const;
00147 
00148         //- Liquid heat capacity [J/(kg K)]
00149         inline scalar cp(scalar p, scalar T) const;
00150 
00151         //- Liquid Enthalpy [J/(kg)]
00152         inline scalar h(scalar p, scalar T) const;
00153 
00154         //- Ideal gas heat capacity [J/(kg K)]
00155         inline scalar cpg(scalar p, scalar T) const;
00156 
00157         //- Second Virial Coefficient [m^3/kg]
00158         inline scalar B(scalar p, scalar T) const;
00159 
00160         //- Liquid viscosity [Pa s]
00161         inline scalar mu(scalar p, scalar T) const;
00162 
00163         //- Vapour viscosity [Pa s]
00164         inline scalar mug(scalar p, scalar T) const;
00165 
00166         //- Liquid thermal conductivity  [W/(m K)]
00167         inline scalar K(scalar p, scalar T) const;
00168 
00169         //- Vapour thermal conductivity  [W/(m K)]
00170         inline scalar Kg(scalar p, scalar T) const;
00171 
00172         //- Surface tension [N/m]
00173         inline scalar sigma(scalar p, scalar T) const;
00174 
00175         //- Vapour diffussivity [m2/s]
00176         inline scalar D(scalar p, scalar T) const;
00177 
00178 
00179     // I-O
00180 
00181         //- Write the function coefficients
00182         void writeData(Ostream& os) const
00183         {
00184             liquid::writeData(os); os << nl;
00185             rho_.writeData(os); os << nl;
00186             pv_.writeData(os); os << nl;
00187             hl_.writeData(os); os << nl;
00188             cp_.writeData(os); os << nl;
00189             cpg_.writeData(os); os << nl;
00190             mu_.writeData(os); os << nl;
00191             mug_.writeData(os); os << nl;
00192             K_.writeData(os); os << nl;
00193             Kg_.writeData(os); os << nl;
00194             sigma_.writeData(os); os << nl;
00195             D_.writeData(os); os << endl;
00196         }
00197 
00198         //- Ostream Operator
00199         friend Ostream& operator<<(Ostream& os, const IDEA& l)
00200         {
00201             l.writeData(os);
00202             return os;
00203         }
00204 };
00205 
00206 
00207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00208 
00209 } // End namespace Foam
00210 
00211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00212 
00213 #include "IDEAI.H"
00214 
00215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00216 
00217 #endif
00218 
00219 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd