2 // calculate the new diameter with the standard 1D Rosin Rammler
3 // distribution. Calculation of the mean radius based on SMR rs.
4 // Coefficient factorGamma depends on nExp. Note that Reitz either used
5 // (Schmidt et al., 1999-01-0496) or skipped (Senecal et al.) this factor!
6 // scalar factorGamma = 0.75*sqrt(mathematicalConstant::pi); //nExp=2
7 scalar factorGamma = 1.;
8 scalar delta = dD/factorGamma;
10 // dD is the SMD, and the delta is calculated using gamma
11 // function. Here we assume nExp = 2
12 scalar minValue = dD/10.0;
15 // The pdf value for 4.0*delta is already very small.
16 // scalar maxValue = delta*4.0;
18 if (maxValue - minValue < SMALL)
20 minValue = maxValue/20.0;
23 scalar range = maxValue - minValue;
26 FixedList<scalar, 500> rrd;
27 scalar probFactorMin = exp(-pow(minValue/delta, nExp));
28 scalar probFactorMax = exp(-pow(maxValue/delta, nExp));
29 scalar probFactor = 1.0/(probFactorMin - probFactorMax);
33 scalar xx = minValue + range*n/500;
34 rrd[n] = (probFactorMin - exp(-pow(xx/delta, nExp)))*probFactor;
40 scalar y = rndGen.sample01<scalar>();
43 while(!success && (k<500))
52 x = minValue + range*(k - 0.5)/500.0;