OpenFOAM
4.1
The OpenFOAM Foundation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
lagrangian
spray
submodels
AtomizationModel
LISAAtomization
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
}
rndGen
cachedRandom rndGen(label(0),-1)
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
minValue
scalar minValue
Definition:
LISASMDCalcMethod2.H:12
probFactorMax
scalar probFactorMax
Definition:
LISASMDCalcMethod2.H:28
forAll
forAll(rrd, n)
Definition:
LISASMDCalcMethod2.H:31
x
x
Definition:
LISASMDCalcMethod2.H:52
Foam::exp
dimensionedScalar exp(const dimensionedScalar &ds)
Definition:
dimensionedScalar.C:252
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition:
dimensionedScalar.C:73
n
label n
Definition:
TABSMDCalcMethod2.H:31
rrd
FixedList< scalar, 500 > rrd
Definition:
LISASMDCalcMethod2.H:26
Generated by
1.8.11