populationBalanceModelI.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 \*---------------------------------------------------------------------------*/
25 
26 #include "populationBalanceModel.H"
27 #include "populationBalance.H"
28 #include "volFieldsFwd.H"
29 
30 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
31 
32 inline Foam::label Foam::populationBalanceModel::sourceUpdateInterval() const
33 {
34  return solverDict().lookupOrDefault<label>("sourceUpdateInterval", 1);
35 }
36 
37 
38 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
39 
41 {
42  return fluid_;
43 }
44 
45 
47 {
48  return mesh_;
49 }
50 
51 
52 inline const Foam::phaseModel&
54 {
55  return continuousPhase_;
56 }
57 
58 
60 {
61  return phases_.size();
62 }
63 
64 
67 {
68  return phases_;
69 }
70 
71 
74 {
75  return uniquePhases_;
76 }
77 
78 
81 {
82  return diameters_;
83 }
84 
85 
88 {
89  return uniqueDiameters_;
90 }
91 
92 
95 {
96  return fs_;
97 }
98 
99 
101 {
102  return fs_;
103 }
104 
105 
107 (
108  const label i
109 ) const
110 {
111  return fs_[i];
112 }
113 
114 
116 {
117  return fs_[i];
118 }
119 
120 
123 {
124  return dSphs_;
125 }
126 
127 
129 (
130  const label i
131 ) const
132 {
133  return dSphs_[i];
134 }
135 
136 
139 {
140  return vs_;
141 }
142 
143 
145 (
146  const label i
147 ) const
148 {
149  return vs_[i];
150 }
151 
152 
155 {
156  return dmdtfs_;
157 }
158 
159 
162 {
163  return expansionDmdtfs_;
164 }
165 
166 
169 {
170  return modelSourceDmdtfs_;
171 }
172 
173 
175 {
176  return mesh_.solution().solverDict(name_);
177 }
178 
179 
181 {
182  return solverDict().lookupOrDefault<bool>("solveOnFinalIterOnly", false);
183 }
184 
185 
188 {
189  return coalescencePairs_;
190 }
191 
192 
195 {
196  return binaryBreakupPairs_;
197 }
198 
199 
201 {
202  return
203  uniquePhases_.size() > 1
204  ? alphas_()
205  : uniquePhases_.first();
206 }
207 
208 
210 {
211  return
212  uniquePhases_.size() > 1
213  ? tmp<volVectorField>(U_())
214  : uniquePhases_.first().U();
215 }
216 
217 
218 // ************************************************************************* //
Generic GeometricField class.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:91
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
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
T lookupOrDefault(const word &, const T &) const
Find and return a T, if not found return the given default.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:98
Class to represent a system of phases.
Definition: phaseSystem.H:74
const volScalarField & f(const label i) const
Access a group fraction.
const UPtrList< const phaseModel > & uniquePhases() const
Access the minimal list of the phases in this population balance.
const dimensionedScalar & v(const label i) const
Access the representative volumes diameters of a group.
const dmdtfTable & dmdtfs() const
Return reference to the coalescence and breakup interfacial mass.
const PtrList< dimensionedScalar > & dSphs() const
Access the representative spherical diameters of the groups.
const phaseSystem & fluid() const
Return reference to the phaseSystem.
const List< labelPair > & coalescencePairs() const
Return coalescence relevant group pairs.
const List< labelPair > & binaryBreakupPairs() const
Return binary breakup relevant group pairs.
tmp< volVectorField > U() const
Return average velocity.
const dmdtfTable & expansionDmdtfs() const
Return reference to the expansion interfacial mass transfer rates.
bool solveOnFinalIterOnly() const
Solve on final pimple iteration only.
const dmdtfTable & modelSourceDmdtfs() const
Return reference to the model source interfacial mass transfer rates.
const UPtrList< const diameterModels::populationBalance > & diameters() const
Access the list of diameter models associated with each group.
const dimensionedScalar & dSph(const label i) const
Access the representative spherical diameters of a group.
const phaseModel & continuousPhase() const
Return continuous phase.
label nGroups() const
Return the number of groups in the population balance.
const volScalarField & alphas() const
Return total void of phases belonging to this populationBalance.
const UPtrList< const phaseModel > & phases() const
Access the list of phases associated with each group.
const fvMesh & mesh() const
Return reference to the mesh.
const PtrList< volScalarField > & fs() const
Access the group fractions.
const UPtrList< const diameterModels::populationBalance > & uniqueDiameters() const
Access the minimal list of the diameter models in this population.
const PtrList< dimensionedScalar > & vs() const
Access the representative volumes diameters of the groups.
const dictionary & solverDict() const
Return solution settings dictionary for this populationBalance.
A class for managing temporary objects.
Definition: tmp.H:55
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59