EPANET model input file manufacturing method, system, equipment, medium and product

By obtaining and processing the annotation information of the pipeline CAD files in the EPANET model, using the dxf2epa tool and the random walk algorithm, the problems of low processing efficiency and low accuracy in the existing technology are solved, and efficient and accurate EPANET model input file generation is achieved.

CN120449826APending Publication Date: 2025-08-08ZHONGSHUIHUAIHEGUIHUA DESIGN RES CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510592136.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

When handling large-scale simulation projects, the existing EPANET model has low processing efficiency and low accuracy, especially when dealing with pipeline networks of different materials and pipe diameters, it is prone to node duplication and topological relationship errors.

Method used

By obtaining the annotation information of the CAD file of the urban water supply pipeline network, it is added to the custom attribute bar of the pipe segment object, and using the dxf2epa tool to convert it into multiple layer inp files, extracting and supplementing the elevation, pipe diameter and roughness coefficients, conducting node uniqueness and topological relationship checks, using the random walk algorithm to detect connectivity, and finally generating the EPANET model input file.

Benefits of technology

Improve the processing efficiency and accuracy of the EPANET model, automatically eliminate duplicate nodes, prevent node conflicts, and ensure the accuracy and completeness of model files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449826A_ABST
    Figure CN120449826A_ABST
Patent Text Reader

Abstract

The invention discloses an EPANET model input file manufacturing method, system, device, medium and product, and relates to the field of EPANET model input file manufacturing, the method comprises the following steps: obtaining annotation information of an urban water supply network CAD file, and adding the annotation information to an attribute bar; splitting each pipe section to corresponding layers according to the annotation information, and extracting starting point coordinates and terminal point coordinates of each pipe section to a first table; using a dxf2epa tool to convert the file into a plurality of layer inp files, and extracting pipe segment and node coordinate information to a second table; and according to the first table and the second table, elevation, pipe diameter and roughness coefficient are added, node uniqueness and topological relation check and correction are carried out, connectivity detection is carried out on the urban water supply pipe network by using a random walk algorithm, and an input file of an EPANET model is generated. According to the input file generated by the method, the processing efficiency and the processing precision of the EPANET model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of EPANET model input file production, and in particular to an EPANET model input file production method, system, device, medium and product. Background Art

[0002] The EPANET model is a hydraulic and water quality model of pressurized pipe networks, used for hydraulic and water quality simulations of urban water supply networks. The model tracks delayed pipeline flow, node pressures, tank water levels, and chemical concentrations throughout the network. It also simulates water age and performs source tracing. It has been widely used in the planning, analysis, and design of hydraulic and water quality simulations for urban pipe networks worldwide. The software's background images of components such as pipes, nodes, pumps, valves, and reservoirs, along with the dxf2epa tool for vector file processing, are cumbersome, inaccurate, and inefficient for large-scale simulations involving multiple pipe diameters and materials. Summary of the Invention

[0003] The purpose of this application is to provide an EPANET model input file preparation method, system, equipment, medium and product to improve the processing accuracy and efficiency of the EPANET model.

[0004] To achieve the above objectives, this application provides the following solutions:

[0005] In a first aspect, the present application provides a method for preparing an EPANET model input file, comprising:

[0006] Obtain annotation information of the city water supply network CAD file and add the annotation information to the custom property column of each pipe segment object; the annotation information includes the pipe segment material and pipe segment diameter;

[0007] Splitting each pipe segment in the city water supply network CAD file into corresponding layers according to the annotation information to obtain a split city water supply network CAD file, and extracting the start point coordinates and end point coordinates of each pipe segment in the split city water supply network CAD file into a first table; the layers are named according to the pipe segment diameter and pipe segment material;

[0008] Based on the layers, using the dxf2epa tool, converting the split urban water supply network CAD file into multiple layer inp files, and extracting the pipe segment and node coordinate information in the layer inp files into a second table;

[0009] According to the first table and the second table, adding elevation, pipe diameter and roughness coefficient to each layer inp file to obtain a supplemented layer inp file;

