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

CH4N2O.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::CH4N2O
00026 
00027 Description
00028     urea, note that some of the properties are unavailable in the literature
00029     and have been copied from water.
00030 
00031 SourceFiles
00032     CH4N2O.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef CH4N2O_H
00037 #define CH4N2O_H
00038 
00039 #include <liquids/liquid.H>
00040 #include <thermophysicalFunctions/NSRDSfunc0.H>
00041 #include <thermophysicalFunctions/NSRDSfunc1.H>
00042 #include <thermophysicalFunctions/NSRDSfunc2.H>
00043 #include <thermophysicalFunctions/NSRDSfunc3.H>
00044 #include <thermophysicalFunctions/NSRDSfunc4.H>
00045 #include <thermophysicalFunctions/NSRDSfunc5.H>
00046 #include <thermophysicalFunctions/NSRDSfunc6.H>
00047 #include <thermophysicalFunctions/NSRDSfunc7.H>
00048 #include <thermophysicalFunctions/NSRDSfunc14.H>
00049 #include <thermophysicalFunctions/APIdiffCoefFunc.H>
00050 
00051 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00052 
00053 namespace Foam
00054 {
00055 
00056 /*---------------------------------------------------------------------------*\
00057                            Class CH4N2O Declaration
00058 \*---------------------------------------------------------------------------*/
00059 
00060 class CH4N2O
00061 :
00062     public liquid
00063 {
00064     // Private data
00065 
00066         NSRDSfunc0 rho_;
00067         NSRDSfunc1 pv_;
00068         NSRDSfunc6 hl_;
00069         NSRDSfunc0 cp_;
00070         NSRDSfunc0 h_;
00071         NSRDSfunc7 cpg_;
00072         NSRDSfunc4 B_;
00073         NSRDSfunc1 mu_;
00074         NSRDSfunc2 mug_;
00075         NSRDSfunc0 K_;
00076         NSRDSfunc2 Kg_;
00077         NSRDSfunc6 sigma_;
00078         APIdiffCoefFunc D_;
00079 
00080 public:
00081 
00082     //- Runtime type information
00083     TypeName("CH4N2O");
00084 
00085 
00086     // Constructors
00087 
00088         //- Construct null
00089         CH4N2O();
00090 
00091         //- Construct from components
00092         CH4N2O
00093         (
00094             const liquid& l,
00095             const NSRDSfunc0& 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         CH4N2O(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         //- Vapour diffussivity [m2/s] with specified binary pair
00156         inline scalar D(scalar p, scalar T, scalar Wb) const;
00157 
00158 
00159     // I-O
00160 
00161         //- Write the function coefficients
00162         void writeData(Ostream& os) const
00163         {
00164             liquid::writeData(os); os << nl;
00165             rho_.writeData(os); os << nl;
00166             pv_.writeData(os); os << nl;
00167             hl_.writeData(os); os << nl;
00168             cp_.writeData(os); os << nl;
00169             cpg_.writeData(os); os << nl;
00170             B_.writeData(os); os << nl;
00171             mu_.writeData(os); os << nl;
00172             mug_.writeData(os); os << nl;
00173             K_.writeData(os); os << nl;
00174             Kg_.writeData(os); os << nl;
00175             sigma_.writeData(os); os << nl;
00176             D_.writeData(os); os << endl;
00177         }
00178 
00179         //- Ostream Operator
00180         friend Ostream& operator<<(Ostream& os, const CH4N2O& l)
00181         {
00182             l.writeData(os);
00183             return os;
00184         }
00185 };
00186 
00187 
00188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00189 
00190 } // End namespace Foam
00191 
00192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00193 
00194 #include "CH4N2OI.H"
00195 
00196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00197 
00198 #endif
00199 
00200 // ************************ vim: set sw=4 sts=4 et: ************************ //
00201 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines