36 namespace distributionModels
52 lambda_(distributionModelDict_.
get<scalar>(
"lambda"))
57 <<
"Rate parameter cannot be equal to or less than zero:" <<
nl 58 <<
" lambda = " << lambda_
77 const scalar u = rndGen_.sample01<scalar>();
78 const scalar qMin =
exp(-lambda_*minValue_);
79 const scalar qMax =
exp(-lambda_*maxValue_);
80 return -(scalar(1)/lambda_)*
log(qMin + u*(qMax - qMin));
86 return scalar(1)/lambda_;
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
dimensionedScalar log(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
addToRunTimeSelectionTable(distributionModel, binned, dictionary)
virtual scalar sample() const
Sample the distribution.
Macros for easy insertion into run-time selection tables.
Particle-size distribution model wherein random samples are drawn from the doubly-truncated exponenti...
defineTypeNameAndDebug(binned, 0)
dimensionedScalar exp(const dimensionedScalar &ds)
virtual void check() const
Check that the distribution model is valid.
virtual scalar meanValue() const
Return the theoretical mean of the distribution.
A library of runtime-selectable doubly-truncated probability distribution models. Returns random samp...
exponential(const dictionary &dict, Random &rndGen)
Construct from components.