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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015-2018 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::interfaceCompositionModels::Henry
28 
29 Description
30  Henry's law for gas solubility in liquid. The concentration of a dissolved
31  species in the liquid is proportional to its partial pressure in the gas. A
32  dimensionless solubility, \f$k\f$, is given for each species. This is the
33  ratio of the concentration of the species in the liquid to the
34  corresponding concentration in the gas; i.e., \f$k =
35  c_{i,liq}/c_{i,gas}\f$. Mixing in the gas is assumed to be ideal.
36 
37 SourceFiles
38  Henry.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef Henry_H
43 #define Henry_H
44 
45 #include "InterfaceCompositionModel.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 class phasePair;
53 
54 namespace interfaceCompositionModels
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  Class Henry Declaration
59 \*---------------------------------------------------------------------------*/
60 
61 template<class Thermo, class OtherThermo>
62 class Henry
63 :
64  public InterfaceCompositionModel<Thermo, OtherThermo>
65 {
66  // Private data
67 
68  //- Dimensionless solubility coefficients
69  const scalarList k_;
70 
71  //- The remaining solvent species fraction
72  volScalarField YSolvent_;
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("Henry");
79 
80  // Constructors
81 
82  //- Construct from components
83  Henry
84  (
85  const dictionary& dict,
86  const phasePair& pair
87  );
88 
89 
90  //- Destructor
91  virtual ~Henry() = default;
92 
93 
94  // Member Functions
95 
96  //- Update the composition
97  virtual void update(const volScalarField& Tf);
98 
99  //- The interface species fraction
100  virtual tmp<volScalarField> Yf
101  (
102  const word& speciesName,
103  const volScalarField& Tf
104  ) const;
105 
106  //- The interface species fraction derivative w.r.t. temperature
108  (
109  const word& speciesName,
110  const volScalarField& Tf
111  ) const;
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace interfaceCompositionModels
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #ifdef NoRepository
123  #include "Henry.C"
124 #endif
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
Foam::phasePair
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:53
Foam::InterfaceCompositionModel
Base class for interface composition models, templated on the two thermodynamic models either side of...
Definition: InterfaceCompositionModel.H:58
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::interfaceCompositionModel::pair
const phasePair & pair() const
The phase pair.
Definition: interfaceCompositionModel.C:122
Foam::interfaceCompositionModels::Henry::update
virtual void update(const volScalarField &Tf)
Update the composition.
Definition: Henry.C:66
Foam::interfaceCompositionModels::Henry::~Henry
virtual ~Henry()=default
Destructor.
Foam::interfaceCompositionModels::Henry::Henry
Henry(const dictionary &dict, const phasePair &pair)
Construct from components.
Definition: Henry.C:34
Foam::interfaceCompositionModels::Henry::YfPrime
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
Definition: Henry.C:109
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::interfaceCompositionModels::Henry::Yf
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
Definition: Henry.C:82
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Henry.C
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::List< scalar >
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::interfaceCompositionModels::Henry
Henry's law for gas solubility in liquid. The concentration of a dissolved species in the liquid is p...
Definition: Henry.H:61
Foam::interfaceCompositionModels::Henry::TypeName
TypeName("Henry")
Runtime type information.