## 2 Mathematical Model  
The analysed system is an existing distribution pipeline system in an industrial facility with two different sources of industrial water (Source 1 and Source 2) and two independent outlets (V2 and V4), as shown in Figure 1. Water is supplied to the V4 Branch at a flow rate \(Q_{2}\) through a pipeline with a constant cross-section, a length \(L_{2\text{-V4}}\), a diameter \(d_{2\text{-V4}}\) and a difference between the pipeline inlet and outlet elevations \(\Delta H_{2\text{-V4}}\). Source 1 is equipped with pumps arranged in parallel to facilitate supplying water separately to the V2 and V4 Branches. Water is supplied to the V2 Branch through the pipes arranged in series and in parallel from two different sources of industrial water. Water from Source 1 is supplied at a flow rate \(Q_{1}\) through pipes 1-4 (length \(L_{1\text{-}4}\); diameter \(d_{1\text{-}4}\); elevation difference \(\Delta H_{1\text{-}4}\)). Water from Source 2 is supplied at a flow rate \(Q_{3}\) through pipes 3-4 (length \(L_{3\text{-}4}\); diameter \(d_{3\text{-}4}\); elevation difference \(\Delta H_{3\text{-}4}\)); water in that source originates in the wastewater treatment plant and is supplied back to the facility. The requirement was to maximise the utilisation of that source while maintaining a preset water flow rate. Subsequently, water is transported to pipe 4-V2 (length \(L_{4\text{-V2}}\); diameter \(d_{4\text{-V2}}\); elevation difference \(\Delta H_{4\text{-V2}}\)) in the facility. The main purpose of creating the model was to produce a hydraulic description of a dynamic system that would facilitate stabilising discharge pressures \(p_{\text{V2}}\) and \(p_{\text{V4}}\) while maintaining a constant flow rate of water from Source 2, in particular by regulating pressures \(p_{1}\), \(p_{2}\) and \(p_{3}\). The hydraulic model was based on the following design assumptions:  
* The inside diameter of the pipeline is free of any internal incrustation;
* With regard to the pressure differences, the pipe expansion is neglected, and the pipes are regarded as perfectly rigid;
* The values of local losses caused by hydraulic components (valves, check valves, etc.) are known. The calculations below apply to an unsteady flow of an incompressible fluid. All the pressures below are relative when compared to the atmospheric pressure. For the individual V2 and V4 Branches, the following equations were applied to describe the pressure equilibrium:  
\[p_{1}-\Delta p_{1\text{-}4}-\Delta p_{4\text{-V2}}=p_{\text{V2}}\;(\text{Pa}) \tag{1}\]  
\[p_{3}-\Delta p_{3\text{-}4}-\Delta p_{4\text{-V2}}=p_{\text{V2}}\;(\text{Pa}) \tag{2}\]  
\[p_{2}-\Delta p_{2\text{-V4}}=p_{\text{V4}}\;(\text{Pa}) \tag{3}\]wherein \(p_{1}\) is the relative pressure at the inlet into the V2 Branch from Source 1 (Pa); \(\Delta p_{1-4}\) is the difference between the pressures in the 1-4 Branch (Pa); \(\Delta p_{\text{x-y}}\) is the difference between the pressures in the x-y Branch (Pa); \(p_{\text{V2}}\) is the pressure at the outlet from the V2 Branch into the facility (Pa); \(p_{3}\) is the pressure at the inlet into the V2 Branch from Source 2 (Pa); and \(p_{2}\) is the pressure at the inlet into the V4 Branch from Source 1 (Pa). The flow rate balance was described using Equation (4):  
\[Q_{1}+Q_{3}=Q_{4}\left(\text{m}^{3}\cdot\text{s}^{-1}\right) \tag{4}\]  
wherein \(Q_{i}\) represents the flow rates in the individual branches and sections, as shown in Figure 1 (m\({}^{3}\cdot\)s\({}^{-1}\)).