← Back to team overview

yade-users team mailing list archive

[Question #708473]: Get bodyStressTensors with body ID

 

New question #708473 on Yade:
https://answers.launchpad.net/yade/+question/708473

Hi,

I would like to get the stress tensors of particular particles.

What I understood is that I can use bodyStressTensors() which returns a table with per-particle stress tensors[1].

Referring to [2], I can get the stress of that particular particle by:
s=bodyStressTensors()
stress = s[b.id]##"b" being a body

If I understood correctly, b.id is an id, while in s[*], * should be the location index. 
b.id seems to be the same as the location index when the packing is created initially. So this way works well.
However, in my future simulation, some of the initial particles will be erased and there will be new particles created in the packing. I am not sure that after the erase-add particles (maybe more than one time the erase-add process), can I still use "stress = s[b.id]" to get the correct stress of the particular particle?

If not, do you have any idea how to get the stress tensors of particular particles using body's Id.

Thanks.

Leonard




[1]https://yade-dev.gitlab.io/trunk/yade.utils.html?highlight=bodystresstensors#yade._utils.bodyStressTensors
[2]https://yade-dev.gitlab.io/trunk/user.html?highlight=paraview#micro-stress

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