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-2023 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 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
27 
28 inline Foam::label
29 Foam::diameterModels::populationBalanceModel::sourceUpdateInterval() const
30 {
31  return
32  mesh_.solution().solverDict(name_)
33  .lookupOrDefault<label>("sourceUpdateInterval", 1);
34 }
35 
36 
37 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
38 
39 inline const Foam::phaseSystem&
41 {
42  return fluid_;
43 }
44 
45 
48 {
49  return dmdtfs_;
50 }
51 
52 
53 inline const Foam::fvMesh&
55 {
56  return mesh_;
57 }
58 
59 
60 inline const Foam::dictionary&
62 {
63  return dict_;
64 }
65 
66 
68 {
69  return mesh_.solution().solverDict(name_).lookup<label>("nCorr");
70 }
71 
72 
73 inline Foam::Switch
75 {
76  return
77  mesh_.solution().solverDict(name_).lookupOrDefault<bool>
78  (
79  "solveOnFinalIterOnly",
80  false
81  );
82 }
83 
84 
85 inline const Foam::phaseModel&
87 {
88  return continuousPhase_;
89 }
90 
91 
94 {
95  return sizeGroups_;
96 }
97 
98 
99 inline const Foam::volScalarField&
101 {
102  return Sp_[i];
103 }
104 
105 
108 {
109  return coalescencePairs_;
110 }
111 
112 
115 {
116  return binaryBreakupPairs_;
117 }
118 
119 
120 inline const Foam::volScalarField&
122 {
123  if (velocityGroupPtrs_.size() > 1)
124  {
125  return alphas_();
126  }
127  else
128  {
129  return velocityGroupPtrs_.begin()()->phase();
130  }
131 }
132 
133 
134 inline const Foam::volVectorField&
136 {
137  if (velocityGroupPtrs_.size() > 1)
138  {
139  return U_();
140  }
141  else
142  {
143  return velocityGroupPtrs_.begin()()->phase().U();
144  }
145 }
146 
147 
148 // ************************************************************************* //
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 simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:61
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.
const UPtrList< sizeGroup > & sizeGroups() const
Return the size groups belonging to this populationBalance.
Switch solveOnFinalIterOnly() const
Solve on final pimple iteration only.
const phaseModel & continuousPhase() const
Return continuous phase.
const volScalarField & alphas() const
Return total void of phases belonging to this populationBalance.
const dictionary & dict() const
Return populationBalanceCoeffs dictionary.
const fvMesh & mesh() const
Return reference to the mesh.
label nCorr() const
Return the number of corrections.
const volScalarField & Sp(const label i) const
Return implicit source terms.
const phaseSystem::dmdtfTable & dmdtfs() const
Return reference to the interfacial mass transfer rates.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) 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:99
const fvSolution & solution() const
Return the fvSolution.
Definition: fvMesh.C:1762
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:73
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