Hi,
I'm currently working on writing a code that should allow me to calculate energy dissipation per impact in my system. My system is a shaker mill which means that energy is also constantly being transferred into my particles. My first attempts have included the following:
a) Per impact, calculate the total kinetic energy of particles involved. Then simply subtract the energy before the impact and after the impact. In theory, this difference could be considered as the energy loss that has been dissipated. However, I noticed that if my target save interval is too big, the subtraction mentioned before can throw deceiving values as either particle could've already gained energy either from the system or other particles.
b) I then noticed that when I track collisions, it is possible to extract information from the function that I mentioned in my title, getLossFromContacts. In a similar way, whenever my mill actually starts shaking, the values become negative. This again I believe makes sense simply because while some energy may be dissipated, more is being gained by the motion. Overall this makes the loss from contacts actually be a gain from contacts.
Nonetheless, I am very interested in seeing how this function is defined. I accessed the function in the SystemEnergy.py file but it doesn't show any equation, instead it simply shows "return self.getAttribute(self.__tStepEnergyPath,'Loss From Contacts')" . I'm trying to find out how this function is defined because then maybe I can manipulate it somehow to obtain what I actually want.
Also if you have any tips for this, I would really appreciate hearing them. Perhaps there is a more straightforward way of doing this that I ignore.
Thanks a lot in advance for any help.