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-2020 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 
87 inline const Foam::volScalarField&
89 {
90  return SuSp_[i];
91 }
92 
93 
96 {
97  return phasePairs_;
98 }
99 
100 
102 (
103  const phasePair& pair
104 ) const
105 {
106  if
107  (
108  isA<velocityGroup>(pair.phase1().dPtr()())
109  &&
110  isA<velocityGroup>(pair.phase2().dPtr()())
111  )
112  {
113  const velocityGroup& velGroup1 =
114  refCast<const velocityGroup>(pair.phase1().dPtr()());
115 
116  const velocityGroup& velGroup2 =
117  refCast<const velocityGroup>(pair.phase2().dPtr()());
118 
119  return velGroup1.popBalName() == velGroup2.popBalName();
120  }
121 
122  return false;
123 }
124 
125 
128 {
129  return v_;
130 }
131 
132 
133 inline const Foam::volScalarField&
135 {
136  if (velocityGroups_.size() > 1)
137  {
138  return alphas_();
139  }
140  else
141  {
142  return velocityGroups_.first().phase();
143  }
144 }
145 
146 
147 inline const Foam::volVectorField&
149 {
150  if (velocityGroups_.size() > 1)
151  {
152  return U_();
153  }
154  else
155  {
156  return velocityGroups_.first().phase().U();
157  }
158 }
159 
160 
161 // ************************************************************************* //
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 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:158
const PtrList< dimensionedScalar > & v() const
Return the sizeGroup boundaries.
const phaseModel & phase1() const
Return phase 1.
Definition: phasePairI.H:28
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 volScalarField & SuSp(const label i) const
Return semi-implicit source terms.
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:67
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,.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
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.
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:812