The paper presents a new method for modelling the warming up process of a water system with elements regulating the flow in a stochastic manner. The paper presents the basic equations describing the work of typical elements which the water installation is composed of. In the proposed method, a new computational algorithm was used in the form of an iterative procedure enabling the use of boundary conditions that can be stochastically modified during the warming-up process. A typical situation, when such a modification is processed, is the regulation of the medium flow through two-way or three-way valves or applying additional heat source. Moreover, the presented method does not require the transformation of the differential equations, describing the operation of individual elements, into a linear form, which significantly facilitates analytical work and makes it more flexible. The example of analysis of the operation of water installation used for controlling temperature of the process gases in a chemical installation shows the functionality and flexibility of the method. The adopted calculation schematics enable changing the direction of the heat flow while the heat exchanger is in operation. Additionally, the sequence of calculation processed in modules describing operation of installation elements is elective (there is no situation that output parameters from one element are used as input parameters for other element in the same calculation step).