diffusionGasEvaporation.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) 2022 OpenCFD Ltd.
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::meltingEvaporationModels::diffusionGasEvaporation
28 
29 Description
30  Gas diffusion based evaporation/condensation mass transfer model.
31 
32  THE evaporation rate is given by:
33 
34  \f[
35  \hat{m_i} =
36  - C \rho_{g} D_{v,i}
37  \frac
38  {
39  \frac{dY_{v,i}}{dn}
40  }
41  {
42  1 - \; \sum_{1}^{Nv}Y_{g,j}
43  }
44  \f]
45 
46  where:
47  \vartable
48  \hat{m_i} | mass flux rate [kg/s/m2]
49  \rho_{g} | gas phase density
50  D_{v,i} | diffusion coefficient
51  C | model coefficient
52  \frac{dY_{v,i}}{dn} | normal derivative of evaporated component
53  Y_{g,j} | mass fraction at the surface
54  \endvartable
55 
56 Usage
57  Example usage:
58  \verbatim
59  massTransferModel
60  (
61  (liquid to gas)
62  {
63  // Mandatory entries
64  type diffusionGasEvaporation;
65  species vapour.gas;
66  C 1;
67  saturationPressure
68  {
69  type Antoine;
70  A 3.55;
71  B 643;
72  C -198;
73  }
74 
75  // Optional entries
76  isoAlpha <scalar>;
77  Tactivate <scalar>;
78 
79  // Inherited entries
80  ...
81  }
82  );
83  \endverbatim
84 
85  where:
86  \table
87  Property | Description | Type | Reqd | Deflt
88  type | Type name: diffusionGasEvaporation | word | yes | -
89  saturationPressure | Saturation model | dict | yes | -
90  isoAlpha | Iso-alpha for interface | scalar | no | 0.5
91  C | Model coefficient | scalar | yes | -
92  Tactivate | Saturation temperature | scalar | no | 0
93  \endtable
94 
95  The inherited entries are elaborated in:
96  - \link InterfaceCompositionModel.H \endlink
97  - \link saturationModel.H \endlink
98 
99 SourceFiles
100  diffusionGasEvaporation.C
101 
102 \*---------------------------------------------------------------------------*/
103 
104 #ifndef Foam_meltingEvaporationModels_diffusionGasEvaporation_H
105 #define Foam_meltingEvaporationModels_diffusionGasEvaporation_H
106 
107 #include "InterfaceCompositionModel.H"
108 #include "saturationModel.H"
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
111 
112 namespace Foam
113 {
114 
115 // Forward Declarations
116 class phasePair;
117 
118 namespace meltingEvaporationModels
119 {
120 
121 /*---------------------------------------------------------------------------*\
122  Class diffusionGasEvaporation Declaration
123 \*---------------------------------------------------------------------------*/
124 
125 template<class Thermo, class OtherThermo>
126 class diffusionGasEvaporation
127 :
128  public InterfaceCompositionModel<Thermo, OtherThermo>
129 {
130  // Private Data
131 
132  //- Saturation pressure model
133  autoPtr<saturationModel> saturationModelPtr_;
134 
135  //- Interface Iso-value
136  scalar isoAlpha_;
137 
138  //- Evaporation coefficient
140 
141  //- Activation temperature
142  const dimensionedScalar Tactivate_;
143 
144  //- Interface area
145  volScalarField interfaceArea_;
146 
147  //- Mass source
148  volScalarField mDotc_;
149 
150 
151  // Private Member Functions
152 
153  //- Update interface
154  void updateInterface(const volScalarField& T);
155 
156 
157 public:
158 
159  //- Runtime type information
160  TypeName("diffusionGasEvaporation");
161 
162 
163  // Constructors
164 
165  //- Construct from components
167  (
168  const dictionary& dict,
169  const phasePair& pair
170  );
171 
172 
173  //- Destructor
174  virtual ~diffusionGasEvaporation() = default;
175 
176 
177  // Member Functions
178 
179  //- Explicit total mass transfer coefficient
180  virtual tmp<volScalarField> Kexp
181  (
182  const volScalarField& field
183  );
184 
185  //- Implicit mass transfer coefficient
186  virtual tmp<volScalarField> KSp
187  (
188  label modelVariable,
189  const volScalarField& field
190  );
191 
192  //- Explicit mass transfer coefficient
193  virtual tmp<volScalarField> KSu
194  (
195  label modelVariable,
196  const volScalarField& field
197  );
198 
199  //- Return Tactivate
200  virtual const dimensionedScalar& Tactivate() const noexcept
201  {
202  return Tactivate_;
203  }
204 
205  //- Add/subtract alpha*div(U) as a source term
206  //- for alpha, substituting div(U) = mDot(1/rho1 - 1/rho2)
207  virtual bool includeDivU() const noexcept
208  {
209  return true;
210  }
211 };
212 
213 
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 
216 } // End namespace meltingEvaporationModels
217 } // End namespace Foam
218 
219 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
220 
221 #ifdef NoRepository
222 # include "diffusionGasEvaporation.C"
223 #endif
224 
225 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
226 #endif
227 
228 // ************************************************************************* //
dictionary dict
rDeltaTY field()
modelVariable
Enumeration for variable based mass transfer models.
virtual tmp< volScalarField > KSu(label modelVariable, const volScalarField &field)
Explicit mass transfer coefficient.
virtual tmp< volScalarField > KSp(label modelVariable, const volScalarField &field)
Implicit mass transfer coefficient.
virtual bool includeDivU() const noexcept
Add/subtract alpha*div(U) as a source term for alpha, substituting div(U) = mDot(1/rho1 - 1/rho2) ...
TypeName("diffusionGasEvaporation")
Runtime type information.
virtual ~diffusionGasEvaporation()=default
Destructor.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
const direction noexcept
Definition: Scalar.H:258
const phasePair & pair() const
The phase pair.
diffusionGasEvaporation(const dictionary &dict, const phasePair &pair)
Construct from components.
virtual const dimensionedScalar & Tactivate() const noexcept
Return Tactivate.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
virtual tmp< volScalarField > Kexp(const volScalarField &field)
Explicit total mass transfer coefficient.
Namespace for OpenFOAM.