Calculation of Energy Transferred to and from the Fluid in Translational Periodic Model

How do I calculate how much energy is transferred to/from the fluid in a translational periodic model?

Please see the PDF file displayed below to know how to calculate energy transferred to and from the fluid in a translational periodic model.