A city water supply network modeling and optimization method and system based on digital twinning

CN123013355APending Publication Date: 2026-10-30LANZHOU UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611400582.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

现有技术中,往往仅依据经验值或设计手册设定模型参数,导致构建的虚拟模型与物理管网的实际运行状态存在较大偏差,难以实现高保真的“虚实映射”

Benefits of technology

[0025]经由上述的技术方案可知,与现有技术相比,本发明公开提供了一种基于数字孪生的城市供水管网建模与优化方法及系统,具有以下效果:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123013355A_ABST
    Figure CN123013355A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on digital twinning urban water supply pipe network modeling and optimization method and system, it is related to wisdom water affairs and digital twinning technical field, method includes: the geometric entity model of water supply pipe network reflecting the spatial structure characteristics of pipe network;According to the topological relationship of water supply pipe network geometric entity model and pipe network operating parameter, establish initial hydraulic attribute model for simulating the hydraulic operating state of pipe network;The historical measured data of water supply pipe network is acquired, and the global optimization of the grouping Hazen-Williams roughness coefficient in initial hydraulic attribute model is carried out using white shark optimization algorithm, to obtain the optimal roughness coefficient combination, and the optimal roughness coefficient combination is substituted back to initial hydraulic attribute model, to obtain the hydraulic attribute model after checking;The hydraulic attribute model after checking is integrated with water supply pipe network geometric entity model, the unified mapping of water supply pipe network spatial structure and hydraulic attribute is realized, and the digital twinning model of water supply pipe network with higher precision is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of smart water management and digital twin technology, and more specifically to a method and system for modeling and optimizing urban water supply networks based on digital twins. Background Technology

[0002] Urban water supply networks, as vital urban infrastructure, are a critical lifeline system ensuring the stable operation of residents' lives, industrial production, and public services. With the acceleration of urbanization and the continuous growth of water demand, the scale of water supply networks is constantly expanding, and their topological structure is becoming increasingly complex. Safe and stable operation is of paramount importance to ensuring urban water supply. However, water supply networks are typically buried deep underground, characterized by their high degree of concealment, wide distribution, long pipelines, and numerous nodes. Their operational status is affected by multiple factors, including fluctuations in water demand, changes in pipeline friction, pump station scheduling, and valve status.

[0003] Traditional water supply network operation and management primarily rely on manual inspections, experience-based judgment, and periodic static monitoring data. This approach has significant limitations. In recent years, the rise of digital twin technology has provided a new technological path to address these issues. This technology aims to achieve dynamic interaction between the physical entity and the virtual model by constructing a virtual model corresponding to the physical system and combining real-time data interaction, state mapping, and simulation analysis. In the field of water supply networks, digital twin technology is highly anticipated, with the expectation that by integrating hydraulic property models, geometric models, and monitoring data, it can achieve real-time perception and optimized control of the network's status.

[0004] However, in the existing practice of digital twin modeling and application of water supply networks, the following major technical problems still need to be solved:

[0005] 1) The parameters of the hydraulic property model have large uncertainties and insufficient mapping accuracy.

[0006] The accuracy of hydraulic simulation of water supply networks largely depends on the accuracy of pipe friction coefficients (such as the Hayzen-Williams roughness coefficient). However, this coefficient is affected by various factors such as pipe material, pipe age, internal scaling, corrosion degree, and actual operating environment, and changes dynamically over time. In existing technologies, model parameters are often set based solely on empirical values ​​or design manuals, resulting in significant deviations between the constructed virtual model and the actual operating state of the physical pipe network, making it difficult to achieve high-fidelity "virtual-real mapping".

[0007] 2) Parameter verification of complex pipeline networks is difficult, and there is a lack of global optimization methods.

[0008] For large-scale, topologically complex urban water supply networks, parameter verification is essentially a nonlinear optimization problem with complex constraints. Traditional local trial-and-error or gradient search methods are prone to getting trapped in local optima and are computationally inefficient, making them unsuitable for the global parameter optimization requirements of large and complex networks, resulting in unsatisfactory model verification results.

[0009] Therefore, how to construct a modeling and optimization method for urban water supply networks that can accurately reflect the spatial structure of the network and optimize key hydraulic parameters through intelligent algorithms to achieve high-fidelity mapping has become a pressing technical challenge in the field of digital twins for water supply networks. Summary of the Invention

[0010] In view of the above problems, this invention is proposed to provide a method and system for modeling and optimizing urban water supply networks based on digital twins to overcome or at least partially solve the above problems. This invention improves the parameter calibration accuracy and mapping accuracy of the digital twin model of the water supply network by globally optimizing the roughness coefficient through WSO and deeply integrating geometric and hydraulic properties, while ensuring high-fidelity and lightweight rendering of the geometric model.

[0011] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, embodiments of the present invention provide a method for modeling and optimizing urban water supply networks based on digital twins, including: Establish a geometric solid model of the water supply network that reflects the spatial structural characteristics of the network; Based on the topological relationship and operating parameters of the water supply network geometric entity model, an initial hydraulic property model is established to simulate the hydraulic operating state of the network. Historical measured values ​​of the water supply network are obtained, and the White Shark optimization algorithm is used to globally optimize the grouped Hayzen-Williams roughness coefficients in the initial hydraulic property model to obtain the optimal combination of roughness coefficients that meets the preset error requirements. The optimal combination of roughness coefficients is then substituted back into the initial hydraulic property model to update the model parameters and obtain the verified hydraulic property model. The verified hydraulic property model is integrated with the geometric entity model of the water supply network to achieve a unified mapping between the spatial structure and hydraulic properties of the water supply network, resulting in a high-fidelity digital twin model.

[0012] Preferably, the process of establishing the geometric solid model of the water supply network specifically includes: Obtain water supply network design drawings, network topology data, node coordinate data, pipe segment connection relationships, pipe attribute parameters, and ancillary facility connection information, and organize them to obtain the water supply network topology structure; The node connection relationships are determined based on the water supply network topology, and a node connection relationship table is formed. Based on the water supply network topology, node connection relationship table and pipeline attribute parameters, establish a pipe segment number table and a geometric object number table. The geometric object number table is used to record the number and object type of each geometric object in the geometric model, as well as its corresponding pipe segment number, node number or ancillary facility number. Based on the pipe section number, node number, or ancillary facility number, establish a correspondence between the existing pipeline attribute parameters, water supply system process data, pump station operating parameters, valve status parameters, water tank level or reservoir total head parameters, user node water demand data, and pressure monitoring point layout information and the corresponding pipe section, node, or ancillary facility. Based on the node connection table, pipe segment number table, and geometric object number table, a topology-driven modeling approach is used to construct the geometric model of the water supply network; among which, straight pipe segments are generated using a straight pipe stretching method, and pipe segments with turns are generated using a bend scanning method. The geometric model of the water supply network is lightweighted by simplifying redundant patches to reduce the number of polygons and vertices in the model, thereby obtaining a geometric solid model of the water supply network that retains the spatial orientation and connection relationships of the network.

[0013] Preferably, the establishment of the initial hydraulic property model for simulating the hydraulic operation state of the pipeline network specifically includes: Based on the water supply network topology, pipe segment numbering table and node connection relationship table, a hydraulic topology including water supply, pressurized transmission and distribution, storage facilities and network monitoring is constructed. Based on the hydraulic topology, hydraulic calculation relationships are established according to the node flow balance equation, pipe section head loss relationship and energy balance equation. After establishing the hydraulic calculation relationship, set the water supply link and boundary conditions according to the water supply system process data associated with the number, and configure the node attribute data, pipe segment attribute data, pump station attribute data and valve attribute data according to the corresponding attribute parameters respectively; Based on the user node water usage data, the node basic water demand and user water demand time mode are set. Based on the valve historical operating status, the valve control parameters are set. Based on the pump station historical operating parameters, the pump operating parameters are set. Based on the node basic water demand, user water demand time mode, valve control parameters and pump operating parameters, dynamic network operation data is formed. Based on the hydraulic topology, hydraulic calculation relationships, water supply links, boundary conditions, node attribute data, pipe segment attribute data, pump station attribute data, valve attribute data, and operating parameters, the pipe segments in the water supply network are grouped according to the pipe diameter, and a corresponding Hayzen-Williams roughness coefficient is configured for each pipe diameter group to form an initial hydraulic attribute model. Set the total simulation duration and hydraulic time step, run the hydraulic simulation, and obtain the hydraulic simulation results of the water supply network under the set operating conditions.

[0014] Preferably, the node flow balance equation is:

[0015] In the formula, For water supply network node index; Represents nodes Connected and flowing to nodes The collection of pipe segments, among which Index of the inflow pipe section; Represents nodes Connected and consisting of nodes The outflowing pipe section collection, among which Index for the outflow pipe segment; Indicates the first The flow rate into the pipe section, Indicates the first The flow rate of the outflow pipe section; Represents a node External flow (node ​​demand or water supply input).

[0016] The head loss of the pipe section in the hydraulic calculation relationship is:

