← Back to team overview

yade-dev team mailing list archive

Re: Some cleaning in capillary law

 

Hi Jerome,

I introduced isBroken some years ago to deactivate liquid bridges. I used it to simulate rising water level:

O.engines=O.engines+[PyRunner(iterPeriod=100,command='eraseLiquidBridges()')]

def eraseLiquidBridges():
  for i in O.interactions:
    if i.geom.contactPoint[2] < waterLevel and i.isReal:
      i.phys.isBroken=True	#delete liquid bridges below water level

meniscus is set to true by [1] or [2] automatically in the next time step, so in the current version it is not redundant with isBroken and can not be absorbed by it.

This seems to me contradictory (zero volume meniscii might "form" between contacting spheres depending on the succion) and, associated to the test l.139 [3], it leads, in some cases, to interactions that are never deleted, even if there is no more geometrical overlap neither a meniscus with a non-zero amount of water (because erase on l.160 might be switched).

This is more or less a bug, but not harmful since the contact is inactive (does not influence forces on bodies). I use it to remember contacts, that were set to isBroken manually. The code is indeed quite confusing. I think that second condition in [3] can be deleted, since it will never be fulfilled.

[1] https://github.com/yade/trunk/blob/master/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp#L123 [2] https://github.com/yade/trunk/blob/master/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp#L126 [3] https://github.com/yade/trunk/blob/master/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp#L161

Zitat von Jerome Duriez <Jerome.Duriez@xxxxxxxxxxx>:

Hi,

* CapillaryPhys/MindlinPhys.isBroken is a bool attribute that is false by default, never updated, and never usefully used neither in c++ nor py files of source. Furthermore, its meaning according to the doc seems quite redundant with "meniscus". Do you agree if I remove it ? (it = isBroken)

* Furthermore, the design of "meniscus" itself might maybe be improved. Around l. 119 [1], this bool is set to true as soon as there is contact, or if distantMeniscii should be created
And, around l.149 [2], it is set to false when volume is zero.

This seems to me contradictory (zero volume meniscii might "form" between contacting spheres depending on the succion) and, associated to the test l.139 [3], it leads, in some cases, to interactions that are never deleted, even if there is no more geometrical overlap neither a meniscus with a non-zero amount of water (because erase on l.160 might be switched).

I propose to suppress the (meniscus = 0 if volume = 0), and the test on "meniscus" l.139.
I could attach an illustrative script if necessary

Jerome



[1] https://github.com/yade/trunk/blob/master/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp#L119 [2] https://github.com/yade/trunk/blob/master/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp#L149 [3] https://github.com/yade/trunk/blob/master/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp#L139






Follow ups

References