← Back to team overview

yade-users team mailing list archive

[Question #677658]: check breakOccurred in JCF contact law


New question #677658 on Yade:

Hi all,

I am using the code [1] to check if a particle lose its cohesive contact and consequently belongs or not to a relative aggregate.
But I am not quite sure if i.phys.breakOccurred is really checking if the cohesive break occurred.

My question is:
Inside O.engines should I activate the flag used to trigger retriangulation as soon as a cohesive bond breaks or not?
Example (yes):
		[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=False, Key="Wei", recordCracks=True, breakOccurred(=0))]
Example (no):

		[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=False, Key="Wei", recordCracks=True)]

Thank you,


def addBodyToAggreg(body,aggreg): # auxiliary function, add body [yade.Body instance] and all its neighbors into aggreg (python set instance)
   if body.id in aggreg: # do nothing if b is already in aggreg ...
   aggreg.add(body.id) # ... otherwise add it to aggreg
   intrs = body.intrs()
   for i in intrs: # and add also all its neighbors ...
      if not isinstance(i.phys,JCFpmPhys): # ... but only that connected with JCFpmPhys interactions
      if i.phys.breakOccurred: # ... but only not yet broken
      i2 = i.id1 if i.id2==body.id else i.id2 # choose the other body of interaction
      b2 = O.bodies[i2]
      addBodyToAggreg(b2,aggreg) # and add it and all its neighbors to aggreg

You received this question notification because your team yade-users is
an answer contact for Yade.