[0010] Performing node uniqueness check and topological relationship check on each of the supplemented layer inp files, and correcting them to obtain a corrected layer inp file;

[0011] Based on the corrected layer inp files, a random walk algorithm is used to perform connectivity detection on the urban water supply network to obtain a layer inp file after detection;

[0012] Generate the input file of the EPANET model based on the inp file of each detected layer.

[0013] Optionally, the annotation information is added to the custom property column of each pipe segment object, specifically including:

[0014] According to the distance and height from the midpoint to the line segment in the annotation information, the annotation information is added to the custom property column of each pipe segment object.

[0015] Optionally, extracting the starting point coordinates and the ending point coordinates of each pipe segment in the split urban water supply network CAD file into a first table, and then further including:

[0016] Add the roughness coefficient and pipe diameter to the second table based on the pipe material and pipe diameter.

[0017] Optionally, the method further includes: converting the split urban water supply network CAD file into a dxf format.

[0018] Optionally, according to the first table and the second table, the elevation, pipe diameter and roughness coefficient are added to each layer inp file to obtain a supplemented layer inp file, specifically including:

[0019] Match the node coordinate information in the second table with the node coordinate information in the first table. When the horizontal and vertical coordinates are the same, add the z-axis coordinate of the corresponding node in the first table to the elevation attribute of the corresponding node, and retain the pipe diameter and pipe material corresponding to the node;

[0020] According to the pipe material and pipe diameter of the node, the node ID is matched with Node1 and Node2 in the [PIPES] section of the second table. When the node ID is the same as Node1 or Node2, the pipe diameter and pipe material corresponding to the retained node are added to the pipe diameter attribute and roughness coefficient attribute of the pipe.

[0021] Optionally, performing a node uniqueness check and a topological relationship check on each of the supplemented layer inp files and correcting them to obtain a corrected layer inp file specifically includes:

[0022] Merging the node coordinate information in each of the supplemented layer inp files into a third table;

[0023] Replacing the node IDs with the same node coordinate information in the third table with the ID of the last node with the same coordinate information to obtain a replaced node ID;

[0024] According to the replaced node ID, the [PIPES] part in each of the supplemented layer inp files is updated to obtain an updated layer inp file;

[0025] Use the list query method to filter out the independent nodes in the updated layer inp file and delete them to obtain the filtered layer inp file;

[0026] The list query method is used to check and correct the topological relationship of the filtered layer inp file to obtain the corrected layer inp file.

[0027] In a second aspect, the present application provides an EPANET model input file production system, comprising:

[0028] A file acquisition module is used to obtain annotation information of the CAD file of the urban water supply network and add the annotation information to the custom attribute column of each pipe segment object; the annotation information includes the pipe segment material and pipe segment diameter;

[0029] a layer splitting module for splitting each pipe segment in the urban water supply network CAD file into corresponding layers based on the annotation information, obtaining a split urban water supply network CAD file, and extracting the starting point coordinates and the ending point coordinates of each pipe segment in the split urban water supply network CAD file into a first table; the layers are named according to the pipe segment diameter and the pipe segment material;

[0030] A file conversion module is used to convert the split urban water supply network CAD file into multiple layer inp files based on the layer using the dxf2epa tool, and extract the pipe segment and node coordinate information in the layer inp file to a second table;

[0031] A data supplementation module, configured to add elevation, pipe diameter, and roughness coefficient to each layer inp file according to the first table and the second table to obtain a supplemented layer inp file;

[0032] A verification module is used to perform node uniqueness check and topological relationship check on each of the supplemented layer inp files, and to correct them to obtain a corrected layer inp file;

[0033] A connectivity detection module is used to perform connectivity detection on the urban water supply network based on the corrected layer inp files and using a random walk algorithm to obtain a layer inp file after detection;

[0034] The input file generation module is used to generate the input file of the EPANET model according to the inp file of each layer after the detection.

[0035] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any one of the above-described methods for producing an EPANET model input file.

[0036] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any one of the above-mentioned methods for producing an EPANET model input file.

[0037] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements any one of the above-mentioned methods for producing an EPANET model input file.

