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-2020 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"
44 
45 namespace Foam
46 {
47 
48 class phasePair;
49 
50 /*---------------------------------------------------------------------------*\
51  Class phaseTransferModel Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  public regIOobject
57 {
58 protected:
59 
60  // Protected data
61 
62  //- Phase pair
63  const phasePair& pair_;
64 
65 
66 public:
67 
68  //- Runtime type information
69  TypeName("phaseTransferModel");
70 
71 
72  // Declare runtime construction
73 
75  (
76  autoPtr,
78  dictionary,
79  (
80  const dictionary& dict,
81  const phasePair& pair
82  ),
83  (dict, pair)
84  );
85 
86 
87  // Static Data Members
88 
89  //- Mass transfer rate dimensions
90  static const dimensionSet dimDmdt;
91 
92  //- Empty species list
93  static const hashedWordList noSpecies_;
94 
95 
96  // Constructors
97 
98  //- Construct from a dictionary and a phase pair
100  (
101  const dictionary& dict,
102  const phasePair& pair
103  );
104 
105 
106  //- Destructor
107  virtual ~phaseTransferModel();
108 
109 
110  // Selectors
111 
113  (
114  const dictionary& dict,
115  const phasePair& pair
116  );
117 
118 
119  // Member Functions
120 
121  //- Whether or not there is a mass transfer rate for the mixture
122  virtual bool mixture() const;
123 
124  //- The mass transfer rate for the mixture
125  virtual tmp<volScalarField> dmdtf() const;
126 
127  //- The list of individual species that are transferred
128  virtual const hashedWordList& species() const;
129 
130  //- The mass transfer rate for individual species
131  virtual HashPtrTable<volScalarField> dmidtf() const;
132 
133  //- Dummy write for regIOobject
134  bool writeData(Ostream& os) const;
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
phaseTransferModel(const dictionary &dict, const phasePair &pair)
Construct from a dictionary and a phase pair.
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:158
const phasePair & pair_
Phase pair.
TypeName("phaseTransferModel")
Runtime type information.
static const hashedWordList noSpecies_
Empty species list.
virtual ~phaseTransferModel()
Destructor.
A HashTable specialization for hashing pointers.
Definition: HashPtrTable.H:50
declareRunTimeSelectionTable(autoPtr, phaseTransferModel, dictionary,(const dictionary &dict, const phasePair &pair),(dict, pair))
Dimension set for the base types.
Definition: dimensionSet.H:120
virtual bool mixture() const
Whether or not there is a mass transfer rate for the mixture.
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.
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:55
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.
static autoPtr< phaseTransferModel > New(const dictionary &dict, const phasePair &pair)
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.