← Back to team overview

yade-users team mailing list archive

Re: [Question #706667]: 'JCFpmState' object has no attribute 'tensBreak'

 

Question #706667 on Yade changed:
https://answers.launchpad.net/yade/+question/706667

    Status: Open => Answered

Luc Scholtès proposed the following answer:
Hi,

This example script is deprecated I think since, as the error says,
jcfpm state has no (no more) attributes 'tensBreak' nor 'shearBreak'
which are called in the custom recorder() function.

It should work if you change the following loop:

tensCks=0
shearCks=0
for o in O.bodies:
       if isinstance(o.shape,Sphere):
          tensCks+=o.state.tensBreak
          shearCks+=o.state.shearBreak

by

tensCks=interactionLaw.nbTensCracks
shearCks=interactionLaw.nbShearCracks

BTW, you could actually remove the lines related to cracks in the
recorder() function and just replace

tc=0.5*tensCks,sc=0.5*shearCks

by

tc=interactionLaw.nbTensCracks,sc=interactionLaw.nbShearCracks

in yade.plot.addData(...)

Luc

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