Pipe cooling is an important measure for controlling the temperature of mass concrete during the hydration period. In this paper, a new algorithm (partitioned iterative algorithm, PIA) is proposed to address the complicated process of dissecting cooling pipes in mass concrete and the difficulty of balancing the accuracy and efficiency of the simulation. The algorithm is based on the idea of finite element partitioning, where the water pipe element and the concrete element are considered as two computational parts. The coupling is used to consider the heat transfer between the water pipe and the concrete, avoiding the need to solve for the concrete temperature gradient in the vicinity of the pipe, which improves the efficiency of the algorithm. The comparison of the PIA and the discrete iterative algorithm (DIA) results demonstrates the agreement between the two algorithms in terms of computational accuracy and distribution pattern.In addition, the automatic creation and insertion of the pipe elements results in a significant improvement of the overall performance. Finally, the engineering example demonstrates that the results of the PIA at each observation point agree well with the measured values over the entire calculation time. The accuracy of the calculated peak temperature and the peak temperature age can both meet the engineering requirements.