Despite their potential catastrophic impact, transients are often ignored or presented ad hoc when designing water distribution systems. To address this problem, we introduce a new piece-wise function fitting model that is integrated with mixed integer programming to optimally place and size surge tanks for transient control. The key features of the algorithm are a model-driven discretization of the search space, a linear approximation nonsmooth system response surface to transients, and a mixed integer linear programming optimization. Results indicate that high quality solutions can be obtained within a reasonable number of function evaluations and demonstrate the computational effectiveness of the approach through two case studies. The work investigates one type of surge control devices (closed surge tank) for a specified set of transient events. The performance of the algorithm relies on the assumption that there exists a smooth relationship between the objective function and tank size. Results indicate the potential of the approach for the optimal surge control design in water systems.