Volume fraction of spheres appear to be far too less using Makecloud

Asked by Sanny

Hello,

I just started with this package. My goal is to generate random (non-overlapping) spheres in accordance with particle size distribution. I want to achieve a volume fraction of spheres equal to approximately 70%. I followed the online manual and came up with the following code:

# 25 mm cube, with vol frac of spheres=0.7
from yade import pack, export, qt
from math import *
Lx=25e-3
sp=pack.SpherePack()
sp.makeCloud(minCorner=(0,0,0),maxCorner=(Lx,Lx,Lx),porosity=0.3,psdSizes=[2e-3,4e-3,6e-3,8e-3,10e-3,12e-3,14e-3,16e-3],psdCumm=[0.01,0.23,0.4,0.6,0.75,0.93,0.98,1])
sp.toSimulation()
qt.Controller()
qt.View()
export.text('spheres')

I have no problems with the run, I get the output file called 'spheres'. But when I calculate the volume fraction of spheres within the 25 mm cube, I find it to be incredibly small (less than 20%) and the number of particles is way too small.

I am sure I am missing something in the makeCloud that is giving me such low values. I would have expected at least 400 plus particles.

Would any of you be so kind to help me out with the above code.

The screen output looks like this:

-------------
Welcome to Yade 1.07.0
TCP python prompt on localhost:9000, auth cookie `secuda'
XMLRPC info provider on http://localhost:21000
Running script test1.py
/usr/lib/python2.7/dist-packages/IPython/frontend.py:30: UserWarning: The top-level `frontend` package has been deprecated. All its subpackages have been moved to the top `IPython` level.
  warn("The top-level `frontend` package has been deprecated. "
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for showing help), F10 both, F9 generator, F8 plot. ]]
--------------

The spheres file has the following data:

#format x_y_z_r
0.00340762 0.00955894 0.018026 0.00334986
0.00696167 0.0172939 0.0189378 0.00417147
0.0111412 0.00602221 0.00908746 0.00583889
0.019339 0.0165512 0.00921438 0.00474594
0.0205392 0.0178629 0.0191574 0.00424171
0.0147442 0.0202884 0.00583614 0.00177721
0.0199264 0.00781992 0.0112529 0.00128409
0.0170094 0.00858523 0.0191854 0.00560053
0.022655 0.00516024 0.0125429 0.00145099
0.012582 0.0153632 0.00598169 0.00256647

Thank you,
Sanny

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hi Sanny,

see documentation of makeCloud [1]: "Create random loose packing ..."

to create denser packing, have a look at randomDensePack [2] or
randomPeriPack [3].

cheers
Jan

[1]
https://yade-dem.org/doc/yade.pack.html#yade._packSpheres.SpherePack.makeCloud
[2] https://yade-dem.org/doc/yade.pack.html#yade.pack.randomDensePack
[3] https://yade-dem.org/doc/yade.pack.html#yade.pack.randomPeriPack

2015-05-24 20:36 GMT+02:00 Sanny <email address hidden>:

> New question #267328 on Yade:
> https://answers.launchpad.net/yade/+question/267328
>
> Hello,
>
>
> I just started with this package. My goal is to generate random
> (non-overlapping) spheres in accordance with particle size distribution. I
> want to achieve a volume fraction of spheres equal to approximately 70%. I
> followed the online manual and came up with the following code:
>
> # 25 mm cube, with vol frac of spheres=0.7
> from yade import pack, export, qt
> from math import *
> Lx=25e-3
> sp=pack.SpherePack()
>
> sp.makeCloud(minCorner=(0,0,0),maxCorner=(Lx,Lx,Lx),porosity=0.3,psdSizes=[2e-3,4e-3,6e-3,8e-3,10e-3,12e-3,14e-3,16e-3],psdCumm=[0.01,0.23,0.4,0.6,0.75,0.93,0.98,1])
> sp.toSimulation()
> qt.Controller()
> qt.View()
> export.text('spheres')
>
> I have no problems with the run, I get the output file called 'spheres'.
> But when I calculate the volume fraction of spheres within the 25 mm cube,
> I find it to be incredibly small (less than 20%) and the number of
> particles is way too small.
>
> I am sure I am missing something in the makeCloud that is giving me such
> low values. I would have expected at least 400 plus particles.
>
> Would any of you be so kind to help me out with the above code.
>
> The screen output looks like this:
>
> -------------
> Welcome to Yade 1.07.0
> TCP python prompt on localhost:9000, auth cookie `secuda'
> XMLRPC info provider on http://localhost:21000
> Running script test1.py
> /usr/lib/python2.7/dist-packages/IPython/frontend.py:30: UserWarning: The
> top-level `frontend` package has been deprecated. All its subpackages have
> been moved to the top `IPython` level.
> warn("The top-level `frontend` package has been deprecated. "
> [[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key
> for showing help), F10 both, F9 generator, F8 plot. ]]
> --------------
>
> The spheres file has the following data:
>
> #format x_y_z_r
> 0.00340762 0.00955894 0.018026 0.00334986
> 0.00696167 0.0172939 0.0189378 0.00417147
> 0.0111412 0.00602221 0.00908746 0.00583889
> 0.019339 0.0165512 0.00921438 0.00474594
> 0.0205392 0.0178629 0.0191574 0.00424171
> 0.0147442 0.0202884 0.00583614 0.00177721
> 0.0199264 0.00781992 0.0112529 0.00128409
> 0.0170094 0.00858523 0.0191854 0.00560053
> 0.022655 0.00516024 0.0125429 0.00145099
> 0.012582 0.0153632 0.00598169 0.00256647
>
>
> Thank you,
> Sanny
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Jérôme Duriez (jduriez) said :
#2

