Mathematical models and methods for analyzing flow properties in hydraulic circuits with closed circulation circuits

. The article is devoted to the problems of calculating the distribution of flow quality parameters over the elements of the hydraulic system. The main attention is paid to the problem of such a calculation in the presence of closed circulation circuits in the system, when traditional methods and algorithms become ineffective. Mathematical models of the distribution of quality parameters are given, the results of the analysis of their properties in the presence of closed circulation circuits are presented. Against the background of the analysis of the applicability of general mathematical methods for solving the problem, two new methods are proposed based on the special properties of this problem - the "iterative topological" algorithm and the "algebraic-topological" method. Both methods are universal and provide a solution in the presence of closed circulation loops, and in their absence they coincide with the traditional "topological" algorithm.


Introduction
The relevance of a special consideration of the problems of analyzing the properties of flows in pipeline and hydraulic systems (PLS) of various types and purposes is determined by the following main circumstances.
1. To date, a critical mass of tasks has been accumulated that can be attributed to this class: 1) calculation of the temperature regime in the TPM of heat, oil, gas, steam supply, technological purposes, etc. [1 -3, etc.]; 2) distribution of physical and chemical composition of multicomponent flows of gas, oil, oil products, etc .; 3) the distribution of quality parameters [4 etc.] (chlorine concentrations in water supply systems, mechanical and chemical impurities in oil supply systems, oxygen concentrations in heat supply systems, etc.) and in many other cases. All of them are united by the fact that, given the properties of the flows entering the system, it is required to determine the distribution of these properties over all its elements.
2. Recently, in connection with new market conditions, there has been a revival of interest in the problems of calculating nodal prices [5, 6 etc.], due to some flow distribution at given prices on the sources of the working environment. These problems by their mathematical nature almost completely coincide with the noted problems of calculating the distribution of the physical and chemical properties of the working environment. Their applied significance consists, for example, in substantiating technical conditions for connecting new consumers.
3. Such a special study seems appropriate not only for the purpose of streamlining the accumulated experience and its generalization to flows of different nature (material, energy, financial, etc.), which are carriers of different properties (temperature, density, viscosity, impurity concentrations, physicochemical composition, prices, etc.), but, mainly, for entering new problems of analysis and synthesis of flow properties, analysis of controllability of the pipeline system, etc.
4. The main obstacle to such a generalization is that traditional "topological" algorithms for analyzing the distribution of flow properties do not always work. In particular, if there are closed circulation circuits (CCC) in the network, when there are no nodes with known inflow temperatures at the initial or intermediate steps of the algorithm. At the same time, the organization of the CCC in many cases should be considered as one of the ways to maintain the required parameters of the quality of the working environment (temperature potential in heating networks, chlorine concentrations in water pipes, etc.).
An initial attempt to formalize the problems of analyzing the distribution of endogenous properties of flows in hydraulic circuits (HC), as a relatively independent class of problems, was undertaken in [7]. The main attention in it was paid to the problems of analyzing the spectrum of flows, that is, the problems of distributing several properties along the HC at once, which are generated at the points of entry of the working environment. The conditions for the solvability of these problems were revealed, including for cases of loss of performance of topological algorithms, and also algebraic methods of solution related to the solution of systems of equations were proposed.
This article is devoted to the results of the study and generalization of models and methods for analyzing the distribution of properties of flows in hydraulic circuits with CCCs. The main goal of the study is the development of unified algorithms that are equally effective both in the presence and in the absence of CCC.

Algebraic models and the problem of analyzing quality parameters
We will call a parameter that characterizes a certain property of the working environment, a quality parameter. The design scheme of the HC is given in the form of an oriented connected graph, the orientation of its arcs is brought in accordance with the directions of flows, and the branches with zero flow rates are removed from the scheme. HC is open (i.e. there is an exchange of flows with the environment).
Let: j  -quality parameter in the node j ; Τ -m -dimensional vector of these parameters; m -number of HC nodes; Н К , τ τ -n -dimensional vectors of quality parameters at the start and end points of the branches, such that the following condition of the balance of quality parameters on the branches is observed where x is the flow rate vector on the branches with components , 1, , and n is the number of HC branches.
Let be Н К

  A A
