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-2025 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"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace diameterModels
36 {
37 namespace coalescenceModels
38 {
41  (
45  );
46 }
47 }
48 }
49 
51 
52 
53 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
54 
56 (
57  const populationBalanceModel& popBal,
58  const dictionary& dict
59 )
60 :
61  coalescenceModel(popBal, dict),
62  LiaoBase(popBal, dict),
63  PMax_("PMax", dimless, dict, 0.8),
64  AH_("AH", dimEnergy, dict, 3.7e-20),
65  CEff_("CEff", dimless, dict, 2.5),
66  CTurb_("CTurb", dimless, dict, 1),
67  CBuoy_("CBuoy", dimless, dict, 1),
68  CShear_("CShear", dimless, dict, 1),
69  CEddy_("CEddy", dimless, dict, 1),
70  CWake_("CWake", dimless, dict, 1),
71  turbulence_(dict.lookup("turbulence")),
72  buoyancy_(dict.lookup("buoyancy")),
73  laminarShear_(dict.lookup("laminarShear")),
74  eddyCapture_(dict.lookup("eddyCapture")),
75  wakeEntrainment_(dict.lookup("wakeEntrainment")),
76  CPack_
77  (
78  IOobject
79  (
80  "CPack",
81  popBal_.time().name(),
82  popBal_.mesh()
83  ),
84  popBal_.mesh(),
86  (
87  "CPack",
88  dimless,
89  Zero
90  )
91  ),
92  CPackMax_("CPackMax", dimless, dict, 1e5),
93  dCrit_
94  (
95  IOobject
96  (
97  "dCrit",
98  popBal_.time().name(),
99  popBal_.mesh()
100  ),
101  popBal_.mesh(),
103  (
104  "dCrit",
105  dimLength,
106  Zero
107  )
108  ),
109  uRelTurb_
110  (
111  IOobject
112  (
113  "uRelTurb",
114  popBal_.time().name(),
115  popBal_.mesh()
116  ),
117  popBal_.mesh(),
119  (
120  "uRelTurb",
121  dimVelocity,
122  Zero
123  )
124  ),
125  uRelBuoy_
126  (
127  IOobject
128  (
129  "uRelBuoy",
130  popBal_.time().name(),
131  popBal_.mesh()
132  ),
133  popBal_.mesh(),
135  (
136  "uRelBuoy",
137  dimVelocity,
138  Zero
139  )
140  ),
141  uRelShear_
142  (
143  IOobject
144  (
145  "uRelShear",
146  popBal_.time().name(),
147  popBal_.mesh()
148  ),
149  popBal_.mesh(),
151  (
152  "uRelShear",
153  dimVelocity,
154  Zero
155  )
156  )
157 {}
158 
159 
160 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
161 
163 {
165 
166  CPack_ = min(PMax_/max(PMax_ - popBal_.alphas(), small), CPackMax_);
167 
168  const sizeGroup& f0 = popBal_.sizeGroups().first();
169 
170  const volScalarField::Internal& rhoc = popBal_.continuousPhase().rho();
171 
172  tmp<volScalarField> tsigma(popBal_.sigmaWithContinuousPhase(f0.phase()));
173  const volScalarField::Internal& sigma = tsigma();
174 
176  popBal_.mesh().lookupObject<uniformDimensionedVectorField>("g");
177 
178  dCrit_ = 4*sqrt(sigma/(mag(g)*(rhoc - f0.phase().rho()())));
179 }
180 
181 
184 (
185  volScalarField::Internal& coalescenceRate,
186  const label i,
187  const label j
188 )
189 {
190  const sizeGroup& fi = popBal_.sizeGroups()[i];
191  const sizeGroup& fj = popBal_.sizeGroups()[j];
192 
193  const volScalarField::Internal& rhoc = popBal_.continuousPhase().rho();
194 
195  tmp<volScalarField> tsigma(popBal_.sigmaWithContinuousPhase(fi.phase()));
196  const volScalarField::Internal& sigma = tsigma();
197 
198  tmp<volScalarField> tmuc(popBal_.continuousPhase().fluidThermo().mu());
199  const volScalarField::Internal& muc = tmuc();
200 
201  dimensionedScalar dEq(2*fi.dSph()*fj.dSph()/(fi.dSph() + fj.dSph()));
202  dimensionedScalar Aij(pi*0.25*sqr(fi.dSph() + fj.dSph()));
203 
204  if (turbulence_)
205  {
206  tmp<volScalarField> tepsilonc(popBal_.continuousTurbulence().epsilon());
207  const volScalarField::Internal& epsilonc = tepsilonc();
208 
209  uRelTurb_ =
210  CTurb_*sqrt(2.0)
211  *sqrt(sqr(cbrt(fi.dSph())) + sqr(cbrt(fj.dSph())))
212  *cbrt(epsilonc);
213  }
214 
215  if (buoyancy_)
216  {
217  uRelBuoy_ = CBuoy_*mag(uTerminal_[i] - uTerminal_[j]);
218  }
219 
220  if (laminarShear_)
221  {
222  uRelShear_ = CShear_*0.5/pi*(fi.dSph() + fj.dSph())*shearStrainRate_;
223  }
224 
225  const volScalarField::Internal collisionEfficiency
226  (
227  neg(kolmogorovLengthScale_ - (fi.dSph() + fj.dSph()))
228  *exp
229  (
230  - CEff_
231  *sqrt
232  (
233  rhoc
234  *dEq
235  /sigma
236  *sqr(max(uRelTurb_, max(uRelBuoy_, uRelShear_)))
237  )
238  )
239  + pos0(kolmogorovLengthScale_ - (fi.dSph() + fj.dSph()))
240  *exp
241  (
242  - (3.0/4.0)
243  *muc
244  *dEq
245  *eddyStrainRate_
246  /sigma
247  *log(cbrt(pi*sigma*sqr(dEq)/(32*AH_)))
248  )
249  );
250 
251  if (turbulence_)
252  {
253  coalescenceRate +=
254  neg(kolmogorovLengthScale_ - (fi.dSph() + fj.dSph()))
255  *CPack_
256  *Aij
257  *uRelTurb_
258  *collisionEfficiency;
259  }
260 
261  if (buoyancy_)
262  {
263  coalescenceRate += CPack_*0.5*Aij*uRelBuoy_*collisionEfficiency;
264  }
265 
266  if (laminarShear_)
267  {
268  coalescenceRate += CPack_*0.5*Aij*uRelShear_*collisionEfficiency;
269  }
270 
271  if (eddyCapture_)
272  {
273  const volScalarField::Internal uRelEddy
274  (
275  CEddy_*0.5/pi*(fi.dSph() + fj.dSph())*eddyStrainRate_
276  );
277 
278  coalescenceRate +=
279  pos0(kolmogorovLengthScale_ - (fi.dSph() + fj.dSph()))
280  *CPack_
281  *0.5
282  *Aij
283  *uRelEddy
284  *collisionEfficiency;
285  }
286 
287  if (wakeEntrainment_)
288  {
289  const dimensionedScalar uRelWakeI(CWake_*uTerminal_[i]*cbrt(Cd_[i]));
290 
291  const dimensionedScalar uRelWakeJ(CWake_*uTerminal_[j]*cbrt(Cd_[j]));
292 
293  coalescenceRate +=
294  CPack_
295  *0.125
296  *pi
297  *(
298  sqr(fi.dSph())
299  *uRelWakeI
300  *pos0(fi.dSph() - 0.5*dCrit_)
301  *(
302  pow6(fi.dSph() - 0.5*dCrit_)
303  /(pow6(fi.dSph() - 0.5*dCrit_) + pow6(0.5*dCrit_))
304  )
305  + sqr(fj.dSph())
306  *uRelWakeJ
307  *pos0(fj.dSph() - 0.5*dCrit_)
308  *(
309  pow6(fj.dSph() - 0.5*dCrit_)
310  /(pow6(fj.dSph() - 0.5*dCrit_) + pow6(0.5*dCrit_))
311  )
312  );
313  }
314 }
315 
316 
317 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
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:93
Base class for coalescence models.
Bubble coalescence model of Liao et al. (2015). The terminal velocities and drag coefficients are com...
virtual void precompute()
Precompute diameter independent expressions.
LiaoCoalescence(const populationBalanceModel &popBal, const dictionary &dict)
virtual void addToCoalescenceRate(volScalarField::Internal &coalescenceRate, const label i, const label j)
Add to coalescenceRate.
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:96
const dimensionedScalar & dSph() const
Return representative spherical diameter of the sizeGroup.
Definition: sizeGroupI.H:51
const phaseModel & phase() const
Return const-reference to the phase.
Definition: sizeGroupI.H:37
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
virtual const volScalarField & rho() const =0
Return the density field.
A class for managing temporary objects.
Definition: tmp.H:55
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
addToRunTimeSelectionTable(coalescenceModel, AdachiStuartFokkink, dictionary)
defineTypeNameAndDebug(AdachiStuartFokkink, 0)
Namespace for OpenFOAM.
static const zero Zero
Definition: zero.H:97
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedScalar pos0(const dimensionedScalar &ds)
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
const dimensionSet dimless
const dimensionSet dimLength
void pow6(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
dimensionedScalar log(const dimensionedScalar &ds)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar neg(const dimensionedScalar &ds)
void cbrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
const dimensionSet dimVelocity
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
dictionary dict