PopulationBalancePhaseSystem.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) 2017-2019 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::PopulationBalancePhaseSystem
26 
27 Description
28  Class which provides population balance functionality.
29 
30 See also
31  Foam::diameterModels::populationBalanceModel
32 
33 SourceFiles
34  PopulationBalancePhaseSystem.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef PopulationBalancePhaseSystem_H
39 #define PopulationBalancePhaseSystem_H
40 
41 #include "phaseSystem.H"
42 #include "populationBalanceModel.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class PopulationBalancePhaseSystem Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class BasePhaseSystem>
55 :
56  public BasePhaseSystem
57 {
58 protected:
59 
60  // Protected typedefs
61 
63  pDmdtTable;
64 
65 
66  // Protected data
67 
68  //- populationBalanceModels
70 
71  //- Interfacial Mass transfer rate
72  pDmdtTable pDmdt_;
73 
74 
75  // Protected member functions
76 
77  //- Return the population balance mass transfer rate
78  virtual tmp<volScalarField> pDmdt(const phasePairKey& key) const;
79 
80 
81 public:
82 
83  // Constructors
84 
85  //- Construct from fvMesh
87 
88 
89  //- Destructor
91 
92 
93  // Member Functions
94 
95  //- Return the mass transfer rate for a pair
96  virtual tmp<volScalarField> dmdt(const phasePairKey& key) const;
97 
98  //- Return the mass transfer rates for each phase
99  virtual PtrList<volScalarField> dmdts() const;
100 
101  //- Return the mass transfer matrices
103 
104  //- Read base phaseProperties dictionary
105  virtual bool read();
106 
107  //- Solve all population balance equations
108  virtual void solve();
109 };
110 
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 } // End namespace Foam
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #ifdef NoRepository
120 #endif
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #endif
125 
126 // ************************************************************************* //
Class which provides population balance functionality.
virtual void solve()
Solve all population balance equations.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
virtual ~PopulationBalancePhaseSystem()
Destructor.
PtrList< diameterModels::populationBalanceModel > populationBalances_
populationBalanceModels
PopulationBalancePhaseSystem(const fvMesh &)
Construct from fvMesh.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
virtual bool read()
Read base phaseProperties dictionary.
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > pDmdtTable
virtual tmp< volScalarField > pDmdt(const phasePairKey &key) const
Return the population balance mass transfer rate.
Namespace for OpenFOAM.
pDmdtTable pDmdt_
Interfacial Mass transfer rate.