[0017] in, For pipe section Head loss; For pipe section Traffic; For pipe section The Hay-Williams roughness coefficient, The value is determined by the Hayzen-Williams roughness coefficient corresponding to the pipe diameter group to which the pipe section belongs; For pipe section Pipe diameter; For pipe section The length.

[0018] Preferably, the process of establishing the verified hydraulic property model specifically includes: Historical measured data of water supply network pressure monitoring points are obtained. The historical measured data of the pressure monitoring points are then standardized in terms of time format, checked for outliers, handled for missing values, and matched in terms of time step to obtain the measured pressure value corresponding to the hydraulic simulation time. The average measured pressure value of each pressure monitoring point within a set period is also calculated. Based on the pipe diameter, the pipe segments in the water supply network are divided into multiple pipe diameter groups. The Hayzen-Williams roughness coefficient corresponding to each pipe diameter group is used as the parameter to be optimized. A parameter vector to be optimized is constructed, consisting of the Hayzen-Williams roughness coefficients of each group, and the variable constraint range is set. Initialize the great white shark population, and randomly generate multiple sets of parameter combinations consisting of the Hayzen-Williams roughness coefficients for each pipe diameter group within the variable constraints. Each set of parameter combinations is used as the position vector of a single great white shark. For each individual in the current population, according to the pipe diameter grouping mapping relationship, the Hayzen-Williams roughness coefficients corresponding to each group of white shark individuals are assigned to the corresponding pipe segments and written into the initial hydraulic property model. Dynamic hydraulic simulation is then run and the pressure simulation values ​​of the monitoring points are extracted. The average value of the simulated pressure value over the corresponding period is compared with the average measured pressure value. The root mean square error between the simulated pressure value and the measured pressure value is calculated according to the preset objective function to obtain the objective function value corresponding to the individual. The individual fitness is determined according to the objective function value. Based on the position update strategy of the white shark optimization algorithm, the position of the white shark individual is updated by using the current optimal individual position and random search factor, so as to realize the iterative optimization of the Hayzen-Williams roughness coefficient for each pipe diameter group. Repeatedly execute parameter mapping, model parameter writing, dynamic hydraulic simulation, objective function calculation, fitness evaluation, and white shark individual position update operations until the maximum number of iterations is reached or the preset convergence condition is met; The individual white shark with the smallest objective function value is output, and the corresponding combination of Hezen-Williams roughness coefficients for each pipe diameter group is taken as the optimal combination of roughness coefficients. This combination is then substituted back into the initial hydraulic property model to obtain the verified hydraulic property model.

[0019] Preferably, the objective function is:

[0020] In the formula, The root mean square error between the simulated pressure value and the measured pressure value; The vector of parameters to be optimized consists of the Hayzen-Williams roughness coefficients for each pipe diameter group; This refers to the number of pressure monitoring points; and The first The average simulated pressure value and average measured pressure value of each pressure monitoring point within a set period.

[0021] Preferably, the verified hydraulic property model is integrated with the geometric entity model of the water supply network to achieve a unified mapping between the spatial structure and hydraulic properties of the water supply network, resulting in a high-fidelity digital twin model, specifically including: Import the geometric entity model of the water supply network into the 3D visualization engine, and establish the network root node, data management object, and interface object for unified management of geometric objects, carrying attribute data and scripts; Define a pipe segment attribute class for storing pipe segment number, start and end nodes, pipe diameter, pipe length, roughness and flow information, and a node attribute class for storing node number, elevation, water demand, pressure and head information, and construct a network data management script for unified management of the pipe segment attribute class and node attribute class; Based on the geometric object numbering table, establish the association between the geometric entity model of the water supply network and the verified hydraulic attribute model, so that the spatial objects in the geometric entity model can carry the corresponding hydraulic attribute information. Construct an information panel management script, call the pipe segment attribute data and node attribute data in the network data management script, and output the attribute information to the interface text component for display, to verify the integrated expression of the water supply network geometric entity model and the verified hydraulic attribute model; The optimal combination of roughness coefficients is imported into the verified hydraulic property model for simulation calculation to obtain pressure simulation results. These results are then compared with the measured pressure monitoring data of the monitoring points within a preset time period to calculate the absolute error. If the absolute error meets the preset verification accuracy requirements, the current model is confirmed as a high-fidelity digital twin model of the water supply network; if it does not meet the requirements, return to perform Hay-Williams roughness coefficient optimization or verify the basic data and monitoring data of the network.

[0022] Secondly, embodiments of the present invention provide a digital twin-based urban water supply network modeling and optimization system, comprising: Geometric Solid Modeling Module: Used to create geometric solid models of water supply networks that reflect the spatial structural characteristics of the network. Hydraulic simulation calculation module: used to establish an initial hydraulic property model for simulating the hydraulic operation state of the water supply network based on the topological relationship and network operation parameters of the geometric entity model of the water supply network; Global parameter optimization module: used to obtain historical measured values ​​of water supply network, use the white shark optimization algorithm to globally optimize the grouped Hay-Williams roughness coefficients in the initial hydraulic property model, obtain the optimal roughness coefficient combination that meets the preset error requirements, substitute the optimal roughness coefficient combination back into the initial hydraulic property model, update the model parameters, and obtain the verified hydraulic property model; Twin mapping integration module: used to integrate the verified hydraulic property model with the geometric entity model of the water supply network, realize the unified mapping between the spatial structure and hydraulic properties of the water supply network, and obtain a high-fidelity digital twin model.

[0023] Thirdly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements a method for modeling and optimizing urban water supply networks based on digital twins.

[0024] Fourthly, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a method for modeling and optimizing urban water supply networks based on digital twins.

[0025] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method and system for modeling and optimizing urban water supply networks based on digital twins, which has the following effects: 1) Significantly improves the accuracy and reliability of hydraulic simulation models. This invention abandons the traditional approach of relying solely on empirical values ​​or design manuals to set pipe roughness coefficients, and innovatively introduces WSO (Wide Standardization) for global optimization of grouped Hayzen-Williams roughness coefficients. By constructing an objective function that minimizes the error between simulated and measured pressure values, it can automatically search for the parameter combination that best matches the actual operating conditions of the current pipeline network (such as pipe wall scaling and corrosion). This data-driven verification method effectively solves the model distortion problem caused by parameter uncertainty, ensuring a high degree of consistency between the virtual model and the physical entity in key indicators such as pressure distribution and flow allocation.

[0026] 2) Achieve deep integration of geometric spatial structure and hydraulic properties To address the problem of fragmented and difficult-to-link "geometric model" and "hydraulic model" in existing digital twin systems, this invention proposes a unified mapping and integration mechanism. By establishing a link between a pipe segment number table and a geometric object number table, and using a scripting language to dynamically carry hydraulic attribute data in a 3D visualization engine, bidirectional communication from 3D space to hydraulic logic is achieved. This not only allows maintenance personnel to intuitively view real-time water pressure and flow rate in the 3D scene, but also enables them to trace back the hydraulic calculation parameters of spatial objects by clicking on them, greatly enhancing the interactivity and usability of the system.

[0027] 3) Balancing high model fidelity with rendering performance In constructing the geometric entity model, this invention employs a topology-driven modeling strategy and implements targeted lightweight processing. Straight pipe segments are generated using extrusion, while turning pipe segments are generated using scanning. This approach ensures the accuracy of the pipe network topology and significantly reduces the number of polygons and vertices by simplifying redundant faces. This method significantly reduces the rendering load of the 3D scene while maintaining the integrity of the pipe network's spatial orientation and connectivity, enabling the high-fidelity digital twin model to run smoothly on ordinary terminals and providing technical support for real-time monitoring of large-scale pipe networks.

[0028] 4) Improved parameter optimization capabilities under complex pipeline network conditions. The WSO method employed in this invention possesses strong global search capabilities and is independent of gradient information, making it particularly suitable for solving complex parameter inversion problems involving nonlinearity and multiple constraints in water supply networks. Combined with preprocessing of historical monitoring data (outlier removal and smoothing), this method can avoid getting trapped in local optima. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0030] Figure 1 This is a block diagram of a method for modeling and optimizing urban water supply networks based on digital twins, provided in an embodiment of the present invention. Figure 2 This is a flowchart illustrating the modeling process of the geometric entity model of the water supply network provided in this embodiment of the invention. Figure 3 This is a geometric model diagram of the water supply network provided in the embodiments of the present invention; Figure 4 The following is a comparison diagram before and after the lightweighting process provided in the embodiment of the present invention, wherein (a) is the pipeline network model before lightweighting and (b) is the pipeline network model after lightweighting. Figure 5 This is a hydraulic topology diagram provided in an embodiment of the present invention; Figure 6 This is a flowchart of the hydraulic property model verification process provided in this embodiment of the invention. Detailed Implementation

[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] This invention discloses a method for modeling and optimizing urban water supply networks based on digital twins, such as... Figure 1 As shown, it includes: Establish a geometric solid model of the water supply network that reflects the spatial structural characteristics of the network; Based on the topological relationship of the geometric entity model of the water supply network and the network operation parameters, an initial hydraulic property model is established to simulate the hydraulic operation state of the network. Historical measured values ​​of the water supply network were obtained, and the White Shark Optimizer (WSO) algorithm was used to iteratively optimize the Hayzen-Williams roughness coefficients corresponding to each pipe diameter group to obtain the optimal combination of roughness coefficients. The optimal combination of roughness coefficients was then used to update the initial hydraulic property model to obtain the verified hydraulic property model.

