Convex Modeling of Pumps in Order to Optimize Their Energy Use