The paper presents the technique of computing flow and heat transfer of water in a pipeline whose initial temperature is lower than the freezing point of water. A feature of the method is the possibility of calculating the process from the moment of pouring water into a pipe on the inner surface of whose wall a layer of ice is being formed. The system of equations describing the process involves nonstationary energy equations for the water flow, ice layer, and for the pipe wall. It is solved for each section of the pipeline passed by water in a small time interval in the process of filling the pipe and further flow. The Beginning computer program has been created and implemented in the Visual Basic language for numerical analysis of the process. The calculations made with the aid of this program allow one to estimate the possibility of appearance of an ice plug in the pipeline at the given temperature, water flow rate, pipeline diameter, and conditions of external heat transfer of water flow in the pipeline.