[0033] The verified hydraulic property model is integrated with the geometric entity model of the water supply network to achieve a unified mapping between the spatial structure and hydraulic properties of the water supply network, resulting in a high-fidelity digital twin model.

[0034] The digital twin modeling scheme for water supply networks is divided into four stages, which are explained in detail below.

[0035] Step 1: Construct a geometric solid model of the water supply network; Step 1 is used to construct a geometric solid model that reflects the spatial structure characteristics and topological connection relationship of the water supply network based on the water supply network design drawings, node coordinate data, pipeline attribute parameters and network topology data, and to organize and number the water supply system process data, auxiliary facility operation parameters, hydraulic boundary conditions, user node water demand data and pressure monitoring point layout information required for the subsequent hydraulic attribute model construction.

[0036] Since the water supply pipeline network constitutes the main body of the entire pipeline system within the modeling scope, and is the core carrier for subsequent operational status mapping and visualization analysis, the water supply pipeline network is taken as the main geometric modeling object. For auxiliary facilities such as pumping stations, reservoirs, and water storage tanks, they are represented by nodalization, symbolization, or simplified geometry based on their connection relationship and function in the water supply pipeline system, without detailed solid modeling.

[0037] The inputs for step 1 include water supply network design drawings, network topology data, node coordinate data, pipe segment connection relationships, pipe attribute parameters, auxiliary facility connection information, water supply system process data, pump station operating parameters, valve status parameters, water tank level or reservoir total head parameters, user node water demand data, and pressure monitoring point layout information. Among them, the pipeline topology data is used to determine the overall connection relationship of the water supply network; the node coordinate data is used to determine the spatial location of each node and the endpoint of the pipe segment; the pipe segment connection relationship is used to determine the starting node, ending node and connection method of each pipe segment; the pipeline attribute parameters are used to determine the pipe segment length, pipe diameter, direction, pipe material and Hezen-Williams roughness coefficient; the auxiliary facility connection information is used to determine the access location of pumping stations, reservoirs, water storage tanks, valves and other objects in the water supply network system; the water supply system process data is used to determine the operation process of the water supply system and the process connection relationship between various water supply facilities; the pumping station operation parameters are used to determine the flow-head relationship, start-stop status and operation mode of the pumps; the valve status parameters are used to determine the opening and closing status, opening degree and control parameters of the valves; the water level of the water tank or the total head of the reservoir is used to determine the water level boundary conditions required for hydraulic calculation; the water demand data of the user nodes is used to determine the basic water demand of each user node and its water demand variation law; and the pressure monitoring point layout information is used to determine the number, layout location and corresponding pipeline node of the pressure monitoring point.

[0038] Specifically, such as Figure 2 As shown, the process begins by organizing the water supply network design drawings, network topology data, node coordinates, pipe segment connections, pipe attribute parameters, and ancillary facility connection information. This clarifies the pipeline route, node distribution, starting and ending nodes of each pipe segment, connections between pipe segments, and connections to ancillary facilities. Based on this, the water supply network topology is established. The water supply network topology describes the connections between pipe segments and nodes, as well as the connections between ancillary facilities such as pumping stations, reservoirs, water storage tanks, and valves and the water supply network. According to the water supply network topology, the pipe segments connected to each node, adjacent nodes, and node types are further determined, forming node connection relationships. These node connection relationships are stored in a node connection relationship table. The node connection relationship table includes at least the node number, node coordinates, node type, the pipe segment number connected to the node, and the adjacent node number.

[0039] Then, based on the compiled water supply network topology, node connection table, and pipe attribute parameters, a pipe segment number table and a geometric object number table are established. The pipe segment number table records the number of each pipe segment and its corresponding start node, end node, segment length, diameter, direction, pipe material, and initial Hazen-Williams roughness coefficient. The geometric object number table records the number and object type of each geometric object in the geometric model, as well as its corresponding pipe segment number, node number, or ancillary facility number. Geometric objects include pipe objects, node objects, and ancillary facility objects such as pump stations, reservoirs, water storage tanks, and valves. By establishing the pipe segment number table, node connection table, and geometric object number table, the pipe, node, and ancillary facility objects in the geometric entity model can be correlated with the pipe segments, nodes, equipment, and attribute parameters in the subsequent hydraulic attribute model.

[0040] After establishing the pipe segment numbering table, node connection relationship table, and geometric object numbering table, the existing pipeline attribute parameters, water supply system process data, pump station operating parameters, valve status parameters, water tank level or reservoir total head parameters, user node water demand data, and pressure monitoring point layout information are matched with the corresponding pipe segments, nodes, or ancillary facilities based on the pipe segment number, node number, or ancillary facility number.

[0041] Specifically, the process involves associating pump station operating parameters with their corresponding pump station objects and their connected nodes; associating valve status parameters with their corresponding valve objects and their respective pipe sections; associating pool water levels or reservoir total head parameters with their corresponding pool or reservoir nodes; associating user node water demand data with their corresponding user nodes; and associating pressure monitoring point deployment information with their corresponding network nodes. Through this process, all operating parameters, boundary conditions, water demand data, and pressure monitoring information acquire corresponding pipe section numbers, node numbers, or auxiliary facility numbers. This provides a data foundation for subsequent equipment parameter settings, hydraulic boundary condition settings, node water demand settings, and comparisons between simulated and measured pressure values ​​in the hydraulic property model.

[0042] Based on the established pipe segment numbering table, node connection table, and geometric object numbering table, a "topology-driven geometry" modeling approach was adopted to construct the water supply network geometric model in SolidWorks. For each pipe segment in the water supply network, a corresponding water supply network geometric model was established according to the length, diameter, and direction in the pipe segment numbering table. Specifically, for straight pipe segments, a straight pipe extrusion method was used to generate geometric entities; for pipe segments with detours, a bend scanning method was used to generate the corresponding pipe geometry, taking into account the pipeline direction. Through these methods, the water supply network geometric model maintains consistency with the water supply network topology in terms of spatial orientation, pipe segment dimensions, and connection relationships.

[0043] For ancillary facilities such as pumping stations, reservoirs, and water storage tanks, instead of performing detailed modeling of complex structures and internal configurations, they are represented using functional nodes, symbolic objects, or simplified blocks based on their functional roles and connection locations within the water supply network system. This approach preserves the connecting role of ancillary facilities within the water supply network topology while avoiding irrelevant geometric details that would increase the operational burden of subsequent model integration and visualization.

[0044] After completing the simplified representation of the pipeline geometric model and ancillary facilities, the pipe sections, nodes, and ancillary facilities are assembled according to the actual topology of the water supply network. The model's length, location, pipe diameter, and connection relationships are then checked against the pipe section numbering table and geometric object numbering table to ensure that the geometric model accurately reflects the overall direction of the water supply network, the pipe section connection relationships, and the access relationships of ancillary facilities. Figure 3 As shown.

[0045] Furthermore, the geometric model of the water supply network created in SolidWorks was imported into the 3ds Max platform for lightweighting. During the lightweighting process, redundant faces and non-critical geometric details in the model were appropriately simplified using 3ds Max's model optimization tools. Considering the characteristics of the water supply network model, such as slender pipe segments, complex connection relationships, and high requirements for topological continuity, excessively high compression ratios were avoided during lightweighting to prevent damage to the main shape and spatial connection relationships of the network. After optimization, the number of polygons in the model was reduced from 33,792 to 28,406, a reduction of approximately 15.94%; the number of vertices was reduced from 17,950 to 15,257, a reduction of approximately 15.00%. This processing can reduce the model complexity and subsequent platform operation burden, while better preserving the spatial orientation, pipe segment connection relationships, and overall geometric features of the water supply network, such as... Figure 4 As shown.

[0046] The output of Step 1 includes a water supply network geometric entity model, a water supply network topology, a node connection table, a pipe segment number table, a geometric object number table, and pipe attribute parameters, water supply system process data, pump station operating parameters, valve status parameters, water tank level or reservoir total head parameters, user node water demand data, and pressure monitoring point layout information after numbering association based on the pipe segment number table, node connection table, and geometric object number table. Specifically, the water supply network geometric entity model is used for visualization, Unity platform import, and operational status mapping in the subsequent high-fidelity digital twin model construction; the water supply network topology, node connection table, and pipe segment number table are used to establish pipe segments, nodes, and connection relationships in the subsequent hydraulic attribute model; the geometric object number table is used to implement object mapping and attribute binding between the water supply network geometric entity model and the hydraulic attribute model; the pipe attribute parameters after numbering association are used to set the pipe segment length, pipe diameter, pipe material, and Hayzen-Williams roughness coefficient in the hydraulic attribute model; and the water supply system process data, pump station operating parameters, valve status parameters, water tank level or reservoir total head parameters, user node water demand data, and pressure monitoring point layout information after numbering association. The process data is used to determine the water supply process and facility connection methods in the hydraulic property model; the pump station operation parameters and valve status parameters, after being numbered and associated, are used to set the operation status of the pumps and valves; the water level of the pool or the total head of the reservoir, after being numbered and associated, are used to set the water level boundary conditions for hydraulic calculations; the water demand data of the user nodes, after being numbered and associated, are used to set the water demand of each user node and its water demand pattern over time; the pressure monitoring point layout information, after being numbered and associated, is used to establish the correspondence between pressure monitoring points and pipeline nodes, and to provide a spatial index of measured pressure data for subsequent hydraulic property model verification.

