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"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace populationBalance
35 {
36 namespace breakupModels
37 {
40 }
41 }
42 }
43 
44 
45 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
46 
48 (
49  const populationBalanceModel& popBal,
50  const dictionary& dict
51 )
52 :
53  binary(popBal, dict),
54  LiaoBase(popBal, dict),
55  BTurb_("BTurb", dimless, dict, 1),
56  BShear_("BShear", dimless, dict, 1),
57  BEddy_("BEddy", dimless, dict, 1),
58  BFric_("BFric", dimless, dict, 0.25),
59  turbulence_(dict.lookup("turbulence")),
60  laminarShear_(dict.lookup("laminarShear")),
61  turbulentShear_(dict.lookup("turbulentShear")),
62  interfacialFriction_(dict.lookup("interfacialFriction"))
63 {}
64 
65 
66 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
67 
69 {
71 }
72 
73 
76 (
77  const label i,
78  const label j
79 ) const
80 {
81  const dimensionedScalar& dSphi = popBal_.dSph(i);
82  const dimensionedScalar& dSphj = popBal_.dSph(j);
83  const dimensionedScalar& vj = popBal_.v(j);
84 
85  const volScalarField::Internal& rhoc = popBal_.continuousPhase().rho();
86 
87  tmp<volScalarField> tsigma(popBal_.sigmaWithContinuousPhase(i));
88  const volScalarField::Internal& sigma = tsigma();
89 
90  tmp<volScalarField> tmuc(popBal_.continuousPhase().fluidThermo().mu());
91  const volScalarField::Internal& muc = tmuc();
92 
93  const dimensionedScalar dk(cbrt(pow3(dSphj) - pow3(dSphi)));
94 
95  const volScalarField::Internal tauCrit1
96  (
97  6*sigma/dSphj*(sqr(dSphi/dSphj) + sqr(dk/dSphj) - 1)
98  );
99 
100  const volScalarField::Internal tauCrit2
101  (
102  sigma/min(dk, dSphi)
103  );
104 
105  const volScalarField::Internal tauCrit(max(tauCrit1, tauCrit2));
106 
107  tmp<volScalarField::Internal> tbinaryBreakupRate =
109  (
110  "binaryBreakupRate",
111  popBal_.mesh(),
113  );
114  volScalarField::Internal& binaryBreakupRate = tbinaryBreakupRate.ref();
115 
116  if (turbulence_)
117  {
118  tmp<volScalarField> tepsilonc(popBal_.continuousTurbulence().epsilon());
119  const volScalarField::Internal& epsilonc = tepsilonc();
120 
121  const volScalarField::Internal tauTurb
122  (
123  pos(dSphj - kolmogorovLengthScale_)*BTurb_*rhoc
124  *sqr(cbrt(epsilonc*dSphj))
125  );
126 
127  binaryBreakupRate +=
128  pos(tauTurb - tauCrit)
129  /dSphj
130  *sqrt(mag(tauTurb - tauCrit)/rhoc)
131  /vj;
132  }
133 
134  if (laminarShear_)
135  {
136  const volScalarField::Internal tauShear
137  (
138  BShear_*muc*shearStrainRate_
139  );
140 
141  binaryBreakupRate +=
142  pos(tauShear - tauCrit)
143  /dSphj
144  *sqrt(mag(tauShear - tauCrit)/rhoc)
145  /vj;
146  }
147 
148  if (turbulentShear_)
149  {
150  const volScalarField::Internal tauEddy
151  (
152  pos0(kolmogorovLengthScale_ - dSphj)
153  *BEddy_
154  *muc
155  *eddyStrainRate_
156  );
157 
158  binaryBreakupRate +=
159  pos(tauEddy - tauCrit)
160  /dSphj
161  *sqrt(mag(tauEddy - tauCrit)/rhoc)/vj;
162  }
163 
164  if (interfacialFriction_)
165  {
166  const volScalarField::Internal tauFric
167  (
168  BFric_*0.5*rhoc*sqr(uTerminal_[j])*Cd_[j]
169  );
170 
171  binaryBreakupRate +=
172  pos(tauFric - tauCrit)
173  /dSphj
174  *sqrt(mag(tauFric - tauCrit)/rhoc)/vj;
175  }
176 
177  return tbinaryBreakupRate;
178 }
179 
180 
181 // ************************************************************************* //
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,.
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 breakup models which provide a total breakup rate and a separate daughter size distrib...
Definition: breakupModel.H:56
Bubble breakup model of Liao et al. (2015). The terminal velocities and drag coefficients are compute...
Definition: Liao.H:131
virtual void precompute()
Pre-compute diameter independent expressions.
Definition: Liao.C:68
Liao(const populationBalanceModel &popBal, const dictionary &dict)
Definition: Liao.C:48
virtual tmp< volScalarField::Internal > rate(const label i, const label j) const
Return the breakup rate between two groups.
Definition: Liao.C:76
Base class for binary breakup models that provide a breakup rate between a size class pair directly,...
Definition: binary.H:60
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
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
const dimensionSet dimless
addToRunTimeSelectionTable(breakupModel, exponential, dictionary)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
Definition: units.C:346
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 & dimVolume
Definition: dimensions.C:150
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
void inv(pointPatchField< tensor > &, const pointPatchField< tensor > &)
const dimensionSet & dimTime
Definition: dimensions.C:142
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
void pow3(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void cbrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dictionary dict