diffusiveMassTransferModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2015-2025 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::diffusiveMassTransferModel
26 
27 Description
28  Model for diffusive mass transfer coefficients between two phases
29 
30 SourceFiles
31  diffusiveMassTransferModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef diffusiveMassTransferModel_H
36 #define diffusiveMassTransferModel_H
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 #include "volFields.H"
41 #include "dictionary.H"
42 #include "runTimeSelectionTables.H"
44 #include "SidedInterfacialModel.H"
45 
46 namespace Foam
47 {
48 
49 class phaseSystem;
50 
51 /*---------------------------------------------------------------------------*\
52  Class diffusiveMassTransferModel Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 {
57 public:
58 
59  //- Runtime type information
60  TypeName("diffusiveMassTransferModel");
61 
62 
63  // Declare runtime construction
64 
66  (
67  autoPtr,
69  dictionary,
70  (
71  const dictionary& dict,
72  const phaseInterface& interface
73  ),
74  (dict, interface)
75  );
76 
77 
78  // Static Data Members
79 
80  //- Coefficient dimensions
81  static const dimensionSet dimK;
82 
83 
84  // Constructors
85 
86  //- Construct from a dictionary and an interface
88  (
89  const dictionary& dict,
90  const phaseInterface& interface
91  );
92 
93 
94  //- Destructor
96 
97 
98  // Selectors
99 
101  (
102  const dictionary& dict,
103  const phaseInterface& interface
104  );
105 
106 
107  // Member Functions
108 
109  //- The implicit mass transfer coefficient
110  // Note: this has had the species mass diffusivity factored out
111  virtual tmp<volScalarField> K() const = 0;
112 };
113 
114 
115 /*---------------------------------------------------------------------------*\
116  Class blendedDiffusiveMassTransferModel Declaration
117 \*---------------------------------------------------------------------------*/
118 
120 :
121  public BlendedInterfacialModel<diffusiveMassTransferModel>
122 {
123 public:
124 
125  // Constructors
126 
127  //- Inherit base class constructors
128  using
131 
132 
133  // Selectors
134 
136  (
137  const dictionary& dict,
138  const phaseInterface& interface,
139  const dictionary& blendingDict
140  )
141  {
143  (
145  (
146  dict,
147  interface,
149  )
150  );
151  }
152 
153 
154  // Member Functions
155 
156  //- Return the mass transfer coefficient
157  tmp<volScalarField> K() const;
158 };
159 
160 
161 /*---------------------------------------------------------------------------*\
162  Class sidedBlendedDiffusiveMassTransferModel Declaration
163 \*---------------------------------------------------------------------------*/
164 
166 :
167  public SidedInterfacialModel<blendedDiffusiveMassTransferModel>
168 {
169 public:
170 
171  // Constructors
172 
173  //- Inherit base class constructors
174  using
177 
178 
179  // Selectors
180 
182  (
183  const dictionary& dict,
184  const phaseInterface& interface,
185  const dictionary& blendingDict
186  )
187  {
189  (
191  (
192  dict,
193  interface,
195  )
196  );
197  }
198 };
199 
200 
201 /*---------------------------------------------------------------------------*\
202  Class sidedDiffusiveMassTransferModel Declaration
203 \*---------------------------------------------------------------------------*/
204 
206 :
207  public SidedInterfacialModel<diffusiveMassTransferModel>
208 {
209 public:
210 
211  // Constructors
212 
213  //- Inherit base class constructors
214  using
217 
218 
219  // Selectors
220 
222  (
223  const dictionary& dict,
225  )
226  {
228  (
230  );
231  }
232 
233 
234  // Member Functions
235 
236  //- Return the mass transfer coefficient
237  tmp<volScalarField> KinThe(const phaseModel& phase) const;
238 };
239 
240 
241 /*---------------------------------------------------------------------------*\
242  Class blendedSidedDiffusiveMassTransferModel Declaration
243 \*---------------------------------------------------------------------------*/
244 
246 :
247  public BlendedInterfacialModel<sidedDiffusiveMassTransferModel>
248 {
249 public:
250 
251  // Constructors
252 
253  //- Inherit base class constructors
254  using
257 
258 
259  // Selectors
260 
262  (
263  const dictionary& dict,
264  const phaseInterface& interface,
265  const dictionary& blendingDict
266  )
267  {
269  (
271  (
272  dict,
273  interface,
275  )
276  );
277  }
278 
279 
280  // Member Functions
281 
282  //- Return the mass transfer coefficient
283  tmp<volScalarField> KinThe(const phaseModel& phase) const;
284 };
285 
286 
287 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
288 
289 } // End namespace Foam
290 
291 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
292 
293 #endif
294 
295 // ************************************************************************* //
Wrapper class for interfacial models for which multiple instances of the model are used for different...
BlendedInterfacialModel(const dictionary &dict, const phaseInterface &interface, const dictionary &blendingDict, const Args &... args)
Construct from a dictionary, an interface and a blending dictionary.
const phaseInterface & interface() const
Access the interface.
Wrapper class for interfacial models for which two instances of the model are used per interface; one...
const phaseInterface & interface() const
Access the interface.
SidedInterfacialModel(const dictionary &dict, const phaseInterface &interface, const Args &... args)
Construct from a dictionary and an interface.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
static autoPtr< blendedDiffusiveMassTransferModel > New(const dictionary &dict, const phaseInterface &interface, const dictionary &blendingDict)
tmp< volScalarField > K() const
Return the mass transfer coefficient.
tmp< volScalarField > KinThe(const phaseModel &phase) const
Return the mass transfer coefficient.
static autoPtr< blendedSidedDiffusiveMassTransferModel > New(const dictionary &dict, const phaseInterface &interface, const dictionary &blendingDict)
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Model for diffusive mass transfer coefficients between two phases.
static autoPtr< diffusiveMassTransferModel > New(const dictionary &dict, const phaseInterface &interface)
TypeName("diffusiveMassTransferModel")
Runtime type information.
declareRunTimeSelectionTable(autoPtr, diffusiveMassTransferModel, dictionary,(const dictionary &dict, const phaseInterface &interface),(dict, interface))
virtual tmp< volScalarField > K() const =0
The implicit mass transfer coefficient.
diffusiveMassTransferModel(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
static const dimensionSet dimK
Coefficient dimensions.
Dimension set for the base types.
Definition: dimensionSet.H:125
Class to represent an interface between phases. Derivations can further specify the configuration of ...
static autoPtr< sidedBlendedDiffusiveMassTransferModel > New(const dictionary &dict, const phaseInterface &interface, const dictionary &blendingDict)
tmp< volScalarField > KinThe(const phaseModel &phase) const
Return the mass transfer coefficient.
static autoPtr< sidedDiffusiveMassTransferModel > New(const dictionary &dict, const phaseInterface &interface)
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
const dictionary & blendingDict(const phaseSystem &fluid, const dictionary &dict)
Macros to ease declaration of run-time selection tables.
dictionary dict