Cooling system is essential in the production process of extruded plastic pipe, which determines the length of production line and product quality. This study simulates the transient heat transfer of spray cooling based on ANSYS. The result shows that for the convective heat transfer coefficient less than 180 W·m~(-2)·K~(-1), the time for cooling to 47 °C changes obviously with the convective heat transfer coefficient, while it does not change much for higher convective heat transfer coefficient. Then we simulate the spray nozzle based on FLUENT software, investigating the effect of entrance velocity and nozzle height on distribution of convective heat transfer coefficient. We have found that with other parameters constant, the total convective heat transfer coefficient increases with entrance velocity (within 6-15 m·s~(-1)), and the heat transfer coefficient of stagnation point increases from 217 W·m~(-2)·K~(-1) to 386 W·m~(-2)·K~(-1). Wall convective heat transfer coefficient increases as the nozzle height decreases (within 68-128 mm), and heat transfer coefficient of stagnation point increases from 227 W·m~(-2)·K~(-1) to 311 W·m~(-2)·K~(-1). Finally we put forward a proposal on global optimization for spray cooling baths based on above study.