[0047] Step 2: Construct the initial hydraulic property model; Step 2 is used to construct an initial hydraulic attribute model based on the water supply network topology, node connection table, pipe segment number table, and pipe attribute parameters associated with the numbers, water supply system process data, and auxiliary facility operation parameters output in Step 1. This model reflects the water supply network's pressure, flow rate, head loss, pump operating status, valve control status, and user water demand variation characteristics. The initial hydraulic attribute model uses EPANET software as the modeling platform to simulate the hydraulic operation process of the pressurized water supply network and provides the attribute model foundation for subsequent hydraulic attribute model verification, high-fidelity digital twin model construction, and operational status mapping.

[0048] Step 2 also involves acquiring historical operating status of pumping stations, historical control status of valves, hourly water consumption data of users, water level or total head change data of water tanks or reservoirs, and historical measured data of pressure monitoring points from the water supply company's operation management system or monitoring system. The historical operating status of pumping stations, historical control status of valves, hourly water consumption data of users, and water level or total head change data of water tanks or reservoirs are used to set the dynamic operating conditions of the hydraulic model at each simulation moment; the historical measured data of pressure monitoring points are used for subsequent verification of the hydraulic property model.

[0049] Specifically, based on the water supply network topology, pipe segment numbering table, and node connection relationship table output in step 1, a hydraulic topology is first established in EPANET. The hydraulic topology consists of water supply, pressurized distribution, storage facilities, and network monitoring. The total length of the water supply network in the study area is 27 km, establishing a three-stage pressurized water supply system, including 4 water supply nodes, 3 pressurized pump stations, and 3 elevated water tanks. The network topology contains a total of 511 nodes and 525 pipes, including 132 user nodes, and 10 pressure monitoring points are set up for operational status monitoring, such as... Figure 5 As shown.

[0050] In this embodiment, 525 pipes in the water supply network are grouped according to their diameter. Pipes with the same or similar diameter range are grouped into the same diameter group, and each diameter group is characterized by a uniform Hayzen-Williams roughness coefficient, resulting in a total of 6 diameter groups. Using pipe diameter grouping reduces the dimensionality of the parameters to be optimized while maintaining the ability to represent the hydraulic characteristics of the network, avoiding independent optimization of a large number of individual pipe roughness coefficients, and improving parameter calibration efficiency. Therefore, in the subsequent hydraulic property model verification process, the grouped roughness coefficients corresponding to the 6 diameter groups are used as the parameters to be optimized to construct a parameter vector:

[0051] in, Indicates the first The Hayzen-Williams roughness coefficients for each pipe diameter group.

[0052] Based on the pressure monitoring point layout information output from step 1, which is then associated with numbered nodes, each pressure monitoring point is linked to its corresponding node in the hydraulic topology to establish a pressure monitoring point-hydraulic node mapping relationship. The pressure monitoring point layout information includes at least the pressure monitoring point number, the corresponding hydraulic node number, the monitoring location, and the monitoring data identifier. After the association is completed, pressure monitoring identifiers are set for the corresponding nodes in the initial hydraulic property model to provide a location index for subsequent pressure simulation result extraction and model verification.

[0053] Furthermore, EPANET hydraulic calculation relationships are established based on hydraulic calculation principles. In the geometric solid model of the water supply network, each node is typically connected to one or more pipe segments. For any given node, the total flow entering that node should be balanced with the total flow leaving that node. Therefore, the flow balance relationship at a node can be expressed as: (1) In the formula, For water supply network node index; Represents nodes Connected and flowing to nodes The collection of pipe segments, among which Index of the inflow pipe section; Represents nodes Connected and consisting of nodes The outflowing pipe section collection, among which Index for the outflow pipe segment; Indicates the first The flow rate into the pipe section, Indicates the first The flow rate of the outflow pipe section; Represents a node External flow (node ​​demand or water supply input).

[0054] When water flows along a pipe network, it experiences frictional resistance from the pipe walls, resulting in head loss. For any pipe segment, the head difference between its two ends can be described by the head loss of that segment. Using the Hayzen-Williams formula, the head loss of the pipe segment is: (2) In the formula, For pipe section Head loss; For pipe section Traffic; For pipe section The Hay-Williams roughness coefficient; For pipe section Pipe diameter; For pipe section The length.

[0055] Energy balance equation: In a water supply network, water flows from high-head nodes to low-head nodes. For connecting nodes... and nodes For any pipe segment, the head difference between its two ends should be consistent with the head loss generated during the water flow in that segment. If external energy inputs such as pumps are not considered, the energy balance relationship of the pipe segment can be expressed as: (3) In the formula, and These are the water heads at both ends of the pipe section; For pipe section The head loss. When there are auxiliary components such as pumps and valves in the pipeline network, the energy gain or local head loss caused by them must also be considered.

[0056] After establishing the above hydraulic calculation relationships, the water supply links and boundary conditions are set according to the process data of the water supply system associated with the numbering. The primary booster station uses a DN600 water supply pipeline as its water source, with a supply pressure of 0.25 MPa at the connection point. The station uses a superimposed booster water supply system, drawing water from the city's main water supply network through a DN500 pipeline and then supplying raw water to the secondary booster station's clear water reservoir through a DN400 pipeline. The secondary booster station adopts a high-low pressure zoned water supply mode. The low-pressure pump set uses 0.5 MPa as the pump stop control pressure, while the high-pressure pump set supplies water to the tertiary booster station and also supplies water to the Gaoping area. The surplus water flows into the Gaodi Reservoir and supplies water to users along the line by gravity flow. The tertiary booster station uses the high-pressure zone pipeline network of the secondary booster station as its main water source and supplies water to the terminal area through a DN200 pipeline. The system is equipped with two water storage sources. One is the clear water reservoir of the secondary booster station, with an inlet pipe diameter of DN400, and the water source comes from the primary booster station. The other is the highland reservoir, with an inlet pipe diameter of DN500, and the water source comes from the high-pressure pump set of the secondary booster station.

[0057] Based on the node connection relationship table, the water level of the pool or the total head of the reservoir after numbering and association, and the pressure monitoring point layout information, basic attributes are set for each node to form node attribute data. Node attribute data includes node number, node type, node coordinates, node elevation, connecting pipe section, boundary head or level, and pressure monitoring identifier. Specifically, ordinary connection nodes have their connecting pipe sections set according to the node connection relationship table; pool or reservoir nodes have their boundary head or level set according to the water level of the pool or the total head of the reservoir after numbering and association; and pressure monitoring nodes have their monitoring identifiers set according to the pressure monitoring point layout information after numbering and association.

[0058] Simultaneously, based on the pipe segment number table, the associated pipe attribute parameters, and the node connection relationship table output in step 1, attributes are set for each pipe segment, forming pipe segment attribute data. The pipe segment attribute data includes the pipe segment number, start node, end node, pipe segment length, pipe diameter, pipe material, and Hazen-Williams roughness coefficient. Specifically, the start and end nodes of the pipe segment are determined based on the pipe segment number table and the node connection relationship table, while the pipe segment length, pipe diameter, pipe material, and Hazen-Williams roughness coefficient are determined based on the pipe attribute parameters.

[0059] Based on the pipe attribute parameters associated with the output number from step 1, the length, diameter, and Hayzen-Williams roughness coefficient of each pipe segment are set in EPANET. The Hayzen-Williams roughness coefficient set before the hydraulic attribute model verification is used as the initial Hayzen-Williams roughness coefficient for the pipe segment, and is associated with the corresponding pipe segment according to the segment number. This is used for the initialization and value range setting of the WSO optimization variables in subsequent step 3.

[0060] Then, the model parameters were set based on the actual data from the water supply company. The total head of the clear water reservoir of the secondary booster station was set to 1580 m, and the water level and elevation data of the three water tanks were obtained from the actual data recorded by the water supply company. The pump parameters were set according to the pump flow rate-head data, with pumps A1-A4 having a flow rate of 300 m³ / h and a head of 60 m; pumps B1 and B2 having a flow rate of 200 m³ / h and a head of 60 m; pumps B3-B5 having a flow rate of 300 m³ / h and a head of 150 m; and pumps C1-C3 having a flow rate of 50 m³ / h and a head of 90 m.

[0061] Table 1 Pump Flow Rate-Head Data Table

[0062] Based on the connection location of each pumping station in the hydraulic topology, and the pumping station operating parameters and pump flow-head data provided by the water supply company, the pump numbers, inlet nodes, outlet nodes, and flow-head relationships of each pumping station are set in EPANET, thus forming the pumping station attribute data. The pumping station attribute data includes the pumping station number, the pump numbers within the station, the pump inlet nodes, the pump outlet nodes, the rated flow rate, and the rated head.

