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


Public Member Functions | |
| TypeName ("exponential") | |
| Runtime type information. | |
| exponential (const dictionary &dict, Random &rndGen) | |
| Construct from components. | |
| exponential (const exponential &p) | |
| Copy construct. | |
| virtual autoPtr< distributionModel > | clone () const |
| Construct and return a clone. | |
| void | operator= (const exponential &)=delete |
| No copy assignment. | |
| virtual | ~exponential ()=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 exponential probability density function:
![\[ f(x; \lambda, A, B) =
\lambda \frac{\exp(-\lambda (x - A))}{1 - \exp(-\lambda(B-A))}
\]](form_505.png)
where
![]() | = | Exponential probability density function |
![]() | = | Rate parameter |
![]() | = | 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 exponential probability density function:
![\[ x = - \frac{1}{\lambda} \ln (r)
\]](form_514.png)
with
![\[ r = q_{min} + u (q_{max} - q_{min})
\]](form_515.png)
![\[ q_{min} = \exp(-\lambda A)
\]](form_516.png)
![\[ q_{max} = \exp(-\lambda B)
\]](form_517.png)
where 

constant/<CloudProperties>: subModels
{
injectionModels
{
<name>
{
...
sizeDistribution
{
type exponential;
exponentialDistribution
{
lambda <lambdaValue>;
minValue <minValue>;
maxValue <maxValue>;
}
}
}
}
}
where the entries mean:
| Property | Description | Type | Reqd | Deflt |
|---|---|---|---|---|
type | Type name: exponential | word | yes | - |
exponentialDistribution | Distribution settings | dict | yes | - |
lambda | Rate parameter | scalar | yes | - |
minValue | Minimum of the distribution | scalar | yes | - |
maxValue | Maximum of the distribution | scalar | yes | - |
Definition at line 185 of file exponential.H.
| exponential | ( | const dictionary & | dict, |
| Random & | rndGen ) |
Construct from components.
Definition at line 38 of file exponential.C.
References distributionModel::check(), dict, distributionModel::distributionModel(), distributionModel::distributionModelDict_, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::GlobalIOList< Tuple2< scalar, vector > >::typeName, Foam::nl, and rndGen.
Referenced by clone(), exponential(), operator=(), and TypeName().


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

|
virtualdefault |
Destructor.
| TypeName | ( | "exponential" | ) |
Runtime type information.
References dict, exponential(), p, and rndGen.

|
inlinevirtual |
Construct and return a clone.
Implements distributionModel.
Definition at line 220 of file exponential.H.
References exponential().

|
delete |
|
virtual |
Sample the distribution.
Implements distributionModel.
Definition at line 68 of file exponential.C.
References Foam::exp(), Foam::log(), distributionModel::maxValue_, distributionModel::minValue_, and distributionModel::rndGen_.

|
virtual |
Return the theoretical mean of the distribution.
Implements distributionModel.
Definition at line 77 of file exponential.C.