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... | |
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 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 90 of file general.C.
References Foam::check(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and Foam::type().
Referenced by general::clone().


Construct from components.
Allows negative entries
Definition at line 160 of file general.C.
References Foam::endl(), forAll, Foam::max(), Foam::min(), Foam::nl, and WarningInFunction.

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

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

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

|
virtual |
Sample the distribution.
Implements distributionModel.
Definition at line 229 of file general.C.
References Foam::constant::atomic::alpha, k, Foam::mag(), n, p, 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 296 of file general.C.
References dict, dictName(), x, and y.
Referenced by InjectedParticleDistributionInjection< CloudType >::info().


|
virtual |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.