access individual energy contribution from each particle

Asked by rox212

Dear all,

Is there a way to access the specific energy contribution from each particle? or a group of particles?

something like:

#######################
for b in O.bodies:
        if isinstance(b.shape,Sphere):
            pos = b.state.pos
            radius = b.shape.radius
            plasticEnergy = O.energy.keys()+[''nonviscDamp''] ... (?) # here I want o access the particle b contribution to the 'nonviscDamp''
#######################
Thank you for your help!

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jérôme Duriez
Solved:
Last query:
Last reply:
Revision history for this message
rox212 (rox212) said :
#1

To be specific, during the simulation run, I want to access the dissipation and friction energy contribution on specific particles. How can I do that?

Revision history for this message
Jan Stránský (honzik) said :
#2

Hello,

please read [1] and provide a MWE or at least what Ip2/Law2 you are using.
The answer strongly depends on it.

In principle it should/could be possible by storing interaction and body values and comparing them between individual iterations.

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
Best Jérôme Duriez (jduriez) said :
#3

Hi,

Related recent threads:

https://answers.launchpad.net/yade/+question/700748 and
https://answers.launchpad.net/yade/+question/700181

I a nutshell, you will most probably have to do it by yourself, this is not a functionality already present in YADE. Good news is that you can do by yourself anything you want in YADE

Revision history for this message
rox212 (rox212) said (last edit ):
#4

Thank you!

Revision history for this message
rox212 (rox212) said :
#5

Thanks Jérôme Duriez, that solved my question.