Interactions between a boxes isn't 'real'

Asked by Ramin

Hello there.
I can't find a functor for interactions between box-type objects. There is 'Ig2_Sphere_Sphere_ScGeom()' functor for interactions between spheres, but I don't see similar one for the boxes.
I detect the interaction between two boxes in the attached MWE , but it isn't real, so one box just fall through the other one whereas sphere's behavior is correct.
Help me please to solve this small problem. Thanks a lot.

Interaction that I found when boxes has contact:
In [19]: O.interactions[box_1, box_2].dict()
Out[19]:
{'id1': 0,
 'id2': 1,
 'iterMadeReal': -1,
 'geom': None,
 'phys': None,
 'cellDist': Vector3i(0,0,0),
 'iterBorn': 0,
 'isReal': False}

MWE:
box_1 = O.bodies.append(box((2.5,2.5,0.5), (5,5,1), fixed=True))
box_2 = O.bodies.append(box((2,2,3), (1,1,1)))
sphere = O.bodies.append(sphere((4,4,3), 1, material=FrictMat()))
O.engines = [
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Box_Aabb()]),
    InteractionLoop(
            [Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom()],
            [Ip2_FrictMat_FrictMat_FrictPhys()],
            [Law2_ScGeom_FrictPhys_CundallStrack()]
    ),
    NewtonIntegrator(damping=0.1, gravity=(0,0,-9.81)),
    GlobalStiffnessTimeStepper(),
]

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Best Jan Stránský (honzik) said :
#1

Hello,

> I can't find a functor for interactions between box-type objects. There is 'Ig2_Sphere_Sphere_ScGeom()' functor for interactions between spheres, but I don't see similar one for the boxes.

There is no box-box Ig2 currently in Yade.

> I detect the interaction between two boxes in the attached MWE , but it isn't real

The interaction is "potential" form collider point of view (the axis aligned boxes around the box shapes intersect).
Therefore you have interaction, but without any IGeom (created by Ig2, but it does not exist for box-box), so it is not real.

You would have similar behavior for spheres if you omit Ig2_Sphere_Sphere.

> Help me please to solve this small problem.

The solution is to implement a new Ig2_Box_Box, so in fact not too small problem..

Cheers
Jan

Revision history for this message
Ramin (ginmaru) said :
#2

Thanks Jan Stránský, that solved my question.