Particle-size distribution model wherein random samples are drawn from a mixture of a finite set of doubly-truncated univariate normal probability density functions: More...
Public Member Functions | |
TypeName ("multiNormal") | |
Runtime type information. More... | |
multiNormal (const dictionary &dict, Random &rndGen) | |
Construct from components. More... | |
multiNormal (const multiNormal &p) | |
Copy construct. More... | |
virtual autoPtr< distributionModel > | clone () const |
Construct and return a clone. More... | |
void | operator= (const multiNormal &)=delete |
No copy assignment. More... | |
virtual | ~multiNormal ()=default |
Destructor. More... | |
virtual scalar | sample () const |
Sample the distribution. More... | |
scalar | sample (const scalar mu, const scalar sigma) const |
Sample the normal distribution. More... | |
virtual scalar | meanValue () const |
Return the theoretical mean of the distribution. More... | |
Public Member Functions inherited from distributionModel | |
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 | ~distributionModel ()=default |
Destructor. More... | |
virtual scalar | minValue () const |
Return the minimum of the distribution. More... | |
virtual scalar | maxValue () const |
Return the maximum of the distribution. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from distributionModel | |
static autoPtr< distributionModel > | New (const dictionary &dict, Random &rndGen) |
Selector. More... | |
Protected Member Functions inherited from distributionModel | |
virtual void | check () const |
Check that the distribution model is valid. More... | |
Protected Attributes inherited from distributionModel | |
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 a mixture of a finite set of doubly-truncated univariate normal probability density functions:
with for any distribution:
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 (the same for each distribution) | |
= | Maximum of the distribution (the same for each distribution) | |
= | Weighting factor |
Constraints:
Random samples are generated by a combination of the inverse transform sampling technique and categorical sampling in three steps:
distributionModels::normal
):
with
where is another sample drawn from the uniform probability density function on the unit interval .
constant/<CloudProperties>
: subModels { injectionModels { <name> { ... sizeDistribution { type multiNormal; multiNormalDistribution { minValue <min>; maxValue <max>; mu ( <mean1> <mean2> ... ); sigma ( <standard deviation1> <standard deviation2> ... ); weight ( <weight1> <weight2> ... ); } } } } }
where the entries mean:
Property | Description | Type | Reqd | Deflt |
---|---|---|---|---|
type | Type name: multiNormal | word | yes | - |
multiNormalDistribution | Distribution settings | dict | yes | - |
minValue | Minimum of the distribution | scalar | yes | - |
maxValue | Maximum of the distribution | scalar | yes | - |
mu | List of means of parent general normal distributions | scalarList | yes | - |
sigma | List of standard deviations of parent general normal distributions | scalarList | yes | - |
weight | List of weights of a given distribution in the distribution mixture | scalarList | yes | - |
Notes
minValue
and maxValue
are the same for all distributions in the distribution mixture.weight
should always be input in a non-decreasing (i.e. monotonic) order.Definition at line 281 of file multiNormal.H.
multiNormal | ( | const dictionary & | dict, |
Random & | rndGen | ||
) |
Construct from components.
Definition at line 42 of file multiNormal.C.
Referenced by multiNormal::clone().
multiNormal | ( | const multiNormal & | p | ) |
Copy construct.
Definition at line 113 of file multiNormal.C.
|
virtualdefault |
Destructor.
TypeName | ( | "multiNormal" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Implements distributionModel.
Definition at line 327 of file multiNormal.H.
References multiNormal::multiNormal().
|
delete |
No copy assignment.
|
virtual |
Sample the distribution.
Implements distributionModel.
Definition at line 124 of file multiNormal.C.
Foam::scalar sample | ( | const scalar | mu, |
const scalar | sigma | ||
) | const |
Sample the normal distribution.
Definition at line 143 of file multiNormal.C.
References Foam::constant::physicoChemical::b, Foam::clamp(), Foam::erf(), Foam::Math::erfInv(), Foam::constant::physicoChemical::mu, p, sigma(), Foam::sqrt(), and x.
|
virtual |
Return the theoretical mean of the distribution.
Implements distributionModel.
Definition at line 168 of file multiNormal.C.
References forAll.