[0038] According to the specific embodiments provided in this application, this application has the following technical effects:

[0039] The present application provides an EPANET model input file production method, system, equipment, medium and product, which obtains annotation information of a city water supply network CAD file and adds the annotation information to the custom attribute column of each pipe segment object; splits each pipe segment in the city water supply network CAD file into corresponding layers according to the annotation information to obtain the split city water supply network CAD file, and extracts the starting point coordinates and end point coordinates of each pipe segment in the split city water supply network CAD file to a first table; based on the layer, uses the dxf2epa tool to convert the split city water supply network CAD file into multiple layer inp files, and extracts the pipe segment and node coordinate information in the layer inp file to a second table; according to the first table and the second table, adds elevation, pipe diameter and roughness coefficient to the layer inp file to obtain a supplemented layer inp file; performs node uniqueness check and topological relationship check on each supplemented layer inp file, and corrects it to obtain a corrected layer inp file, uses a random walk algorithm to perform connectivity detection on the city water supply network to obtain a detected layer inp file; generates an EPANET model input file based on each detected layer inp file. This application eliminates the need for manual data entry, ensuring accurate and convenient operation. For projects with large simulation scopes, it can effectively improve data processing efficiency and save time. For problems with nodes connecting different pipe diameters that lead to duplicate nodes, duplicate nodes can be automatically removed, preventing node conflict errors and ensuring accurate model files. The input files generated by this application improve the processing efficiency and accuracy of EPANET models. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 A flowchart of a method for preparing an EPANET model input file provided in one embodiment of the present application;

[0042] Figure 2 A workflow diagram of the method for preparing the EPANET model input file for this application;

[0043] Figure 3 Schematic diagram for testing pipe network connectivity;

[0044] Figure 4 This is an application case diagram;

[0045] Figure 5A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0047] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0048] In an exemplary embodiment, Figure 1 and Figure 2 As shown, a method for preparing an EPANET model input file is provided, comprising the following steps:

[0049] S1: Obtain annotation information of the urban water supply network CAD file, and add the annotation information to the custom attribute column of each pipe segment object; the annotation information includes the pipe segment material and pipe segment diameter.

[0050] In practical applications, the method of adding attribute columns is very necessary for models whose CAD files only have text annotations but are not layered according to pipe diameters. Based on the principle that the annotation text is closest to the midpoint of the pipe segment, the text information is automatically extracted and added to the pipe segment attributes, and the accuracy of the attribute information is verified.

[0051] As an optional implementation, the annotation information is added to the custom property column of each pipe segment object, specifically including:

[0052] According to the distance and height from the midpoint to the line segment in the annotation information, the annotation information is added to the custom property column of each pipe segment object.

[0053] In actual application, step 1, add the annotation information of the CAD file (urban water supply network CAD file) to the attribute column: first create the material and pipe diameter attribute columns, extract the midpoint coordinates (X0, Y0) of the annotation information and the two-dimensional plane normal vector n = (A, B) of the line segment, and calculate the distance from the midpoint to the line segment. And set the maximum distance d limit to be smaller than the height h in the annotation information, and assign the text content to the line segment attribute column nearby. For example, in DN200 ductile iron, the digital information is assigned to the pipe diameter attribute column and the Chinese character information is assigned to the material attribute column.

[0054] S2: Split each pipe segment in the urban water supply network CAD file into corresponding layers according to the annotation information to obtain the split urban water supply network CAD file, and extract the starting point coordinates and end point coordinates of each pipe segment in the split urban water supply network CAD file into a first table; the layers are named according to the pipe segment diameter and pipe segment material.

[0055] Convert the split urban water supply network CAD file into dxf format.

[0056] As an optional implementation method, the starting point coordinates and the ending point coordinates of each pipe segment in the split urban water supply network CAD file are extracted into a first table, and then the method further includes:

[0057] Add the roughness coefficient and pipe diameter to the second table based on the pipe material and pipe diameter.