[0063] Based on the valve connection information and valve status parameters in the auxiliary facility connection information output in step 1, the valve number, connection location, valve type, and corresponding control parameters are set in EPANET, thereby forming valve attribute data. Valve attribute data includes valve number, valve type, connecting pipe segment or connecting node, and corresponding control parameters. The configuration of the above-mentioned node attribute data, pipe segment attribute data, pump station attribute data, and valve attribute data are parallel basic parameter setting processes, and their order is not limited.

[0064] After completing the above basic attribute configuration, based on user node water usage data, valve historical control status, and pump station historical operating status, the basic water demand of user nodes, user water demand time mode, valve control parameters, and pump operating parameters are set respectively. The setting of these three types of dynamic operating parameters is a parallel process, and the order in which they are set is not limited. Specifically, based on the pump station's historical operating status, the start / stop status and operating conditions of the pumps at each simulation moment are set; based on the valve's historical control status, control parameters such as valve opening, opening / closing status, and target flow are set. General valve 1 is set to 60% closed, general valve 2 is set to 60% closed, general valve 3 is set to fully open, and general valve 4 is set to 30% closed. The flow control valves are set according to the target flow setting value in the valve status parameters to meet the flow control requirements of the corresponding pipelines; based on user node water usage data, the node's basic water demand and user water demand time mode are set. Using user flow data from July 18, 2024 to July 24, 2024 as the data basis for building the model, the basic water demand and time mode are input for 132 user nodes. The total simulation duration is set to 168 hours, with a hydraulic time step of 1 hour. The water usage variation coefficient for user nodes is expressed as follows: (4) In the formula: No. Water usage variation coefficient corresponding to the hour; For the first Hourly water consumption To extend the periodic simulation time index; The average hourly water consumption of the node within a 168-hour period.

[0065] This water consumption variation coefficient converts the average water demand of user nodes into time-varying node water demand, thus reflecting the dynamic changes in user water consumption over a 168-hour simulation period. Based on hourly user flow data from July 18, 2024 to July 24, 2024, the ratio of water consumption at each moment to the average hourly water consumption is calculated to obtain the water consumption variation coefficient for each moment within the 168-hour simulation period, which is then arranged chronologically to form user water demand time patterns. Subsequently, the basic water demand of each user node is associated with the corresponding user water demand time pattern, forming dynamic water demand settings for 132 user nodes. The user water demand time pattern includes a time pattern number and a sequence of water consumption variation coefficients corresponding to the 168 hydraulic calculation moments.

[0066] After setting the user water demand time pattern, pump operating parameters, valve control parameters, and water tank or reservoir boundary conditions, the various operational data are organized according to a unified simulation time step. Specifically, the user water demand time pattern, the start-stop status or operating condition of the pumps at various times, the opening degree or control status of the valves at various times, and the water level or total head data of the water tank or reservoir at various times are arranged in chronological order and uniformly converted into a data sequence corresponding to a 168-hour simulation cycle and a 1-hour hydraulic time step, thus forming the dynamic operation data of the pipeline network. The dynamic operation data of the pipeline network includes the user water demand time pattern, the pump operating status sequence, the valve control status sequence, and the water level or total head change sequence of the water tank or reservoir, which are used to set the actual operating conditions at each simulation time during the subsequent model verification process.

[0067] Furthermore, historical measured pressure data from monitoring points corresponding to the model simulation period are obtained from the water supply company's monitoring system. Based on the pressure monitoring point-hydraulic node mapping relationship, the measured pressure data of each monitoring point is associated with its corresponding hydraulic node. The historical measured pressure data undergoes time format standardization, outlier checking, missing value handling, and time step matching to ensure a one-to-one correspondence between the monitoring time of the measured pressure data and the simulation time of the hydraulic attribute model. The processed measured pressure data includes the pressure monitoring point number, the corresponding hydraulic node number, the monitoring time, and the measured pressure value, which is used for comparison with the simulated pressure values ​​of the same node and time in subsequent step 3. Finally, the parameters for nodes, pipe sections, pumps, water tanks, valves, and user water demand time patterns are set in EPANET, and a hydraulic simulation is run to obtain hydraulic calculation results such as node pressure, pipe section flow rate, pipe section head loss, pump station operating status, and valve control status under set operating conditions.

[0068] The output of step 2 includes the initial hydraulic property model, hydraulic topology, node attribute data, pipe segment attribute data, valve attribute data, pump station attribute data, user water demand time pattern, pipeline dynamic operation data, initial Hay-Williams roughness coefficient of the pipeline, pressure monitoring point layout information, processed measured data of pressure monitoring points, and hydraulic simulation results under corresponding working conditions. The initial hydraulic attribute model is formed by integrating hydraulic topology, node attribute data, pipe segment attribute data, valve attribute data, pump station attribute data, user water demand time patterns, and hydraulic boundary conditions. The hydraulic topology describes the connection relationships between nodes, pipe segments, pumps, valves, and hydraulic calculation objects such as pools or reservoirs. The dynamic operation data of the pipeline network consists of user water demand time patterns, pump operation status sequences, valve control status sequences, and pool water level or reservoir total head change sequences. The initial Hay-Williams roughness coefficient of the pipeline is obtained by setting the pipeline attribute parameters output in step 1. The pressure monitoring point layout information is associated with the nodes in the hydraulic topology to form a pressure monitoring point-hydraulic node mapping relationship. The measured data of the pressure monitoring points are obtained by the water supply company's monitoring system and formed after node association, data cleaning, and time alignment. The initial hydraulic property model, hydraulic topology, pipeline dynamic operation data, initial Hay-Williams roughness coefficient, pressure monitoring point layout information, and measured pressure monitoring point data are used together for hydraulic property model verification in subsequent step 3. Attribute data such as nodes, pipe segments, pumping stations, valves, and user water demand time patterns are used for attribute binding and operational state mapping in the subsequent high-fidelity digital twin model. The configuration of basic attribute data such as nodes, pipe segments, pumping stations, and valves is a parallel model parameter setting process, with no fixed order. After completing the basic attribute configuration, the setting of user water demand time patterns, pump operating parameters, and valve control parameters is also a parallel dynamic operating condition configuration process.

[0069] Step 3: Establish a verification method for the hydraulic property model; Step 3 is used to construct a hydraulic property model verification method based on EPANET and MATLAB co-simulation and WSO optimization, based on the initial hydraulic property model, hydraulic topology, and related verification data output in Step 2. This method optimizes the pipeline Hay-Williams roughness coefficient, making the simulated nodal pressure values ​​output by the hydraulic property model closer to the actual monitoring values ​​of the physical water supply network, thereby improving the calculation accuracy and engineering applicability of the water supply network hydraulic property model.

[0070] Step 3's inputs include the initial hydraulic property model, hydraulic topology, pipeline dynamic operation data, initial Hayzen-Williams roughness coefficients, pressure monitoring point layout information, and processed historical measured data from pressure monitoring points, all output from Step 2. Specifically, the initial hydraulic property model provides the foundation for EPANET hydraulic calculations; the pipeline topology data determines the connections between nodes, pipe segments, pumping stations, valves, and water tanks; the pipeline dynamic operation data, including user water demand patterns, pumping station operating status, valve control status, and historical sensor monitoring data, is used to set the operating conditions during model simulation; the historical measured data from pressure monitoring points is used for comparative analysis with the model simulation results; and the Hayzen-Williams roughness coefficients serve as the initial parameter basis for WSO optimization.

[0071] Specifically, the first step is to establish a co-simulation environment between EPANET and MATLAB. The EPANET-Toolkit plugin is installed in MATLAB, enabling MATLAB to call the EPANET initial hydraulic property model through a programming interface, and to perform parameter settings, simulation execution, and result extraction for the EPANET initial hydraulic property model. The initial hydraulic property model obtained in step 2 is then imported into the MATLAB environment as the base model for subsequent co-simulation and model verification.

[0072] Then, the simulation parameters were set using a MATLAB script calling the EPANET-Toolkit, and the dynamic operation data of the pipeline network output in step 2 was written into the initial hydraulic property model. Based on the time range of the water supply network operation data, the simulation period was set to 168 hours, the hydraulic simulation step size was set to 1 hour, and EPANET was called to execute the dynamic hydraulic simulation to obtain the simulated pressure values ​​of each monitoring node at different times. The simulation results were extracted and stored in the MATLAB workspace for subsequent comparative analysis with the measured data from the pressure monitoring points.

[0073] Furthermore, the historical measured data of the pressure monitoring points output in step 2 are read, and the pressure monitoring point number, corresponding hydraulic node number, and monitoring time are verified according to the pressure monitoring point-hydraulic node mapping relationship in the pressure monitoring point layout information to ensure that the measured pressure value and the simulated pressure value are consistent in terms of monitoring location and time step. The verified measured data of the pressure monitoring points are used as the measured comparison data for model verification.

