Liao.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 "Liao.H"
27 #include "fvcGrad.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace diameterModels
36 {
37 namespace binaryBreakupModels
38 {
41  (
43  Liao,
45  );
46 }
47 }
48 }
49 
51 
52 
53 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
54 
56 (
57  const populationBalanceModel& popBal,
58  const dictionary& dict
59 )
60 :
61  binaryBreakupModel(popBal, dict),
62  LiaoBase(popBal, dict),
63  BTurb_("BTurb", dimless, dict, 1),
64  BShear_("BShear", dimless, dict, 1),
65  BEddy_("BEddy", dimless, dict, 1),
66  BFric_("BFric", dimless, dict, 0.25),
67  turbulence_(dict.lookup("turbulence")),
68  laminarShear_(dict.lookup("laminarShear")),
69  turbulentShear_(dict.lookup("turbulentShear")),
70  interfacialFriction_(dict.lookup("interfacialFriction"))
71 {}
72 
73 
74 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
75 
77 {
79 }
80 
81 
83 (
84  volScalarField::Internal& binaryBreakupRate,
85  const label i,
86  const label j
87 )
88 {
89  const sizeGroup& fi = popBal_.sizeGroups()[i];
90  const sizeGroup& fj = popBal_.sizeGroups()[j];
91 
92  const volScalarField::Internal& rhoc = popBal_.continuousPhase().rho();
93 
94  tmp<volScalarField> tsigma(popBal_.sigmaWithContinuousPhase(fi.phase()));
95  const volScalarField::Internal& sigma = tsigma();
96 
97  tmp<volScalarField> tmuc(popBal_.continuousPhase().fluidThermo().mu());
98  const volScalarField::Internal& muc = tmuc();
99 
100  const dimensionedScalar dk(cbrt(pow3(fj.dSph()) - pow3(fi.dSph())));
101 
102  const volScalarField::Internal tauCrit1
103  (
104  6*sigma/fj.dSph()*(sqr(fi.dSph()/fj.dSph()) + sqr(dk/fj.dSph()) - 1)
105  );
106 
107  const volScalarField::Internal tauCrit2
108  (
109  sigma/min(dk, fi.dSph())
110  );
111 
112  const volScalarField::Internal tauCrit(max(tauCrit1, tauCrit2));
113 
114  if (turbulence_)
115  {
116  tmp<volScalarField> tepsilonc(popBal_.continuousTurbulence().epsilon());
117  const volScalarField::Internal& epsilonc = tepsilonc();
118 
119  const volScalarField::Internal tauTurb
120  (
121  pos(fj.dSph() - kolmogorovLengthScale_)*BTurb_*rhoc
122  *sqr(cbrt(epsilonc*fj.dSph()))
123  );
124 
125  binaryBreakupRate +=
126  pos(tauTurb - tauCrit)
127  /fj.dSph()
128  *sqrt(mag(tauTurb - tauCrit)/rhoc)
129  /fj.x();
130  }
131 
132  if (laminarShear_)
133  {
134  const volScalarField::Internal tauShear
135  (
136  BShear_*muc*shearStrainRate_
137  );
138 
139  binaryBreakupRate +=
140  pos(tauShear - tauCrit)
141  /fj.dSph()
142  *sqrt(mag(tauShear - tauCrit)/rhoc)
143  /fj.x();
144  }
145 
146  if (turbulentShear_)
147  {
148  const volScalarField::Internal tauEddy
149  (
150  pos0(kolmogorovLengthScale_ - fj.dSph())
151  *BEddy_
152  *muc
153  *eddyStrainRate_
154  );
155 
156  binaryBreakupRate +=
157  pos(tauEddy - tauCrit)
158  /fj.dSph()
159  *sqrt(mag(tauEddy - tauCrit)/rhoc)/fj.x();
160  }
161 
162  if (interfacialFriction_)
163  {
164  const volScalarField::Internal tauFric
165  (
166  BFric_*0.5*rhoc*sqr(uTerminal_[j])*Cd_[j]
167  );
168 
169  binaryBreakupRate +=
170  pos(tauFric - tauCrit)
171  /fj.dSph()
172  *sqrt(mag(tauFric - tauCrit)/rhoc)/fj.x();
173  }
174 }
175 
176 
177 // ************************************************************************* //
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...
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 binary breakup models that provide a breakup rate between a size class pair directly,...
Bubble breakup model of Liao et al. (2015). The terminal velocities and drag coefficients are compute...
Definition: Liao.H:131
virtual void precompute()
Precompute diameter independent expressions.
Definition: Liao.C:76
Liao(const populationBalanceModel &popBal, const dictionary &dict)
Definition: Liao.C:56
virtual void addToBinaryBreakupRate(volScalarField::Internal &binaryBreakupRate, const label i, const label j)
Add to binary breakupRate.
Definition: Liao.C:83
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 dimensionedScalar & x() const
Return representative volume of the sizeGroup.
Definition: sizeGroupI.H:58
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
A class for managing temporary objects.
Definition: tmp.H:55
Calculate the gradient of the given field.
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
addToRunTimeSelectionTable(binaryBreakupModel, LehrMilliesMewes, dictionary)
Namespace for OpenFOAM.
dimensionedScalar pos(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 dimless
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void pow3(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void cbrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
dictionary dict