Calculation of energy savings with a variable speed pump