randomDensePack got a strange error

Asked by Huihuang Xia

Hi,
When I conduct simulation using randomDensePack in YADE(vision 1.20.0), a strange error occur as follows:
Welcome to Yade 1.20.0
TCP python prompt on localhost:9000, auth cookie `caseus'
XMLRPC info provider on http://localhost:21000
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for showing help), F10 both, F9 generator, F8 plot. ]]

Yade [1]: from yade import pack

Yade [2]: ## construct the predicate first

Yade [3]: pred=pack.inHyperboloid(centerBottom=(0,0,-.1),centerTop=(0,0,.1),radius=.05,skirt=.03)

Yade [4]: ## alternatively: pack.inHyperboloid((0,0,-.1),(0,0,.1),.05,.03)

Yade [5]: ## pack the predicate with spheres (will be explained later)

Yade [6]: spheres=pack.randomDensePack(pred,spheresInCell=2000,radius=3.5e-3)
No suitable packing in database found, running PERIODIC compression
/usr/lib/x86_64-linux-gnu/yade/py/yade/pack.py:296: 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)

Yade [7]: ## add spheres to simulation

Yade [8]: O.bodies.append(spheres)
 -> [8]:
[0,
 1,
 2,
 3,
 4,
 5,
Finally, Yade got a same results as in the tutorial, but when I using randomDensePack to conduct other simulation, it got only this error (No suitable packing in database found, running PERIODIC compression...) without any particles displayed in the 3D view.
Can you help me to solve this problem?
Many thanks.

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 message ("No suitable packing in database found, running PERIODIC compression") is not an error, it just tells you that randomDensePack() has to run a hidden simulation to give you a packing (instead of picking a previously generated packing in the database ie your Yade-use history)

This being said, it's a little sad you mention to us some working commands, but not the actual commands (in a MWE shape, see [*]) that are problematic to you. As it is now, it is very difficult to understand and help with your problem.

Note that a function like O.bodies.append() is always necessary after calling randomDensePack() for the particles to be defined in the simulation (and displayed in the 3D view)

Jerome

[*] https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
Huihuang Xia (huihuangxia) said :
#2

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

Revision history for this message
Huihuang Xia (huihuangxia) said :
#3

Dear Jérôme Duriez,

Thanks for your help, I will read "How to ask questions as a user of Yade" carefully.

Regards.