[0074] Subsequently, the simulated EPANET pressure values ​​obtained from MATLAB were compared with the measured pressure values. For each pressure monitoring point, the simulated pressure values ​​at each simulation time were extracted and compared with the measured pressure values ​​at the same time. The absolute error between the simulated and measured pressure values ​​was calculated to evaluate the simulation accuracy of the initial hydraulic property model.

[0075] Based on error analysis, the Hayzen-Williams roughness coefficient was selected as the main verification parameter for the hydraulic property model. Since nodal flow rates can be determined from water meter readings, possessing good realism and availability, while the pipeline Hayzen-Williams roughness coefficient is significantly affected by factors such as pipe material, pipe age, internal scaling, and operating environment, making it difficult to obtain accurate values ​​directly, the pipeline friction coefficient was chosen as the primary optimization target. The initial Hayzen-Williams roughness coefficient was set to 110, and the Hayzen-Williams head loss formula was used to calculate the head loss along the pipe.

[0076] For any pipe section, the head loss calculation relationship is expressed as follows: When water flows along a pipe network, it experiences frictional resistance from the pipe walls, resulting in head loss. For any pipe segment, the head difference between its two ends can be described by the head loss of that segment. Using the Hayzen-Williams formula, the head loss of the pipe segment is: (5) In the formula, For pipe section Head loss; For pipe section Traffic; For pipe section The Hay-Williams roughness coefficient; For pipe section Pipe diameter; For pipe section The length.

[0077] In this embodiment, 525 pipes in the water supply network are grouped according to their diameter. Pipes with the same or similar diameter range are grouped into the same diameter group, and each diameter group is characterized by a uniform Hayzen-Williams roughness coefficient, resulting in a total of 6 diameter groups. Using pipe diameter grouping reduces the dimensionality of the parameters to be optimized while maintaining the ability to represent the hydraulic characteristics of the network, avoiding independent optimization of a large number of individual pipe roughness coefficients, and improving parameter calibration efficiency. Therefore, in the subsequent hydraulic property model verification process, the grouped roughness coefficients corresponding to the 6 diameter groups are used as the parameters to be optimized to construct a parameter vector: (6) in, Indicates the first The Hayzen-Williams roughness coefficients for each pipe diameter group.

[0078] The objective function is established with the goal of minimizing the root mean square error between the simulated and measured pressure values: (7) In the formula, The root mean square error between the simulated pressure value and the measured pressure value; The vector of parameters to be optimized consists of the Hayzen-Williams roughness coefficients for each pipe diameter group; This refers to the number of pressure monitoring points; and The first The average simulated pressure value and average measured pressure value of each pressure monitoring point within a set period.

[0079] In this embodiment, the pressure monitoring points include 10 points: D1, D2, D3, D4, D5, D6, D7, D8, D9, and D10. By minimizing the root mean square error between the simulated pressure value and the measured pressure value at each pressure monitoring point, the calculation results of the hydraulic property model are made closer to the actual operating state of the water supply network.

[0080] Furthermore, the White Shark Optimizer (WSO) algorithm was used to optimize the grouped Hayzen-Williams roughness coefficients. The WSO parameters were set as follows: optimization variable dimension. White shark population size Maximum number of iterations The range of the Hayzen-Williams roughness coefficient variables for each group was set to 80–160. Using the root mean square error (RMSE) between the simulated and measured average pressure values ​​at the pressure monitoring points as the fitness function, the optimal parameter combination was obtained by iteratively optimizing the roughness coefficient combination through the position update mechanism of the White Shark optimization algorithm.

[0081] The WSO verification process is as follows: First, the population is initialized. For the six pipe diameter groups, the Hayzen-Williams roughness coefficients are randomly selected within the constraint range of 80–160, generating 50 independent Hayzen-Williams roughness coefficient combinations. Each Hayzen-Williams roughness coefficient combination is treated as an individual. Each individual corresponds to a complete Hayzen-Williams roughness coefficient parameter scheme for the water supply network.

[0082] Then, the EPANET model parameters are updated. For each individual in the current population, the corresponding pipe Hay-Williams roughness coefficient and network dynamic operation data are written into the EPANET water supply network hydraulic property model to form the corresponding hydraulic simulation model.

[0083] Next, the EPANET dynamic simulation was run. The EPANET-Toolkit was called via MATLAB to run a 168-hour hydraulic simulation with a simulation step of 1 hour, and the simulated pressure values ​​of monitoring points D1, D2, D3, D4, D5, D6, D7, D8, D9 and D10 were extracted.

[0084] Then, the fitness is calculated. The objective function value is calculated based on the root mean square error between the simulated and measured pressure values ​​at each pressure monitoring point. The smaller the objective function value, the closer the Hayden-Williams roughness coefficient combination corresponding to that individual is to the actual pipeline network operating state. The fitness of the individual is determined based on the objective function value, serving as the basis for WSO selection, crossover, and mutation operations.

[0085] Further, WSO iterative calculations are performed. Based on the position update mechanism of the white shark optimization algorithm, the position of the white shark individual is updated using the current optimal individual information and a random search strategy, generating a new combination of coarseness coefficients. The process of parameter writing, dynamic hydraulic simulation, objective function calculation, fitness evaluation, and white shark individual position update is repeated until the maximum number of iterations is reached or the preset convergence condition is met.

[0086] Finally, the white shark individual with the smallest objective function value is output, and the roughness coefficient combination of its corresponding 6 pipe diameter groups is taken as the optimal roughness coefficient combination. This optimal Hayzen-Williams roughness coefficient combination is written into the EPANET initial hydraulic property model to obtain the verified hydraulic property model.

[0087] After obtaining the calibrated hydraulic property model, the accuracy of the model calibration is evaluated. The simulated pressure values ​​output by the calibrated hydraulic property model are compared with the measured values ​​at the pressure monitoring points to determine whether they meet the accuracy requirements of the model calibration.

[0088] When the pressure error meets the verification accuracy requirements, the hydraulic property model verification is deemed valid, and the verified hydraulic property model is used as the basis for the subsequent high-fidelity digital twin model construction. When the error does not meet the verification accuracy requirements, the pipeline network basic data, sensor monitoring data, and model parameter settings are re-verified, and the Hayzen-Williams roughness coefficient optimization verification process is executed again. The hydraulic property model verification process is as follows: Figure 6 As shown.

[0089] The output of step 3 includes the calibrated hydraulic property model, the optimal combination of Hayzen-Williams roughness coefficients, simulated pressure data from pressure monitoring points, pressure error analysis results, and model calibration accuracy evaluation results. Specifically, the calibrated hydraulic property model is used for fusion with the geometric entity model of the water supply network in subsequent step 4; the optimal combination of Hayzen-Williams roughness coefficients is used to update the pipe segment property parameters in the hydraulic property model; and the pressure error analysis results and model calibration accuracy evaluation results are used to determine whether the hydraulic property model can accurately reflect the actual operating state of the physical water supply network.

[0090] Step 4: Construct a high-fidelity digital twin model; Step 4 involves constructing a high-fidelity digital twin model of the water supply network based on the geometric entity model of the water supply network output in Step 1, the hydraulic property model output in Step 2, and the verified hydraulic property model output in Step 3. This step uses the Unity platform as the visualization integration environment to associate the geometric model of the water supply network with the EPANET hydraulic property model. This allows the digital twin model to not only express the spatial structure, pipe segment routing, and topological connections of the water supply network, but also to carry hydraulic property information such as pipe diameter, pipe length, roughness, flow rate, node elevation, node water demand, node pressure, and node head.

[0091] The inputs for step 4 include the geometric entity model of the water supply network obtained in step 1, the geometric object numbering table obtained in step 1, the pipe segment attribute data and node attribute data obtained in step 2, the verified hydraulic attribute model obtained in step 3, the optimized Hayzen-Williams roughness coefficient, pressure simulation results, and measured data from pressure monitoring points. Specifically, the geometric entity model of the water supply network is used to represent the spatial morphology of the network in the Unity platform; the geometric object numbering table is used to establish the correspondence between geometric objects and attribute data; the verified hydraulic attribute model provides attribute information such as pressure, flow rate, head, and Hayzen-Williams roughness coefficient; and the measured data from pressure monitoring points is used to verify the mapping accuracy of the digital twin model to the actual operating state of the water supply network.

[0092] Specifically, the geometric solid model of the water supply network, created in SolidWorks and lightweighted using 3ds Max, is first imported into the Unity platform. The model objects, data management objects, and interface objects are then uniformly organized in Unity's Hierarchy panel. In the Unity scene, a PipeNetworkRoot is created as the root node of the water supply network geometric solid model, used for unified management of the water supply network geometric objects. A DataManager object is created to hold pipe segment attribute data, node attribute data, and related attribute management scripts. Interface objects such as Canvas, Panel, and Text are created to visualize the attribute information.

[0093] Next, the organization method for water supply network attribute data is established. Based on the pipe segment and node attributes in the EPANET hydraulic attribute model, pipe segment attribute classes PipeData and node attribute classes NodeData are defined in Unity. PipeData stores pipe segment number, start node, end node, pipe diameter, pipe length, roughness, and flow rate information; NodeData stores node number, node elevation, node water demand, node pressure, and node head information. Based on this, a NetworkDataManager script is constructed to uniformly manage the pipe segment and node attribute data.

