← Back to team overview

yade-users team mailing list archive

Re: [Question #690841]: Damage value from cpm model

 

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

    Status: Needs information => Answered

Jan Stránský proposed the following answer:
Hello,

you can try b.state.normDmg [1] (which is not damage, but rather residual strength [2,3], which is somewhat more intuitive to interpret).
Needs CpmStateUpdater [4] to be run before to have the value updated.

> based on the O.interactions ,I can extract the particle ids

or the other way around, based on body, you can extract interactions:
###
intrs = b.intrs() # [5]
avgDmg = sum(i.phys.omega for i in intrs) / len(b.intrs)
b.shape.color = scalarOnColorScale(avgDmg,0,1)
###

cheers
Jan

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.CpmState.normDmg
[2] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/ConcretePM.cpp#L645
[3] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/ConcretePM.cpp#L673
[4] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.CpmStateUpdater
[5] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Body.intrs

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