yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #04957
Re: [Question #171223]: Strange behavior of spheres colliding with a moving facet
Question #171223 on Yade changed:
https://answers.launchpad.net/yade/+question/171223
vadim posted a new comment:
I changed the model and made a "table" from just one facet:
===================================================
def fill_box():
""" fills the box with particles """
def create_layer(N,r,h,offset=0):
""" N -- number of particles in the layer
r -- radius of particles
h -- height of the layer
offset -- initial offset """
if offset==0:
offset=2*r
ni=nj=range(int(math.sqrt(N)))
for i in ni:
for j in nj:
O.bodies.append(utils.sphere((offset+j*r*3,offset+i*r*3,h),r))
for i in range(1):
create_layer(16,0.008,0.01+i*0.018,offset=0.01+float(random.randint(10,20))/2500)
def shake_table():
""" move the table according to the sine law (period T=0.5) """
global pos_table
h=0.02*math.sin(2*pi*O.time*2)
pos_table[2]=h
O.bodies[8].state.pos=pos_table
# handling engines
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
# handle sphere+sphere and facet+sphere collisions
[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.04),
PyRunner(command='shake_table()',virtPeriod=O.dt),
]
# time step
O.dt=1e-08
# MAIN SCENARIO
# Create a box with no roof
O.bodies.append(utils.facetBox((0.05,0.05,0.06),(.05,.05,.1),wallMask=15))
O.materials[0].density=1500
# Create a table
O.bodies.append(utils.facet([(0.15,-0.1,0),(0.15,0.2,0),(-0.15,0.05,0)],color=(1,0,0)))
# copy coordinates of the table into a global variable
pos_table=O.bodies[8].state.pos
# fill the box with spheres
fill_box()
O.saveTmp()
===================================================
Let's compare new results with the previous:
1. Old, two facet table, time step dt=1e-8:
Yade [15]: O.run(2000000)
Yade [16]: O.time
-> [16]: 0.020000000000648145
Yade [17]: O.bodies[15].state.vel
-> [17]: Vector3(0,0,3.0783555450742548)
2. New, one facet table, time step dt=1e-8:
Yade [1]: O.run(2000000)
Yade [2]: O.time
-> [2]: 0.020000000000648145
Yade [3]: O.bodies[15].state.vel
-> [3]: Vector3(0,0,3.6318959155341539)
Conclusions. Number of facets doesn't matter. Yade doesn't work out
sphere/facet interactions properly. Maybe I can use a sphere with huge
radius instead of the facet?
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.