37 namespace distributionModels
53 lambda_(distributionModelDict_.getCompat<scalar>(
"lambda", {{
"d", 2106}})),
54 n_(distributionModelDict_.get<scalar>(
"n"))
56 if (lambda_ < VSMALL || n_ < VSMALL)
59 <<
"Scale/Shape parameter cannot be equal to or less than zero:" 60 <<
" lambda = " << lambda_
71 const massRosinRammler&
p 88 const scalar a = scalar(3)/n_ + scalar(1);
92 const scalar u = rndGen_.position<scalar>(cdfA, cdfB);
94 d = lambda_*
pow(
x, scalar(1)/n_);
96 }
while (std::isnan(d));
105 return lambda_*tgamma(scalar(1)/n_ + scalar(1));
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.
addToRunTimeSelectionTable(distributionModel, binned, dictionary)
virtual scalar meanValue() const
Return the theoretical mean of the distribution.
Macros for easy insertion into run-time selection tables.
scalar incGamma_P(const scalar a, const scalar x)
Lower incomplete gamma function.
defineTypeNameAndDebug(binned, 0)
massRosinRammler(const dictionary &dict, Random &rndGen)
Construct from components.
scalar invIncGamma(const scalar a, const scalar P)
Inverse of regularised lower incomplete gamma function.
static void check(const int retVal, const char *what)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
A library of runtime-selectable doubly-truncated probability distribution models. Returns random samp...
virtual scalar sample() const
Sample the distribution.
Particle-size distribution model wherein random samples are drawn from the two-parameter Rosin-Rammle...