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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::interfaceCompositionModels::Henry
28
29Description
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
37SourceFiles
38 Henry.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef Henry_H
43#define Henry_H
44
45#include "InterfaceCompositionModel.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52class phasePair;
54namespace interfaceCompositionModels
55{
56
57/*---------------------------------------------------------------------------*\
58 Class Henry Declaration
59\*---------------------------------------------------------------------------*/
60
61template<class Thermo, class OtherThermo>
62class 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
75public:
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// ************************************************************************* //
Base class for interface composition models, templated on the two thermodynamic models either side of...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Henry's law for gas solubility in liquid. The concentration of a dissolved species in the liquid is p...
Definition: Henry.H:64
TypeName("Henry")
Runtime type information.
virtual ~Henry()=default
Destructor.
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
Definition: Henry.C:82
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
Definition: Henry.C:109
const phasePair & pair() const
The phase pair.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:56
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
mesh update()
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73