phaseTransferModel.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) 2018-2022 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::phaseTransferModel
26 
27 Description
28 
29 SourceFiles
30  phaseTransferModel.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef phaseTransferModel_H
35 #define phaseTransferModel_H
36 
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 
39 #include "volFields.H"
40 #include "dictionary.H"
41 #include "HashPtrTable.H"
42 #include "hashedWordList.H"
43 #include "runTimeSelectionTables.H"
45 
46 namespace Foam
47 {
48 
49 class phaseSystem;
50 
51 /*---------------------------------------------------------------------------*\
52  Class phaseTransferModel Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public regIOobject
58 {
59 public:
60 
61  //- Runtime type information
62  TypeName("phaseTransferModel");
63 
64 
65  // Declare runtime construction
66 
68  (
69  autoPtr,
71  dictionary,
72  (
73  const dictionary& dict,
74  const phaseInterface& interface
75  ),
76  (dict, interface)
77  );
78 
79 
80  // Static Data Members
81 
82  //- Mass transfer rate dimensions
83  static const dimensionSet dimDmdt;
84 
85  //- Does this model require correcting on fixed flux boundaries?
86  static const bool correctFixedFluxBCs = false;
87 
88  //- Empty species list
89  static const hashedWordList noSpecies_;
90 
91 
92  // Constructors
93 
94  //- Construct from a dictionary and an interface
96  (
97  const dictionary& dict,
98  const phaseInterface& interface
99  );
100 
101 
102  //- Destructor
103  virtual ~phaseTransferModel();
104 
105 
106  // Selectors
107 
109  (
110  const dictionary& dict,
111  const phaseInterface& interface
112  );
113 
114 
115  // Member Functions
116 
117  //- Whether or not there is a mass transfer rate for the mixture
118  virtual bool mixture() const;
119 
120  //- The mass transfer rate for the mixture
121  virtual tmp<volScalarField> dmdtf() const;
122 
123  //- The list of individual species that are transferred
124  virtual const hashedWordList& species() const;
125 
126  //- The mass transfer rate for individual species
127  virtual HashPtrTable<volScalarField> dmidtf() const;
128 
129  //- Dummy write for regIOobject
130  bool writeData(Ostream& os) const;
131 };
132 
133 
134 /*---------------------------------------------------------------------------*\
135  Class blendedPhaseTransferModel Declaration
136 \*---------------------------------------------------------------------------*/
139 :
140  public BlendedInterfacialModel<phaseTransferModel>
141 {
142 public:
143 
144  // Constructors
145 
146  //- Inherit base class constructors
147  using
149  BlendedInterfacialModel;
150 
151 
152  // Selectors
153 
155  (
156  const dictionary& dict,
157  const phaseInterface& interface
158  );
159 
160 
161  // Member Functions
162 
163  //- Whether or not there is a mass transfer rate for the mixture
164  bool mixture() const;
165 
166  //- The mass transfer rate for the mixture
167  tmp<volScalarField> dmdtf() const;
168 
169  //- The list of individual species that are transferred
170  hashedWordList species() const;
171 
172  //- The mass transfer rate for individual species
174 };
175 
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 } // End namespace Foam
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 #endif
184 
185 // ************************************************************************* //
dictionary dict
virtual const hashedWordList & species() const
The list of individual species that are transferred.
static const dimensionSet dimDmdt
Mass transfer rate dimensions.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
TypeName("phaseTransferModel")
Runtime type information.
static autoPtr< phaseTransferModel > New(const dictionary &dict, const phaseInterface &interface)
static const hashedWordList noSpecies_
Empty species list.
virtual ~phaseTransferModel()
Destructor.
A HashTable specialisation for hashing pointers.
Definition: HashPtrTable.H:50
Class to represent an interface between phases. Derivations can further specify the configuration of ...
Dimension set for the base types.
Definition: dimensionSet.H:121
static const bool correctFixedFluxBCs
Does this model require correcting on fixed flux boundaries?
virtual bool mixture() const
Whether or not there is a mass transfer rate for the mixture.
phaseTransferModel(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
virtual tmp< volScalarField > dmdtf() const
The mass transfer rate for the mixture.
bool writeData(Ostream &os) const
Dummy write for regIOobject.
declareRunTimeSelectionTable(autoPtr, phaseTransferModel, dictionary,(const dictionary &dict, const phaseInterface &interface),(dict, interface))
A wordList with hashed indices for faster lookup by name.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:52
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Definition: PtrList.H:53
virtual HashPtrTable< volScalarField > dmidtf() const
The mass transfer rate for individual species.
Namespace for OpenFOAM.