← Back to team overview

yade-users team mailing list archive

Re: [Question #268041]: Unable to place new sphere after 5000 attempts

 

Question #268041 on Yade changed:
https://answers.launchpad.net/yade/+question/268041

    Status: Open => Answered

Jérôme Duriez proposed the following answer:
Hi,

According to the source code of CircularFactory [*], sphere packing creation here consists in filling the defined volume with spheres, through repeted random attempts:
for each new sphere creation trial, it is checked that the new sphere does not overlap with existing ones. Otherwise the new sphere is not created. 
If new sphere creation is at some point unsuccessfull after a given maximum attempt number (seems to be 5000), procedure stops and you end up with a packing not corresponding to what you asked for (or no packing at all maybe)

This procedure is quite classical in Yade (e.g. makeCloud() function
uses a similar one). It is simply not possible to obtain any desired
packing within any volume through such random geometrical packing
algorithm. Solution is usually to modify the required PSD parameters, so
that the random filling without overlaps has more chances to be
successfull.

[*]
https://github.com/yade/trunk/blob/51d5727f14cb0b38c807b22e93d6fec1b0ead862/pkg/dem/SpheresFactory.cpp
with your error message at line 154. I understand it may sound tough for
newcomers, but it is the magic of opensource codes..

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.