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...
#include <general.H>


Public Member Functions | |
| TypeName ("general") | |
| Runtime type information. | |
| general (const dictionary &dict, Random &rndGen) | |
| Construct from components. | |
| general (const UList< scalar > &sampleData, const scalar binWidth, Random &rndGen) | |
| Construct from components. | |
| general (const general &p) | |
| Copy construct. | |
| virtual autoPtr< distributionModel > | clone () const |
| Construct and return a clone. | |
| void | operator= (const general &)=delete |
| No copy assignment. | |
| virtual | ~general ()=default |
| Destructor. | |
| virtual tmp< scalarField > | x () const |
| Bin boundaries. | |
| virtual tmp< scalarField > | y () const |
| Probabilities. | |
| virtual scalar | sample () const |
| Sample the distribution. | |
| virtual scalar | meanValue () const |
| Return the arithmetic mean of the distribution data. | |
| virtual void | writeData (Ostream &os) const |
| Write data to stream. | |
| virtual void | readData (Istream &os) |
| Read data from stream. | |
| virtual dictionary | writeDict (const word &dictName) const |
| Write data in dictionary format. | |
| virtual void | readDict (const dictionary &dict) |
| Read data from dictionary. | |
| 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 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 89 of file general.C.
References distributionModel::check(), dict, distributionModel::distributionModel(), distributionModel::distributionModelDict_, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::GlobalIOList< Tuple2< scalar, vector > >::typeName, distributionModel::maxValue_, distributionModel::minValue_, Foam::nl, rndGen, and Foam::type().
Referenced by clone(), general(), operator=(), and TypeName().


Construct from components.
Allows negative entries
Definition at line 159 of file general.C.
References distributionModel::distributionModel(), Foam::endl(), forAll, Foam::GlobalIOList< Tuple2< scalar, vector > >::typeName, Foam::max(), distributionModel::maxValue_, Foam::min(), distributionModel::minValue_, Foam::nl, rndGen, and WarningInFunction.

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

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

|
delete |
|
virtual |
Bin boundaries.
Definition at line 327 of file general.C.
References forAll, tmp< T >::New(), and x().
Referenced by readDict(), and x().


|
virtual |
Probabilities.
Definition at line 341 of file general.C.
References forAll, tmp< T >::New(), and y().
Referenced by readDict(), and y().


|
virtual |
Sample the distribution.
Implements distributionModel.
Definition at line 229 of file general.C.
References alpha, k, Foam::mag(), n, p, distributionModel::rndGen_, and Foam::sqrt().

|
virtual |
Return the arithmetic mean of the distribution data.
Implements distributionModel.
|
virtual |
|
virtual |
|
virtual |
Write data in dictionary format.
Definition at line 295 of file general.C.
References dict, dictName(), x, and y.
Referenced by InjectedParticleDistributionInjection< CloudType >::info().


|
virtual |