regarding clumps from randomdensepack

Asked by Nishith Agarwal

hi

I am trying to study mixing of solid particles. I am trying to use the randomdensepack command to generate a packing of spheres and then use it as a clump of spheres. Can anyone tell me how to use define a clump of spheres using the packing generated because i have tried many things but am always getting some error.

Thank you

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anton Gladky (gladky-anton) said :
#1

Hi,

what error do you have? Please, provide a problem test-script.

Anton

Revision history for this message
Jan Stránský (honzik) said :
#2

Hello,

could you please provide us with a simple script and obtained errors?
Thanks
Jan
Dne 16.5.2012 23:25 "Nishith Agarwal" <email address hidden>
napsal(a):

> New question #197489 on Yade:
> https://answers.launchpad.net/yade/+question/197489
>
> hi
>
> I am trying to study mixing of solid particles. I am trying to use the
> randomdensepack command to generate a packing of spheres and then use it
> as a clump of spheres. Can anyone tell me how to use define a clump of
> spheres using the packing generated because i have tried many things but am
> always getting some error.
>
> Thank you
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Nishith Agarwal (neelu-agarwal09) said :
#3

Hello,
here is my test script
from yade import pack,timing, ymport, qt, plot

sp=pack.SpherePack()
pred=pack.inHyperboloid(centerBottom=(0,0,-.1),centerTop=(0,0,.1),radius=.05,skirt=.03)
spheres=pack.randomDensePack(pred,spheresInCell=2000,radius=3.5e-3)
c1= O.bodies.appendClumped ([spheres])
sp.makeClumpCloud((0,0,0),(15,15,15),[c1],periodic=False)
sp.toSimulation()

O.bodies.append(utils.wall(position=0,axis=2))

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()],
 ),
 GravityEngine(gravity=(0,0,-100)),
 NewtonIntegrator(damping=0),
]
O.dt=.7*utils.PWaveTimeStep()
O.saveTmp()
O.step()

and i get the following error
  File "test4.py", line 6, in <module>
    c1= O.bodies.appendClumped ([spheres])

TypeError: No registered converter was able to produce a C++ rvalue of type boost::shared_ptr<Body> from this Python object of type list

this is my first time using yade so dont be surprised if i am doing something horribly wrong :)

Revision history for this message
Jan Stránský (honzik) said :
#4

Hello Nishith,

the first solution is to use

c1= O.bodies.appendClumped (spheres) # without braces around speheres

then you will have problems on the next line, as c1 is tuple of int and list of ints.. I have never used makeClumpCloud, so I dont know how to fix it, hopefully somebody else will help you :-)

Jan

On 21.5.2012 20:20, Nishith Agarwal wrote:
> from yade import pack,timing, ymport, qt, plot
>
> sp=pack.SpherePack()
> pred=pack.inHyperboloid(centerBottom=(0,0,-.1),centerTop=(0,0,.1),radius=.05,skirt=.03)
> spheres=pack.randomDensePack(pred,spheresInCell=2000,radius=3.5e-3)
> c1= O.bodies.appendClumped ([spheres])
> sp.makeClumpCloud((0,0,0),(15,15,15),[c1],periodic=False)
> sp.toSimulation()
>
> O.bodies.append(utils.wall(position=0,axis=2))
>
> O.engines=[
> ForceResetter(),
> InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
> InteractionLoop(
> [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
> [Ip2_FrictMat_FrictMat_FrictPhys()],
> [Law2_ScGeom_FrictPhys_CundallStrack()],
> ),
> GravityEngine(gravity=(0,0,-100)),
> NewtonIntegrator(damping=0),
> ]
> O.dt=.7*utils.PWaveTimeStep()
> O.saveTmp()
> O.step()
>
> and i get the following error
> File "test4.py", line 6, in<module>
> c1= O.bodies.appendClumped ([spheres])

Revision history for this message
Jan Stránský (honzik) said :
#5

Hello Nishith,

the first solution is to use

c1= O.bodies.appendClumped (spheres) # without braces around speheres

then you will have problems on the next line, as c1 is tuple of int and list of ints.. I have never used makeClumpCloud, so I dont know how to fix it, hopefully somebody else will help you :-)

Jan

On 21.5.2012 20:20, Nishith Agarwal wrote:
> from yade import pack,timing, ymport, qt, plot
>
> sp=pack.SpherePack()
> pred=pack.inHyperboloid(centerBottom=(0,0,-.1),centerTop=(0,0,.1),radius=.05,skirt=.03)
> spheres=pack.randomDensePack(pred,spheresInCell=2000,radius=3.5e-3)
> c1= O.bodies.appendClumped ([spheres])
> sp.makeClumpCloud((0,0,0),(15,15,15),[c1],periodic=False)
> sp.toSimulation()
>
> O.bodies.append(utils.wall(position=0,axis=2))
>
> O.engines=[
> ForceResetter(),
> InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
> InteractionLoop(
> [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
> [Ip2_FrictMat_FrictMat_FrictPhys()],
> [Law2_ScGeom_FrictPhys_CundallStrack()],
> ),
> GravityEngine(gravity=(0,0,-100)),
> NewtonIntegrator(damping=0),
> ]
> O.dt=.7*utils.PWaveTimeStep()
> O.saveTmp()
> O.step()
>
> and i get the following error
> File "test4.py", line 6, in<module>
> c1= O.bodies.appendClumped ([spheres])

Revision history for this message
Nishith Agarwal (neelu-agarwal09) said :
#6

Hello,
i removed the braces around spheres and now get folowing error

File "test4.py", line 7, in <module>
    sp.makeClumpCloud((0,0,0),(15,15,15),[c1],periodic=False)
TypeError: No registered converter was able to produce a C++ rvalue of type boost::shared_ptr<SpherePack> from this Python object of type tuple
somebody plz help

Revision history for this message
Launchpad Janitor (janitor) said :
#7

This question was expired because it remained in the 'Open' state without activity for the last 15 days.