Dear all,

I am doing a simulation where I prescribe a velocity onto a big granule and push it into an array of smaller granules. The big granule is what drives the system and to check my energy distribution, I would have to compute the input energy which is

Integral( Force on big granule * velocity of big granule *dt)

or for a more MD friendly framework, it would be summing over all the timesteps the product (Force on big granule*displacement).

The thing is I would have to perform this every timestep. My goal is to calculate this quantity and keep track of energies over time. I would appreciate it if you could tell me how to proceed with this and if it does require me to alter the source code, could you point me to some resources (donâ€™t hve much experience with c++).

Best,

Aved