OpenFOAM logo
Open Source CFD Toolkit

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-2005 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     IDEA
00027     The IDEA fuel is constructed by adding 
00028     30% alphaMethylNaphthalene with 70% n-decane.
00029     The new properties have been calculated by adding the values in these
00030     proportions and making a least square fit, using the same NSRDS-eq.
00031     so that Y = 0.3*Y_naphthalene + 0.7*Y_decane
00032 
00033     The valid Temperature range for n-decane is normally 243.51 - 617.70 K
00034     and for the naphthalene it's 242.67 - 772.04 K
00035     The least square fit was done in the interval 244 - 617 K
00036 
00037     The critical temperature was taken to be 618.074 K, since this
00038     is the 'c'-value in the rho-equation, which corresponds to Tcrit,
00039     This value was then used in the fit for the NSRDS6-eq, which uses Tcrit.
00040     (important for the latent heat and surface tension)
00041 
00042     The molecular weights are 142.20 and 142.285 and for the IDEA fuel
00043     it's thus 142.26 ( approximately 0.3*142.2 + 0.7*142.285)
00044 
00045     Critical pressure was set to the lowest one (n-Decane)
00046 
00047     Critical volume... also the lowest one (naphthalene) 0.523 m^3/kmol
00048 
00049     Second Virial Coefficient is n-Decane
00050 Description
00051 
00052 SourceFiles
00053     IDEA.C
00054 
00055 \*---------------------------------------------------------------------------*/
00056 
00057 #ifndef IDEA_H
00058 #define IDEA_H
00059 
00060 #include "liquid.H"
00061 #include "NSRDSfunc0.H"
00062 #include "NSRDSfunc1.H"
00063 #include "NSRDSfunc2.H"
00064 #include "NSRDSfunc3.H"
00065 #include "NSRDSfunc4.H"
00066 #include "NSRDSfunc5.H"
00067 #include "NSRDSfunc6.H"
00068 #include "NSRDSfunc7.H"
00069 #include "APIdiffCoefFunc.H"
00070 
00071 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00072 
00073 namespace Foam
00074 {
00075 
00076 /*---------------------------------------------------------------------------*\
00077                            Class IDEA Declaration
00078 \*---------------------------------------------------------------------------*/
00079 
00080 class IDEA
00081 :
00082     public liquid
00083 {
00084     // Private data
00085 
00086         NSRDSfunc5 rho_;
00087         NSRDSfunc1 pv_;
00088         NSRDSfunc6 hl_;
00089         NSRDSfunc0 cp_;
00090         NSRDSfunc0 h_;
00091         NSRDSfunc7 cpg_;
00092         NSRDSfunc4 B_;
00093         NSRDSfunc1 mu_;
00094         NSRDSfunc2 mug_;
00095         NSRDSfunc0 K_;
00096         NSRDSfunc2 Kg_;
00097         NSRDSfunc6 sigma_;
00098         APIdiffCoefFunc D_;
00099 
00100 
00101 public:
00102 
00103     //- Runtime type information
00104     TypeName("IDEA");
00105 
00106 
00107     // Constructors
00108 
00109         //- Construct null
00110         IDEA()
00111         :
00112             liquid(142.26, 618.074, 2.11e+6, 0.523, 0.247, 242.67, 3.4929e-2, 447.3, 1.7012e-30, 0.3478, 1.57e+4),
00113             rho_(152.012105, 3.87150382e-1, 618.073893, 4.00790044e-1),
00114             pv_(8.4817774623e+01, -8.6782398353e+03, -9.1277694857, 4.6153144498e-06, 2.0),
00115             hl_(618.074,2.1671983789e+05, -4.2413153435e+00, 1.1656811532e+01, -1.1656446689e+01, 4.3667661492),
00116             cp_(1.6604957e+3, -6.250871e-1, 6.1778552e-3, 0.0, 0.0, 0.0),
00117             // NN: enthalpy, h_, is not used in the sprayModel.
00118             // For consistency, the enthalpy is derived from hlat and hl.
00119             // For this fuel I've put it to zero because I was lazy at the time...
00120             h_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
00121             cpg_(1.0457515243e+03, 3.4410492875e+03, 1.5976862298e+03, 2.4697705752e+03, 7.3699710536e+02),
00122             B_(0.00337351091119935, -4.13606494008504, -534560.916470464, -1.13364022911762e+19, 2.80704220402713e+21),
00123             mu_(-6.9645853822e+01, 4.4390635942e+03, 8.4680722718e+00, 0.0, 0.0),
00124             mug_(4.2629382158e-08, 8.8144402122e-01, 9.6918097636e+01, 0.0),
00125             K_(2.03684e-01, -2.3168e-04, 0.0, 0.0, 0.0, 0.0),
00126             Kg_(-5.664925956707e+02, 8.896721676320e-01, -2.849783998688e+09, 6.914935658053e+05),
00127             sigma_(618.074, 8.3846525429e-03, -1.0044759047e+01, 2.7261918781e+01, -2.5529134309e+01, 8.6488806234),
00128             D_(147.18, 20.1, 142.2, 28) // NN: Same as nHeptane
00129         {}
00130         IDEA
00131         (
00132             const liquid& l,
00133             const NSRDSfunc5& density,
00134             const NSRDSfunc1& vapourPressure,
00135             const NSRDSfunc6& heatOfVapourisation,
00136             const NSRDSfunc0& heatCapacity,
00137             const NSRDSfunc0& enthalpy,
00138             const NSRDSfunc7& idealGasHeatCapacity,
00139             const NSRDSfunc4& secondVirialCoeff,
00140             const NSRDSfunc1& dynamicViscosity,
00141             const NSRDSfunc2& vapourDynamicViscosity,
00142             const NSRDSfunc0& thermalConductivity,
00143             const NSRDSfunc2& vapourThermalConductivity,
00144             const NSRDSfunc6& surfaceTension,
00145             const APIdiffCoefFunc& vapourDiffussivity
00146         )
00147         :
00148             liquid(l),
00149             rho_(density),
00150             pv_(vapourPressure),
00151             hl_(heatOfVapourisation),
00152             cp_(heatCapacity),
00153             h_(enthalpy),
00154             cpg_(idealGasHeatCapacity),
00155             B_(secondVirialCoeff),
00156             mu_(dynamicViscosity),
00157             mug_(vapourDynamicViscosity),
00158             K_(thermalConductivity),
00159             Kg_(vapourThermalConductivity),
00160             sigma_(surfaceTension),
00161             D_(vapourDiffussivity)
00162         {}
00163 
00164         //- Construct from Istream
00165         IDEA(Istream& is)
00166         :
00167             liquid(is),
00168             rho_(is),
00169             pv_(is),
00170             hl_(is),
00171             cp_(is),
00172             h_(is),
00173             cpg_(is),
00174             B_(is),
00175             mu_(is),
00176             mug_(is),
00177             K_(is),
00178             Kg_(is),
00179             sigma_(is),
00180             D_(is)
00181         {}
00182 
00183 
00184     // Member Functions
00185 
00186         //- Liquid density [kg/m^3]
00187         scalar rho(scalar p, scalar T) const
00188         {
00189             return rho_.f(p, T);
00190         }
00191 
00192         //- Vapour pressure [Pa]
00193         scalar pv(scalar p, scalar T) const
00194         {
00195             return pv_.f(p, T);
00196         }
00197 
00198         //- Heat of vapourisation [J/kg]
00199         scalar hl(scalar p, scalar T) const
00200         {
00201             return hl_.f(p, T);
00202         }
00203 
00204         //- Liquid heat capacity [J/(kg K)]
00205         scalar cp(scalar p, scalar T) const
00206         {
00207             return cp_.f(p, T);
00208         }
00209 
00210         //- Liquid Enthalpy [J/(kg)]
00211         scalar h(scalar p, scalar T) const
00212         {
00213             return h_.f(p, T);
00214         }
00215 
00216         //- Ideal gas heat capacity [J/(kg K)]
00217         scalar cpg(scalar p, scalar T) const
00218         {
00219             return cpg_.f(p, T);
00220         }
00221 
00222         //- Second Virial Coefficient [m^3/kg]
00223         scalar B(scalar p, scalar T) const
00224         {
00225             return B_.f(p, T);
00226         }
00227 
00228         //- Liquid viscosity [Pa s]
00229         scalar mu(scalar p, scalar T) const
00230         {
00231             return mu_.f(p, T);
00232         }
00233 
00234         //- Vapour viscosity [Pa s]
00235         scalar mug(scalar p, scalar T) const
00236         {
00237             return mug_.f(p, T);
00238         }
00239 
00240         //- Liquid thermal conductivity  [W/(m K)]
00241         scalar K(scalar p, scalar T) const
00242         {
00243             return K_.f(p, T);
00244         }
00245 
00246         //- Vapour thermal conductivity  [W/(m K)]
00247         scalar Kg(scalar p, scalar T) const
00248         {
00249             return Kg_.f(p, T);
00250         }
00251 
00252         //- Surface tension [N/m]
00253         scalar sigma(scalar p, scalar T) const
00254         {
00255             return sigma_.f(p, T);
00256         }
00257 
00258         //- Vapour diffussivity [m2/s]
00259         scalar D(scalar p, scalar T) const
00260         {
00261             return D_.f(p, T);
00262         }
00263 
00264 
00265         //- Write the function coefficients
00266         void writeData(Ostream& os) const
00267         {
00268             liquid::writeData(os); os << nl;
00269             rho_.writeData(os); os << nl;
00270             pv_.writeData(os); os << nl;
00271             hl_.writeData(os); os << nl;
00272             cp_.writeData(os); os << nl;
00273             cpg_.writeData(os); os << nl;
00274             mu_.writeData(os); os << nl;
00275             mug_.writeData(os); os << nl;
00276             K_.writeData(os); os << nl;
00277             Kg_.writeData(os); os << nl;
00278             sigma_.writeData(os); os << nl;
00279             D_.writeData(os); os << endl;
00280         }
00281 
00282 
00283     // Ostream Operator
00284 
00285         friend Ostream& operator<<(Ostream& os, const IDEA& l)
00286         {
00287             l.writeData(os);
00288             return os;
00289         }
00290 };
00291 
00292 
00293 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00294 
00295 } // End namespace Foam
00296 
00297 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00298 
00299 #endif
00300 
00301 // ************************************************************************* //
For further information go to www.openfoam.org