Due to the economic crisis and water scarcity happening in recent years, many researchers have focused on the water distribution network optimization problem. On this specified subject, all recent research has applied stochastic meta-heuristic algorithms to solve these sets of problems. In this study, the application of a novel deterministic physically inspired heuristic algorithm for minimizing the cost of pipe-sizing in the water distribution system (WDS) is investigated. In fact, the algorithm used in this research is the modified central force optimization algorithm to solve the water distribution network problem called CFOnet. The approach is applied to optimize the design of the Kadu and Khorramshahr networks. For this purpose, CFOnet method is programmed in MATLAB and interfaced with the hydraulic simulation model, EPANET. The obtained solutions in this study are compared with those stochastic methods in the WDS optimization literature. This comparison shows that CFOnet is more efficient in obtaining lower cost than other optimization methods for solving the two mentioned WDSs, while it enjoys the merits of a deterministic optimization method.