← Back to team overview

yade-users team mailing list archive

[Question #680904]: simulation problem between sphere and polyhedra

 

New question #680904 on Yade:
https://answers.launchpad.net/yade/+question/680904

hello 
i was simulating the contact between sphere and polyhedra, but there is a problem:when the particle When particles come into contact with the boundary which formed by polyhedra with fixed position, it It bounces up and then fly away,moreover, the polyhedra paticle just get though the boundary, and finally only a few sphere left in the contain form by polyhedron boundary.
below is my code:
from yade import polyhedra_utils,pack,plot,utils
import random

#m  = PolyhedraMat(young=1e10,poisson=.05)
n = FrictMat(young=1e9,poisson=.2)

O.materials.append(n)

#the boundary of particle flow
v1=((0,0,0),(0,3.2,0),(0,0,6),(0,3.2,6),(-0.1,0,0),(-0.1,3.2,0),(-0.1,0,6),(-0.1,3.2,6))
v2=((0,0,0),(0,0,6),(18,0,0),(18,0,6),(0,0.1,0),(0,0.1,6),(18,0.1,0),(18,0.1,6))
v3=((0,3.1,0),(0,3.1,6),(18,3.1,0),(18,3.1,6),(0,3.2,0),(0,3.2,6),(18,3.2,0),(18,3.2,6))
v4=((0,0,0),(0,3.2,0),(18,3.2,0),(18,0,0),(0,0,-0.1),(0,3.2,-0.1),(18,3.2,-0.1),(18,0,-0.1))
v5=((3,0.1,0),(3,3.1,0),(3,0.1,6),(3,3.1,6),(3.1,0.1,0),(3.1,3.1,0),(3.1,0.1,6),(3.1,3.1,6))
b1 = polyhedra_utils.polyhedra(material=n,v=v1,fixed=True) # you can set wire at 
b2 = polyhedra_utils.polyhedra(material=n,v=v2,fixed=True) 
b3 = polyhedra_utils.polyhedra(material=n,v=v3,fixed=True)
b4 = polyhedra_utils.polyhedra(material=n,v=v4,fixed=True)
wall = polyhedra_utils.polyhedra(material=n,v=v5,fixed=True)
b2.shape.wire=True
  
O.bodies.append((b1,b2,b3,b4,wall))




#polyhedra_utils.fillBox((0,0,0),(10,10,20),m,seed=1)

#sphere particles mixed with polyhedra
sp=pack.SpherePack()
sp.makeCloud((0,0,10),(3,3,30),psdSizes=[0.1,0.5,0.8],psdCumm=(0.5,0.8,1),seed=1)

for center,radius in sp:
    if radius >= 0.3:
        t = polyhedra_utils.polyhedra(n,(radius,radius,radius))
        t.state.pos = center # sets polyhedron position according to sphere position
        O.bodies.append(t)
    else:
        t = sphere(center,radius,material=n)
        O.bodies.append(t)
#simulation
O.engines = [
    ForceResetter(),
    InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Sphere_Aabb()]),
    InteractionLoop(
        [Ig2_Polyhedra_Polyhedra_ScGeom(),
         Ig2_Sphere_Polyhedra_ScGeom(),
         Ig2_Sphere_Sphere_ScGeom()],
        [Ip2_FrictMat_FrictMat_FrictPhys()],  
        [Law2_ScGeom_FrictPhys_CundallStrack()]  # contact law -- apply forces
    ),
    # GravityEngine(gravity=(0,0,-9.81)),
    NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
    PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker')
]
O.dt=5e-5
     

O.trackEnergy=True

def checkUnbalanced():
   if unbalancedForce()<.05:
      O.pause()
     
def addPlotData():
   # each item is given a names, by which it can be the unsed in plot.plots
   # the **O.energy converts dictionary-like O.energy to plot.addData arguments
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

# define how to plot data: 'i' (step number) on the x-axis, unbalanced force
# on the left y-axis, all energies on the right y-axis
# (O.energy.keys is function which will be called to get all defined energies)
# None separates left and right y-axis
plot.plots={'i':('unbalanced',None,O.energy.keys)}

# show the plot on the screen, and update while the simulation runs
plot.plot()

O.saveTmp()

i would appreciate if if you can help me


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