← 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

chanaka Udaya posted a new comment:
>>Are you asking what YADE attribute could correspond to a "sphere
damage value" in the CPM ?

When one spheres are interacting another sphere It will create a
interaction. If two spheres are in tension, when it exceeds the elastic
limit subjected to damage and this damage value is varying from 0 to 1.

For instance, I want to print this damage value in the terminal

>>Or what is the use of scalarOnColorScale() ?

based on the O.interactions ,I can extract the particle ids
corresponding to the interaction. If I can obtain the scalar damage
value corresponding to a particular interaction, I can color the two
spheres based on this damage value with time.

Like this,in this case rotation

for b in O.bodies:
		b.shape.color=scalarOnColorScale(b.state.rot().norm(),0,pi/2.)

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