|
|
|
liquidMixture.HGo 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::liquidMixture 00027 00028 Description 00029 A mixture of liquids. 00030 00031 The theory in this class is to a very large extent based on the book: 00032 'The Properties of Gases & Liquids' 4th ed. 00033 by Reid, Prausnitz and Poling 00034 00035 For now it does not do much, since the perfect gas equation is used. 00036 00037 The dictionary constructor searches for the entry @c liquidComponents, 00038 which is a wordList. The liquid properties of each component can either 00039 be contained within a @c liquidProperties sub-dictionary or (for legacy 00040 purposes) can be found directly in the dictionary. 00041 The @c liquidProperties sub-dictionary entry should be used when possible 00042 to avoid conflicts with identically named gas-phase entries. 00043 00044 A simple example of a single-component liquidMixture: 00045 @verbatim 00046 liquidComponents 00047 ( 00048 H2O 00049 ); 00050 00051 // the gas-phase species 00052 species 00053 ( 00054 AIR H2O 00055 ); 00056 00057 // thermo values from BurcatCpData 00058 AIR 00059 AIR 1 28.96518 // specie: name/nMoles/MolWt 00060 200 6000 1000 // low/high/common temperature 00061 3.0879272 0.0012459718 -4.2371895e-07 6.7477479e-11 -3.9707697e-15 -995.26275 5.9596093 // 7 upper Temp. coeffs 00062 3.5683962 -0.00067872943 1.5537148e-06 -3.2993706e-12 -4.6639539e-13 -1062.3466 3.7158296 // 7 lower Temp. coeffs 00063 1.4792e-06 116 // sutherlandTransport for AIR (STAR-CD) 00064 ; 00065 H2O 00066 H2O 1 18.01528 // specie: name/nMoles/MolWt 00067 200 6000 1000 // low/high/common temperature 00068 2.6770389 0.0029731816 -7.7376889e-07 9.4433514e-11 -4.2689991e-15 -29885.894 6.88255 // 7 upper Temp. coeffs 00069 4.1986352 -0.0020364017 6.5203416e-06 -5.4879269e-09 1.771968e-12 -30293.726 -0.84900901 // 7 lower Temp. coeffs 00070 1.4792e-06 116 // sutherlandTransport for AIR (STAR-CD) 00071 ; 00072 00073 liquidProperties 00074 { 00075 H2O H2O defaultCoeffs; 00076 } 00077 @endverbatim 00078 00079 \*---------------------------------------------------------------------------*/ 00080 00081 #ifndef liquidMixture_H 00082 #define liquidMixture_H 00083 00084 #include "word.H" 00085 #include "scalarField.H" 00086 #include "PtrList.H" 00087 #include "liquid.H" 00088 #include "autoPtr.H" 00089 00090 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00091 00092 namespace Foam 00093 { 00094 00095 /*---------------------------------------------------------------------------*\ 00096 Class liquidMixture Declaration 00097 \*---------------------------------------------------------------------------*/ 00098 00099 class liquidMixture 00100 { 00101 // Private data 00102 00103 // maximum reduced temperature 00104 static const scalar TrMax; 00105 00106 //- The names of the liquids 00107 List<word> components_; 00108 00109 //- The liquid properties 00110 PtrList<liquid> properties_; 00111 00112 00113 public: 00114 00115 00116 // Constructors 00117 00118 //- Construct from dictionary 00119 liquidMixture 00120 ( 00121 const dictionary& 00122 ); 00123 00124 00125 // Selectors 00126 00127 //- Select construct from dictionary 00128 static autoPtr<liquidMixture> New 00129 ( 00130 const dictionary& 00131 ); 00132 00133 00134 // Member Functions 00135 00136 inline const List<word>& components() const 00137 { 00138 return components_; 00139 } 00140 00141 //- Return the liquid properties 00142 inline const PtrList<liquid>& properties() const 00143 { 00144 return properties_; 00145 } 00146 00147 //- Calculate the critical temperature of mixture 00148 scalar Tc(const scalarField& x) const; 00149 00150 //- Return pseudocritical temperature according to Kay's rule 00151 scalar Tpc(const scalarField& x) const; 00152 00153 //- Return pseudocritical pressure (modified Prausnitz and Gunn) 00154 scalar Ppc(const scalarField& x) const; 00155 00156 //- Return mixture accentric factor 00157 scalar omega(const scalarField& x) const; 00158 00159 //- Return the surface molar fractions 00160 scalarField Xs 00161 ( 00162 const scalar p, 00163 const scalar Tg, 00164 const scalar Tl, 00165 const scalarField& xg, 00166 const scalarField& xl 00167 ) const; 00168 00169 00170 //- Calculate the mean molecular weight [kg/kmol] 00171 // from mole fractions 00172 scalar W(const scalarField& x) const; 00173 00174 //- Returns the mass fractions, given mole fractions 00175 scalarField Y(const scalarField& X) const; 00176 00177 //- Returns the mole fractions, given mass fractions 00178 scalarField X(const scalarField& Y) const; 00179 00180 //- Calculate the mixture density [kg/m^3] 00181 scalar rho 00182 ( 00183 const scalar p, 00184 const scalar T, 00185 const scalarField& x 00186 ) const; 00187 00188 //- Calculate the mixture vapour pressure [Pa] 00189 scalar pv 00190 ( 00191 const scalar p, 00192 const scalar T, 00193 const scalarField& x 00194 ) const; 00195 00196 //- Calculate the mixture latent heat [J/kg] 00197 scalar hl 00198 ( 00199 const scalar p, 00200 const scalar T, 00201 const scalarField& x 00202 ) const; 00203 00204 //- Calculate the mixture heat capacity [J/(kg K)] 00205 scalar cp 00206 ( 00207 const scalar p, 00208 const scalar T, 00209 const scalarField& x 00210 ) const; 00211 00212 //- Estimate mixture surface tension [N/m] 00213 scalar sigma 00214 ( 00215 const scalar p, 00216 const scalar T, 00217 const scalarField& x 00218 ) const; 00219 00220 //- Calculate the mixture viscosity [Pa s] 00221 scalar mu 00222 ( 00223 const scalar p, 00224 const scalar T, 00225 const scalarField& x 00226 ) const; 00227 00228 //- Estimate thermal conductivity [W/(m K)] 00229 // Li's method, Eq. 10-12.27 - 10.12-19 00230 scalar K 00231 ( 00232 const scalar p, 00233 const scalar T, 00234 const scalarField& x 00235 ) const; 00236 00237 scalar D 00238 ( 00239 const scalar p, 00240 const scalar T, 00241 const scalarField& x 00242 ) const; 00243 }; 00244 00245 00246 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00247 00248 } // End namespace Foam 00249 00250 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00251 00252 #endif 00253 00254 // ************************************************************************* // |