Particle-size distribution model wherein random samples are drawn from the doubly-truncated univariate normal probability density function: More...
#include <normal.H>


Public Member Functions | |
| TypeName ("normal") | |
| Runtime type information. | |
| normal (const dictionary &dict, Random &rndGen) | |
| Construct from components. | |
| normal (const normal &p) | |
| Copy construct. | |
| virtual autoPtr< distributionModel > | clone () const |
| Construct and return a clone. | |
| void | operator= (const normal &)=delete |
| No copy assignment. | |
| virtual | ~normal ()=default |
| Destructor. | |
| virtual scalar | sample () const |
| Sample the distribution. | |
| virtual scalar | meanValue () const |
| Return the theoretical mean of the distribution. | |
| Public Member Functions inherited from distributionModel | |
| TypeName ("distributionModel") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, distributionModel, dictionary,(const dictionary &dict, Random &rndGen),(dict, rndGen)) | |
| Declare runtime constructor selection table. | |
| distributionModel (const word &name, const dictionary &dict, Random &rndGen) | |
| Construct from dictionary. | |
| distributionModel (const distributionModel &p) | |
| Copy construct. | |
| virtual | ~distributionModel ()=default |
| Destructor. | |
| virtual scalar | minValue () const |
| Return the minimum of the distribution. | |
| virtual scalar | maxValue () const |
| Return the maximum of the distribution. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from distributionModel | |
| static autoPtr< distributionModel > | New (const dictionary &dict, Random &rndGen) |
| Selector. | |
| Protected Member Functions inherited from distributionModel | |
| virtual void | check () const |
| Check that the distribution model is valid. | |
| Protected Attributes inherited from distributionModel | |
| const dictionary | distributionModelDict_ |
| Coefficients dictionary. | |
| Random & | rndGen_ |
| Reference to the random number generator. | |
| scalar | minValue_ |
| Minimum of the distribution. | |
| scalar | maxValue_ |
| Maximum of the distribution. | |
Particle-size distribution model wherein random samples are drawn from the doubly-truncated univariate normal probability density function:
![\[ f(x; \mu, \sigma, A, B) =
\frac{1}{\sigma}
\frac{
\phi \left( \frac{x - \mu}{\sigma} \right)
}{
\Phi \left( \frac{B - \mu}{\sigma} \right)
- \Phi \left( \frac{A - \mu}{\sigma} \right)
}
\]](form_537.png)
where
![]() | = | Doubly-truncated univariate normal distribution |
![]() | = | Mean of the parent general normal distribution |
![]() | = | Standard deviation of the parent general normal distribution |
![]() | = | General normal probability density function |
![]() | = | General normal cumulative distribution function |
![]() | = | Sample |
![]() | = | Minimum of the distribution |
![]() | = | Maximum of the distribution |
Constraints:

![$ x \in [B,A] $](form_512.png)

Random samples are generated by the inverse transform sampling technique by using the quantile function of the doubly-truncated univariate normal probability density function:
![\[ x = \mu + \sigma \sqrt{2} \, {erf}^{-1} \left( 2 p - 1 \right)
\]](form_550.png)
with
![\[ p = u \,
\left(
\Phi\left(
\frac{B - \mu}{\sigma}
\right)
- \Phi\left(
\frac{A - \mu}{\sigma}
\right)
\right)
+ \Phi\left( \frac{A - \mu}{\sigma} \right)
\]](form_551.png)
![\[ \Phi(\xi) =
\frac{1}{2}
\left(
1 + {erf}\left(\frac{\xi - \mu}{\sigma \sqrt{2} }\right)
\right)
\]](form_552.png)
where 

Reference:
Governing expressions (tag:B):
Burkardt, J. (2014).
The truncated normal distribution.
Department of Scientific Computing Website,
Florida State University, 1-35.
URL:people.sc.fsu.edu/~jburkardt/presentations/truncated_normal.pdf
(Retrieved on: 19 Feb 2021)
constant/<CloudProperties>: subModels
{
injectionModels
{
<name>
{
...
sizeDistribution
{
type normal;
normalDistribution
{
mu <mean>;
sigma <stardard deviation>;
minValue <min>;
maxValue <max>;
}
}
}
}
}
where the entries mean:
| Property | Description | Type | Reqd | Deflt |
|---|---|---|---|---|
type | Type name: normal | word | yes | - |
normalDistribution | Distribution settings | dict | yes | - |
mu | Mean of the parent general normal distribution | scalar | yes | - |
sigma | Standard deviation of the parent general normal distribution | scalar | yes | - |
minValue | Minimum of the distribution | scalar | yes | - |
maxValue | Maximum of the distribution | scalar | yes | - |
| normal | ( | const dictionary & | dict, |
| Random & | rndGen ) |
Construct from components.
Definition at line 40 of file normal.C.
References dict, distributionModel::distributionModel(), distributionModel::distributionModelDict_, Foam::GlobalIOList< Tuple2< scalar, vector > >::typeName, and rndGen.
Referenced by clone(), normal(), operator=(), and TypeName().


| normal | ( | const normal & | p | ) |
Copy construct.
Definition at line 76 of file normal.C.
References distributionModel::distributionModel(), normal(), and p.

|
virtualdefault |
Destructor.
| TypeName | ( | "normal" | ) |
|
inlinevirtual |
Construct and return a clone.
Implements distributionModel.
Definition at line 284 of file normal.H.
References normal().

|
delete |
|
virtual |
Sample the distribution.
Implements distributionModel.
Definition at line 86 of file normal.C.
References b, Foam::clamp(), Foam::erf(), Foam::Math::erfInv(), distributionModel::maxValue_, distributionModel::minValue_, p, distributionModel::rndGen_, Foam::sqrt(), and x.

|
virtual |
Return the theoretical mean of the distribution.
Implements distributionModel.
Definition at line 108 of file normal.C.
References b, Foam::erf(), Foam::exp(), distributionModel::maxValue_, distributionModel::minValue_, Foam::constant::mathematical::pi(), Foam::sqr(), and Foam::sqrt().
