← Back to team overview

yade-users team mailing list archive

Re: [Question #668460]: replacing particles with pack.incilynder

 

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

    Status: Open => Answered

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

> but I am not succeeding in it

please always try to be more specific.. like "I got this error", "The
resulting packing does not look like what I want"...

> Can I use regularHexa instead of randomdensePack?

yes, sure

concerning examples/agglomerate, you can just change the inSphere part
in divide.py to something like below. Change the values labeled by TODO
according to your needs.

######
...
for si,s in enumerate(sp):
   radius = s.shape.radius * sqrt(2) # TODO
   heightHelf = s.shape.radius * sqrt(2) # TODO # sqrt(r^2+hh^2) should be <= s.shape.radius
   radius2 = .2*radius # TODO
   vecHalfH = Vector3(0,0,heightHelf) # TODO random direction?
   bot = s.state.pos - vecHalfH
   top = s.state.pos + vecHalfH
   cyl = pack.inCylinder(bot,top,radius) - pack.inCylinder(bot,top,radius2)
   sp1 = pack.randomDensePack(
      cyl,
      ...
   )
   ...
######

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.