The product of the well flow rate times the temperature of the water in the well is a measure of the energy transferred to or from the aquifer. While the well is injecting water the temperature is 20 C. When it is withdrawing water the temperature is the groundwater temperature. Both the flow rates and the temperatures are recorded in .csv results files generated by MODFLOW. You can use a spreadsheet program to calculate this for one of the cells that makes up the well. The values can be transferred to one file and plotted. For an actual system, you might want to do the same sort of analysis for all the well cells instead of just one of them.
Screen capture of pumping rate values in a spreadsheet
Screen capture of simulated temperatures in a spreadsheet
Sceen capture of a spreadsheet showing a plot of flow rate times well water temperature versus time