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

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