Particle-size distribution model wherein random samples are drawn from the doubly-truncated exponential probability density function: More...
Public Member Functions | |
TypeName ("exponential") | |
Runtime type information. More... | |
exponential (const dictionary &dict, Random &rndGen) | |
Construct from components. More... | |
exponential (const exponential &p) | |
Copy construct. More... | |
virtual autoPtr< distributionModel > | clone () const |
Construct and return a clone. More... | |
void | operator= (const exponential &)=delete |
No copy assignment. More... | |
virtual | ~exponential ()=default |
Destructor. More... | |
virtual scalar | sample () const |
Sample the distribution. More... | |
virtual scalar | meanValue () const |
Return the theoretical mean of the distribution. More... | |
![]() | |
TypeName ("distributionModel") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, distributionModel, dictionary,(const dictionary &dict, Random &rndGen),(dict, rndGen)) | |
Declare runtime constructor selection table. More... | |
distributionModel (const word &name, const dictionary &dict, Random &rndGen) | |
Construct from dictionary. More... | |
distributionModel (const distributionModel &p) | |
Copy construct. More... | |
virtual autoPtr< distributionModel > | clone () const =0 |
Construct and return a clone. More... | |
virtual | ~distributionModel ()=default |
Destructor. More... | |
virtual scalar | sample () const =0 |
Sample the distribution. More... | |
virtual scalar | minValue () const |
Return the minimum of the distribution. More... | |
virtual scalar | maxValue () const |
Return the maximum of the distribution. More... | |
virtual scalar | meanValue () const =0 |
Additional Inherited Members | |
![]() | |
static autoPtr< distributionModel > | New (const dictionary &dict, Random &rndGen) |
Selector. More... | |
![]() | |
virtual void | check () const |
Check that the distribution model is valid. More... | |
![]() | |
const dictionary | distributionModelDict_ |
Coefficients dictionary. More... | |
Random & | rndGen_ |
Reference to the random number generator. More... | |
scalar | minValue_ |
Minimum of the distribution. More... | |
scalar | maxValue_ |
Maximum of the distribution. More... | |
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))} \]
where
\( f(x; \lambda, A, B) \) | = | Exponential probability density function |
\( \lambda \) | = | Rate parameter |
\( x \) | = | Sample |
\( A \) | = | Minimum of the distribution |
\( B \) | = | Maximum of the distribution |
Constraints:
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) \]
with
\[ r = q_{min} + u (q_{max} - q_{min}) \]
\[ q_{min} = \exp(-\lambda A) \]
\[ q_{max} = \exp(-\lambda B) \]
where \( u \) is a sample drawn from the uniform probability density function on the unit interval \( (0, 1) \).
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 189 of file exponential.H.
exponential | ( | const dictionary & | dict, |
Random & | rndGen | ||
) |
Construct from components.
Definition at line 45 of file exponential.C.
References distributionModel::check(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
exponential | ( | const exponential & | p | ) |
Copy construct.
Definition at line 66 of file exponential.C.
|
virtualdefault |
Destructor.
TypeName | ( | "exponential" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Implements distributionModel.
Definition at line 214 of file exponential.H.
|
delete |
No copy assignment.
|
virtual |
Sample the distribution.
Implements distributionModel.
Definition at line 75 of file exponential.C.
References Foam::exp(), and Foam::log().
|
virtual |
Return the theoretical mean of the distribution.
Implements distributionModel.
Definition at line 84 of file exponential.C.