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-2020 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  // Private data
59 
60  //- Population balances
62 
63  //- Mass transfer rates
65 
66 
67 public:
68 
69  // Constructors
70 
71  //- Construct from fvMesh
73 
74 
75  //- Destructor
77 
78 
79  // Member Functions
80 
81  //- Return the mass transfer rate for an interface
82  virtual tmp<volScalarField> dmdtf(const phasePairKey& key) const;
83 
84  //- Return the mass transfer rates for each phase
85  virtual PtrList<volScalarField> dmdts() const;
86 
87  //- Return the momentum transfer matrices for the cell-based algorithm
89 
90  //- Return the momentum transfer matrices for the face-based algorithm
92 
93  //- Return the heat transfer matrices
95 
96  //- Return the specie transfer matrices
98  specieTransfer() const;
99 
100  //- Read base phaseProperties dictionary
101  virtual bool read();
102 
103  //- Solve all population balance equations
104  virtual void solve
105  (
108  );
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 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);label pRefCell=0;scalar pRefValue=0.0;if(fluid.incompressible()){ p=max(p_rgh+fluid.rho() *gh, pMin);if(p_rgh.needReference()) { setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue);p+=dimensionedScalar("p", p.dimensions(), pRefValue - getRefCellValue(p, pRefCell));p_rgh=p - fluid.rho() *gh;}}mesh.setFluxRequired(p_rgh.name());PtrList< volScalarField > rAUs
Definition: createFields.H:67
virtual tmp< volScalarField > dmdtf(const phasePairKey &key) const
Return the mass transfer rate for an interface.
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 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:78
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
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.