populationBalanceSystem.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-2025 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::populationBalanceSystem
26 
27 Description
28  Class which provides population balance functionality. Holds a number of
29  population balances and provides access to the transfers that result from
30  the population balance interactions.
31 
32 See also
33  Foam::diameterModels::populationBalanceModel
34 
35 SourceFiles
36  populationBalanceSystem.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef populationBalanceSystem_H
41 #define populationBalanceSystem_H
42 
43 #include "phaseSystem.H"
44 #include "populationBalanceModel.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class populationBalanceSystem Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 {
57  // Private Data
58 
59  //- Reference to the phase system
60  const phaseSystem& fluid_;
61 
62  //- Population balances
64 
65 
66  // Private Member Functions
67 
68  //- Add interface mass transfer rates to phase-mass transfer rates
69  void addDmdts
70  (
73  ) const;
74 
75  //- Add momentum transfer terms which result from mass transfers
76  void addDmdtUfs
77  (
80  ) const;
81 
82  //- Add energy transfer terms which result from mass transfers
83  void addDmdtHefs
84  (
87  ) const;
88 
89  //- Add specie transfer terms which result from mass transfers
90  void addDmdtYfs
91  (
94  ) const;
95 
96 
97 public:
98 
99  //- Runtime type information
100  TypeName("populationBalanceSystem");
101 
102 
103  // Constructors
104 
105  //- Construct from a phase system
107 
108 
109  //- Destructor
110  virtual ~populationBalanceSystem();
111 
112 
113  // Member Functions
114 
115  //- Return the mass transfer rates for each phase
117 
118  //- Return the momentum transfer matrices for the cell-based algorithm
120 
121  //- Return the momentum transfer matrices for the face-based algorithm
123 
124  //- Return the heat transfer matrices
126 
127  //- Return the specie transfer matrices
129 
130  //- Solve all population balance equations
131  void solve();
132 
133  //- Correct the population balances
134  void correct();
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Class to represent a system of phases.
Definition: phaseSystem.H:74
Class which provides population balance functionality. Holds a number of population balances and prov...
TypeName("populationBalanceSystem")
Runtime type information.
void correct()
Correct the population balances.
autoPtr< HashPtrTable< fvVectorMatrix > > momentumTransferf()
Return the momentum transfer matrices for the face-based algorithm.
autoPtr< HashPtrTable< fvScalarMatrix > > specieTransfer() const
Return the specie transfer matrices.
autoPtr< HashPtrTable< fvScalarMatrix > > heatTransfer() const
Return the heat transfer matrices.
populationBalanceSystem(const phaseSystem &)
Construct from a phase system.
PtrList< volScalarField::Internal > dmdts() const
Return the mass transfer rates for each phase.
autoPtr< HashPtrTable< fvVectorMatrix > > momentumTransfer()
Return the momentum transfer matrices for the cell-based algorithm.
void solve()
Solve all population balance equations.
virtual ~populationBalanceSystem()
Destructor.
Namespace for OpenFOAM.