LuoSvendsen.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) 2019-2026 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 "LuoSvendsen.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace populationBalance
36 {
37 namespace breakupModels
38 {
41 }
42 }
43 }
44 
45 
46 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
47 
49 (
50  const populationBalanceModel& popBal,
51  const dictionary& dict
52 )
53 :
54  binary(popBal, dict),
55  gammaUpperReg2by11_(),
56  gammaUpperReg5by11_(),
57  gammaUpperReg8by11_(),
58  C4_("C4", dimless, dict, 0.923),
59  beta_("beta", dimless, dict, 2.05),
60  minEddyRatio_("minEddyRatio", dimless, dict, 11.4),
61  kolmogorovLengthScale_
62  (
63  IOobject
64  (
65  "kolmogorovLengthScale",
66  popBal_.time().name(),
67  popBal_.mesh()
68  ),
69  popBal_.mesh(),
71  (
72  "kolmogorovLengthScale",
73  dimLength,
74  Zero
75  )
76  )
77 {
78  List<Tuple2<scalar, scalar>> gammaUpperReg2by11Table;
79  List<Tuple2<scalar, scalar>> gammaUpperReg5by11Table;
80  List<Tuple2<scalar, scalar>> gammaUpperReg8by11Table;
81 
82  gammaUpperReg2by11Table.append(Tuple2<scalar, scalar>(0.0, 1.0));
83  gammaUpperReg5by11Table.append(Tuple2<scalar, scalar>(0.0, 1.0));
84  gammaUpperReg8by11Table.append(Tuple2<scalar, scalar>(0.0, 1.0));
85 
86  for (scalar z = 1e-2; z <= 10.0; z = z + 1e-2)
87  {
88  Tuple2<scalar, scalar> gamma2by11
89  (
90  z,
91  incGammaRatio_Q(2.0/11.0, z)
92  );
93 
94  Tuple2<scalar, scalar> gamma5by11
95  (
96  z,
97  incGammaRatio_Q(5.0/11.0, z)
98  );
99 
100  Tuple2<scalar, scalar> gamma8by11
101  (
102  z,
103  incGammaRatio_Q(8.0/11.0, z)
104  );
105 
106  gammaUpperReg2by11Table.append(gamma2by11);
107  gammaUpperReg5by11Table.append(gamma5by11);
108  gammaUpperReg8by11Table.append(gamma8by11);
109  }
110 
111  gammaUpperReg2by11_ =
113  (
114  "gamma2by11",
118  gammaUpperReg2by11Table
119  );
120 
121  gammaUpperReg5by11_ =
123  (
124  "gamma5by11",
128  gammaUpperReg5by11Table
129  );
130 
131  gammaUpperReg8by11_ =
133  (
134  "gamma8by11",
138  gammaUpperReg8by11Table
139  );
140 }
141 
142 
143 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
144 
146 {
147  kolmogorovLengthScale_ =
148  pow025
149  (
150  pow3
151  (
152  popBal_.continuousPhase().fluidThermo().nu()
153  )
154  /popBal_.continuousTurbulence().epsilon()
155  );
156 }
157 
158 
161 (
162  const label i,
163  const label j
164 ) const
165 {
166  const dimensionedScalar& dSphj = popBal_.dSph(j);
167  const dimensionedScalar& vi = popBal_.v(i);
168  const dimensionedScalar& vj = popBal_.v(j);
169 
170  const volScalarField::Internal& rhoc = popBal_.continuousPhase().rho();
171 
172  tmp<volScalarField> tsigma(popBal_.sigmaWithContinuousPhase(i));
173  const volScalarField::Internal& sigma = tsigma();
174 
175  tmp<volScalarField> tepsilonc(popBal_.continuousTurbulence().epsilon());
176  const volScalarField::Internal& epsilonc = tepsilonc();
177 
178  const dimensionedScalar cf
179  (
180  pow(vi/vj, 2.0/3.0) + pow((1 - vi/vj), 2.0/3.0) - 1
181  );
182 
184  (
185  12*cf*sigma
186  /(beta_*rhoc*pow(dSphj, 5.0/3.0)*pow(epsilonc, 2.0/3.0))
187  );
188 
189  const volScalarField::Internal xiMin
190  (
191  minEddyRatio_*kolmogorovLengthScale_/dSphj
192  );
193 
194  const volScalarField::Internal tMin(b/pow(xiMin, 11.0/3.0));
195 
196  volScalarField::Internal integral(3/(11*pow(b, 8.0/11.0)));
197  forAll(integral, celli)
198  {
199  integral[celli] *=
200  2
201  *pow(b[celli], 3.0/11.0)
202  *tgamma(5.0/11.0)
203  *(
204  gammaUpperReg5by11_->value(b[celli])
205  - gammaUpperReg5by11_->value(tMin[celli])
206  );
207  }
208 
209  return
210  C4_
211  *(1 - popBal_.alphas()())
212  /vj
213  *cbrt(epsilonc/sqr(dSphj))
214  *integral;
215 }
216 
217 
218 // ************************************************************************* //
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:449
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
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:91
void append(const T &)
Append an element at the end of the list.
Definition: ListI.H:178
Base class to read table data for tables.
Definition: TableReader.H:51
A 2-tuple for storing two objects of different types.
Definition: Tuple2.H:66
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
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 breakup models which provide a total breakup rate and a separate daughter size distrib...
Definition: breakupModel.H:56
Model of Luo and Svendsen (1996). The breakup rate is calculated by.
Definition: LuoSvendsen.H:231
virtual void precompute()
Pre-compute diameter independent expressions.
Definition: LuoSvendsen.C:145
LuoSvendsen(const populationBalanceModel &popBal, const dictionary &dict)
Definition: LuoSvendsen.C:49
virtual tmp< volScalarField::Internal > rate(const label i, const label j) const
Return the breakup rate between two groups.
Definition: LuoSvendsen.C:161
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
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
volScalarField & b
Definition: createFields.H:27
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
const dimensionSet dimless
const dimensionSet time
addToRunTimeSelectionTable(breakupModel, exponential, dictionary)
Namespace for OpenFOAM.
static const zero Zero
Definition: zero.H:97
const doubleScalar e
Definition: doubleScalar.H:106
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
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
void pow025(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
void pow3(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
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< typename powProduct< Type, r >::type, GeoMesh, Field > > pow(const DimensionedField< Type, GeoMesh, PrimitiveField > &df, typename powProduct< Type, r >::type)
scalar incGammaRatio_Q(const scalar a, const scalar x)
Normalised upper incomplete gamma function.
Definition: incGamma.C:221
dictionary dict