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

2018-05-11 Thread Leticia Morais
Question #668460 on Yade changed:
https://answers.launchpad.net/yade/+question/668460

Status: Answered => Solved

Leticia Morais confirmed that the question is solved:
Thanks Jan.
That solved my question.

Cheers
Leticia

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


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

2018-05-04 Thread Jan Stránský
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.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #668460]: replacing particles with pack.incilynder

2018-05-01 Thread Leticia Morais
New question #668460 on Yade:
https://answers.launchpad.net/yade/+question/668460

Hello everybody,

what I am trying to do is to agglomerate example 
(https://github.com/yade/trunk/tree/master/examples/agglomerate), but instead 
of dividing the sphere of makecloud, i want to replace then with an cylinder 
agglomerates with a hole inside as:

pack.inCylinder((0.0,0.0,0.0),(0.0,0.0,0.05),0.05)-pack.inCylinder((0.0,0.0,0.0),(0.0,0.0,0.05),0.01)
s

but I am not succeeding in it. My script is:


from yade import export,ymport



dim= (1,1,1) # dimensions for makeCloud
radius = 0.05


sp = pack.SpherePack()
sp.makeCloud((0.,0.,0.), dim, rMean=radius, seed=1)
sp.toSimulation()



for s in sp:

cil=pack.inCylinder((s[0][0],s[0][1],s[0][2]),(s[0][0],s[0][1],s[0][2]+0.05),s[1])-pack.inCylinder((s[0][0],s[0][1],s[0][2]),(s[0][0],s[0][1],s[0][2]+0.05),0.01)
sp1=pack.randomDensePack(cil,radius=0.01, returnSpherePack=True)


I am not sure if i can do that, I am sorry but I am still learning yade. I have 
seen question #403360 (https://answers.launchpad.net/yade/+question/403360) and 
I couldn't use it to solve my problem.

Is there another way of replacing the sphere by the pack? Can I use regularHexa 
instead of randomdensePack?

hope you can solve my problem.
thanks a lot 

Leticia 



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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp