← Back to team overview

yade-users team mailing list archive

Re: Uniform distribution

 

It is fixed. Tell me if you find problems again.

Bruno

Bruno Chareyre a écrit :
I found a problem I think. Thank you for that.
This line is in fact generating r/rmean between (1- 0.5dev) and (1 + 0.5dev). I'll fix in a minute.

Real r=(rnd()-.5)*rRelFuzz*rMean+rMean;

It doesn't explain non uniformity though. You are using a recent version right (I fixed a distribution bias in r1865)?

Bruno

Hi all,

perhaps (but I could be wrong) I found an error in the generation of a uniform distribution of radii used in Yade. As some have already pointed out in previous emails the uniform distribution is such that:

R_min = R_mean * (1-
StdDev)
R_max = R_mean * (1+StdDev)

In Yade we define a StdDev and a R_mean and with such values we generate the distribution but if I check the results in terms of R_max and R_min, I do not see a correspondence with the values I should obtain as performed above. Moreover I have tried to see if the distribution is uniform between the values of R_max and R_min I obtain from Yade and actually between them the distribution is not uniform. So, what's wrong here? I need to use a uniform distribution, I have tried to look at the possible available distributions in boost but what I need is that one used in Yade (boost::uniform_real<>(0,1)) that to me doesn't work properly and I do not understand why.
Any suggestions?
Thanks a lot,

Chiara

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp





--
_______________
Bruno Chareyre
Associate Professor
Grenoble INP
Lab. 3SR
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________




References