Development of information and computing technologies for modelling of pipeline and hydraulic systems

. The paper is devoted to the development of information and computational technologies for creating digital twins of real pipeline systems of various types and purposes. The main results of work in the direction of creating the information computing environment “ANGARA”, as a basic technology for s etting up and using the information and computing environment, describe its information, computing and analytical functions is presented. The technology of information and mathematical models integration for the creation of information computing systems for pipeline systems calculating of different types is presented. The concept of enterprise unified digital space developing, as well as technologies for remote access to it, is described. The article presents an object-oriented technology of computer modelling of pipeline systems and an example of its application when creating an online application for hydraulic calculations. The technology used by the authors for testing and comparing the effectiveness of various mathematical methods for calculating the flow distribution is presented. Prospective directions of calculation technologies development related to the use of parallel computing technology are presented.


Introduction
The actuality of the topic is determined by the complexity of the development and control processes of large scale pipeline systems (PLS) of various types, which is impossible without the use of modern information technologies and digital twins of real systems.
The listed, as well as other software products available on the market, are focused on a specific type of PLS (water, heat, gas supply, etc.), application area (design, operation, dispatch control, personnel training, scientific research) and have strictly defined (usually closed) data formats. Such a rigid data structure makes it difficult, or does not at all allow, to adapt the existing PCSs for other types of PLS, classes of mathematical models, problems to be solved, purposes of application and deprives them of the possibility of integration with other information systems (IS). At the same time, all types of PLS and the tasks solved in their design and operation has much in common.
In ESI SB RAS, within the framework of the developed scientific direction -the theory of hydraulic circuits [9,10], a model apparatus as well as methods of calculation and optimization, applicable in principle to any types of pipeline and hydraulic systems has been developed. The effective use of this methodological potential was largely contained by the lack of computer technologies for flexible configuration of the information and computational environment of information and computing systems (ICS) for arbitrary types of PLS, classes of problems to be solved and areas of possible application.
The article reflects the experience of the authors in the development of information and computing technologies for the creation of digital twins [11] of real PLS of various types and purposes.
1 The "ANGARA" information computer technology adaptability, scalability and extensibility of information and computing functionality, without the participation of the developers.
ICE "ANGARA" allows you to configure the information (configuration of the structure and filling of databases, integration with other IS) and computing (integration and interaction of software and computing units and complexes) environment, as well as the use of this environment within a single graphical user interface for PLS computer modeling, analysis of information, interpretation of initial data and results of calculations [14]. This technology made it possible not to worry about the development of interfaces, the form of representation of schemas and data, data formats, it allows using any programming languages when creating computational modules. The calculation module takes the necessary data from the database, performs the calculation and writes the result back to the database (or transfers it directly to the ICE). The ICE is responsible for all interaction with the user.
Over the past time, the ICE "ANGARA" has received significant development [15], taking into account the accumulated experience and the opportunities that appear with the development of the IT industry. The most important properties of ICE are: -storing data in open format in any modern relational DBMS (both local and network), guarantees the possibility of expanding the database structure by the user; -support of multilevel PLS models [16,17], to ensure the possibility of decomposition of a single calculation scheme according to any criterion (territorial, technological, departmental) and coordination of calculation results of individual fragments. The decomposition technology is based on the following principles: 1) equivalent the scheme -when each design scheme can be represented in a higher-level scheme by one element, for which the parameters of the aggregated characteristics of the scheme are calculated; 2) disaggregation, which consists in detailing the results of calculating the element that represents the scheme at the top level. This technology makes it possible to carry out calculations of PLS of any dimension in a minimum time, as well as to calculate a separate subsystem of PLS without calculating the entire system as a whole; -the possibility of multilayer presentation of information (both network scheme and location plan), including with the organization of data exchange between layers and computational models. This makes it possible to implement as an intersystem interaction of different types of PLS and to make the most of all available information for modeling; -Interactive visual data analysis allows to significantly simplify the process of interaction with the user, allowing you to easily analyze both the initial data and the calculation results, search for errors in data, bottlenecks in the system, etc.
ICE has a complex of graphic, informational, computational and analytical functions that is necessary for the creation, editing and analysis of various types systems schemes. Graphical functions include: support for a multi-layer location plan and the ability to convert it from popular geographic information systems and design systems (DXF, MapInfo files, Shape files); search by address; flexible customization of the type of display of system elements; support and display of several different types of networks on a single plan; support for an arbitrary hierarchy of design schemes (hierarchical, parallel, nested). Information functions include: -displaying data in various forms (captions on the scheme, data on an element in a table, data on an arbitrary set of elements or their group in a table); -support for the interaction of elements from different types of schemes; data interaction with other information systems of the enterprise (ERP, MES, SCADA, information-measuring, billing systems, etc.); -flexible configuration of the structure of the database (DB) depending on the types of systems and classes of tasks to be solved and user requirements: export of data tables to Microsoft Office applications; database export between MS SQL Server to MS Access; -entering and editing data for a group of elements arbitrarily selected on the scheme; -automatic updating of the structure and diagnostics of the database version; -search for network and plan elements by the value of any of the parameters (technological, address, etc). Analytical functions include: -highlighting network elements with animation, color and / or size in proportion to the values of certain parameters of nodes or links; -construction of special graphs (piezometric, temperature, etc.) in the form familiar to engineers; -the use of elements of business graphics (bar, line, pie charts); -a combination of several forms of selection of elements, automation of typical operations for the selection of elements using the mechanism of selection templates. Computational functions include: -execution of topological tasks common for all types of systems (search for route, allocation of zones, checking connectivity, etc.).
-interaction and control of the launch of computational tasks, taking into account the order of their launch and the result of the calculation of previous tasks; -data exchange with calculation modules can be carried out through COM, DB, file mechanisms.

