← Back to team overview

yade-users team mailing list archive

Re: [Question #676014]: Determining breaked interactions in JCFpm


Question #676014 on Yade changed:

    Status: Open => Answered

Jérôme Duriez proposed the following answer:

Looking at interactions "i", you may (equivalently) look at
i.phys.breakOccurred, or i.phys.isBroken, see JCFpmPhys doc [1]

However, as you understood, interactions broken in tension will most probably disappear right after breakage (though one way to avoid this behavior is to define neverErase=True in Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM), and it will be impossible to access them (they're gone..)

Depending what you want determine about broken interactions (their locations ? their number ? ..), you may also look at the bodies-related variables JCFpmState.damageIndex, nbBrokenBonds...: b.state.damageIndex where b is a body.

As for the Law2 variable nbShearCracks, nbTensCracks, you classically just have to access the Law2 Python object (let say it's named "object"), and ask for "object.nbTensCracks".

A convenient way of accessing this Law2 Python object is to use labels:
see https://yade-dem.org/doc/user.html#labeling-things

E.g. having in your InteractionLoop definition (in O.engines) :

Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(..., label='object')

Then object.nbTensCracks

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.JCFpmPhys

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