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-2022 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. Stores the mass
29  transfer rates resulting from coalescence, breakup or drift across
30  representative phases that collectively define a dispersed phase.
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  // Private data
61 
62  //- Population balances
64 
65  //- Mass transfer rates
67 
68 
69 public:
70 
71  // Constructors
72 
73  //- Construct from fvMesh
75 
76 
77  //- Destructor
79 
80 
81  // Member Functions
82 
83  //- Return the mass transfer rate for an interface
84  virtual tmp<volScalarField> dmdtf(const phaseInterfaceKey& key) const;
85 
86  //- Return the mass transfer rates for each phase
87  virtual PtrList<volScalarField> dmdts() const;
88 
89  //- Return the momentum transfer matrices for the cell-based algorithm
91 
92  //- Return the momentum transfer matrices for the face-based algorithm
94 
95  //- Return the heat transfer matrices
97 
98  //- Return the specie transfer matrices
100  specieTransfer() const;
101 
102  //- Solve all population balance equations
103  virtual void solve
104  (
107  );
108 
109  //- Correct derived properties
110  virtual void correct();
111 
112  //- Read base phaseProperties dictionary
113  virtual bool read();
114 };
115 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #ifdef NoRepository
125 #endif
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
Class which provides population balance functionality. Stores the mass transfer rates resulting from ...
Word-pair based class used for keying interface models in hash tables.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
virtual ~PopulationBalancePhaseSystem()
Destructor.
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);if(fluid.found("pMin")){ IOWarningInFunction(fluid)<< "Pressure limits, pMin and pMax, are now read from "<< pimple.dict().name()<< endl;}pressureReference pressureReference(p, p_rgh, pimple.dict(), fluid.incompressible());if(fluid.incompressible()){ p=p_rgh+fluid.rho() *gh;}if(p_rgh.needReference() &&fluid.incompressible()){ p+=dimensionedScalar("p", p.dimensions(), pressureReference.refValue() - getRefCellValue(p, pressureReference.refCell()));}p_rgh=p - fluid.rho() *gh;mesh.schemes().setFluxRequired(p_rgh.name());PtrList< volScalarField > rAUs
Definition: createFields.H:67
virtual void solve(const PtrList< volScalarField > &rAUs, const PtrList< surfaceScalarField > &rAUfs)
Solve all population balance equations.
virtual autoPtr< phaseSystem::momentumTransferTable > momentumTransfer()
Return the momentum transfer matrices for the cell-based algorithm.
virtual void correct()
Correct derived properties.
virtual autoPtr< phaseSystem::momentumTransferTable > momentumTransferf()
Return the momentum transfer matrices for the face-based algorithm.
PtrList< surfaceScalarField > rAUfs
Definition: createFields.H:68
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:95
virtual autoPtr< phaseSystem::specieTransferTable > specieTransfer() const
Return the specie transfer matrices.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
virtual tmp< volScalarField > dmdtf(const phaseInterfaceKey &key) const
Return the mass transfer rate for an interface.
A class for managing temporary objects.
Definition: PtrList.H:53
virtual bool read()
Read base phaseProperties dictionary.
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Return the heat transfer matrices.
Namespace for OpenFOAM.