[0058] In actual application, step 2: split the pipe diameter attribute column and material attribute column information in step 1 above into different layers and convert them into dxf format, extract the node coordinate (x, y, z) information in the CAD file to external table 1 (first table), and add the roughness coefficient and pipe diameter information to the corresponding worksheet of Excel table 2 (second table) according to the material and pipe diameter information.

[0059] S3: Based on the layer, use the dxf2epa tool to convert the split urban water supply network CAD file into multiple layer inp files, and extract the pipe segment and node coordinate information in the layer inp file to the second table.

[0060] In actual application, in step 3, the dxf2epa tool is used to create inp files of different layers and the data is transferred to Excel table 2 and stored in different worksheets. The purpose is to facilitate processing and assign values such as Diameter and Roughness to obtain a basic output format file with key characters. Combined with the information obtained in step 2, the roughness coefficient and diameter information of the pipe section are improved.

[0061] S4: According to the first table and the second table, the elevation, the pipe diameter and the roughness coefficient are added to each layer inp file to obtain a supplemented layer inp file.

[0062] As an optional implementation, S4 specifically includes:

[0063] S41: Match the node coordinate information in the second table with the node coordinate information in the first table. When the horizontal coordinate and the vertical coordinate are the same, add the z-axis coordinate of the corresponding node in the first table to the elevation attribute of the corresponding node, and retain the pipe diameter and pipe material corresponding to the node.

[0064] S42: According to the pipe material and pipe diameter of the node, the node ID is matched with Node1 and Node2 in the [PIPES] part in the second table. When the node ID is the same as Node1 or Node2, the pipe diameter and pipe material corresponding to the retained node are added to the pipe diameter attribute and roughness coefficient attribute of the pipe.

[0065] In practical applications, step 4, based on table 1 in step 2 and table 2 obtained in step 3, matches the x, y coordinate information of [COORDINATES] in table 2 obtained in step 3 with the coordinate information in table 1, and supplements the Elev attribute (elevation attribute) of the node [JUNCTIONS] in table 2 and the Diameter attribute and Roughness attribute of [PIPES]. The specific process is as follows:

[0066] Step 4.1: Match the x1, y1 coordinate information in [COORDINATES] in Table 2 with the (x0, y0, z0) coordinates in Table 1. When x1 = x0 and y1 = y0, store the z0 value in the Elev attribute of the corresponding node, and retain the pipe diameter and material information corresponding to the node.

[0067] Step 4.2: Based on the material and diameter information of the node, match the node ID with the Node1 and Node2 information of [PIPES]. When the node ID is the same as Node1 or Node2, assign the diameter and material information retained in step 4.1 to the Diameter and Roughness attributes of the pipe segment.

[0068] S5: performing node uniqueness check and topological relationship check on each of the supplemented layer inp files, and correcting them to obtain a corrected layer inp file.

[0069] As an optional implementation, S5 specifically includes:

[0070] S51: Merging the node coordinate information in each of the supplemented layer inp files into a third table.

[0071] S52: Replace the node IDs with the same node coordinate information in the third table with the ID of the last node with the same coordinate information to obtain a replaced node ID.

[0072] S53: According to the replaced node ID, the [PIPES] part in each of the supplemented layer inp files is updated to obtain an updated layer inp file.

[0073] S54: Using a list query method, filter out independent nodes in the updated layer inp file and delete them to obtain a filtered layer inp file.

[0074] S55: Using a list query method, the topological relationship of the filtered layer inp file is checked and corrected to obtain a corrected layer inp file.

[0075] In actual application, step 5 processes the file node and pipe segment information to ensure the uniqueness of the nodes and the accuracy of the topological relationship between the pipe segments and nodes. Finally, the information data in each worksheet of Table 2 is obtained after processing without duplicate nodes and with accurate topological relationship between the pipe segments and nodes. One-click automatic processing is achieved through Python programming. The specific process is as follows:

