Formula expression of energy in yade

Asked by Zhe Zhang

Dear YADE developers and users,

I am conducting a simulation where the energy results are important for the study. So I want to know what are the functions of all kinds of enrgies (like elastPotential, plastDissip, velGradWork, kinetic, gravWork and nonviscDamp and Etot in [1]. I could not find the definations of these energies in yade documentation. Could you tell me where i can find them?

Thank you very much!!
Zhe
[1]https://gitlab.com/yade-dev/trunk/blob/master/doc/sphinx/tutorial/06-periodic-triaxial-test.py

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

Hi

Components of EnergyTracker are unfortunately not documented. The only way to know / check their exact definitions is to browse C++ source code.

E.g. https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/ElasticContactLaw.cpp#L99 for elastPotential (in the case of Law2_ScGeom_FrictPhys_CundallStrack)

Revision history for this message
Zhe Zhang (zzjohn) said :
#2

Hi Jérôme,

Thank you very much for your information. If i want to check all the energy components i mentioned above if i use InteractionLoop([Ig2_Sphere_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()]),
how can i find the others besides elastPotential? Is there any nameing rule to follow?

For example, do i need to check CohesiveFrictionContactLaw.cpp for plastDissip?
But i cannot figure out which files are relevant to velGradWork, kinetic, gravWork and nonviscDamp according to the names of c++ files. I am sorry for my unfalimarity of the source code.

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

O.energy.keys() will give you the names of all energy terms for your simulation.

Then, you would have to search through source code to fish the exact lines where these terms are computed (and understand C++). Using e.g.
grep -r gravWork # from your trunk folder with source code
would be a good fishing hook

Revision history for this message
Zhe Zhang (zzjohn) said :
#5

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