PopulationBalancePhaseSystem.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) 2017-2018 OpenFOAM Foundation
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::PopulationBalancePhaseSystem
28 
29 Description
30  Class which provides population balance functionality.
31 
32 See also
33  Foam::diameterModels::populationBalanceModel
34 
35 SourceFiles
36  PopulationBalancePhaseSystem.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef PopulationBalancePhaseSystem_H
41 #define PopulationBalancePhaseSystem_H
42 
43 #include "phaseSystem.H"
44 #include "populationBalanceModel.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class PopulationBalancePhaseSystem Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class BasePhaseSystem>
57 :
58  public BasePhaseSystem
59 {
60 protected:
61 
62  // Protected typedefs
63 
65  pDmdtTable;
66 
67 
68  // Protected data
69 
70  //- populationBalanceModels
72 
73  //- Interfacial Mass transfer rate
75 
76 
77  // Protected member functions
78 
79  //- Return the population balance mass transfer rate
80  virtual tmp<volScalarField> pDmdt(const phasePairKey& key) const;
81 
82 
83 public:
84 
85  // Constructors
86 
87  //- Construct from fvMesh
89 
90 
91  //- Destructor
93 
94 
95  // Member Functions
96 
97  //- Return the mass transfer rate for a pair
98  virtual tmp<volScalarField> dmdt(const phasePairKey& key) const;
99 
100  //- Return the mass transfer rates for each phase
101  virtual PtrList<volScalarField> dmdts() const;
102 
103  //- Return the mass transfer matrices
105 
106  //- Read base phaseProperties dictionary
107  virtual bool read();
108 
109  //- Solve all population balance equations
110  virtual void solve();
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #ifdef NoRepository
122 #endif
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
Class which provides population balance functionality.
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
PtrList< diameterModels::populationBalanceModel > populationBalances_
populationBalanceModels
virtual void solve()
Solve all population balance equations.
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:61
virtual tmp< volScalarField > pDmdt(const phasePairKey &key) const
Return the population balance mass transfer rate.
PopulationBalancePhaseSystem(const fvMesh &)
Construct from fvMesh.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
Definition: foamGltfBase.H:103
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition: List.H:55
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
A class for managing temporary objects.
Definition: HashPtrTable.H:50
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > pDmdtTable
virtual bool read()
Read base phaseProperties dictionary.
Namespace for OpenFOAM.
pDmdtTable pDmdt_
Interfacial Mass transfer rate.