Indeed, makeCloud is designed to generate a "gas" of particles: samples with very high porosities (e.g. voidVolume = 0.7 totalVolume). Such samples are obtained through random attempts to put spheres inside a given volume (between minCorner and maxCorner), checking that there is no contact between spheres.
If, at one point, the random attempts fail to find an empty space for new spheres, the final number of spheres can be much lower than the expected number.

In the end, this function is not appropriate to your goals, as Jan pointed out. In addition to the proposed functions, a classical workflow is to use "makeCloud" to generate a sample similar to the one sought (in terms of particle number and psd), and, then, to reach desired porosity through the simulation of an isotropic compression.

Revision history for this message
Sanny (situ2007) said :
#3

Dear Jan/Jerome,

Thank you very much for the quick response.

I understand your explanation. I have further questions on the same subject please.

I defined psdSize and number of particles and defined the box to be of very large size. Thus Yade gave me accurate psdSize spheres.

From your test, I understood that In the next step, I have to use something like:
pred=define a box here.
spheres=pack.randomDensePack(pred, ...) # pack random spheres within the box
O.bodies.append(spheres)

Will the above few lines suffice? Or did you mean that I have to run some sort of Triaxial test example, wherein the 'spheres' is inserted in the predicate by compression test.

Thank you,
Sanny

Revision history for this message
Jérôme Duriez (jduriez) said :
#4

Not really:

- either you use pack.randomDensePack which returns - in one step - a sphere assembly, in a dense state, located inside the predicate. No need to use makeCloud first here.

- or you use makeCloud (=> generates assembly but with a very loose state), then perform a sort of TriaxialTest (to confer this now existing assembly a dense state)

Both methods are not to be used together.

Revision history for this message
Sanny (situ2007) said :
#5

Thank you very much Jerome. It is clear now.

I presume that randomDensePack will not allow desired PSD to be defined?

In that case, the second option is the only one? I will try to use the triaxial example, but in the meantime, is there a script that can allow to check for desired porosity being reached? I saw a few threads that discusses this but in the end it was not clear to me.

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

1> I will try to use the triaxial example
Great move.

2> is there a script that can allow to check for desired porosity
GOTO 1

Note: randomDensePack is only hiding what the triaxial test script does. It makes nothing different.

Bruno

Can you help with this problem?

Provide an answer of your own, or ask Sanny for more information if necessary.

To post a message you must log in.