OpenFOAM
11
The OpenFOAM Foundation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
LISASMDCalcMethod2.H
Go to the documentation of this file.
1
{
2
// calculate the new diameter with the standard 1D Rosin Rammler
3
// distribution. Calculation of the mean radius based on SMR rs.
4
// Coefficient factorGamma depends on nExp. Note that Reitz either used
5
// (Schmidt et al., 1999-01-0496) or skipped (Senecal et al.) this factor!
6
// scalar factorGamma = 0.75*sqrt(mathematicalConstant::pi); // nExp=2
7
scalar factorGamma = 1.;
8
scalar
delta
= dD/factorGamma;
9
10
// dD is the SMD, and the delta is calculated using gamma
11
// function. Here we assume nExp = 2
12
scalar
minValue
= dD/10.0;
13
scalar
maxValue
= dD;
14
15
// The pdf value for 4.0*delta is already very small.
16
// scalar maxValue = delta*4.0;
17
18
if
(
maxValue
-
minValue
< small)
19
{
20
minValue
=
maxValue
/20.0;
21
}
22
23
scalar
range
=
maxValue
-
minValue
;
24
25
scalar
nExp
= 3;
26
FixedList<scalar, 500>
rrd
;
27
scalar
probFactorMin
=
exp
(-
pow
(
minValue
/
delta
,
nExp
));
28
scalar
probFactorMax
=
exp
(-
pow
(
maxValue
/
delta
,
nExp
));
29
scalar
probFactor
= 1.0/(
probFactorMin
-
probFactorMax
);
30
31
forAll
(
rrd
,
n
)
32
{
33
scalar xx =
minValue
+
range
*
n
/500;
34
rrd
[
n
] = (
probFactorMin
-
exp
(-
pow
(xx/
delta
,
nExp
)))*
probFactor
;
35
}
36
37
38
bool
success
=
false
;
39
40
scalar
y
=
rndGen
.sample01<scalar>();
41
label
k
= 0;
42
43
while
(!
success
&& (
k
<500))
44
{
45
if
(
rrd
[
k
] >
y
)
46
{
47
success
=
true
;
48
}
49
k
++;
50
}
51
52
x
=
minValue
+
range
*(
k
- 0.5)/500.0;
53
}
forAll
forAll(rrd, n)
Definition:
LISASMDCalcMethod2.H:31
minValue
scalar minValue
Definition:
LISASMDCalcMethod2.H:12
probFactor
scalar probFactor
Definition:
LISASMDCalcMethod2.H:29
range
scalar range
Definition:
LISASMDCalcMethod2.H:23
k
label k
Definition:
LISASMDCalcMethod2.H:41
probFactorMax
scalar probFactorMax
Definition:
LISASMDCalcMethod2.H:28
maxValue
scalar maxValue
Definition:
LISASMDCalcMethod2.H:13
success
bool success
Definition:
LISASMDCalcMethod2.H:38
rrd
FixedList< scalar, 500 > rrd
Definition:
LISASMDCalcMethod2.H:26
delta
scalar delta
Definition:
LISASMDCalcMethod2.H:8
x
x
Definition:
LISASMDCalcMethod2.H:52
nExp
scalar nExp
Definition:
LISASMDCalcMethod2.H:25
probFactorMin
scalar probFactorMin
Definition:
LISASMDCalcMethod2.H:27
y
scalar y
Definition:
LISASMDCalcMethod2.H:40
n
label n
Definition:
TABSMDCalcMethod2.H:31
Foam::exp
dimensionedScalar exp(const dimensionedScalar &ds)
Definition:
dimensionedScalar.C:274
Foam::label
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
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition:
dimensionedScalar.C:73
rndGen
Random rndGen(label(0))
src
lagrangian
parcel
submodels
Spray
AtomisationModel
LISAAtomisation
LISASMDCalcMethod2.H
Generated by
1.9.1