1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 The theory in this class is to a very large extent based on the book:
32 'The Properties of Gases & Liquids' 4th ed.
33 by Reid, Prausnitz and Poling
35 For now it does not do much, since the perfect gas equation is used.
37 The dictionary constructor searches for the entry @c liquidComponents,
38 which is a wordList. The liquid properties of each component can either
39 be contained within a @c liquidProperties sub-dictionary or (for legacy
40 purposes) can be found directly in the dictionary.
41 The @c liquidProperties sub-dictionary entry should be used when possible
42 to avoid conflicts with identically named gas-phase entries.
44 A simple example of a single-component liquidMixture:
51 // the gas-phase species
57 // thermo values from BurcatCpData
59 AIR 1 28.96518 // specie: name/nMoles/MolWt
60 200 6000 1000 // low/high/common temperature
61 3.0879272 0.0012459718 -4.2371895e-07 6.7477479e-11 -3.9707697e-15 -995.26275 5.9596093 // 7 upper Temp. coeffs
62 3.5683962 -0.00067872943 1.5537148e-06 -3.2993706e-12 -4.6639539e-13 -1062.3466 3.7158296 // 7 lower Temp. coeffs
63 1.4792e-06 116 // sutherlandTransport for AIR (STAR-CD)
66 H2O 1 18.01528 // specie: name/nMoles/MolWt
67 200 6000 1000 // low/high/common temperature
68 2.6770389 0.0029731816 -7.7376889e-07 9.4433514e-11 -4.2689991e-15 -29885.894 6.88255 // 7 upper Temp. coeffs
69 4.1986352 -0.0020364017 6.5203416e-06 -5.4879269e-09 1.771968e-12 -30293.726 -0.84900901 // 7 lower Temp. coeffs
70 1.4792e-06 116 // sutherlandTransport for AIR (STAR-CD)
75 H2O H2O defaultCoeffs;
79 \*---------------------------------------------------------------------------*/
81 #ifndef liquidMixture_H
82 #define liquidMixture_H
85 #include "scalarField.H"
90 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95 /*---------------------------------------------------------------------------*\
96 Class liquidMixture Declaration
97 \*---------------------------------------------------------------------------*/
103 // maximum reduced temperature
104 static const scalar TrMax;
106 //- The names of the liquids
107 List<word> components_;
109 //- The liquid properties
110 PtrList<liquid> properties_;
118 //- Construct from dictionary
127 //- Select construct from dictionary
128 static autoPtr<liquidMixture> New
136 inline const List<word>& components() const
141 //- Return the liquid properties
142 inline const PtrList<liquid>& properties() const
147 //- Calculate the critical temperature of mixture
148 scalar Tc(const scalarField& x) const;
150 //- Return pseudocritical temperature according to Kay's rule
151 scalar Tpc(const scalarField& x) const;
153 //- Return pseudocritical pressure (modified Prausnitz and Gunn)
154 scalar Ppc(const scalarField& x) const;
156 //- Return mixture accentric factor
157 scalar omega(const scalarField& x) const;
159 //- Return the surface molar fractions
165 const scalarField& xg,
166 const scalarField& xl
170 //- Calculate the mean molecular weight [kg/kmol]
171 // from mole fractions
172 scalar W(const scalarField& x) const;
174 //- Returns the mass fractions, given mole fractions
175 scalarField Y(const scalarField& X) const;
177 //- Returns the mole fractions, given mass fractions
178 scalarField X(const scalarField& Y) const;
180 //- Calculate the mixture density [kg/m^3]
188 //- Calculate the mixture vapour pressure [Pa]
196 //- Calculate the mixture latent heat [J/kg]
204 //- Calculate the mixture heat capacity [J/(kg K)]
212 //- Estimate mixture surface tension [N/m]
220 //- Calculate the mixture viscosity [Pa s]
228 //- Estimate thermal conductivity [W/(m K)]
229 // Li's method, Eq. 10-12.27 - 10.12-19
246 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
248 } // End namespace Foam
250 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
254 // ************************************************************************* //