Public Member Functions | List of all members
exponential Class Reference

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

Inheritance diagram for exponential:
Inheritance graph
[legend]
Collaboration diagram for exponential:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("exponential")
 
 exponential (const dictionary &dict, Random &rndGen)
 
 exponential (const exponential &p)
 
virtual autoPtr< distributionModelclone () const
 
void operator= (const exponential &)=delete
 
virtual ~exponential ()=default
 
virtual scalar sample () const
 
virtual scalar meanValue () const
 
- Public Member Functions inherited from distributionModel
 TypeName ("distributionModel")
 
 declareRunTimeSelectionTable (autoPtr, distributionModel, dictionary,(const dictionary &dict, Random &rndGen),(dict, rndGen))
 
 distributionModel (const word &name, const dictionary &dict, Random &rndGen)
 
 distributionModel (const distributionModel &p)
 
virtual ~distributionModel ()=default
 
virtual scalar minValue () const
 
virtual scalar maxValue () const
 

Additional Inherited Members

- Static Public Member Functions inherited from distributionModel
static autoPtr< distributionModelNew (const dictionary &dict, Random &rndGen)
 
- Protected Member Functions inherited from distributionModel
virtual void check () const
 
- Protected Attributes inherited from distributionModel
const dictionary distributionModelDict_
 
RandomrndGen_
 
scalar minValue_
 
scalar maxValue_
 

Detailed Description

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) $.

Usage
Minimal example by using 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 -
Source files

Definition at line 185 of file exponential.H.

Constructor & Destructor Documentation

◆ exponential() [1/2]

exponential ( const dictionary dict,
Random rndGen 
)

Definition at line 39 of file exponential.C.

References Foam::check(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Referenced by exponential::clone().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exponential() [2/2]

exponential ( const exponential p)

Definition at line 59 of file exponential.C.

◆ ~exponential()

virtual ~exponential ( )
virtualdefault

Member Function Documentation

◆ TypeName()

TypeName ( "exponential"  )

◆ clone()

virtual autoPtr<distributionModel> clone ( ) const
inlinevirtual

Implements distributionModel.

Definition at line 210 of file exponential.H.

References exponential::exponential().

Here is the call graph for this function:

◆ operator=()

void operator= ( const exponential )
delete

◆ sample()

Foam::scalar sample ( ) const
virtual

Implements distributionModel.

Definition at line 68 of file exponential.C.

References Foam::exp(), and Foam::log().

Here is the call graph for this function:

◆ meanValue()

Foam::scalar meanValue ( ) const
virtual

Implements distributionModel.

Definition at line 77 of file exponential.C.


The documentation for this class was generated from the following files: