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 populationBalance
36 {
37 namespace coalescenceModels
38 {
41  (
45  );
46 }
47 }
48 }
49 
50 
51 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
52 
54 (
55  const populationBalanceModel& popBal,
56  const dictionary& dict
57 )
58 :
59  coalescenceModel(popBal, dict),
60  LiaoBase(popBal, dict),
61  PMax_("PMax", dimless, dict, 0.8),
62  AH_("AH", dimEnergy, dict, 3.7e-20),
63  CEff_("CEff", dimless, dict, 2.5),
64  CTurb_("CTurb", dimless, dict, 1),
65  CBuoy_("CBuoy", dimless, dict, 1),
66  CShear_("CShear", dimless, dict, 1),
67  CEddy_("CEddy", dimless, dict, 1),
68  CWake_("CWake", dimless, dict, 1),
69  turbulence_(dict.lookup("turbulence")),
70  buoyancy_(dict.lookup("buoyancy")),
71  laminarShear_(dict.lookup("laminarShear")),
72  eddyCapture_(dict.lookup("eddyCapture")),
73  wakeEntrainment_(dict.lookup("wakeEntrainment")),
74  CPack_
75  (
76  IOobject
77  (
78  "CPack",
79  popBal_.time().name(),
80  popBal_.mesh()
81  ),
82  popBal_.mesh(),
84  (
85  "CPack",
86  dimless,
87  Zero
88  )
89  ),
90  CPackMax_("CPackMax", dimless, dict, 1e5),
91  dCrit_
92  (
93  IOobject
94  (
95  "dCrit",
96  popBal_.time().name(),
97  popBal_.mesh()
98  ),
99  popBal_.mesh(),
101  (
102  "dCrit",
103  dimLength,
104  Zero
105  )
106  ),
107  uRelTurb_
108  (
109  IOobject
110  (
111  "uRelTurb",
112  popBal_.time().name(),
113  popBal_.mesh()
114  ),
115  popBal_.mesh(),
117  (
118  "uRelTurb",
119  dimVelocity,
120  Zero
121  )
122  ),
123  uRelBuoy_
124  (
125  IOobject
126  (
127  "uRelBuoy",
128  popBal_.time().name(),
129  popBal_.mesh()
130  ),
131  popBal_.mesh(),
133  (
134  "uRelBuoy",
135  dimVelocity,
136  Zero
137  )
138  ),
139  uRelShear_
140  (
141  IOobject
142  (
143  "uRelShear",
144  popBal_.time().name(),
145  popBal_.mesh()
146  ),
147  popBal_.mesh(),
149  (
150  "uRelShear",
151  dimVelocity,
152  Zero
153  )
154  )
155 {}
156 
157 
158 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
159 
161 {
163 
164  CPack_ = min(PMax_/max(PMax_ - popBal_.alphas(), small), CPackMax_);
165 
166  const volScalarField::Internal& rhoc = popBal_.continuousPhase().rho();
167 
168  tmp<volScalarField> tsigma(popBal_.sigmaWithContinuousPhase(0));
169  const volScalarField::Internal& sigma = tsigma();
170 
171  const uniformDimensionedVectorField& g =
172  popBal_.mesh().lookupObject<uniformDimensionedVectorField>("g");
173 
174  dCrit_ = 4*sqrt(sigma/(mag(g)*(rhoc - popBal_.phases().first().rho()())));
175 }
176 
177 
180 (
181  const label i,
182  const label j
183 ) const
184 {
186 
187  const dimensionedScalar& dSphi = popBal_.dSph(i);
188  const dimensionedScalar& dSphj = popBal_.dSph(j);
189 
190  const volScalarField::Internal& rhoc = popBal_.continuousPhase().rho();
191 
192  tmp<volScalarField> tsigma(popBal_.sigmaWithContinuousPhase(i));
193  const volScalarField::Internal& sigma = tsigma();
194 
195  tmp<volScalarField> tmuc(popBal_.continuousPhase().fluidThermo().mu());
196  const volScalarField::Internal& muc = tmuc();
197 
198  dimensionedScalar dEq(2*dSphi*dSphj/(dSphi + dSphj));
199  dimensionedScalar Aij(pi*0.25*sqr(dSphi + dSphj));
200 
201  if (turbulence_)
202  {
203  tmp<volScalarField> tepsilonc(popBal_.continuousTurbulence().epsilon());
204  const volScalarField::Internal& epsilonc = tepsilonc();
205 
206  uRelTurb_ =
207  CTurb_*sqrt(2.0)
208  *sqrt(sqr(cbrt(dSphi)) + sqr(cbrt(dSphj)))
209  *cbrt(epsilonc);
210  }
211 
212  if (buoyancy_)
213  {
214  uRelBuoy_ = CBuoy_*mag(uTerminal_[i] - uTerminal_[j]);
215  }
216 
217  if (laminarShear_)
218  {
219  uRelShear_ = CShear_*0.5/pi*(dSphi + dSphj)*shearStrainRate_;
220  }
221 
222  const volScalarField::Internal collisionEfficiency
223  (
224  neg(kolmogorovLengthScale_ - (dSphi + dSphj))
225  *exp
226  (
227  - CEff_
228  *sqrt
229  (
230  rhoc
231  *dEq
232  /sigma
233  *sqr(max(uRelTurb_, max(uRelBuoy_, uRelShear_)))
234  )
235  )
236  + pos0(kolmogorovLengthScale_ - (dSphi + dSphj))
237  *exp
238  (
239  - (3.0/4.0)
240  *muc
241  *dEq
242  *eddyStrainRate_
243  /sigma
244  *log(cbrt(pi*sigma*sqr(dEq)/(32*AH_)))
245  )
246  );
247 
248  tmp<volScalarField::Internal> tcoalescenceRate =
250  (
251  "coalescenceRate",
252  popBal_.mesh(),
254  );
255  volScalarField::Internal& coalescenceRate = tcoalescenceRate.ref();
256 
257  if (turbulence_)
258  {
259  coalescenceRate +=
260  neg(kolmogorovLengthScale_ - (dSphi + dSphj))
261  *CPack_
262  *Aij
263  *uRelTurb_
264  *collisionEfficiency;
265  }
266 
267  if (buoyancy_)
268  {
269  coalescenceRate += CPack_*0.5*Aij*uRelBuoy_*collisionEfficiency;
270  }
271 
272  if (laminarShear_)
273  {
274  coalescenceRate += CPack_*0.5*Aij*uRelShear_*collisionEfficiency;
275  }
276 
277  if (eddyCapture_)
278  {
279  const volScalarField::Internal uRelEddy
280  (
281  CEddy_*0.5/pi*(dSphi + dSphj)*eddyStrainRate_
282  );
283 
284  coalescenceRate +=
285  pos0(kolmogorovLengthScale_ - (dSphi + dSphj))
286  *CPack_
287  *0.5
288  *Aij
289  *uRelEddy
290  *collisionEfficiency;
291  }
292 
293  if (wakeEntrainment_)
294  {
295  const dimensionedScalar uRelWakeI(CWake_*uTerminal_[i]*cbrt(Cd_[i]));
296 
297  const dimensionedScalar uRelWakeJ(CWake_*uTerminal_[j]*cbrt(Cd_[j]));
298 
299  coalescenceRate +=
300  CPack_
301  *0.125
302  *pi
303  *(
304  sqr(dSphi)
305  *uRelWakeI
306  *pos0(dSphi - 0.5*dCrit_)
307  *(
308  pow6(dSphi - 0.5*dCrit_)
309  /(pow6(dSphi - 0.5*dCrit_) + pow6(0.5*dCrit_))
310  )
311  + sqr(dSphj)
312  *uRelWakeJ
313  *pos0(dSphj - 0.5*dCrit_)
314  *(
315  pow6(dSphj - 0.5*dCrit_)
316  /(pow6(dSphj - 0.5*dCrit_) + pow6(0.5*dCrit_))
317  )
318  );
319  }
320 
321  return tcoalescenceRate;
322 }
323 
324 
325 // ************************************************************************* //
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...
static tmp< DimensionedField< Type, GeoMesh, PrimitiveField > > New(const word &name, const GeoMesh &mesh, const dimensionSet &, const PrimitiveField< Type > &)
Return a temporary field constructed from name, mesh,.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Model for tracking the evolution of a dispersed phase size distribution due to coalescence (synonymou...
Base class for coalescence and breakup models of Liao et al. (2015).
Definition: LiaoBase.H:61
virtual void precompute()
Pre-compute 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()
Pre-compute diameter independent expressions.
LiaoCoalescence(const populationBalanceModel &popBal, const dictionary &dict)
virtual tmp< volScalarField::Internal > rate(const label i, const label j) const
Return the coalescence rate between two groups.
A class for managing temporary objects.
Definition: tmp.H:55
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:197
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].
const dimensionSet dimless
const dimensionSet time
defineTypeNameAndDebug(AdachiStuartFokkink, 0)
addToRunTimeSelectionTable(coalescenceModel, AdachiStuartFokkink, dictionary)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
Definition: units.C:346
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 & dimLength
Definition: dimensions.C:141
const dimensionSet & dimVolume
Definition: dimensions.C:150
void pow6(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
dimensionedScalar log(const dimensionedScalar &ds)
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet & dimVelocity
Definition: dimensions.C:154
const dimensionSet & dimTime
Definition: dimensions.C:142
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dimensionedScalar neg(const dimensionedScalar &ds)
void cbrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet & dimEnergy
Definition: dimensions.C:160
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dictionary dict
Typedefs for UniformDimensionedField.