[0094] Furthermore, based on the geometric object numbering table formed in step 1 and the pipe segment and node attribute data formed in steps 2 and 3, an association relationship is established between the geometric entity model of the water supply network and the verified hydraulic attribute model. For pipe segment objects, the pipe geometric objects in the Unity scene are mapped to the pipe segment number, start node, end node, pipe diameter, pipe length, Hayzen-Williams roughness coefficient, and flow rate data in PipeData; for node objects, the node objects in the Unity scene are mapped to the node number, node elevation, node water demand, node pressure, and node head data in NodeData. Through the above association relationship, the spatial objects in the geometric entity model of the water supply network can carry the corresponding hydraulic attribute information.

[0095] Subsequently, the association between attribute data and the Unity visualization interface was explored. An InfoPanelManager script was built in Unity to call pipe segment and node attribute data from the NetworkDataManager, and the obtained attribute information was output to the interface text component for display. By setting up interface components such as Canvas, Panel, and Text, a water supply network attribute information display panel was established, displaying the attribute data of typical pipe segments and nodes in text format, thereby verifying the feasibility of integrating geometric models and attribute models within the Unity platform.

[0096] After completing the geometric-attribute model integration, the optimal grouped roughness coefficient combination obtained in step 3 is re-imported into the initial hydraulic attribute model established in step 2 to update the Hayzen-Williams roughness coefficients for each pipe diameter group, thus forming the calibrated hydraulic attribute model. Hydraulic simulation calculations of the water supply network are then performed based on EPANET. Actual pressure monitoring data from 10 pressure measurement points between July 18th and July 24th, 2024, are selected and compared with the pressure simulation results output by the digital twin model to verify the accuracy of the water supply network digital twin model after parameter calibration. The results are shown in Tables 2 and 3. The results show that the absolute error between the pressure twin values ​​and the measured values ​​at each pressure measurement point after verification is controlled within the range of 0.17 to 1.09 m. This indicates that the pipe friction coefficient optimized by WSO can effectively improve the consistency between the hydraulic property model and the actual pipe network operation state. The verified pipe network twin model can better reflect the pressure change characteristics of the actual water supply network, which meets the accuracy evaluation standard for the verification of the hydraulic property model of the water supply network adopted in this paper.

[0097] Table 2. Statistics of Absolute Error Range of Monitoring Points over 168 hours

[0098] Table 3. Absolute Pressure Error After WSO Optimization

[0099] Table 4. Optimal roughness coefficients obtained after WSO optimization for each group.

[0100] Specifically, the measured pressure values ​​at 10 pressure measurement points over 168 hours were compared with the simulated pressure values ​​output by the digital twin model at each time step, and the absolute error between the simulated and measured pressure values ​​at each measurement point was calculated. Table 3 shows that the absolute error between the simulated and measured pressure values ​​at each measurement point after verification was controlled within the range of 0.17–1.09 m. Within 168 hours, 1344 data points had an absolute pressure error less than 1 m, accounting for 80%; 1680 data points had an absolute pressure error less than 2 m, accounting for 100%; and 1680 data points had an absolute pressure error less than 4 m, accounting for 100%. These results meet the accuracy evaluation criteria for the verification of the hydraulic property model of the water supply network, indicating that the verified digital twin model of the water supply network can effectively reflect the pressure change characteristics of the actual water supply network.

[0101] Furthermore, the error distribution at different pressure measurement points was analyzed. It was found that the average absolute errors at pressure measurement points D1-D4 and D7-D9 were all within the range of 0.24–0.39 m, with the maximum absolute error not exceeding 0.52 m, indicating that the digital twin model can accurately reflect the pressure distribution in most areas of the water supply network. However, the hourly average absolute errors at pressure measurement points D5, D6, and D10 were 0.86 m, 0.96 m, and 0.92 m, respectively, which were relatively large and may be related to the fact that the study scope did not cover the actual entire network topology.

[0102] To verify the effectiveness of the White Shark optimization algorithm in the parameter calibration of hydraulic models for water supply networks, a genetic algorithm was used as a comparison method, and model calibration was performed under the same parameter range and objective function conditions. The results are shown in Tables 5 and 6.

[0103] Table 5. Absolute Pressure Error After GA Optimization

[0104] Table 6. Grouped Optimal Roughness Coefficients Obtained by Calibration Using Different Optimization Algorithms

[0105] As shown in Tables 5 and 6, compared with the genetic algorithm, the Hayzen-Williams roughness coefficient combinations obtained by the White Shark optimization algorithm exhibit better error control capabilities in the model parameter optimization process. To evaluate the impact of different optimization algorithms on the optimization effect of hydraulic property model parameters, the root mean square error (RMSE) was used as a comprehensive evaluation index for the optimization stage. RMSE is calculated based on the periodic average pressure of each pressure monitoring point and is used to reflect the overall fitting effect of the parameter combinations obtained by different optimization algorithms. The optimal RMSE of the WSO-optimized model is 0.105 m, lower than the 0.125 m result of the GA optimization, indicating that the White Shark optimization algorithm can obtain roughness coefficient combinations that better match the actual pipeline network operating state, thus improving the calibration accuracy of the hydraulic property model parameters. Further analysis of the dynamic pressure error results after verification revealed that the average absolute error of each pressure measurement point after WSO optimization was lower than that after GA optimization. The errors at pressure measurement points D5, D6, and D10 were relatively large, but were effectively reduced after WSO optimization: the average absolute error at pressure measurement point D5 decreased from 0.91 m in the GA optimization result to 0.86 m; the average absolute error at pressure measurement point D6 decreased from 1.02 m to 0.96 m; and the average absolute error at pressure measurement point D10 decreased from 0.97 m to 0.92 m. These results indicate that the WSO optimization method can further reduce the deviation between the model simulation results and the actual monitoring data, improving the calibration effect of the hydraulic property model of the water supply network. Finally, the effectiveness of the high-fidelity digital twin model was judged based on the comparison results of the measured pressure and the twin pressure. When the pressure error meets the preset verification accuracy requirements, confirm that the current geometric-attribute integrated model is a high-fidelity digital twin model of the water supply network; when the pressure error does not meet the verification accuracy requirements, return to step 3 to re-perform Hay-Williams roughness coefficient optimization or verify the basic data and monitoring data of the network.

[0106] The output of step 4 includes a high-fidelity digital twin model of the water supply network, a geometry-attribute integrated scene in the Unity platform, pipe segment attribute data management results, node attribute data management results, visualization results of typical pipe segments and typical node attributes, comparison results of simulated and measured pressure values, and model accuracy evaluation results. The high-fidelity digital twin model of the water supply network is used for subsequent mapping of the water supply network's operational status, display of attribute information, leakage location, operational optimization, and scheduling decisions. The comparison results of simulated and measured pressure values ​​are used to prove that the verified digital twin model can accurately reflect the operational status of the physical water supply network.

[0107] This invention provides a digital twin-based urban water supply network modeling and optimization system, comprising: Geometric solid modeling module: Establishes a geometric solid model of the water supply network that reflects the spatial structural characteristics of the network; Hydraulic simulation calculation module: used to establish an initial hydraulic property model for simulating the hydraulic operation state of the water supply network based on the topological relationship of the geometric entity model of the water supply network and the network operation parameters; Global parameter optimization module: It is used to obtain historical measured values ​​of water supply network, and uses the white shark optimization algorithm to globally optimize the grouped Hay-Williams roughness coefficients in the initial hydraulic property model to obtain the optimal combination of roughness coefficients that meets the preset error requirements. The optimal combination of roughness coefficients is then substituted back into the initial hydraulic property model to update the model parameters and obtain the verified hydraulic property model. Twin mapping integration module: used to integrate the verified hydraulic property model with the geometric entity model of the water supply network, realize the unified mapping between the spatial structure and hydraulic properties of the water supply network, and obtain a high-fidelity digital twin model.

Claims

1. A method for modeling and optimizing urban water supply networks based on digital twins, characterized in that, include: Establish a geometric solid model of the water supply network that reflects the spatial structural characteristics of the network; Based on the topological relationship and operating parameters of the water supply network geometric entity model, an initial hydraulic property model is established to simulate the hydraulic operating state of the network. Historical measured values ​​of the water supply network are obtained, and the White Shark optimization algorithm is used to globally optimize the grouped Hayzen-Williams roughness coefficients in the initial hydraulic property model to obtain the optimal combination of roughness coefficients that meets the preset error requirements. The optimal combination of roughness coefficients is then substituted back into the initial hydraulic property model to update the model parameters and obtain the verified hydraulic property model. The verified hydraulic property model is integrated with the geometric entity model of the water supply network to achieve a unified mapping between the spatial structure and hydraulic properties of the water supply network, resulting in a high-fidelity digital twin model.

