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-2023 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  //- Mass transfer rate derivative w.r.t pressure dimensions
86  static const dimensionSet dimD2mdtdp;
87 
88  //- Does this model require correcting on fixed flux boundaries?
89  static const bool correctFixedFluxBCs = false;
90 
91  //- Empty species list
92  static const hashedWordList noSpecies_;
93 
94 
95  // Constructors
96 
97  //- Construct from a dictionary and an interface
99  (
100  const dictionary& dict,
101  const phaseInterface& interface
102  );
103 
104 
105  //- Destructor
106  virtual ~phaseTransferModel();
107 
108 
109  // Selectors
110 
112  (
113  const dictionary& dict,
114  const phaseInterface& interface
115  );
116 
117 
118  // Member Functions
119 
120  //- Whether or not there is a mass transfer rate for the mixture
121  virtual bool mixture() const;
122 
123  //- The mass transfer rate for the mixture
124  virtual tmp<volScalarField> dmdtf() const;
125 
126  //- The mass transfer rate derivative w.r.t pressure for the mixture
127  virtual tmp<volScalarField> d2mdtdpf() const;
128 
129  //- The list of individual species that are transferred
130  virtual const hashedWordList& species() const;
131 
132  //- The mass transfer rate for individual species
133  virtual HashPtrTable<volScalarField> dmidtf() const;
134 
135  //- Dummy write for regIOobject
136  bool writeData(Ostream& os) const;
137 };
138 
139 
140 /*---------------------------------------------------------------------------*\
141  Class blendedPhaseTransferModel Declaration
142 \*---------------------------------------------------------------------------*/
143 
145 :
146  public BlendedInterfacialModel<phaseTransferModel>
147 {
148 public:
149 
150  // Constructors
151 
152  //- Inherit base class constructors
153  using
156 
157 
158  // Selectors
159 
161  (
162  const dictionary& dict,
164  );
165 
166 
167  // Member Functions
168 
169  //- Whether or not there is a mass transfer rate for the mixture
170  bool mixture() const;
171 
172  //- The mass transfer rate for the mixture
173  tmp<volScalarField> dmdtf() const;
174 
175  //- The mass transfer rate derivative w.r.t pressure for the mixture
177 
178  //- The list of individual species that are transferred
179  hashedWordList species() const;
180 
181  //- The mass transfer rate for individual species
183 };
184 
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 } // End namespace Foam
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 #endif
193 
194 // ************************************************************************* //
const phaseInterface & interface() const
Access the interface.
BlendedInterfacialModel(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
A HashTable specialisation for hashing pointers.
Definition: HashPtrTable.H:67
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
bool mixture() const
Whether or not there is a mass transfer rate for the mixture.
static autoPtr< blendedPhaseTransferModel > New(const dictionary &dict, const phaseInterface &interface)
hashedWordList species() const
The list of individual species that are transferred.
tmp< volScalarField > d2mdtdpf() const
The mass transfer rate derivative w.r.t pressure for the mixture.
HashPtrTable< volScalarField > dmidtf() const
The mass transfer rate for individual species.
tmp< volScalarField > dmdtf() const
The mass transfer rate for the mixture.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Dimension set for the base types.
Definition: dimensionSet.H:125
A wordList with hashed indices for faster lookup by name.
Class to represent an interface between phases. Derivations can further specify the configuration of ...
virtual bool mixture() const
Whether or not there is a mass transfer rate for the mixture.
virtual ~phaseTransferModel()
Destructor.
static autoPtr< phaseTransferModel > New(const dictionary &dict, const phaseInterface &interface)
bool writeData(Ostream &os) const
Dummy write for regIOobject.
static const bool correctFixedFluxBCs
Does this model require correcting on fixed flux boundaries?
TypeName("phaseTransferModel")
Runtime type information.
virtual tmp< volScalarField > d2mdtdpf() const
The mass transfer rate derivative w.r.t pressure for the mixture.
virtual HashPtrTable< volScalarField > dmidtf() const
The mass transfer rate for individual species.
static const dimensionSet dimD2mdtdp
Mass transfer rate derivative w.r.t pressure dimensions.
virtual tmp< volScalarField > dmdtf() const
The mass transfer rate for the mixture.
static const hashedWordList noSpecies_
Empty species list.
virtual const hashedWordList & species() const
The list of individual species that are transferred.
static const dimensionSet dimDmdt
Mass transfer rate dimensions.
declareRunTimeSelectionTable(autoPtr, phaseTransferModel, dictionary,(const dictionary &dict, const phaseInterface &interface),(dict, interface))
phaseTransferModel(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
dictionary dict