[0076] Step 5.1: Merge the [COORDINATES] information from Table 2 into a new worksheet (the third worksheet). Compare the node information for different pipe diameters in the [COORDINATES] section of the third worksheet. Keep the ID of the last node with the same coordinates and replace it with the node ID in the corresponding worksheet. This ensures that each coordinate point has only one ID. For example, if Worksheet a has coordinate ID a-4, Worksheet b has coordinate ID b-21, and Worksheet c has coordinate ID c-32, and the coordinate (x, y) values are the same, then they are unified into one ID, such as ID c-32.

[0077] Step 5.2: For the pipe segment [PIPES] information in the third table, since it is represented by the ID, Node1, and Node2 attributes, replace the aforementioned numbers with the pipe segment node information. Match the initial numbers in [COORDINATES] with the [PIPES] node numbers, updating them to the numbers described in Step 5.1. For example, if the attributes [ID, Node1, Node2] for pipe segment 1 are [P-1, IDa-4, IDa-5], they will be updated to [P-1, IDc-32, IDa-5].

[0078] Step 5.3: After the replacement is completed, some nodes do not belong to any pipe segment, that is, independent nodes. Independent points need to be removed. Specifically, the pipe segment node codes are stored in a list. Through the list query function, independent nodes are filtered out and the corresponding codes in the table are replaced with " / / " characters to facilitate the deletion of independent nodes.

[0079] Step 5.4: For the [COORDINATES] information for different pipe diameters, if there are connections between pipe segments, nodes may be stored in different worksheets. Merge the [COORDINATES] information for different pipe diameters into a single table and use a list query to return the repeated elements and the number of repetitions. Using the repeated elements and the number of repetitions, replace the repeated elements in the table with " / / " and delete them, retaining only the last element.

[0080] S6: Based on the corrected layer inp files, a random walk algorithm is used to perform connectivity detection on the urban water supply network to obtain a layer inp file after detection.

[0081] In practical applications, in step 6, a random walk algorithm is used to detect the connectivity of the pipe network.

[0082] First, we start with the Node11 node of the first pipe segment and walk along the pipeline to the connected pipe segments. We place an active label on the node we walk to and iterate the walk. This will verify the connection relationship of the model pipeline and ensure that the created model file does not have a large range of independent pipe segments. The walk detection model is shown below: Figure 3 As shown in the figure, taking node 1 as an example, the connected pipes are a, b, and n. Active labels are placed at the other end of the pipes, namely 2, 5, and 0. Then, randomly select from nodes 2, 5, and 0. For example, if 2 is selected, the connected pipes are a, c, and d. Pipe a has an active label, so exclude it. Then, select pipes c and d randomly, and so on. This verifies the connectivity of the pipe network, ensures that the model file does not have large, independent pipe networks, reduces manual verification, and increases model accuracy.

[0083] S7: Generate an input file for the EPANET model based on the inp file of each detected layer. Use Python programming to automatically process and generate the input file for the EPANET model according to the inp file format.

[0084] In actual application, step 7, integrate the node, pipe section, coordinate and other information according to the inp file format to create the final input file inp of the EPANET model. The file header information is written directly once, and the specific information is automatically obtained through Python programming to obtain the worksheet name in the table, and read and write the specific information one by one. The final file format is shown in Table 1. The inp file that meets the requirements is imported into EPANET to obtain the pipe network model of the required project. The application case is as follows: Figure 4 As shown in the figure, a project typically contains fewer components, such as pumps and reservoirs, and these can be created manually in EPANET. Valves can be handled using the same logic and will not be detailed here.

[0085] Table 1 Final file format

[0086]

[0087] This application adds annotation information (pipe material, pipe diameter) of CAD files that are only marked but not divided into layers to the attribute column; processes them in layers according to the pipe diameter and material information to retain the coordinate elevation information of the original file; extracts the pipe coordinate point information into a table by layer; uses dxf2epa to create inp files in layers and transfers the data to Excel tables, creating worksheets for different pipe diameters respectively; adds information such as Elev, Diameter, and Roughness according to the [COORDINATES] information in the inp file and the CAD file information; processes the file nodes and pipe segments to ensure the uniqueness of the nodes and the correspondence of the topological relationship of the pipe segment node information; verifies the connectivity of the pipe network to avoid the existence of large-scale independent pipe networks and increase the workload of model debugging; integrates the nodes, pipe segments, coordinate information, etc. according to the inp file format to create a model input file. This application can accurately create a model input file based on the original CAD file, automatically process the node and pipe segment information and topological relationship, with high accuracy and high speed.

