OpenFOAM
v2406
The open source CFD toolbox
LISASMDCalcMethod1.H
Go to the documentation of this file.
1
{
2
// calculate the new diameter with a Rosin Rammler distribution
3
4
scalar
minValue
=
min
(d, dD/10.0);
5
scalar
maxValue
= dD;
6
7
if
(
maxValue
-
minValue
< SMALL)
8
{
9
minValue
= d/10.0;
10
}
11
12
scalar
range
=
maxValue
-
minValue
;
13
14
scalar
y
= 0;
15
16
bool
success
=
false
;
17
18
while
(!
success
)
19
{
20
21
x
=
minValue
+
range
*
rndGen
.sample01<scalar>();
22
y
=
rndGen
.sample01<scalar>();
23
scalar
p
= 0.0;
24
scalar
nExp
= 1;
25
scalar xx =
pow
(
x
/dD,
nExp
);
26
27
p
= xx*
exp
(-xx);
28
if
(
y
<
p
)
29
{
30
success
=
true
;
31
}
32
}
33
}
minValue
scalar minValue
Definition:
LISASMDCalcMethod2.H:12
rndGen
Random rndGen
Definition:
createFields.H:23
nExp
scalar nExp
Definition:
LISASMDCalcMethod2.H:25
range
scalar range
Definition:
LISASMDCalcMethod1.H:12
x
x
Definition:
LISASMDCalcMethod2.H:52
y
scalar y
Definition:
LISASMDCalcMethod1.H:14
maxValue
scalar maxValue
Definition:
LISASMDCalcMethod1.H:5
Foam::exp
dimensionedScalar exp(const dimensionedScalar &ds)
Definition:
dimensionedScalar.C:254
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition:
hashSets.C:26
success
bool success
Definition:
LISASMDCalcMethod1.H:16
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition:
dimensionedScalar.C:68
p
volScalarField & p
Definition:
createFieldRefs.H:8
src
lagrangian
spray
submodels
AtomizationModel
LISAAtomization
LISASMDCalcMethod1.H
Generated by
1.8.14