OpenFOAM
5.0
The OpenFOAM Foundation
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
w
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
v
w
+
Enumerations
a
b
c
d
e
f
g
i
k
l
m
o
p
r
s
t
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Related Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Typedefs
b
c
d
f
g
k
l
m
p
r
s
t
v
w
+
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
src
lagrangian
spray
submodels
AtomizationModel
LISAAtomization
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
nExp
scalar nExp
Definition:
LISASMDCalcMethod2.H:25
x
x
Definition:
LISASMDCalcMethod2.H:52
Foam::exp
dimensionedScalar exp(const dimensionedScalar &ds)
Definition:
dimensionedScalar.C:274
rndGen
cachedRandom rndGen(label(0), -1)
Foam::min
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition:
dimensionedScalar.C:73
p
volScalarField & p
Definition:
createFieldRefs.H:4
Generated by
1.8.13