OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

liquidMixture.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-2007 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     liquidMixture
00027     
00028 Description
00029     The theory in this class is to a very large extent based on the book:
00030     'The Properties of Gases & Liquids' 4th ed.
00031     by Reid, Prausnitz and Poling
00032 
00033     For now it does not do much, since the perfect gas eq. is used.
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef liquidMixture_H
00038 #define liquidMixture_H
00039 
00040 #include "word.H"
00041 #include "scalarField.H"
00042 #include "PtrList.H"
00043 #include "liquid.H"
00044 #include "autoPtr.H"
00045 
00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00047 
00048 namespace Foam
00049 {
00050 
00051 /*---------------------------------------------------------------------------*\
00052                            Class liquidMixture Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 class liquidMixture
00056 {
00057     // Private data
00058 
00059         // maximum reduced temperature
00060         static const scalar TrMax;
00061 
00062         //- The names of the liquids
00063         List<word> components_;
00064 
00065         //- The liquid properties
00066         PtrList<liquid> properties_;
00067 
00068 
00069 public:
00070 
00071 
00072     // Constructors
00073 
00074         //- Construct from dictionary
00075         liquidMixture
00076         (
00077             const dictionary&
00078         );
00079 
00080 
00081     // Selectors
00082 
00083         //- Select construct from dictionary
00084         static autoPtr<liquidMixture> New
00085         (
00086             const dictionary&
00087         );
00088 
00089 
00090     // Member Functions
00091 
00092         inline const List<word>& components() const
00093         {
00094             return components_;
00095         }
00096 
00097         //- Return the liquid properties
00098         inline const PtrList<liquid>& properties() const
00099         {
00100             return properties_;
00101         }
00102 
00103         //- Calculate the critical temperature of mixture
00104         scalar Tc(const scalarField& x) const;
00105 
00106         //- Return pseudocritical temperature according to Kay's rule
00107         scalar Tpc(const scalarField& x) const;
00108 
00109         //- Return pseudocritical pressure (modified Prausnitz and Gunn)
00110         scalar Ppc(const scalarField& x) const;
00111 
00112         //- Return mixture accentric factor
00113         scalar omega(const scalarField& x) const;
00114     
00115         //- Return the surface molar fractions
00116         scalarField Xs
00117         (
00118             const scalar p,
00119             const scalar Tg,
00120             const scalar Tl,
00121             const scalarField& xg,
00122             const scalarField& xl
00123         ) const;
00124 
00125 
00126         //- Calculate the mean molecular weigth [kg/kmol]
00127         // from mole fractions
00128         scalar W(const scalarField& x) const;
00129 
00130         //- Returns the mass fractions, given mole fractions
00131         scalarField Y(const scalarField& X) const;
00132 
00133         //- Returns the mole fractions, given mass fractions
00134         scalarField X(const scalarField& Y) const;
00135 
00136         //- Calculate the mixture density [kg/m^3]
00137         scalar rho
00138         (
00139             const scalar p,
00140             const scalar T,
00141             const scalarField& x
00142         ) const;
00143 
00144         //- Calculate the mixture vapour pressure [Pa]
00145         scalar pv
00146         (
00147             const scalar p, 
00148             const scalar T,
00149             const scalarField& x
00150         ) const;
00151 
00152         //- Calculate the mixture latent heat [J/kg]
00153         scalar hl
00154         (
00155             const scalar p, 
00156             const scalar T,
00157             const scalarField& x
00158         ) const;
00159 
00160         //- Calculate the mixture heat capacity [J/(kg K)]
00161         scalar cp
00162         (
00163             const scalar p, 
00164             const scalar T,
00165             const scalarField& x
00166         ) const;
00167 
00168         //- Estimate mixture surface tension [N/m]
00169         scalar sigma
00170         (
00171             const scalar p, 
00172             const scalar T,
00173             const scalarField& x
00174         ) const;
00175 
00176         //- Calculate the mixture viscosity [Pa s]
00177         scalar mu
00178         (
00179             const scalar p,
00180             const scalar T,
00181             const scalarField& x
00182         ) const;
00183 
00184         //- Estimate thermal conductivity  [W/(m K)]
00185         // Li's method, Eq. 10-12.27 - 10.12-19
00186         scalar K
00187         (
00188             const scalar p, 
00189             const scalar T,
00190             const scalarField& x
00191         ) const;
00192 
00193         scalar D
00194         (
00195             const scalar p, 
00196             const scalar T,
00197             const scalarField& x
00198         ) const;
00199 };
00200 
00201 
00202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00203 
00204 } // End namespace Foam
00205 
00206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00207 
00208 #endif
00209 
00210 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd