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-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 \*---------------------------------------------------------------------------*/
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 
46 inline const Foam::fvMesh&
48 {
49  return mesh_;
50 }
51 
52 
53 inline const Foam::dictionary&
55 {
56  return dict_;
57 }
58 
59 
61 {
62  return mesh_.solution().solverDict(name_).lookup<label>("nCorr");
63 }
64 
65 
66 inline Foam::Switch
68 {
69  return
70  mesh_.solution().solverDict(name_).lookupOrDefault<bool>
71  (
72  "solveOnFinalIterOnly",
73  false
74  );
75 }
76 
77 
78 inline const Foam::phaseModel&
80 {
81  return continuousPhase_;
82 }
83 
84 
87 {
88  return velocityGroupPtrs_;
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_[velocityGroupPtrs_.begin().key()]->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
144  velocityGroupPtrs_[velocityGroupPtrs_.begin().key()]->phase().U();
145  }
146 }
147 
148 
149 // ************************************************************************* //
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const volScalarField & Sp(const label i) const
Return implicit source terms.
const volVectorField & U() const
Return average velocity.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
const List< labelPair > & coalescencePairs() const
Return coalescence relevant size group pairs.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
Definition: Switch.H:60
Holds information (coordinate and normal) regarding nearest wall point.
const dictionary & dict() const
Return populationBalanceCoeffs dictionary.
const fvSolution & solution() const
Return the fvSchemes.
Definition: fvMesh.C:1683
const dictionary & solverDict(const word &name) const
Return the solver controls dictionary for the given field.
Definition: solution.C:335
label nCorr() const
Return the number of corrections.
const phaseModel & continuousPhase() const
Return continuous phase.
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:68
const phaseSystem & fluid() const
Return reference to the phaseSystem.
An STL-conforming hash table.
Definition: HashTable.H:61
const UPtrList< sizeGroup > & sizeGroups() const
Return the size groups belonging to this populationBalance.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
const volScalarField & alphas() const
Return total void of phases belonging to this populationBalance.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
const fvMesh & mesh() const
Return reference to the mesh.
const List< labelPair > & binaryBreakupPairs() const
Return binary breakup relevant size group pairs.
Switch solveOnFinalIterOnly() const
Solve on final pimple iteration only.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
const HashTable< const velocityGroup * > & velocityGroupPtrs() const
Return the velocity groups belonging to this populationBalance.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:864