A the complete m n  incidence matrix of the nodes and branches of the HC, be the Н К , A A -matrices that fix (by unit elements) separately the incidence of the HC branches to their initial and final nodes, respectively [1,7]. Then the condition for complete mixing of the working medium has the form Also, let:  Τ -m -dimensional vector of quality parameters of external inflows, moreover 0 j    , if there is no external inflow at the node j ;  Q ,  Q -m -dimensional diagonal matrices of nodal inflows and withdrawals with positive values of the inflow (withdrawal) flow rate at the node j and zero values in the absence of inflow (withdrawal), respectively. Then the condition of the nodal balance of quality parameters can be presented in a compact form where X is a n -dimensional diagonal matrix with elements , 1, on the main diagonal.
The task of the analysis is to determine the quality parameters at all points of the multicircuit network ( Н К , , Τ τ τ ) with a known flow distribution ( x ) that satisfies the first Kirchhoff's law and given temperatures of external inflows (  Τ ). The traditional (topological) algorithm for its solution is associated with a sequential traversal of the nodes of the design scheme and is reduced to the following stages: 1) all nodes of the scheme are considered unvisited; 2) a node j with known parameters of inflows is selected from among the unvisited nodes, in accordance with (3) the value of the nodal parameter for their mixture ( j  ) is calculated, and the node itself is considered viewed; 3) in accordance with (2), the parameter values j  are equated at the beginning of all outgoing branches, and at the end of the branches they are determined based on (1); 5) if there are still unreviewed nodes, then on item 2, otherwise -the problem is solved. Using (1) for exclusion К τ and (2) for exclusion Н τ , we obtain a nodal model of quality parameters Having solved the system of linear equations (4) with respect to Τ , one can sequentially calculate Н τ , К τ from (2) and (1). The main problems of this approach are related to the following: 1) the complexity of solving the system of equations (4) by direct or iterative methods nonlinearly (quadratically) increases with an increase in the dimension of the calculation schemes. The dimension of the schemes of real heat and water supply systems of heat and water supply, etc. can reach many hundreds of thousands of nodes; 2) in many cases, the calculation of quality parameters is a subtask of other, more general tasks, for example, the calculation of non-isothermal flow distribution, regulation of the values of quality parameters, etc. In this case, the problem considered here must be solved many times; 4) optimal, one could consider a unified method that is equally applicable both in the presence and absence of CCC, and in the latter case, comparable in efficiency with a topological algorithm, which does not involve the use of algebraic methods for solving systems of equations.
The analysis of possible approaches that satisfy this requirement is the main subject of the issues discussed below.
Let us consider some important interpretations and properties of the resulting model (4).
1. In (5) Н Н T    R A X A Q is a diagonal matrix of nodal flows with elements jj R equal to the sum of the flow rates of all flows outgoing from the node j , including flows along the branches and nodal withdrawals. In accordance with the first Kirchhoff's law, the values of these elements are also equal to the sum of all inflows into the node, that is 2. The matrix К Н T A X A is responsible for off-diagonal elements Κ . Each element of this matrix is equal to: 1) zero if the nodes j and s are not connected by any branch; 2) flow on a branch, if the node j is the initial, and the node s is the final for this branch; 3) the total flow along the parallel branches having common end nodes j and s .
3. The matrix Κ is very sparse. The number of its nonzero elements m n  , while the total number of elements 2 m . 4. If the HC scheme does not contain CCC, the matrix Κ can be reduced to a triangular form [7]. This explains the fact that system (4) can be solved by a topological algorithm. If the nodes of the circuit are renumbered so that н к , where are н , к i i the numbers of the initial and final nodes of the branch i , -Κ will be lower triangular. 5. If the scheme has at least one CCC, the matrix Κ cannot be reduced to a triangular form and will have elements both below and above the main diagonal.

Iterative calculation methods
Iterative methods for solving the system of linear equations (4) have the advantage that they use only nonzero elements of the matrix of its coefficients. Whereas direct methods (Gauss, Gauss-Jordan, factorization, etc.) lead to a significant filling of this matrix in the process of eliminating unknowns or its multiplicative decomposition. With regard to system (4), let us consider the two most common, relatively simple, traditional methods of organizing such an iterative process [8].
1. Jacobi method . Since К Н T   K R A X A , then system (4) can be represented as К Н T   RΤ A X A Τ b . Hence, the iterative formula has the form Since the matrix R is diagonal, the components j  can be calculated one by one and in any convenient sequence. This method has relatively slow convergence. A sufficient condition for convergence is the strict diagonal dominance of the original matrix K . I.e, In our case, if j is a node with selection.

2.
Seidel (Gauss -Seidel) method. Let's apply the additive decomposition   K L U , where L is the lower triangular matrix with elements jj R on the main diagonal; Lan upper triangular matrix, with a zero diagonal, containing elements that violate triangularity K in the presence of CCC. Then system (4) can be represented as: Hence, the iterative formula has the form , which is observed in the case under consideration. It has been proven that this method converges faster than the Jacobi method [8].
The peculiarities of the computational scheme in the presence of the CCC are associated with the special properties of the matrix U containing nonzero components I is the set of chords of the CCC of the computational scheme, and н i s  , к i j  and s j  . Therefore: 1) on the right-hand side of (8) only components Hence, it becomes possible to use a unified computational scheme, applicable regardless of the presence (absence) of a CCC, which we will call an iterative topological algorithm: 1) an initial approximation ( )  Figures 2a -2b show the convergence plots of the Seidel method for the same design conditions. It is seen that the nature of the convergence is monotonic with respect to the change in both the solution and the residuals. Non-zero residuals are observed only at the nodes of the approach of the chords of the CCC (these nodes are highlighted in gray in Fig.  3a). The number of iterations is several times less than that of the Jacobi method (4, 9, and 6 iterations, respectively). However, here, too, this number depends on the dimension of the circuit.

Direct calculation methods
Direct methods for solving a system of linear equations do not require the organization of iterations, the number of which is unknown in advance, and their computational complexity depends only on the dimension of this system. Let us consider the possibilities of obtaining effective methods of this group, relying on the considered special properties of system (4). be defined as 0 Τ . We also introduce into consideration the matrix 1   V L U , which, potentially, can be obtained from the solution of the matrix system of equations  LV U . Therefore ones. The parameters of other C m m  nodes will be dependent. Let us introduce the decomposition of the vectors and matrices of the model (9) according to this feature, using, respectively, the designations "I" and "D" The solution of system (12) gives the value of the vector I Τ . Substituting this solution into (11), we obtain the value D Τ . Let us summarize the results obtained in the form of a finite computational scheme, which we call the algebraic-topological method.
1. Determine 0 Τ from the solution of the triangular system obtained by solving a triangular system 0  LΤ b , or by the standard topological algorithm by setting . 2. Let us define the matrix I,I V by sequentially solving two matrix "triangular" systems of equations (10).
3. Let us determine * I Τ from the solution of system (12) with a square matrix of coefficients