Contact not detected

Asked by ipemath

Sir,

I am trying a simple 2d problem and wrote the simulation script for that. During run time, the contact between particles doesnt happen and the projectile just falls through the granular 2d bed. I have exhausted all possibilites to debug this issue and as a last resort posting it in forum. I am posting the complete code for your reference.

from __future__ import division
from yade import geom,utils,pack,timing
import math
import numpy as nu
r=1e-3
steelId=O.materials.append(FrictMat(young=193,poisson=.3,density=8000,frictionAngle=.42285,label='steel'))

h=0

for j in range(8):
 for i in range(32):
  O.bodies.append(utils.sphere([-31e-3+2*r*i,h,0],r,wire=False,color=(1,0,0),material='steel'))
 h=h+2*r
h=h-2*r
r1=2*r
h=h+2*sqrt(2)*r

for j in range(8):
 for i in range(16):
  O.bodies.append(utils.sphere([-30e-3+2*r1*i,h,0],r1,wire=False,color=(0,1,0),material='steel'))
 h=h+2*r1

h=h-2*r1
r2=2*r1
h=h+2*sqrt(2)*r1
for j in range(8):
 for i in range(8):
  O.bodies.append(utils.sphere([-28e-3+2*r2*i,h,0],r2,wire=False,color=(0,0,1),material='steel'))
 h=h+2*r2

h=h-2*r2
r3=2*r2
h=h+2*sqrt(2)*r2
for j in range(8):
 for i in range(4):
  O.bodies.append(utils.sphere([-24e-3+2*r3*i,h,0],r3,wire=False,color=(1,0,1),material='steel'))
 h=h+2*r3
h=h-2*r3
h=h+2*sqrt(3)*r2
id_proj=O.bodies.append(utils.sphere([0,h,0],r3,wire=False,color=(0,1,1),material='steel'))
O.bodies.append(utils.wall(-1e-3,axis=1,color=(1,1,0),material='steel'))
projectile=O.bodies[id_proj]
projectile.state.vel=(0,-10,0)
O.dt=1e-6
O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Wall_Aabb()]),
 InteractionLoop(
   [Ig2_Sphere_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
   [Ip2_FrictMat_FrictMat_MindlinPhys(en=1.0,es=1.0)],
   [Law2_ScGeom_MindlinPhys_Mindlin()],
   ),
 NewtonIntegrator(),
 PyRunner(iterPeriod=50,command='trial()')
 ]

kval=open('kval.dat','w')
def trial():
 kval.write('%g\n'%(O.bodies[478].state.vel[1]))
O.run()

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

Hi,
Is it that the interactions are not created (did you check?) or that you define physical parameters in such a way that it _has to_ fall through the bed?
Bruno

Can you help with this problem?

Provide an answer of your own, or ask ipemath for more information if necessary.

To post a message you must log in.