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

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-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::CH4N2O
00027 
00028 Description
00029     urea, note that some of the properties are unavailable in the literature
00030     and have been copied from water.
00031 
00032 SourceFiles
00033     CH4N2O.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef CH4N2O_H
00038 #define CH4N2O_H
00039 
00040 #include "liquid.H"
00041 #include "NSRDSfunc0.H"
00042 #include "NSRDSfunc1.H"
00043 #include "NSRDSfunc2.H"
00044 #include "NSRDSfunc3.H"
00045 #include "NSRDSfunc4.H"
00046 #include "NSRDSfunc5.H"
00047 #include "NSRDSfunc6.H"
00048 #include "NSRDSfunc7.H"
00049 #include "NSRDSfunc14.H"
00050 #include "APIdiffCoefFunc.H"
00051 
00052 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00053 
00054 namespace Foam
00055 {
00056 
00057 /*---------------------------------------------------------------------------*\
00058                            Class CH4N2O Declaration
00059 \*---------------------------------------------------------------------------*/
00060 
00061 class CH4N2O
00062 :
00063     public liquid
00064 {
00065     // Private data
00066 
00067         NSRDSfunc0 rho_;
00068         NSRDSfunc1 pv_;
00069         NSRDSfunc6 hl_;
00070         NSRDSfunc0 cp_;
00071         NSRDSfunc0 h_;
00072         NSRDSfunc7 cpg_;
00073         NSRDSfunc4 B_;
00074         NSRDSfunc1 mu_;
00075         NSRDSfunc2 mug_;
00076         NSRDSfunc0 K_;
00077         NSRDSfunc2 Kg_;
00078         NSRDSfunc6 sigma_;
00079         APIdiffCoefFunc D_;
00080 
00081 public:
00082 
00083     //- Runtime type information
00084     TypeName("CH4N2O");
00085 
00086 
00087     // Constructors
00088 
00089         //- Construct null
00090         CH4N2O();
00091 
00092         //- Construct from components
00093         CH4N2O
00094         (
00095             const liquid& l,
00096             const NSRDSfunc0& density,
00097             const NSRDSfunc1& vapourPressure,
00098             const NSRDSfunc6& heatOfVapourisation,
00099             const NSRDSfunc0& heatCapacity,
00100             const NSRDSfunc0& enthalpy,
00101             const NSRDSfunc7& idealGasHeatCapacity,
00102             const NSRDSfunc4& secondVirialCoeff,
00103             const NSRDSfunc1& dynamicViscosity,
00104             const NSRDSfunc2& vapourDynamicViscosity,
00105             const NSRDSfunc0& thermalConductivity,
00106             const NSRDSfunc2& vapourThermalConductivity,
00107             const NSRDSfunc6& surfaceTension,
00108             const APIdiffCoefFunc& vapourDiffussivity
00109         );
00110 
00111         //- Construct from Istream
00112         CH4N2O(Istream& is);
00113 
00114 
00115     // Member Functions
00116 
00117         //- Liquid density [kg/m^3]
00118         inline scalar rho(scalar p, scalar T) const;
00119 
00120         //- Vapour pressure [Pa]
00121         inline scalar pv(scalar p, scalar T) const;
00122 
00123         //- Heat of vapourisation [J/kg]
00124         inline scalar hl(scalar p, scalar T) const;
00125 
00126         //- Liquid heat capacity [J/(kg K)]
00127         inline scalar cp(scalar p, scalar T) const;
00128 
00129         //- Liquid Enthalpy [J/(kg)]
00130         inline scalar h(scalar p, scalar T) const;
00131 
00132         //- Ideal gas heat capacity [J/(kg K)]
00133         inline scalar cpg(scalar p, scalar T) const;
00134 
00135         //- Second Virial Coefficient [m^3/kg]
00136         inline scalar B(scalar p, scalar T) const;
00137 
00138         //- Liquid viscosity [Pa s]
00139         inline scalar mu(scalar p, scalar T) const;
00140 
00141         //- Vapour viscosity [Pa s]
00142         inline scalar mug(scalar p, scalar T) const;
00143 
00144         //- Liquid thermal conductivity  [W/(m K)]
00145         inline scalar K(scalar p, scalar T) const;
00146 
00147         //- Vapour thermal conductivity  [W/(m K)]
00148         inline scalar Kg(scalar p, scalar T) const;
00149 
00150         //- Surface tension [N/m]
00151         inline scalar sigma(scalar p, scalar T) const;
00152 
00153         //- Vapour diffussivity [m2/s]
00154         inline scalar D(scalar p, scalar T) const;
00155 
00156 
00157     // I-O
00158 
00159         //- Write the function coefficients
00160         void writeData(Ostream& os) const
00161         {
00162             liquid::writeData(os); os << nl;
00163             rho_.writeData(os); os << nl;
00164             pv_.writeData(os); os << nl;
00165             hl_.writeData(os); os << nl;
00166             cp_.writeData(os); os << nl;
00167             cpg_.writeData(os); os << nl;
00168             B_.writeData(os); os << nl;
00169             mu_.writeData(os); os << nl;
00170             mug_.writeData(os); os << nl;
00171             K_.writeData(os); os << nl;
00172             Kg_.writeData(os); os << nl;
00173             sigma_.writeData(os); os << nl;
00174             D_.writeData(os); os << endl;
00175         }
00176 
00177         //- Ostream Operator
00178         friend Ostream& operator<<(Ostream& os, const CH4N2O& l)
00179         {
00180             l.writeData(os);
00181             return os;
00182         }
00183 };
00184 
00185 
00186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00187 
00188 } // End namespace Foam
00189 
00190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00191 
00192 #include "CH4N2OI.H"
00193 
00194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00195 
00196 #endif
00197 
00198 // ************************************************************************* //
00199 
Copyright © 2000-2009 OpenCFD Ltd