2. The method as described in claim 1, characterized in that, The process of establishing the geometric solid model of the water supply network specifically includes: Obtain water supply network design drawings, network topology data, node coordinate data, pipe segment connection relationships, pipe attribute parameters, and ancillary facility connection information, and organize them to obtain the water supply network topology structure; The node connection relationships are determined based on the water supply network topology, and a node connection relationship table is formed. Based on the water supply network topology, node connection relationship table and pipeline attribute parameters, establish a pipe segment number table and a geometric object number table. The geometric object number table is used to record the number and object type of each geometric object in the geometric model, as well as its corresponding pipe segment number, node number or ancillary facility number. Based on the pipe section number, node number, or ancillary facility number, establish a correspondence between the existing pipeline attribute parameters, water supply system process data, pump station operating parameters, valve status parameters, water tank level or reservoir total head parameters, user node water demand data, and pressure monitoring point layout information and the corresponding pipe section, node, or ancillary facility. Based on the node connection table, pipe segment number table, and geometric object number table, a topology-driven modeling approach is used to construct the geometric model of the water supply network; among which, straight pipe segments are generated using a straight pipe stretching method, and pipe segments with turns are generated using a bend scanning method. The geometric model of the water supply network is lightweighted by simplifying redundant patches to reduce the number of polygons and vertices in the model, thereby obtaining a geometric solid model of the water supply network that retains the spatial orientation and connection relationships of the network.

3. The method as described in claim 2, characterized in that, The establishment of the initial hydraulic property model for simulating the hydraulic operation state of the pipeline network specifically includes: Based on the water supply network topology, pipe segment numbering table and node connection relationship table, a hydraulic topology including water supply, pressurized transmission and distribution, storage facilities and network monitoring is constructed. Based on the hydraulic topology, hydraulic calculation relationships are established according to the node flow balance equation, pipe section head loss relationship and energy balance equation. After establishing the hydraulic calculation relationship, set the water supply link and boundary conditions according to the water supply system process data associated with the number, and configure the node attribute data, pipe segment attribute data, pump station attribute data and valve attribute data according to the corresponding attribute parameters respectively; Based on the user node water usage data, the node basic water demand and user water demand time mode are set. Based on the valve historical operating status, the valve control parameters are set. Based on the pump station historical operating parameters, the pump operating parameters are set. Based on the node basic water demand, user water demand time mode, valve control parameters and pump operating parameters, dynamic network operation data is formed. Based on the hydraulic topology, hydraulic calculation relationships, water supply links, boundary conditions, node attribute data, pipe segment attribute data, pump station attribute data, valve attribute data, and operating parameters, the pipe segments in the water supply network are grouped according to the pipe diameter, and a corresponding Hayzen-Williams roughness coefficient is configured for each pipe diameter group to form an initial hydraulic attribute model. Set the total simulation duration and hydraulic time step, run the hydraulic simulation, and obtain the hydraulic simulation results of the water supply network under the set operating conditions.

4. The method as described in claim 3, characterized in that, The node flow balance equation is as follows: In the formula, For water supply network node index; Represents nodes Connected and flowing to nodes The collection of pipe segments, among which Index of the inflow pipe section; Represents nodes Connected and consisting of nodes The outflowing pipe section collection, among which Index for the outflow pipe segment; Indicates the first The flow rate into the pipe section, Indicates the first The flow rate of the outflow pipe section; Represents a node External flow (node ​​demand or water supply input). The head loss of the pipe section in the hydraulic calculation relationship is: in, For pipe section Head loss; For pipe section Traffic; For pipe section The Hay-Williams roughness coefficient, The value is determined by the Hayzen-Williams roughness coefficient corresponding to the pipe diameter group to which the pipe section belongs; For pipe section Pipe diameter; For pipe section The length.

5. The method as described in claim 3 or 4, characterized in that, The process of establishing the verified hydraulic property model specifically includes: Historical measured data of water supply network pressure monitoring points are obtained. The historical measured data of the pressure monitoring points are then standardized in terms of time format, checked for outliers, handled for missing values, and matched in terms of time step to obtain the measured pressure value corresponding to the hydraulic simulation time. The average measured pressure value of each pressure monitoring point within a set period is also calculated. Based on the pipe diameter, the pipe segments in the water supply network are divided into multiple pipe diameter groups. The Hayzen-Williams roughness coefficient corresponding to each pipe diameter group is used as the parameter to be optimized. A parameter vector to be optimized is constructed, consisting of the Hayzen-Williams roughness coefficients of each group, and the variable constraint range is set. Initialize the great white shark population, and randomly generate multiple sets of parameter combinations consisting of the Hayzen-Williams roughness coefficients for each pipe diameter group within the variable constraints. Each set of parameter combinations is used as the position vector of a single great white shark. For each individual in the current population, according to the pipe diameter grouping mapping relationship, the Hayzen-Williams roughness coefficients corresponding to each group of white shark individuals are assigned to the corresponding pipe segments and written into the initial hydraulic property model. Dynamic hydraulic simulation is then run and the pressure simulation values ​​of the monitoring points are extracted. The average value of the simulated pressure value over the corresponding period is compared with the average measured pressure value. The root mean square error between the simulated pressure value and the measured pressure value is calculated according to the preset objective function to obtain the objective function value corresponding to the individual. The individual fitness is determined according to the objective function value. Based on the position update strategy of the white shark optimization algorithm, the position of the white shark individual is updated by using the current optimal individual position and random search factor, so as to realize the iterative optimization of the Hayzen-Williams roughness coefficient for each pipe diameter group. Repeatedly execute parameter mapping, model parameter writing, dynamic hydraulic simulation, objective function calculation, fitness evaluation, and white shark individual position update operations until the maximum number of iterations is reached or the preset convergence condition is met; The individual white shark with the smallest objective function value is output, and the corresponding combination of Hezen-Williams roughness coefficients for each pipe diameter group is taken as the optimal combination of roughness coefficients. This combination is then substituted back into the initial hydraulic property model to obtain the verified hydraulic property model.

6. The method as described in claim 5, characterized in that, The objective function is: In the formula, The root mean square error between the simulated pressure value and the measured pressure value; Let be the vector of parameters to be optimized, consisting of the Hayden-Williams roughness coefficients for each pipe diameter group, where , representing the Hayzen-Williams roughness coefficients corresponding to the six pipe diameter groups respectively; This refers to the number of pressure monitoring points; and The first The average simulated pressure value and average measured pressure value of each pressure monitoring point within a set period.

7. The method as described in claim 6, characterized in that, The verified hydraulic property model is integrated with the geometric entity model of the water supply network to achieve a unified mapping between the spatial structure and hydraulic properties of the water supply network, resulting in a high-fidelity digital twin model, specifically including: Import the geometric entity model of the water supply network into the 3D visualization engine, and establish the network root node, data management object, and interface object for unified management of geometric objects, carrying attribute data and scripts; Define a pipe segment attribute class for storing pipe segment number, start and end nodes, pipe diameter, pipe length, roughness and flow information, and a node attribute class for storing node number, elevation, water demand, pressure and head information, and construct a network data management script for unified management of the pipe segment attribute class and node attribute class; Based on the geometric object numbering table, establish the association between the geometric entity model of the water supply network and the verified hydraulic attribute model, so that the spatial objects in the geometric entity model can carry the corresponding hydraulic attribute information. Construct an information panel management script, call the pipe segment attribute data and node attribute data in the network data management script, and output the attribute information to the interface text component for display, to verify the integrated expression of the water supply network geometric entity model and the verified hydraulic attribute model; The optimal combination of roughness coefficients is imported into the verified hydraulic property model for simulation calculation to obtain pressure simulation results. These results are then compared with the measured pressure monitoring data of the monitoring points within a preset time period to calculate the absolute error. If the absolute error meets the preset verification accuracy requirements, the current model is confirmed as a high-fidelity digital twin model of the water supply network; if it does not meet the requirements, return to perform Hay-Williams roughness coefficient optimization or verify the basic data and monitoring data of the network.

8. A digital twin-based urban water supply network modeling and optimization system, used to implement the method described in any one of claims 1-7, characterized in that, include: Geometric solid modeling module: Used to create geometric solid models of water supply networks that reflect the spatial structural characteristics of the network. Hydraulic simulation calculation module: used to establish an initial hydraulic property model for simulating the hydraulic operation state of the water supply network based on the topological relationship and network operation parameters of the geometric entity model of the water supply network; Global parameter optimization module: used to obtain historical measured values ​​of water supply network, use the white shark optimization algorithm to globally optimize the grouped Hay-Williams roughness coefficients in the initial hydraulic property model, obtain the optimal roughness coefficient combination that meets the preset error requirements, substitute the optimal roughness coefficient combination back into the initial hydraulic property model, update the model parameters, and obtain the verified hydraulic property model; Twin mapping integration module: used to integrate the verified hydraulic property model with the geometric entity model of the water supply network, realize the unified mapping between the spatial structure and hydraulic properties of the water supply network, and obtain a high-fidelity digital twin model.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements a digital twin-based urban water supply network modeling and optimization method as described in any one of claims 1 to 7.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements a method for modeling and optimizing urban water supply networks based on digital twins as described in any one of claims 1 to 7.