← Back to team overview

yade-users team mailing list archive

[Question #235259]: How to count number of interactions

 

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

I want to count the number of collisions between some spheres and a facet. I thought this could be achieved by using the InteractionContainer O.interactions. But for my simple baby example there are no countable interactions.

  tc = 0.001
  en = 0.8
  es = 0.2
  params = utils.getViscoelasticFromSpheresInteraction(tc, en, es)
  frictMatId = O.materials.append(NormalInelasticMat(density=300.0,poisson=0.5,young=1e9))

  ballId=O.bodies.append([
    utils.sphere(center=(0.5,0.5,0.5),radius=.05,material=frictMatId)
  ])

  floor = pack.sweptPolylines2gtsSurface(
    [[
      Vector3(0.0,0.0,0.0),
      Vector3(1.0,0.0,0.0),
      Vector3(1.0,1.0,0.0),
      Vector3(0.0,1.0,0.0),
    ]],
    capStart=True,capEnd=True
  )
  floorIds = O.bodies.append(pack.gtsSurface2Facets(floor))

  O.engines=[
     ForceResetter(),
     InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
     InteractionLoop(
        [Ig2_Facet_Sphere_L3Geom(),Ig2_Sphere_Sphere_L3Geom()],        # collision geometry
        [Ip2_FrictMat_FrictMat_FrictPhys()], # collision "physics"
        [Law2_L3Geom_FrictPhys_ElPerfPl()]   # contact law -- apply forces
     ),
    HarmonicMotionEngine(A=(0.0,0.0,5.25e-3),f=(0.0,0.0,1000/60.0),ids=floorIds),
    NewtonIntegrator(damping=0.2,gravity=(0,0,-9.81))
  ]

  O.dt=0.01*tc
  O.run(2000000,True)

What is the cause of this? Do I interpret the InteractionContainer wrong?

Thanks for any advice

Cheers Reza

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.