List of available computer complexes and their achievements
On the basis of the ICE "ANGARA" from 2003 to 2020 ceveral modifications of the information computer complexes (ICC) were released, that allows the creation of digital twins for various types of PLS. Tuning for a specific type of pipeline system and a set of tasks to be solved comes down to setting up the database structure (a set of elements, their parameters and states, composition and hierarchy of design schemes, etc.).
ICC "ANGARA-HN" [18] is an integration of ICE and computer complex for calculating thermohydraulic modes of heat supply systems.
The main differences between the "ANGARA-HN" and similar software systems are: -the possibility, but not mandatory, of a hierarchical representation of the heating network schemes with automatic linking of boundary parameters between levels and the provision of multi-level calculations; -application of hydraulic calculation methods of the heating network to the complete scheme without decomposition into the supply and return lines; -depending on the problem being solved, the presentation of the heating network diagram can be: single-line or two-line; single-level or multi-level; detailed or aggregated; with display of controls (operational diagram) or without them. ICC automatically converts the topology of the scheme to the type of calculation and transfers the description of the single-line circuit with the regulators located on it and fixed nodal parameters (pressure or flow rate) to the database; -taking into account the physically grounded functions of consumer behavior and regulating devices, which makes it possible to obtain a flow distribution consistent with the laws of physics even with insufficient network bandwidth; -a developed set of search and analytical functions, with the possibility of expanding the set of parameters for analysis of modes by the user; -use of the principle of decomposition of the problem of thermohydraulic calculation into hydraulic and thermal components. This approach makes it possible to reduce the dimension of the problems being solved, use more effective methods for their solution, and more flexibly use the capabilities of the ICC during operation, design and scientific research.
ICC "ANGARA-WS" [19] (Fig. 2.) -represents the integration of ICE and computer complex for calculating the modes of water supply systems. ICC is designed to automate the processes of analysis, development and justification of operating modes (main, repair, postemergency) of large urban water supply systems (tens of thousands of circuit nodes) of arbitrary configuration (branched, multi-circuit), structures (with any number and placement of sources, reservoirs, pump stations, regulators of pressure and flow and other elements). The program allows you to organize the design scheme, both in a single-level and in a multi-level form. In this case, it is possible to carry out both a calculation of a single level (for example, main or distribution network), and a multi-level calculation of the water supply sysytem regime as a whole.
ICC allows you to perform: -calculation of flow distribution with fixed (analysis of the network throughput at given consumer loads) and non-fixed (analysis of the degree of consumer`s supply with a given structure and characteristics of the network) loads in a short time (several seconds for large-scale schemes); -calculation of the operating mode of pumping stations; -construction of piezometric graphs, graphical characteristics of system elements (pumps, pipelines, consumers, tanks); -analysis of the permissibility of the mode and visualization of violations on the scheme by the value of arbitrary parameters of the elements (pressure, flow rate, speed, pressure head loss, etc.).
High reliability of calculations is provided by automated control of the correctness of the input data and theoretically guaranteed convergence of the computational process, which provides a solution with a predetermined accuracy.
ICC "ANGARA-MRPS" is designed to calculate and optimize the hydraulic regimes of maintaining reservoir pressure systems (by water injection) of field oil wells. IСС can be used both for solving the problems of planning a regime for given injection volumes, and for operational control to minimize deviation from the plan in changing operating conditions or in emergency situations. IСС allows one and multilevel calculations of flow distribution with fixed and non-fixed loads, calculation of parameters and modes of operation of well clusters, pumping stations.
When solving the optimization problem, the program calculates the load options for the pumping stations (the number of pumping units switched on, frequency regulation, throttling, bypassing, etc.).
Calculation of permissibility allows visualizing violations of technological limitations for given injection volumes and the composition of the included equipment.
All presented above ICCs are actively used in practice in dozens of design and operating organizations in Russia, Ukraine, Georgia, Mongolia.

Technology of creation of a unified digital space of the enterprise
Commissioning into practice the trend that has emerged in the last decade towards the development of integrated, smart pipeline systems requires an appropriate information basis. Joint control of several different PLS equipped with hundreds of sensors, regulators and other control devices requires much larger amount of information about the PLS state. At the same time, in practice, there are scattered information resources both by types of PLS and within the framework of one system, which makes it impossible to apply modern concepts of smart control [20]. Thus, the creation of such unified digital space (UDS) should become one of the primary goals in the field of informatization of operational enterprises. The development of the UDS of the enterprise is considered by the authors as a necessary condition for the intellectualization of the processes of operation and operational control of the PLS on the basis of the introduction of modern telecommunication, information and modelling technologies.
To solve this problem, the authors have offered the concept of creating a UDF [21] of an enterprise based on the ICE ANGARA, which implies the centralization of information within a single information system. At the same time, it is possible to combine all available information resources (cartography, digital model, SCADA systems, billing, dispatch logs, etc.) into a UDS and provide access to it for all interested services and staff. The application of the proposed concept will ensure the completeness, reliability, availability of information about the object, end-to-end support for the calculation and analytical tasks solved at different time and territorial levels of control on a single information basis. Moreover, access to the UDS can be provided not only to internal, but also to external consumers of information (city services, related enterprises, consumers, etc.).
The performance check of the proposed concept was carried out at the base of water supply Company "Vodokanal" in the city of Irkutsk and has shown its effectiveness in solving the problems of the technological process control of supplying and distributing water in the city. The obtained results create the preconditions for the integration of all information resources of the operating enterprises of the city, which will allow organizing high-quality intersystem interaction, and, as a result, will improve the process of technological control of all pipeline networks.

Technology of the remote access to a unified digital space
Because of the significant spatial extent of the PLS, the problem of providing remote access to the UDS of the enterprise specialists who are engaged in its maintenance arises. To provide such an opportunity, some companies begin to develop appropriate applications (for example, ZuluGIS Online), which indicates their relevance. Access to the UDS at any time and from anywhere in the operated PLS requires a well-developed wireless infrastructure, mobile devices ("smartphone" or "tablet"), appropriate software and information services at the enterprise.
Popular communication channels of the 802.11n standard (Wi-Fi) allow transferring large amounts of data sufficient to download the electronic PLS model (several hundred megabytes for schemes with tens of thousands of nodes) in a reasonable time (several seconds). The range of typical domestic transmitting stations of this standard is limited to tens of meters, and the signal quality depends on the specific location of the receiver. The coverage areas of the Wi-Fi network in the city are limited to individual buildings where the transmitters are located, and do not allow access to the WiFi network from anywhere in the PLS. Mobile networks of cellular operators, on the contrary, provide almost complete coverage of urban areas and beyond. Despite the sufficiency of the theoretical data transfer rates according to the 3G / 4G standards for access to the UDS, in practice the signal quality strongly depends on the position of the subscriber, the congestion of communication channels and other factors. In addition, data transmission in the networks of cellular operators implies a higher price for 1 gigabyte of transmitted information relative to the 802.11n standard. These problems are devoted to special works, both from the standpoint of the development of mobile communications [22], and technologies for transferring large amounts of data on them [23].
To overcome the noted difficulties and ensure continuous access to the UDS of the enterprise for interested stuff, a mobile version of the ICE "ANGARA" was developed -a mobile information complex (MIC) "ANGARA" (Fig. 4.), which works on mobile devices under the Windows operating system. This system was chosen due to the simplicity and ease of development and debugging of components, compatibility of desktop and mobile versions. The program is implemented on the basis of modern application development tools Windows Presentation Foundation and .NET Framework. MIC allows the user to perform a basic set of functions necessary for searching, viewing and editing data on the elements of the PLS, their parameters, with the ability to download pre-downloaded satellite maps of the area. The program keeps a log of the user's operations aimed at changing the data on the PLS, and allows automatic synchronization of these changes with the UDS in the presence of communication (at the user's command).
There are two variant for data synchronization between MIC and UDS. In the first case, data is transferred to the mobile version from the UDS for a separate operational area, for which the engineer is responsible. Data is updated every time when mobile device is connected to the enterprise network, without using mobile data networks. In the second case, in addition to data transmission over the enterprise network, data transmission over Wi-Fi and 3G / 4G networks with the possibility of encrypting the transmitted data is allowed. An important characteristic of the MIC is the possibility of bilateral interaction with the UDS. So, when carrying out repair or verification work at the PLS, the company's specialists can correct the network scheme in the electronic design model (location of objects, their parameters and states). If the user has a network connection and the appropriate access rights, the data synchronization procedure is performed. Thus, the relevance of the PLS data in the UDS is additionally maintained, and the results of such synchronization become immediately available to all users of the enterprise network.
In MIC "ANGARA", unlike the ICE "ANGARA" (where standard databases are used), file storages are used for storing data on PLS, which allow to significantly accelerate the loading of data into the device memory by eliminating "unnecessary" data that are not primary information functions, and intermediate operations required to interact with a full-fledged database. For comparison, loading data from storage files for PLS of 40 000 nodes on tablets of even low price range with a 2-core Atom processor takes no more than 2-3 seconds, while loading similar information from a database on a desktop the computer takes several times longer. In the case of fragmentation of the downloaded data on a territorial basis (as indicated above), the efficiency of the MIC is even higher.
Undoubtedly, the orientation of the MIC on the cross-platform architecture will allow the use of mobile devices of arbitrary configuration, which is the subject of the future development of the MIC.

5
Technology of object-oriented modelling of pipeline systems In ESI SB RAS has been developed the theory of hydraulic circuits [9], within the framework of which methods of mathematical modelling, calculation and optimization are proposed, potentially applicable for PLS of various types and purposes. Both in ESI SB RAS and in many other organizations, software is being developed for computer modelling of PLS based on the methods of the hydraulic circuits theory or its modifications. These programs, as a rule, are aimed at solving a certain class of problems in a specific field of application (design, operation, dispatch control, training, etc.) for specific types of PLS.
At the same time, among different software complexes there is a duplication of the same calculation methods, and when developing a software for a new purpose, these methods are re-programmed and adapted taking into account the applied specifics. With the advent of new methods, it is also necessary to redo or redevelop the software. If there are several software systems, then changes are required in each software solution, which is often accompanied by errors and increased costs for their elimination. The development, debugging and maintenance of such software takes a lot of time and effort, especially if they are implemented as monolithic units, for example, in a structured programming style.
In work [24], the concept of object-oriented modelling of hydraulic circuits (OOMHC) is proposed, which increases the efficiency of the design and development of software (ICC) for modelling pipelines. The application of this concept makes it possible to separate the general calculation methods from the specifics of the subject area while maintaining the relationship at the level of their object representation. In other words, by specifying an object that describes the specifics of the subject area, it is possible to simulate any type of PLS with the same object that implements the general calculation method.
The concept of OOMHC obeys the classical rules of object-oriented programming, which implies the design of classes of objects that encapsulate the details of their implementation and the relationships between them. Also, this concept sets the design rules (strategy) based on the needs of hydraulic circuit modelling. Two independent objects "Network Model" and "Element Models" are introduced. The properties of the first object will be responsible for information about the topology of the design scheme (numbers of end nodes) and the value of boundary conditions (consumption, pressure of the medium in the nodes). The methods of this object will be responsible for the implementation of general methods for calculating the flow distribution, for example, the method of nodal pressures [25]. The properties of the second object will be responsible for the parameters of the modelled elements, for example, length, diameter, pipeline material, various coefficients, etc. However, the methods of the "Element Models" object must match those required by the "Network Model" object. For example, for the nodal pressure method, it is necessary to ensure the calculation of the head loss (pressure) and the derivative for a given flow rate. In the process of calculating the flow distribution, the "Network Model" object will repeatedly call these methods for each element.
The transition to this concept of development will allow: to introduce more advanced methods for solving traditional problems without reprogramming the ICC; quickly integrate methods for solving new problems into the ICC; apply previously implemented methods to new types of pipelines in different ICC and for different purposes, regardless of the language of their development; simplify the process of supporting, updating, adding new components, which at the same time will reduce the costs of developing, debugging, and developing the ICC.

The Internet technology
Along with the problem of remote access to the UDS, the problem of creating and using a unified computing space is becoming more and more urgent. The OOMHC concept potentially allows the use of once implemented models and methods in different ICC and for different purposes. An example of the possibilities of remote use of computational modules is the developed ICC "ISIGR" (Internet System of Hydraulic Calculations) [27,28]. For example, the program already allows to apply different methods to solve the same problem -the calculation of the flow distribution, and apply the same method for different types of PLS (water, gas, heat supply and fire extinguishing).
This ICC is in the public domain of the Internet (http://51.isem.irk.ru), simultaneously acts as an independent software product for performing hydraulic calculations at any time, in any place and for any number of users. It does not require installation on a computer, and an unconventional implementation technology, an intuitive interface and ease of learning allow you to perform multivariate calculations with minimal effort if you have an Internet connection and a standard Internet Explorer web browser of the Windows XP / 7/8/10 operating system. The software package is potentially applicable in energy, housing and communal services, construction, design and operation, research, training of engineers and students. Developed in 2013, the ICC still has no direct analog and in a number of functions it can compete with traditional (commercial) programs. The graphical user interface (Fig. 5) is based on the Microsoft Silverlight component (requires one-time installation) -designed to create programs that run in a web browser environment.
To date, thousands of calculations of real networks and their fragments have been performed on it by many users from different cities of Russia and other countries (Fig. 6). The analysis of these data allows us to conclude that there is a significant and growing demand for this development, despite the fact that no special work has been done to promote it . Fig. 6. Geography of application of the ICC "ISIGR".
Due to the implemented computing capabilities, the ICC "ISIGR" allows performing calculations for schemes with a dimension of up to 1000 nodes, which corresponds to the number of inhabitants of a settlement or a city district of the order of several tens of thousands of people. The time spent on the calculation takes no more than 3 seconds, and the total waiting time for the result, taking into account the cost of data transmission on the Internet, is no more than 5 seconds.
In Russia and abroad, many methods have been developed for calculating the flow distribution, which are based on mathematical methods for solving systems of nonlinear equations. This number includes methods: Newton's [25,[29][30][31], simple iteration [32,33], secants and chords [34,35], evolution [36], etc.. The methods for calculating the flow distribution also differ in the ways of lowering the order of the equations system, and their efficiency depends both on the number of iterations and on the computational costs for each iteration. In these works, as a rule, 1-2 numerical examples are given that show the superiority of the proposed methods over others, which, however, does not in any way indicate their effectiveness and efficiency in all kinds of design conditions. As practice shows, one and the same method in one example may have good results in terms of efficiency, but in another it does not converge at all [1]. Therefore, the question of comparative testing of calculation methods for their performance and efficiency is still open.
Recently, the application of methods from the field of machine learning (ML) to PLS is gaining popularity, for example, in order to predict leaks [37], damage to PLS elements [38], water consumption [39], etc. Such methods, however, need initial data on the series of ("training") tests of the application object, and the more series, the higher the efficiency of the methods.
In this regard, the use of the results of comparative testing for the parameterization of ML methods will potentially allow, for example, to predict the effectiveness of methods for modelling the PLS in specific design conditions. However, full-fledged testing requires a certain representative sample of conditions and calculation parameters, which, of course, is extremely difficult to form. This is especially true for large-scale schemes.
The popularity of the ICC "ISIGR" has opened up a unique opportunity for developers to accumulate a representative sample of design schemes and create a test bench on its basis, in principle, for any methods of PLS modelling [40]. Fig. 7. shows a graph of the results of the application of different methods for calculating the flow distribution for each pipeline network from a certain sample. Here, the solution of the problem for schemes where there are no contours and the number of nodes with a given pressure is not more than one, the method of contour flow rates (MCR) did not require any iterations at all, unlike the others. In another case, when a single ("fictitious") node with a given pressure is added to the circuit in the presence of several "sources", many circuits are formed and the MCR requires several iterations. There are also cases in the graph when the nodal pressure method (NPM) requires fewer iterations than MCR with a significant predominance of the number of nodes over the contours. Otherwise, the average number of iterations of the presented methods is in the range of 4-8, and the influence of the dimension of the network scheme on the number of iterations is insignificant. In the future (as the calculation schemes accumulate), it is planned to actively develop the application of this approach with the involvement of different criteria (computational complexity, reliability, etc.) to analyze the comparative efficiency of alternative methods and highlight the areas of their preferred application.

The parallel computing in pipeline system hydraulic calculation
The effectiveness of software implementations of methods of calculation and optimization in the field of PLS modelling is closely related to the speed of their final algorithm, the cost of computing resources to obtain a solution with a predetermined accuracy and computer performance [24].
Parallel computing technologies can serve as one more direction for increasing the efficiency of pipelines modelling. These technologies involve dividing the array of source data into discrete fragments, each of which can be processed independently of the others. Modern computers have the following technical capabilities for the implementation of parallel computing: -multi-core processors (multiprocessor systems)each core (processor) processes a fragment from the general queue of source data independently of other cores, i.e. asynchronously in separate program threads with subsequent synchronization of the results of their work; -graphic video cards -have a large number (hundreds or thousands) of multiprocessors designed for simple calculations, where parallelization is carried out automatically, which, however, requires specific programming [41]; -computer network -fragments are computed on different computers, and data is exchanged using local or Internet network; -cloud computing -a model for organizing network access in the form of a convenient software layer that simplifies the interaction between a client computer and heterogeneous computing resources that combine the above described types.
TPS modelling tasks involve division into separate fragments, for example, a branch network, distribution and main networks, internal and external networks, a heating unit, pumping stations etc. PLS optimization problem requires multiple calculations of the flow distribution with different parameters of the original model, which initially implies an orientation towards parallel calculations. However, the attraction of parallel computing technologies is appropriate only for large networks, since the overhead costs of synchronizing the calculation results are quite big.