[0088] In this application, CAD file annotation information is added to the property column. The addition of Elev, Diameter, and Roughness information is automatically achieved through software and programming, without the need for manual entry, and the operation is accurate and convenient. For projects with a large simulation range, it can effectively improve the efficiency of data processing and save time. For the problem of node duplication caused by the connection of nodes of different diameters, the duplicate nodes can be automatically removed to prevent node conflict errors and ensure the accuracy of the model file.

[0089] Based on the same inventive concept, embodiments of the present application also provide an EPANET model input file creation system for implementing the aforementioned EPANET model input file creation method. The solution provided by this system is similar to the solution described in the aforementioned method. Therefore, the specific limitations in the embodiments of the EPANET model input file creation system provided below can be found in the aforementioned limitations of the EPANET model input file creation method and will not be further elaborated here.

[0090] In an exemplary embodiment, an EPANET model input file production system is provided, comprising:

[0091] A file acquisition module is used to obtain annotation information of the CAD file of the urban water supply network and add the annotation information to the custom attribute column of each pipe segment object; the annotation information includes the pipe segment material and pipe segment diameter;

[0092] a layer splitting module for splitting each pipe segment in the urban water supply network CAD file into corresponding layers based on the annotation information, obtaining a split urban water supply network CAD file, and extracting the starting point coordinates and the ending point coordinates of each pipe segment in the split urban water supply network CAD file into a first table; the layers are named according to the pipe segment diameter and the pipe segment material;

[0093] A file conversion module is used to convert the split urban water supply network CAD file into multiple layer inp files based on the layer using the dxf2epa tool, and extract the pipe segment and node coordinate information in the layer inp file to a second table;

[0094] A data supplementation module, configured to add elevation, pipe diameter, and roughness coefficient to each layer inp file according to the first table and the second table to obtain a supplemented layer inp file;

[0095] A verification module is used to perform node uniqueness check and topological relationship check on each of the supplemented layer inp files, and to correct them to obtain a corrected layer inp file;

[0096] A connectivity detection module is used to perform connectivity detection on the urban water supply network based on the corrected layer inp files and using a random walk algorithm to obtain a layer inp file after detection;

[0097] The input file generation module is used to generate the input file of the EPANET model according to the inp file of each layer after the detection.

[0098] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the above-mentioned EPANET model input file preparation method when executing the computer program.

[0099] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, which, when executed by a processor, implements the above-mentioned EPANET model input file preparation method.

[0100] In an exemplary embodiment, a computer program product is provided, including a computer program, which implements the above-mentioned EPANET model input file preparation method when executed by a processor.

[0101] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for producing an EPANET model input file is implemented.

[0102] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0103] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0104] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0105] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.

[0106] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0107] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for preparing an EPANET model input file, characterized in that: include: Obtain annotation information of the city water supply network CAD file and add the annotation information to the custom property column of each pipe segment object; the annotation information includes the pipe segment material and pipe segment diameter; Splitting each pipe segment in the city water supply network CAD file into corresponding layers according to the annotation information to obtain a split city water supply network CAD file, and extracting the start point coordinates and end point coordinates of each pipe segment in the split city water supply network CAD file into a first table; the layers are named according to the pipe segment diameter and pipe segment material; Based on the layers, using the dxf2epa tool, converting the split urban water supply network CAD file into multiple layer inp files, and extracting the pipe segment and node coordinate information in the layer inp files into a second table; According to the first table and the second table, adding elevation, pipe diameter and roughness coefficient to each layer inp file to obtain a supplemented layer inp file; Performing node uniqueness check and topological relationship check on each of the supplemented layer inp files, and correcting them to obtain a corrected layer inp file; Based on the corrected layer inp files, a random walk algorithm is used to perform connectivity detection on the urban water supply network to obtain a layer inp file after detection; Generate the input file of the EPANET model based on the inp file of each detected layer.

