LiaoCoalescence.C
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) 2021-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 #include "LiaoCoalescence.H"
28 #include "fvcGrad.H"
29 #include "dragModel.H"
30 #include "phaseSystem.H"
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 namespace diameterModels
37 {
38 namespace coalescenceModels
39 {
42  (
46  );
47 }
48 }
49 }
50 
52 
53 
54 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
55 
58 (
59  const populationBalanceModel& popBal,
60  const dictionary& dict
61 )
62 :
63  coalescenceModel(popBal, dict),
64  LiaoBase(popBal, dict),
65  PMax_(dimensionedScalar::lookupOrDefault("PMax", dict, dimless, 0.8)),
66  AH_(dimensionedScalar::lookupOrDefault("AH", dict, dimEnergy, 3.7e-20)),
67  CEff_(dimensionedScalar::lookupOrDefault("CEff", dict, dimless, 2.5)),
68  CTurb_(dimensionedScalar::lookupOrDefault("CTurb", dict, dimless, 1)),
69  CBuoy_(dimensionedScalar::lookupOrDefault("CBuoy", dict, dimless, 1)),
70  CShear_(dimensionedScalar::lookupOrDefault("CShear", dict, dimless, 1)),
71  CEddy_(dimensionedScalar::lookupOrDefault("CEddy", dict, dimless, 1)),
72  CWake_(dimensionedScalar::lookupOrDefault("CWake", dict, dimless, 1)),
73  turbulence_(dict.lookup("turbulence")),
74  buoyancy_(dict.lookup("buoyancy")),
75  laminarShear_(dict.lookup("laminarShear")),
76  eddyCapture_(dict.lookup("eddyCapture")),
77  wakeEntrainment_(dict.lookup("wakeEntrainment")),
78  CPack_
79  (
80  IOobject
81  (
82  "CPack",
83  popBal_.time().name(),
84  popBal_.mesh()
85  ),
86  popBal_.mesh(),
88  (
89  "CPack",
90  dimless,
91  Zero
92  )
93  ),
94  CPackMax_
95  (
96  dimensionedScalar::lookupOrDefault("CPackMax", dict, dimless, 1e5)
97  ),
98  dCrit_
99  (
100  IOobject
101  (
102  "dCrit",
103  popBal_.time().name(),
104  popBal_.mesh()
105  ),
106  popBal_.mesh(),
108  (
109  "dCrit",
110  dimLength,
111  Zero
112  )
113  ),
114  uRelTurb_
115  (
116  IOobject
117  (
118  "uRelTurb",
119  popBal_.time().name(),
120  popBal_.mesh()
121  ),
122  popBal_.mesh(),
124  (
125  "uRelTurb",
126  dimVelocity,
127  Zero
128  )
129  ),
130  uRelBuoy_
131  (
132  IOobject
133  (
134  "uRelBuoy",
135  popBal_.time().name(),
136  popBal_.mesh()
137  ),
138  popBal_.mesh(),
140  (
141  "uRelBuoy",
142  dimVelocity,
143  Zero
144  )
145  ),
146  uRelShear_
147  (
148  IOobject
149  (
150  "uRelShear",
151  popBal_.time().name(),
152  popBal_.mesh()
153  ),
154  popBal_.mesh(),
156  (
157  "uRelShear",
158  dimVelocity,
159  Zero
160  )
161  )
162 {}
163 
164 
165 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
166 
168 {
170 
171  CPack_ = min(PMax_/max(PMax_ - popBal_.alphas(), SMALL), CPackMax_);
172 
174  popBal_.mesh().lookupObject<uniformDimensionedVectorField>("g");
175 
176  dCrit_ =
177  4*sqrt
178  (
179  popBal_.sigmaWithContinuousPhase(popBal_.sizeGroups()[1].phase())()
180  /(mag(g)*(popBal_.continuousPhase().rho()
181  - popBal_.sizeGroups()[1].phase().rho()))
182  );
183 }
184 
185 
188 (
189  volScalarField& coalescenceRate,
190  const label i,
191  const label j
192 )
193 {
194  const phaseModel& continuousPhase = popBal_.continuousPhase();
195  const sizeGroup& fi = popBal_.sizeGroups()[i];
196  const sizeGroup& fj = popBal_.sizeGroups()[j];
197 
198  dimensionedScalar dEq(2*fi.dSph()*fj.dSph()/(fi.dSph() + fj.dSph()));
199  dimensionedScalar Aij(pi*0.25*sqr(fi.dSph() + fj.dSph()));
200 
201  if (turbulence_)
202  {
203  uRelTurb_ =
204  CTurb_*sqrt(2.0)
205  *sqrt(sqr(cbrt(fi.dSph())) + sqr(cbrt(fj.dSph())))
206  *cbrt(popBal_.continuousTurbulence().epsilon());
207  }
208 
209  if (buoyancy_)
210  {
211  uRelBuoy_ = CBuoy_*mag(uTerminal_[i] - uTerminal_[j]);
212  }
213 
214  if (laminarShear_)
215  {
216  uRelShear_ = CShear_*0.5/pi*(fi.dSph() + fj.dSph())*shearStrainRate_;
217  }
218 
219  const volScalarField collisionEfficiency
220  (
221  neg(kolmogorovLengthScale_ - (fi.dSph() + fj.dSph()))
222  *exp
223  (
224  - CEff_*sqrt
225  (
226  continuousPhase.rho()*dEq
227  /popBal_.sigmaWithContinuousPhase(fi.phase())
228  *sqr(max(uRelTurb_, max(uRelBuoy_, uRelShear_)))
229  )
230  )
231  + pos0(kolmogorovLengthScale_ - (fi.dSph() + fj.dSph()))
232  *exp
233  (
234  - 3*continuousPhase.thermo().mu()*dEq*eddyStrainRate_
235  /(4*popBal_.sigmaWithContinuousPhase(fi.phase()))
236  *log
237  (
238  cbrt
239  (
240  pi*popBal_.sigmaWithContinuousPhase(fi.phase())*sqr(dEq)
241  /(32*AH_)
242  )
243  )
244  )
245  );
246 
247  if (turbulence_)
248  {
249  coalescenceRate +=
250  neg(kolmogorovLengthScale_ - (fi.dSph() + fj.dSph()))
251  *CPack_*Aij*uRelTurb_*collisionEfficiency;
252  }
253 
254  if (buoyancy_)
255  {
256  coalescenceRate += CPack_*0.5*Aij*uRelBuoy_*collisionEfficiency;
257  }
258 
259  if (laminarShear_)
260  {
261  coalescenceRate += CPack_*0.5*Aij*uRelShear_*collisionEfficiency;
262  }
263 
264  if (eddyCapture_)
265  {
266  const volScalarField uRelEddy
267  (
268  CEddy_*0.5/pi*(fi.dSph() + fj.dSph())*eddyStrainRate_
269  );
270 
271  coalescenceRate +=
272  pos0(kolmogorovLengthScale_ - (fi.dSph() + fj.dSph()))
273  *CPack_*0.5*Aij*uRelEddy*collisionEfficiency;
274  }
275 
276  if (wakeEntrainment_)
277  {
278  const dimensionedScalar uRelWakeI
279  (
280  CWake_*uTerminal_[i]*cbrt(Cd_[i])
281  );
282 
283  const dimensionedScalar uRelWakeJ
284  (
285  CWake_*uTerminal_[j]*cbrt(Cd_[j])
286  );
287 
288  coalescenceRate +=
289  CPack_*0.125*pi
290  *(
291  sqr(fi.dSph())*uRelWakeI
292  *pos0(fi.dSph() - 0.5*dCrit_)
293  *(
294  pow6(fi.dSph() - 0.5*dCrit_)
295  /(pow6(fi.dSph() - 0.5*dCrit_) + pow6(0.5*dCrit_))
296  )
297  + sqr(fj.dSph())*uRelWakeJ
298  *pos0(fj.dSph() - 0.5*dCrit_)
299  *(
300  pow6(fj.dSph() - 0.5*dCrit_)
301  /(pow6(fj.dSph() - 0.5*dCrit_) + pow6(0.5*dCrit_))
302  )
303  );
304  }
305 }
306 
307 
308 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
Base class for coalescence and breakup models of Liao et al. (2015).
Definition: LiaoBase.H:61
virtual void precompute()
Precompute diameter independent expressions.
Definition: LiaoBase.C:91
Base class for coalescence models.
Bubble coalescence model of Liao et al. (2015). The terminal velocities and drag coefficients are com...
virtual void addToCoalescenceRate(volScalarField &coalescenceRate, const label i, const label j)
Add to coalescenceRate.
virtual void precompute()
Precompute diameter independent expressions.
LiaoCoalescence(const populationBalanceModel &popBal, const dictionary &dict)
Model for tracking the evolution of a dispersed phase size distribution due to coalescence (synonymou...
Single size class fraction field representing a fixed particle volume as defined by the user through ...
Definition: sizeGroup.H:102
const dimensionedScalar & dSph() const
Return representative spherical diameter of the sizeGroup.
Definition: sizeGroupI.H:50
const phaseModel & phase() const
Return const-reference to the phase.
Definition: sizeGroupI.H:36
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
virtual tmp< volScalarField > mu() const =0
Dynamic viscosity of mixture [kg/m/s].
virtual const rhoThermo & thermo() const =0
Return the thermophysical model.
virtual const volScalarField & rho() const =0
Return the density field.
Calculate the gradient of the given field.
addToRunTimeSelectionTable(coalescenceModel, AdachiStuartFokkink, dictionary)
defineTypeNameAndDebug(AdachiStuartFokkink, 0)
Namespace for OpenFOAM.
dimensionedScalar pow6(const dimensionedScalar &ds)
static const zero Zero
Definition: zero.H:97
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedScalar pos0(const dimensionedScalar &ds)
static const scalar SMALL
Definition: scalar.H:115
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 dimensionSet dimEnergy
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimless
const dimensionSet dimLength
dimensionedScalar log(const dimensionedScalar &ds)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar neg(const dimensionedScalar &ds)
const dimensionSet dimVelocity
dimensionedScalar cbrt(const dimensionedScalar &ds)
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
dictionary dict