Particle-size distribution model wherein random samples are drawn from a given arbitrary probability density function or cumulative distribution function. Input distributions are specified as pairs of (size, probability) (i.e. (point, value) ). More...
Public Member Functions | |
TypeName ("general") | |
Runtime type information. More... | |
general (const dictionary &dict, Random &rndGen) | |
Construct from components. More... | |
general (const UList< scalar > &sampleData, const scalar binWidth, Random &rndGen) | |
Construct from components. More... | |
general (const general &p) | |
Copy construct. More... | |
virtual autoPtr< distributionModel > | clone () const |
Construct and return a clone. More... | |
void | operator= (const general &)=delete |
No copy assignment. More... | |
virtual | ~general ()=default |
Destructor. More... | |
virtual tmp< scalarField > | x () const |
Bin boundaries. More... | |
virtual tmp< scalarField > | y () const |
Probabilities. More... | |
virtual scalar | sample () const |
Sample the distribution. More... | |
virtual scalar | meanValue () const |
Return the arithmetic mean of the distribution data. More... | |
virtual void | writeData (Ostream &os) const |
Write data to stream. More... | |
virtual void | readData (Istream &os) |
Read data from stream. More... | |
virtual dictionary | writeDict (const word &dictName) const |
Write data in dictionary format. More... | |
virtual void | readDict (const dictionary &dict) |
Read data from dictionary. 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 a given arbitrary probability density function or cumulative distribution function. Input distributions are specified as pairs of (size, probability) (i.e. (point, value) ).
constant/<CloudProperties>
: subModels { injectionModels { <name> { ... sizeDistribution { type general; generalDistribution { cumulative false; distribution ( (<size1> <probability1>) (<size2> <probability2>) ... (<sizeN> <probabilityN>) ); } } } } }
where the entries mean:
Property | Description | Type | Reqd | Deflt |
---|---|---|---|---|
type | Type name: general | word | yes | - |
generalDistribution | Distribution settings | dict | yes | - |
distribution | <size>-<probability> pairs | dict | yes | - |
<size> | Particle size | scalar | yes | - |
<probability> | Volume fraction/probability | scalar | yes | - |
cumulative | Flag to determine if input distribution is specified as cumulative or as density | bool | no | false |
distribution
subdictionary can be given as follows: "(1e-07 1.3)" means 1.3% of particles are modelled with a particle diameter of "1e-7" [m], and so on.general | ( | const dictionary & | dict, |
Random & | rndGen | ||
) |
Construct from components.
Definition at line 96 of file general.C.
References distributionModel::check(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, distributionModel::maxValue_, distributionModel::minValue_, Foam::nl, and Foam::type().
Construct from components.
Allows negative entries
Definition at line 166 of file general.C.
References Foam::endl(), forAll, Foam::max(), distributionModel::maxValue_, Foam::min(), distributionModel::minValue_, Foam::nl, and WarningInFunction.
|
virtualdefault |
Destructor.
TypeName | ( | "general" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Implements distributionModel.
|
delete |
No copy assignment.
|
virtual |
Bin boundaries.
Definition at line 334 of file general.C.
References forAll, Time::New(), and x.
|
virtual |
Probabilities.
Definition at line 348 of file general.C.
References forAll, Time::New(), and y.
|
virtual |
Sample the distribution.
Implements distributionModel.
Definition at line 236 of file general.C.
References alpha, k, Foam::mag(), n, p, and Foam::sqrt().
|
virtual |
Return the arithmetic mean of the distribution data.
Implements distributionModel.
|
virtual |
Write data to stream.
Definition at line 295 of file general.C.
References os(), and general::writeData().
Referenced by general::writeData().
|
virtual |
|
virtual |
Write data in dictionary format.
Definition at line 302 of file general.C.
References dict, dictName(), x, and y.
Referenced by InjectedParticleDistributionInjection< CloudType >::info().
|
virtual |
Read data from dictionary.
Definition at line 316 of file general.C.
References dict, forAll, general::readDict(), x, and y.
Referenced by general::readDict().