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
distributionModels
normal
normal.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 2011-2013 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
Class
25
Foam::normal
26
27
Description
28
A normal distribution model
29
30
\verbatim
31
model = strength * exp(-0.5*((x - expectation)/variance)^2 )
32
\endverbatim
33
34
strength only has meaning if there's more than one distribution model
35
36
SourceFiles
37
normal.C
38
39
\*---------------------------------------------------------------------------*/
40
41
#ifndef normal_H
42
#define normal_H
43
44
#include "
distributionModel.H
"
45
46
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48
namespace
Foam
49
{
50
namespace
distributionModels
51
{
52
53
/*---------------------------------------------------------------------------*\
54
Class normal Declaration
55
\*---------------------------------------------------------------------------*/
56
57
class
normal
58
:
59
public
distributionModel
60
{
61
// Private data
62
63
64
//- Distribution minimum
65
scalar minValue_;
66
67
//- Distribution maximum
68
scalar maxValue_;
69
70
71
// Model coefficients
72
73
scalar expectation_;
74
scalar variance_;
75
76
scalar a_;
77
78
79
public
:
80
81
//- Runtime type information
82
TypeName
(
"normal"
);
83
84
85
// Constructors
86
87
//- Construct from components
88
normal
(
const
dictionary
&
dict
,
cachedRandom
&
rndGen
);
89
90
//- Construct copy
91
normal
(
const
normal
&
p
);
92
93
//- Construct and return a clone
94
virtual
autoPtr<distributionModel>
clone
()
const
95
{
96
return
autoPtr<distributionModel>
(
new
normal
(*
this
));
97
}
98
99
100
//- Destructor
101
virtual
~normal
();
102
103
104
// Member Functions
105
106
//- Sample the distributionModel
107
virtual
scalar
sample
()
const
;
108
109
//- Return the minimum value
110
virtual
scalar
minValue
()
const
;
111
112
//- Return the maximum value
113
virtual
scalar
maxValue
()
const
;
114
115
//- Return the mean value
116
virtual
scalar
meanValue
()
const
;
117
118
virtual
scalar
erfInv
(
const
scalar
y
)
const
;
119
};
120
121
122
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123
124
}
// End namespace distributionModels
125
}
// End namespace Foam
126
127
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128
129
#endif
130
131
// ************************************************************************* //
Foam::distributionModels::normal
Definition:
normal.H:56
dict
dictionary dict
Definition:
searchingEngine.H:14
Foam::distributionModels::normal::normal
normal(const dictionary &dict, cachedRandom &rndGen)
Construct from components.
Definition:
normal.C:44
Foam::distributionModels::normal::sample
virtual scalar sample() const
Sample the distributionModel.
Definition:
normal.C:93
Foam::distributionModels::normal::clone
virtual autoPtr< distributionModel > clone() const
Construct and return a clone.
Definition:
normal.H:93
Foam::distributionModels::normal::minValue
virtual scalar minValue() const
Return the minimum value.
Definition:
normal.C:111
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition:
dictionary.H:137
Foam::distributionModels::normal::erfInv
virtual scalar erfInv(const scalar y) const
Definition:
normal.C:129
Foam::cachedRandom
Random number generator.
Definition:
cachedRandom.H:63
Foam::distributionModels::normal::maxValue
virtual scalar maxValue() const
Return the maximum value.
Definition:
normal.C:117
y
scalar y
Definition:
LISASMDCalcMethod1.H:14
rndGen
cachedRandom rndGen(label(0), -1)
Foam::distributionModels::normal::meanValue
virtual scalar meanValue() const
Return the mean value.
Definition:
normal.C:123
Foam::distributionModels::normal::~normal
virtual ~normal()
Destructor.
Definition:
normal.C:87
distributionModel.H
Foam::distributionModel
A library of runtime-selectable distribution models.
Definition:
distributionModel.H:68
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition:
PtrList.H:52
p
volScalarField & p
Definition:
createFieldRefs.H:4
Foam::distributionModels::normal::TypeName
TypeName("normal")
Runtime type information.
Foam
Namespace for OpenFOAM.
Definition:
combustionModel.C:30
Generated by
1.8.13