Number of spheres is not true in particleSD method?

Asked by Hien Nguyen

Hello all,
As triaxial users, I bet you know about the method particleSD to generate a desired pack of spheres having a desired distribution of spheres.
I'm using the particleSD to generate my model, here is the code: http://pastebin.com/BFmG3vkr, we'll pay attention at the following:

psdSizes=[0.002,0.003,0.004,0.005,0.006,0.007,0.008,0.0095]
psdCumm=[1,9,25,50,69,90,95,100]
sp.particleSD(mn,mx,0.00575,False,'triaxial_test',10000,psdSizes,psdCumm,False,seed=1)

10000 is the number of spheres. So as I understand, the generated spheres must be as close as this number, right?, but when I run the code, in the terminal I see these line: (as a result of the particleSD code):

fraction #0 (1%, r=0.002): 2376.37 spheres, fraction/cloud volumes 3.35103e-08/0.00796328
fraction #1 (9%, r=0.003): 5632.87 spheres, fraction/cloud volumes 1.13097e-07/0.00796328
fraction #2 (25%, r=0.004): 4752.73 spheres, fraction/cloud volumes 2.68083e-07/0.00796328
fraction #3 (50%, r=0.005): 3802.19 spheres, fraction/cloud volumes 5.23599e-07/0.00796328
fraction #4 (69%, r=0.006): 1672.26 spheres, fraction/cloud volumes 9.04779e-07/0.00796328
fraction #5 (90%, r=0.007): 1163.93 spheres, fraction/cloud volumes 1.43676e-06/0.00796328
fraction #6 (95%, r=0.008): 185.654 spheres, fraction/cloud volumes 2.14466e-06/0.00796328
fraction #7 (100%, r=0.0095): 110.867 spheres, fraction/cloud volumes 3.59136e-06/0.00796328

I sum up the number of spheres and I see that the sum is far much more than 10000 spheres.
(2376+5632+4752+3802+672+1163+85+110=19692, nearly twice the number I declared in the code)

Can you explain this for me?
Thanks in advance.

I'm run it by Yade-daily current latest version on Ubuntu 12.10, and here is the PSD line: http://i.imgur.com/xQh2Oje.png

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Christian Jakob
Solved:
Last query:
Last reply:
Revision history for this message
Best Christian Jakob (jakob-ifgt) said :
#1

Hi,

I checked out your script. It is not a bug. There are just very less informations given in documentation about particleSD [1].
The problem is rMean in this line of your script:
sp.particleSD(mn,mx,0.00575,False,'triaxial_test',10000,psdSizes,psdCumm,False,seed=1)

If you do not have a uniform distribution rMean is not 0.00575 !

possible workarounds:
- use makeCloud instead of particleSD or
- try to calculate/estimate rMean for particleSD or
- decrease rMean value until you get your specified number of particles (try&error)

[1] https://yade-dem.org/doc/yade.pack.html?highlight=particlesd#yade._packSpheres.SpherePack.particleSD

Regards,

Christian

Revision history for this message
Hien Nguyen (giahien) said :
#2

You got it, I just give some comments about this.

Thanks, I tended to leave rMean=-1 in order to let the psdSizes define the radius of the spheres but the code asked so I enter 0.00575 as a (0.002+0.0095)/2 without hesitation, so I thought the "reducing rMean" method you supposed should work and reasonable. (although when I estimate the rMean by the provided PSD curve, the value is nearly 0.005 too)

By the way, as you can see in my code, I already tried the makeCloud method and it seems to be working like a charm..

sp.makeCloud(mn,mx,-1,0,num_spheres,False, 0.95,psdSizes,psdCumm,False,seed=1)

or so, I can't verify exactly like the particleSD since the terminal don't show the same think as particleSD (I mean the percentage + number of spheres for each class of radius) but I think it works since the radius in this case is exactly defined under psdSizes value.

And a little attention for people who want to play with particleSD, with yade-daily, it will be psdCumm=[1,9,25,50,69,90,95,100], but with makeCloud, it should be psdCumm=[0.01,0.09,0.25,0.50,0.69,0.90,0.95,1.00]

The makeCloud is definitely capable of replacing particleSD but I would still want to use it anyway since when I use the code to explain to someone else it makes sense than the makeCloud (yet makeCloud is powerful but particleSD is somehow "cuter"), so I'll also take the 3rd solution.

Regards.

Revision history for this message
Hien Nguyen (giahien) said :
#3

Thanks Christian Jakob, that solved my question.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#4

> I can't verify exactly like the particleSD since the terminal don't show the same think as particleSD

In case you don't know the example script psd.py, it is worth a look. It shows how to generate nice PSD curves after makeCloud.