All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-2021 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 Foam::diameterModels::populationBalanceModel::nCorr() const
29 {
30  return mesh_.solverDict(name_).lookup<label>("nCorr");
31 }
32 
33 
34 inline Foam::label
35 Foam::diameterModels::populationBalanceModel::sourceUpdateInterval() const
36 {
37  return
38  mesh_.solverDict(name_)
39  .lookupOrDefault<label>("sourceUpdateInterval", 1);
40 }
41 
42 
43 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
44 
45 inline const Foam::phaseSystem&
47 {
48  return fluid_;
49 }
50 
51 
52 inline const Foam::fvMesh&
54 {
55  return mesh_;
56 }
57 
58 
59 inline const Foam::dictionary&
61 {
62  return dict_;
63 }
64 
65 
66 inline const Foam::phaseModel&
68 {
69  return continuousPhase_;
70 }
71 
72 
75 {
76  return velocityGroups_;
77 }
78 
79 
82 {
83  return sizeGroups_;
84 }
85 
86 
89 {
90  return phasePairs_;
91 }
92 
93 
94 inline const Foam::volScalarField&
96 {
97  return Sp_[i];
98 }
99 
100 
103 {
104  return coalescencePairs_;
105 }
106 
107 
110 {
111  return binaryBreakupPairs_;
112 }
113 
114 
115 inline const Foam::volScalarField&
117 {
118  if (velocityGroups_.size() > 1)
119  {
120  return alphas_();
121  }
122  else
123  {
124  return velocityGroups_.first().phase();
125  }
126 }
127 
128 
129 inline const Foam::volVectorField&
131 {
132  if (velocityGroups_.size() > 1)
133  {
134  return U_();
135  }
136  else
137  {
138  return velocityGroups_.first().phase().U();
139  }
140 }
141 
142 
144 (
145  const phasePair& pair
146 ) const
147 {
148  if
149  (
150  isA<velocityGroup>(pair.phase1().dPtr()())
151  &&
152  isA<velocityGroup>(pair.phase2().dPtr()())
153  )
154  {
155  const velocityGroup& velGroup1 =
156  refCast<const velocityGroup>(pair.phase1().dPtr()());
157 
158  const velocityGroup& velGroup2 =
159  refCast<const velocityGroup>(pair.phase2().dPtr()());
160 
161  return velGroup1.popBalName() == velGroup2.popBalName();
162  }
163 
164  return false;
165 }
166 
167 
168 // ************************************************************************* //
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
const volScalarField & Sp(const label i) const
Return implicit source terms.
const phaseModel & phase2() const
Return phase 2.
Definition: phasePairI.H:34
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 phaseModel & phase1() const
Return phase 1.
Definition: phasePairI.H:28
const List< labelPair > & coalescencePairs() const
Return coalescence relevant size group pairs.
bool isVelocityGroupPair(const phasePair &pair) const
Returns true if both phases are velocity groups and.
const phasePairTable & phasePairs() const
Return list of unordered phasePairs in this populationBalance.
const dictionary & dict() const
Return populationBalanceCoeffs dictionary.
This diameterModel is intended for use with a populationBalanceModel in order to simulate polydispers...
const dictionary & solverDict(const word &name) const
Return the solver controls dictionary for the given field.
Definition: solution.C:342
const word & popBalName() const
Return name of populationBalance this velocityGroup belongs to.
const UPtrList< velocityGroup > & velocityGroups() const
Return the velocityGroups belonging to this populationBalance.
const phaseModel & continuousPhase() const
Return continuous phase.
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:70
const phaseSystem & fluid() const
Return reference to the phaseSystem.
const UPtrList< sizeGroup > & sizeGroups() const
Return the sizeGroups 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:78
const autoPtr< diameterModel > & dPtr() const
Return const-reference to diameterModel of the phase.
const fvMesh & mesh() const
Return reference to the mesh.
const List< labelPair > & binaryBreakupPairs() const
Return binary breakup relevant size group pairs.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:844