sphere-pack generation using Constructive Solid Geometry returning error

Asked by Harsh Patel

Hello all,
I wish to generate a sphere-pack in a cylindrical predicate according to a given cumulative size distribution for my project. For learning, I ran the following code given on Pg 49 in the YADE documentation:
>>
from yade import pack
## construct the predicate first
pred=pack.inHyperboloid(centerBottom=(0,0,-.1),centerTop=(0,0,.1),radius=.05,skirt=.03)
## pack the predicate with spheres (will be explained later)
spheres=pack.randomDensePack(pred,spheresInCell=2000,radius=3.5e-3)
## add spheres to simulation
O.bodies.append(spheres)
>>
And I got the following error:
**No suitable packing in database found, running PERIODIC compression
/usr/lib/x86_64-linux-gnu/yade/py/yade/pack.py:368: FutureWarning: The default behavior will change; specify returnSpherePack=True for the new behavior, and False to get rid of this warning (your code will break in the future, however). The returned SpherePack object can be added to the simulation using SpherePack.toSimulation()
  warnings.warn('The default behavior will change; specify returnSpherePack=True for the new behavior, and False to get rid of this warning (your code will break in the future, however). The returned SpherePack object can be added to the simulation using SpherePack.toSimulation()',category=FutureWarning)**

I tried running using .toSimulation() command but got similar error. Please let me know where the problem lies.
HP.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jérôme Duriez
Solved:
Last query:
Last reply:
Revision history for this message
Best Jérôme Duriez (jduriez) said :
#1

Hi,

This is not an error, just a warning: a FutureWarning actually, which is about what may happen in the future, according to the ideas developers had at some point when they coded this warning [*]

I think you can disregard it for now: launching this code here with yadedaily (2018.02b-1590728525~xenial) indeed gives me a packing with some hyperboloid shape. Did you observe another behavior ?

[*] YADE development being just a human enterprise, these ideas may or may not materialize, and the warning may or may not accurately predict the future.

Revision history for this message
Harsh Patel (j0hnn1e) said :
#2

Thanks Jérôme Duriez, that solved my question.