# How to use interactionDetectionFactor(>1) to create distance interactions in Ig2_Sphere_Sphere_ScGeom?

Dear all,

I'm looking at ig2_ Sphere_ Sphere_ ScGeom.cpp，it is found that there is only one line of code[1] about the interactionDete

Thanks in advance.

Jie

[1] https:/

## 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:

Jan Stránský (honzik) said : | #1 |

Hello,

Ig2 is only one component in the interaction creation chain. Ig2_ Sphere_ Sphere_ ScGeom.

The [1] check would return false (= no interaction) for the case of no overlap, but it does the computation and returns true (= interaction for further consideration) for interactionDete

It computes penetrationDepth [2] as

Real norm = normal.norm(); // distance of sphere centers

Real penetrationDepth = s1->radius + s2->radius - norm;

so for "distant interactions" i.geom.

Then, also Ip2 and Law2 are evaluated.

E.g. for "classical" Law2_ScGeom_

cheers

Jan

[2] https:/

[3] https:/

[4] https:/

weijie (amandajoe) said : | #2 |

Hi Jan, and thank you again.

Can I think that when interactionDete

Best regards

Jie

Hi, I would say yes. It will calculate data needed for any functor coming later to the interaction later on.

What _will_ be done with it up to the Ip2/Law2 entirely. For most of them it would just do nothing (or even it will attempt to erase the interaction).

Please note that verletDist in the collider should be defined consistently with detectionFactor (verlet dist >= detection dist to not miss any interaction).

Bruno

Jan Stránský (honzik) said : | #4 |

In general #2 is correct.

For polyhedron-

cheers

Jan

weijie (amandajoe) said : | #5 |

Thanks to Jan and Bruno,

>how to enlarge the polyhedron?

For polyhedron-

>How to set stiffness of such distant interaction?

For CPM,I found that Kn and KS are calculated in Law2_ScGeom_

Best regards

Jie

[6]https:/

[7]https:/

[8]https:/

> their crosssection calculation still pi * Rmin ^ 2[8]? If so, is the value of radius should multiplied by interactiondete

I would say no interactiondete

But at this point the question is more: which are you governing equations? "How to implement" can't be answered when equations are not clarified.

Bruno

Sorry for poor typing, here is the version with punctuation and less typos:

I would say no. interactiondete

Jan Stránský (honzik) said : | #8 |

>>how to enlarge the polyhedron?

> For polyhedron-

It is up to you and your needs :-)

For sphere, I think the only meaningful option is to simply enlarge its radius.

For polyhedrons, there more options:

- simply enlarge the polyhedron vertices from the polyhedron center

- wrap the polyhedron with "equidistant" surface, something like Minkowski sum

- surely other meaningful polyhedron enlargement exist

The proper choice depends on the problem.

>> How to set stiffness of such distant interaction?

> The values of kn and Ks depend on crosssection and reflength. For polyhedron - polyhedron, polyhedron - sphere, is their crosssection calculation still pi * Rmin ^ 2[8]? If so, is the value of radius should multiplied by interactiondete

I agree with Bruno that multiplication of these values by interactionDete

In general, the Rmin, cross-section and refLength may be used.

Rmin for polyhedron is currently a rough estimation (or even hack), it can be done in a more sophisticated way if needed - e.g. taking into account orientation of the interaction w.r.t polyhedron orientation.

Cheers

Jan

weijie (amandajoe) said : | #9 |

Thanks to Jan and Bruno.

weijie (amandajoe) said : | #10 |

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