← Back to team overview

yade-users team mailing list archive

Re: [Question #237548]: YADE stops when click [Show 3D] button

 

Dear Jan, 


Thanks for help. The following is the code. 


from yade import pack, plot
O.bodies.append(utils.geom.facetBox((.5,.5,1),(.5,.5,1),wallMask=29))

O.bodies.append(utils.geom.facetBunker((.5,.5,1.5),1,0.5,4,0.5,hPipe=0.1))

O.bodies.append(utils.geom.facetBox((1.25,0.5,.25),(.25,.25,.25),wallMask=2))
O.bodies.append(utils.geom.facetBox((1.25,0.5,.25),(.25,.25,.25),wallMask=4))
O.bodies.append(utils.geom.facetBox((1.25,0.5,.25),(.25,.25,.25),wallMask=8))
O.bodies.append(utils.geom.facetBox((1.25,0.5,.25),(.25,.25,.25),wallMask=16))
O.bodies.append(utils.geom.facetBox((1.25,0.5,.25),(.25,.25,.25),wallMask=32))

O.bodies.append(facet([(1,0,2),(1,1,2),(1,1,0.5)],dynamic=False))
O.bodies.append(facet([(1,0,2),(1,1,0.5),(1,0,0.5)],dynamic=False))

O.bodies.append(facet([(1,0,0.5),(1,0.25,0.5),(1,0.25,0)],dynamic=False))
O.bodies.append(facet([(1,0,0.5),(1,0.25,0),(1,0,0)],dynamic=False))

O.bodies.append(facet([(1,0.75,0.5),(1,1,0.5),(1,1,0)],dynamic=False))
O.bodies.append(facet([(1,0.75,0.5),(1,1,0),(1,0.75,0)],dynamic=False))

#O.materials.append(FrictMat(density=2e3,young=30e6,poisson=.2,frictionAngle=.6,label="soils"))

sp=pack.SpherePack()
sp.makeCloud((0.15,0.15,2),(0.85,0.85,6.5),rMean=.02)##,rRelFuzz=0.)
sp.toSimulation()

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_L3Geom(),Ig2_Facet_Sphere_L3Geom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_L3Geom_FrictPhys_ElPerfPl()]
   ),
   GravityEngine(gravity=(0,0,-9.81)),
   NewtonIntegrator(damping=0.05),
   PyRunner(command='checkUnbalanced()',realPeriod=2),
   PyRunner(command='addPlotData()',iterPeriod=100)
]

O.dt=.5*utils.PWaveTimeStep()
O.trackEnergy=True

def checkUnbalanced():
   if utils.unbalancedForce()<.05:
      O.pause()
      plot.saveDataTxt('bbb.txt.bz2')

def addPlotData():
   plot.addData(i=O.iter,unbalanced=utils.unbalancedForce(),**O.energy)
   
yade.qt.View();

#plot.plots={'i':('unbalanced',None,O.energy.keys)}
#plot.plot()
O.saveTmp()


I have one more question:
How I change the properties of the spheres that I already created using makecloud.
 
Thank you very much,
Best Regards,


Alsidqi




On Wednesday, November 6, 2013 11:02 PM, Jan Stránský <question237548@xxxxxxxxxxxxxxxxxxxxx> wrote:
 
Question #237548 on Yade changed:
https://answers.launchpad.net/yade/+question/237548

Jan Stránský posted a new comment:
Hi Alsidqi,

sorry for late relpy. Could you please attach an example script (just copy
it to the mail body) reproducing the error? If you could delete unnecessary
code, it would be nice :-) With the script we can try to run it and it will
help us to solve the prbolem
Thanks
Jan


2013/11/3 Alsidqi Hasan <question237548@xxxxxxxxxxxxxxxxxxxxx>

> Question #237548 on Yade changed:
> https://answers.launchpad.net/yade/+question/237548
>
> Alsidqi Hasan posted a new comment:
> Dear Yade user,
>
> I am using facetBunker (funnel like shape) to rain the particles. It
> gave me the following problem:
>
> IndexError                                Traceback (most recent call last)
> /usr/lib/yade/py/yade/__init__.pyc in <module>()
>
> /usr/lib/yade/py/yade/__init__.pyc in checkUnbalanced()
>      51    if utils.unbalancedForce()<.05:
>      52       O.pause()
> ---> 53       plot.saveDataTxt('bbb.txt.bz2')
>      54
>      55 def addPlotData():
>
> /usr/lib/yade/py/yade/plot.pyc in saveDataTxt(fileName, vars)
>     641         else: f=open(fileName,'w')
>     642         f.write("# "+"\t\t".join(vars)+"\n")
> --> 643         for i in range(len(data[vars[0]])):
>     644                 f.write("\t".join([str(data[var][i]) for var in
> vars])+"\n")
>     645         f.close()
>
> IndexError: list index out of range
>
> I can avoid this error by reducing number of particles significantly. Is
> there anyone can help me what is the IndexError: list index out of range
> means? and what is the work around so that I can use the funnel but at
> the same time don't want to reduce the number of particle.
>
> Thank you,
> Best Regards,
>
> Alsidqi
>
> --
> 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     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
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     : yade-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Follow ups

References