← Back to team overview

yade-users team mailing list archive

Distant and/or multiple interactions

 

Hi

I'm trying to adapt the capillary law to the current contact logic. I'm explaining the problem below in case somebody has suggestion (and this may serve as an exemple for similar situations with multiple interactions).

Currently, solid contacts + capillary forces are handled using one unique interraction physics in which we have data for both elastic law and capillary law. Then, ElasticContactLaw and CapillaryLaw are applied sequentially at each iteration.

The problem :
ElasticContactLaw is "requestingDeletion" as soon as there is no contact, when CapillaryLaw should still do something on the same interaction.

Old solution :
- ElasticLaw was applied first, and could set "isReal=false" when no contact exist - After that, in the same cycle, capillary law could revert this flag, so that the interaction geometry was still computed in the next time step.

Now this solution is not possible because requestDeletion() cannot be reverted.

I see different alternatives, but all of them need to disable, or modify, the code in which the command "requestDeletion()" appears. The problem is this happens in functors, like ef2_Spheres_Elastic_ElasticLaw. So, it is impossible to change this in only one place for all.

What I have in mind now is to add a bool to the parameters of functors (the one I use), and a flag in ElasticContactLaw that would be passed to functors :

- ef2_Spheres_Elastic_ElasticLaw(..., bool allowDelete=true)

By setting this flag false, ElasticLaw will stop deleting anything. Only CapillaryLaw would delete interactions.
This is for a quick solution.

For a more general solution with N interaction laws (*), we could just decide that colliders will erase interractions only if no constitutive law need it. For this purpose, the function "requestDeletion" could be replaced by "requestKeep", and all interactions would be deleted unless *at least one* constitutive law decides otherwise. In this case, the "allowDelete" flag is not needed any more.

What do you think of this?

Bruno


(*) I recall all laws must use the same unique type of interactions, since Yade does not handle multiple interactions between two bodies. This is not a big problem with multiple inheritance. If I want electric(**), elastic, and capillary interactions between bodies, I can simply define a IPhysics class like this :

class ElectroElasticCapillaryInteraction: public ElasticContactInteraction, public ElectricInteraction, public CappilaryInteraction
{ ...

A unique constitutive law inheriting from the "N" individual constitutive laws is possible as well (it doesn't solve the initial problem, since "requestDeletion" is inside functors).

(**) No... I did not implement any electric law yet...




--

_______________
Chareyre Bruno
Maître de Conférences

Grenoble INP
Laboratoire 3SR - bureau E145
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________




Follow ups