Track Energy (Plot variables)

Asked by Felipe

Hi everybody,

I'm looking for more information about track Energy.
When I am running one program and type the code below:
"
0.trackEnergy=True
def Data():
 b=O.bodies[21799]#cone plano
 plot.addData(z1=b.state.pos[1],i=O.iter,total=O.energy.total(),**O.energy)
O.run(390000,True)
plot.plots={
 'z1':('total',O.energy.keys)
}
plot.plot()
plot.saveDataTxt('/tmp/dataFile.txt')
"

I'll get the "figure1" that will show me some variables of energy (total, gravWork, Kinetic, nonviscDamp, elastPotential, plastDissip).

So, I would like to know how I can compare these energies with others, for example, body energy, strain energy, friction energy. Is it possible to exist relationship between both energies that I mentioned . I mean, Could you explain more detail for each type of variable?

By the way, If anyone knows any local where i can find more information for each type of variable (total, gravWork, Kinetic, nonviscDamp, elastPotential, plastDissip), I`ll be very grateful!

Thank you guys again for your help and effort!

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
Best Jérôme Duriez (jduriez) said :
#1

Hi,

I'm not used to EnergyTracker, but it seems to me that the best way having more details about the different energies is to perform one search within the code after another, for each energy variable you obtain.

E.g. gravWork seems to be computed here:
https://github.com/yade/trunk/blob/master/pkg/common/GravityEngines.cpp#L28

However, this shows that this gravWork energy variable reflects your simulation in the only case you're using a "GravityEngine" in the simulation loop. And not if you impose gravity through NewtonIntegrator, which is another way.
This is suggested in the doc here:
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.GravityEngine

Then, an off-topic conclusion is that I'm unsure whether EnergyTracker's use does fit any simulation script ? It may be worth for you to check it on simple cases, and / or wait for other answers.
Obviously a possibility is to perform yourself all the energy measurements you need.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#2

EnergyTracker is the only way to track some energy terms (e.g. dissipation by Newton.damping is nearly impossible to compute by yourself).
On the other hand gravitational work is indeed not available without gravityEngine and also some energy dissipated in contact laws are not always included automatically (in such case the law itself has a function returning dissipated energy).
For details on what is calculated you'll have to check the code unfortunately, but I think the names of the terms speaks by itslef. Is is not clear what kinetic energy is??

Revision history for this message
Felipe (felipetthadeu) said :
#3

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