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 
28 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
29 
30 inline Foam::label
31 Foam::diameterModels::populationBalanceModel::sourceUpdateInterval() const
32 {
33  return
34  mesh_.solution().solverDict(name_)
35  .lookupOrDefault<label>("sourceUpdateInterval", 1);
36 }
37 
38 
39 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
40 
41 inline const Foam::phaseSystem&
43 {
44  return fluid_;
45 }
46 
47 
50 {
51  return dmdtfs_;
52 }
53 
54 
57 {
58  return expansionDmdtfs_;
59 }
60 
61 
64 {
65  return modelSourceDmdtfs_;
66 }
67 
68 
69 inline const Foam::fvMesh&
71 {
72  return mesh_;
73 }
74 
75 
76 inline const Foam::dictionary&
78 {
79  return mesh_.solution().solverDict(name_);
80 }
81 
82 
83 inline bool
85 {
86  return solverDict().lookupOrDefault<bool>("solveOnFinalIterOnly", false);
87 }
88 
89 
90 inline const Foam::phaseModel&
92 {
93  return continuousPhase_;
94 }
95 
96 
99 {
100  return sizeGroups_;
101 }
102 
103 
106 {
107  return sizeGroups_;
108 }
109 
110 
113 {
114  return coalescencePairs_;
115 }
116 
117 
120 {
121  return binaryBreakupPairs_;
122 }
123 
124 
125 inline const Foam::volScalarField&
127 {
128  if (velocityGroupPtrs_.size() > 1)
129  {
130  return alphas_();
131  }
132  else
133  {
134  return velocityGroupPtrs_.begin()()->phase();
135  }
136 }
137 
138 
139 inline const Foam::volVectorField&
141 {
142  if (velocityGroupPtrs_.size() > 1)
143  {
144  return U_();
145  }
146  else
147  {
148  return velocityGroupPtrs_.begin()()->phase().U();
149  }
150 }
151 
152 
153 // ************************************************************************* //
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
const dmdtfTable & modelSourceDmdtfs() const
Return reference to the model source interfacial mass transfer rates.
const phaseSystem & fluid() const
Return reference to the phaseSystem.
const List< labelPair > & coalescencePairs() const
Return coalescence relevant size group pairs.
const List< labelPair > & binaryBreakupPairs() const
Return binary breakup relevant size group pairs.
const volVectorField & U() const
Return average velocity.
bool solveOnFinalIterOnly() const
Solve on final pimple iteration only.
const UPtrList< sizeGroup > & sizeGroups() const
Return the size groups belonging to this populationBalance.
const phaseModel & continuousPhase() const
Return continuous phase.
const dmdtfTable & dmdtfs() const
Return reference to the coalescence and breakup interfacial mass.
const volScalarField & alphas() const
Return total void of phases belonging to this populationBalance.
const fvMesh & mesh() const
Return reference to the mesh.
const dmdtfTable & expansionDmdtfs() const
Return reference to the expansion interfacial mass transfer rates.
const dictionary & solverDict() const
Return solution settings dictionary for this populationBalance.
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 bool writeDefault=writeOptionalEntries > 0) 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:96
const fvSolution & solution() const
Return the fvSolution.
Definition: fvMesh.C:1810
Class to represent a system of phases.
Definition: phaseSystem.H:74
const dictionary & solverDict(const word &name) const
Return the solver controls dictionary for the given field.
Definition: solution.C:348
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