Henry.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::Henry
26 
27 Description
28  Henry's law for gas solubiliy in liquid. The concentration of the dissolved
29  species in the liquid is proportional to its partial pressure in the gas.
30  The dimensionless constant of proportionality between concentrations on
31  each side of the interface is \f$k\f$, and is given for each species.
32  Mixing in the gas is assumed to be ideal.
33 
34 SourceFiles
35  Henry.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef Henry_H
40 #define Henry_H
41 
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 class phasePair;
50 
51 namespace interfaceCompositionModels
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class Henry Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 template<class Thermo, class OtherThermo>
59 class Henry
60 :
61  public InterfaceCompositionModel<Thermo, OtherThermo>
62 {
63 private:
64 
65  // Private data
66 
67  //- Solubility coefficients
68  const scalarList k_;
69 
70  //- The remaining solvent species fraction
71  volScalarField YSolvent_;
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("Henry");
78 
79  // Constructors
80 
81  //- Construct from components
82  Henry
83  (
84  const dictionary& dict,
85  const phasePair& pair
86  );
87 
88 
89  //- Destructor
90  virtual ~Henry();
91 
92 
93  // Member Functions
94 
95  //- Update the composition
96  virtual void update(const volScalarField& Tf);
97 
98  //- The interface species fraction
99  virtual tmp<volScalarField> Yf
100  (
101  const word& speciesName,
102  const volScalarField& Tf
103  ) const;
104 
105  //- The interface species fraction derivative w.r.t. temperature
107  (
108  const word& speciesName,
109  const volScalarField& Tf
110  ) const;
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace interfaceCompositionModels
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #ifdef NoRepository
122  #include "Henry.C"
123 #endif
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #endif
128 
129 // ************************************************************************* //
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Base class for interface composition models, templated on the two thermodynamic models either side of...
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
A class for handling words, derived from string.
Definition: word.H:59
Henry(const dictionary &dict, const phasePair &pair)
Construct from components.
virtual void update(const volScalarField &Tf)
Update the composition.
TypeName("Henry")
Runtime type information.
A class for managing temporary objects.
Definition: PtrList.H:54
Namespace for OpenFOAM.