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


Public Member Functions | |
| TypeName ("uniform") | |
| Runtime type information. | |
| uniform (const dictionary &dict, Random &rndGen) | |
| Construct from components. | |
| uniform (const uniform &p) | |
| Copy construct. | |
| virtual autoPtr< distributionModel > | clone () const |
| Construct and return a clone. | |
| void | operator= (const uniform &)=delete |
| No copy assignment. | |
| virtual | ~uniform ()=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 uniform probability density function:
![\[ f(x; A, B) = \frac{1}{B - A}
\]](form_559.png)
where
![]() | = | Doubly-truncated uniform distribution |
![]() | = | 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 uniform probability density function:
![\[ x = u \, (B - A) + A
\]](form_561.png)
where 

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


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

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

|
delete |
|
virtual |
Sample the distribution.
Implements distributionModel.
Definition at line 58 of file uniform.C.
References distributionModel::maxValue_, distributionModel::minValue_, and distributionModel::rndGen_.
|
virtual |
Return the theoretical mean of the distribution.
Implements distributionModel.
Definition at line 64 of file uniform.C.
References distributionModel::maxValue_, and distributionModel::minValue_.