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 // ************************************************************************* //
populationBalanceModel.H
Foam::PopulationBalancePhaseSystem::massTransfer
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
Definition: PopulationBalancePhaseSystem.C:173
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::PopulationBalancePhaseSystem::pDmdtTable
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > pDmdtTable
Definition: PopulationBalancePhaseSystem.H:64
Foam::PopulationBalancePhaseSystem::pDmdt_
pDmdtTable pDmdt_
Interfacial Mass transfer rate.
Definition: PopulationBalancePhaseSystem.H:73
Foam::glTF::key
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
Definition: foamGltfBase.H:108
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
Foam::phasePairKey
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:65
Foam::PopulationBalancePhaseSystem::dmdts
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
Definition: PopulationBalancePhaseSystem.C:154
Foam::PopulationBalancePhaseSystem::dmdt
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
Definition: PopulationBalancePhaseSystem.C:144
Foam::PopulationBalancePhaseSystem::populationBalances_
PtrList< diameterModels::populationBalanceModel > populationBalances_
populationBalanceModels
Definition: PopulationBalancePhaseSystem.H:70
Foam::PopulationBalancePhaseSystem::solve
virtual void solve()
Solve all population balance equations.
Definition: PopulationBalancePhaseSystem.C:251
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
PopulationBalancePhaseSystem.C
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash >
Foam::PopulationBalancePhaseSystem::pDmdt
virtual tmp< volScalarField > pDmdt(const phasePairKey &key) const
Return the population balance mass transfer rate.
Definition: PopulationBalancePhaseSystem.C:36
Foam::PopulationBalancePhaseSystem::read
virtual bool read()
Read base phaseProperties dictionary.
Definition: PopulationBalancePhaseSystem.C:233
Foam::PopulationBalancePhaseSystem::PopulationBalancePhaseSystem
PopulationBalancePhaseSystem(const fvMesh &)
Construct from fvMesh.
Definition: PopulationBalancePhaseSystem.C:56
Foam::PopulationBalancePhaseSystem
Class which provides population balance functionality.
Definition: PopulationBalancePhaseSystem.H:55
Foam::PopulationBalancePhaseSystem::~PopulationBalancePhaseSystem
virtual ~PopulationBalancePhaseSystem()
Destructor.
Definition: PopulationBalancePhaseSystem.C:135