2. The EPANET model input file preparation method according to claim 1, wherein: Add the annotation information to the custom property column of each pipe segment object, including: According to the distance and height from the midpoint to the line segment in the annotation information, the annotation information is added to the custom property column of each pipe segment object.

3. The EPANET model input file preparation method according to claim 1, wherein: Extract the starting point coordinates and end point coordinates of each pipe segment in the split urban water supply network CAD file to the first table, and then also include: Add the roughness coefficient and pipe diameter to the second table based on the pipe material and pipe diameter.

4. The EPANET model input file preparation method according to claim 1, wherein: Also includes: Convert the split urban water supply network CAD file into dxf format.

5. The EPANET model input file preparation method according to claim 1, characterized in that: According to the first table and the second table, the elevation, pipe diameter and roughness coefficient are added to each layer inp file to obtain a supplemented layer inp file, which specifically includes: Match the node coordinate information in the second table with the node coordinate information in the first table. When the horizontal and vertical coordinates are the same, add the z-axis coordinate of the corresponding node in the first table to the elevation attribute of the corresponding node, and retain the pipe diameter and pipe material corresponding to the node; According to the pipe material and pipe diameter of the node, the node ID is matched with Node1 and Node2 in the [PIPES] section of the second table. When the node ID is the same as Node1 or Node2, the pipe diameter and pipe material corresponding to the retained node are added to the pipe diameter attribute and roughness coefficient attribute of the pipe.

6. The EPANET model input file preparation method according to claim 1, characterized in that: Perform node uniqueness check and topological relationship check on each supplemented layer inp file, and correct it to obtain a corrected layer inp file, specifically including: Merging the node coordinate information in each of the supplemented layer inp files into a third table; Replacing the node IDs with the same node coordinate information in the third table with the ID of the last node with the same coordinate information to obtain a replaced node ID; According to the replaced node ID, the [PIPES] part in each of the supplemented layer inp files is updated to obtain an updated layer inp file; Use the list query method to filter out the independent nodes in the updated layer inp file and delete them to obtain the filtered layer inp file; The list query method is used to check and correct the topological relationship of the filtered layer inp file to obtain the corrected layer inp file.

7. An EPANET model input file production system, characterized in that: include: A file acquisition module is used to obtain annotation information of the CAD file of the urban water supply network and add the annotation information to the custom attribute column of each pipe segment object; the annotation information includes the pipe segment material and pipe segment diameter; a layer splitting module for splitting each pipe segment in the urban water supply network CAD file into corresponding layers based on the annotation information, obtaining a split urban water supply network CAD file, and extracting the starting point coordinates and the ending point coordinates of each pipe segment in the split urban water supply network CAD file into a first table; the layers are named according to the pipe segment diameter and the pipe segment material; A file conversion module is used to convert the split urban water supply network CAD file into multiple layer inp files based on the layer using the dxf2epa tool, and extract the pipe segment and node coordinate information in the layer inp file to a second table; A data supplementation module, configured to add elevation, pipe diameter, and roughness coefficient to each layer inp file according to the first table and the second table to obtain a supplemented layer inp file; A verification module is used to perform node uniqueness check and topological relationship check on each of the supplemented layer inp files, and to correct them to obtain a corrected layer inp file; A connectivity detection module is used to perform connectivity detection on the urban water supply network based on the corrected layer inp files and using a random walk algorithm to obtain a layer inp file after detection; The input file generation module is used to generate the input file of the EPANET model according to the inp file of each layer after the detection.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the EPANET model input file preparation method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the EPANET model input file preparation method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the EPANET model input file preparation method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Abaqus grid division method based on Midas modeling and Matlab conversion

    CN109858161A

  • Data input method and device for rainstorm flood management model software

    CN112597670A

  • Pipe network topological relation detection method and device, electronic equipment and storage medium

    CN119004721A

  • Energy analysis apparatus using IFC file and method thereof

    KR1020140014979A

  • Information network with linked information nodes

    US20140337306A1