Box/Wall - Sphere contact with periodic boundaries

Asked by Jérôme Duriez

Hi,

I'm lost about the contact between box or wall with spheres with periodic boundaries (this is not related to the allowBiggerThanPeriod flag, that I'm using).

Consider 9 spheres lying on a box, in a periodic cell. The cell includes exactly the 9 spheres, and the box may change in size. Its surface may approach the one of the cell, or may be bigger (see script below)

   - if the surface of the box is 90% the one of the cell (set howBig = 0.45 in the script below), I get my 9 sphere-box interactions, fine !
   - if the box fills exactly (in surface) the cell (howBig = 0.5) => only 6 spheres are detected as in contact with the box.. (or 4 if I put radius = 0.5, so that there is normally exact geometrical contact)
   - if howBig = 0.6 (the box extends beyond the limits of the cell) => 6 spheres in contact, for both radii tested (0.5 - exact contact - or 0.55 - overlap)
   - if howBig = 1000 => there are 3 spheres in contact with the box.....

If I use a wall I got 3 spheres-wall contact for radius = 0.5, and 6 for radius = 0.55, but not 9.... May someone explain to me these results ? (or confirm that there is a bug ?)

Jérôme

PS : the script :
# encoding: utf-8

O.periodic=1
O.cell.setBox(3,3,3)
for i in range(0,3):
    for j in range (0,3):
        O.bodies.append(sphere(center=Vector3(i+0.5,j+0.5,1.5),radius=0.55,dynamic=0))

howBig=0.45
O.bodies.append(box(center=Vector3(1.5,1.5,0.9),extents=Vector3(howBig*3,howBig*3,0.1)))

O.engines=[
 ForceResetter()
 ,InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()],allowBiggerThanPeriod=1)
 ,InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()])
        ,NewtonIntegrator(damping=0.2)
 ]

O.dt=1.e-5
O.step()

print '\nhowBig =',howBig,':', O.interactions.withBody(9).__len__(),'interactions with the box\n'

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

>this is not related to the allowBiggerThanPeriod flag, that I'm using

If so please show the problem without this flag, since it has known bugs.
https://bugs.launchpad.net/yade/+bug/1112763

Revision history for this message
Jérôme Duriez (jduriez) said :
#2

Ok, I meant "this is not related to the non-use of allowBiggerThanPeriod, please do not answer me : do you use the allowBiggerThanPeriod flag ?"

But I need at the moment using big bodies with respect to the size, so it is non-sense for me to remove it.

It might indeed be related to the bug you linked (thanks, I was not aware of it). In this case this bug would appear not only in "VERY specific case"..

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#3

If this is the same bug, I can't tell I will fix anytime soon.
You can try to find the problem in the collider. Not easy.
Or try a real simulation and see if the bug is really a problem in this case.

Can you help with this problem?

Provide an answer of your own, or ask Jérôme Duriez for more information if necessary.

To post a message you must log in.