← Back to team overview

yade-users team mailing list archive

Re: [Question #248039]: randomDensePack showing errors

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,


> I am new to yade. I tried to generate a sphere packing using
> randomDensePack but it is giving warning and my laptop hangs thereafter.
> Can somebody Please help me with it?
>

could you please be more specific on "hang" definition? :-) most likely it
is creating the packing, seemingly doing nothing..


>
> Code:
> from yade import pack
> pred=pack.inCylinder(centerBottom=(0,0,-.1),centerTop=(0,0,.1),radius=.05)
> spheres=pack.randomDensePack(pred,spheresInCell=2000,radius=3.5e-3)
> O.bodies.append(spheres)
>
> Error:
> No suitable packing in database found, running PERIODIC compression
> /usr/lib/python2.7/dist-packages/yade/pack.py:293: 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)
>
>
To get rid of this warning (as it says), specify returnSpherePack=False to
randomDensePack, i.e.

spheres=pack.randomDensePack(pred,spheresInCell=2000,radius=3.5e-3,returnSpherePack=False)

you can also specify True, but then you will have to change
O.bodies.append(spheres) command.. not important now :-)


> Also what I am trying is to replace the cubical model of "periodic
> triaxial test simulation"i.e. the last example of
> https://yade-dem.org/doc/tutorial-examples.html  with a cylindrical one.
> Could anyone guide me with how to achieve this?
>
>
The example is meant to be periodic, so the periodicity and cylindrical
shape does not fit together (unless in very special case). I don't use
triaxial engines very often, so others may be helpful here. It would be
also good to know what you want to simulate (i.e. if you are just playing
now leaning yade or trying to start some serious simulation).

cheers
Jan

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