Method for constructing a cad-based sewer network model and storage medium

By identifying pipe network and catchment area elements in CAD files, obtaining basic information, and converting them into INP format files, the problem of using DWG format files in SWMM model construction is solved, realizing rapid modeling and efficient conversion of drainage pipe network models.

CN116305952BActive Publication Date: 2025-12-19SHANGHAI HUISHUI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310280704.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-21
Publication Date
2025-12-19
Estimated Expiration
2043-03-21

AI Technical Summary

Technical Problem

Existing technologies cannot directly extract the topology and key basic information of drainage pipe networks from CAD DWG format files, and cannot quickly build SWMM models, especially the construction of catchment areas requires additional integration methods.

Method used

By identifying pipe network and catchment area elements in CAD files, basic information is obtained and converted into an INP format file that SWMM can recognize, including basic information on nodes, pipes, and catchment areas, enabling rapid modeling.

Benefits of technology

It enables rapid conversion from DWG format files to SWMM models, improving model building efficiency, reducing manual operations, and can be used for urban flooding analysis and sponge city planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116305952B_ABST
    Figure CN116305952B_ABST
Patent Text Reader

Abstract

The application discloses a CAD-based sewer network model construction method and a storage medium, and the method comprises the following steps: acquiring a full-element CAD file; performing pipe network element identification and catchment area element identification in the full-element CAD file, and acquiring basic information of each pipe network element and basic information of each catchment area, wherein the pipe network element comprises a node object class element and a line object class element, the node object class element comprises an inspection well and a discharge outlet, the line object class element comprises a pipeline, the basic information of the node object class element comprises coordinates, a ground elevation and a well bottom elevation, the basic information of the line object class element comprises an upstream node, a downstream node, an upstream bottom elevation, a downstream bottom elevation, a pipe diameter and a pipe length, and the basic information of the catchment area comprises vertex coordinates, an area and an outlet node; and converting the basic information of each pipe network element and the basic information of each catchment area to obtain an INP file, and generating a sewer network model. The application can realize rapid modeling based on a CAD file.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of pipe network modeling, and particularly relates to a CAD-based drainage pipe network model construction method and a storage medium. BACKGROUND

[0002] SWMM (Storm Water Management Model) is a free and open source computer program that simulates dynamic rainfall, runoff, pipe network hydrodynamics, water quality changes and other processes. SWMM model was first developed by USEPA (U.S. Environmental Protection Agency) in 1971, and has undergone several version updates and upgrades since then, and has been widely recognized and applied worldwide. In China, SWMM model has been widely used in urban stormwater runoff analysis, drainage pipe planning and design, non-point source pollution control, sponge city construction and other fields.

[0003] At present, China is still in the stage of rapid urbanization, and the informatization level of drainage pipe network data is still low. Especially, the update of current GIS data cannot keep up with the pace of urban development and construction, and GIS data may not reflect the real construction status of the current pipe network, so the various pipe network data stored in DWG format is still the first-hand information that modeling engineers can obtain. However, there are still the following difficulties in using DWG files to construct SWMM model: (1) Since most of the drainage pipe networks are tree-shaped structures with fixed single flow direction, the topological information of DWG format file cannot be saved; (2) The important information of drainage pipe, such as pipe diameter, inner bottom elevation, etc. cannot be directly saved in the graphic file, but exists in the form of text annotation, so the DWG file cannot be directly recognized by SWMM; (3) CAD does not have data analysis function, and the polygon representing the drainage pipe network catchment area cannot be associated with the adjacent nodes.

[0004] In view of the difficulties encountered at present, many scholars have carried out some research on this problem and given the solution.

[0005] In the Chinese patent with publication number CN107423520A, a CAD-based secondary development rapid extraction pipeline information SWMM modeling method is provided. The method uses the VisualLISP language included in AutoCAD to quickly construct a SWMM model for a DWG format drainage pipe network model. It can be used for establishing pipe network topology information, extracting pipe network basic information, data conversion and export, and generating an INP file. The generated INP file can be directly read by the SWMM model. However, this method is limited to the pipe and node itself, and only completes the work of importing pipeline information into SWMM. The constructed INP file is not a complete drainage model, and cannot be directly used for rainwater runoff analysis, sponge city planning and design, etc. Using this method, the catchment area still needs to be constructed through another way, and then a complete and usable drainage model can be constructed through integration. In addition, this method cannot automatically identify the required information, especially for the commonly used pipe diameter annotation format, which directly saves the annotation text as a whole, and the text content needs to be disassembled again. SUMMARY

[0006] The technical problem to be solved by the present application is to provide a CAD-based drainage pipe network model construction method and storage medium, which can realize rapid modeling based on DWG format files.

[0007] To solve the above technical problems, the technical scheme adopted by the present application is as follows: a CAD-based drainage pipe network model construction method, comprising:

[0008] Obtain a full-element CAD file, wherein the full-element CAD file contains pipe network data and catchment area data;

[0009] Identify pipe network elements in the full-element CAD file and obtain the basic information of each pipe network element, wherein the pipe network elements include node object class elements and line object class elements, the node object class elements include inspection wells and outlet ports, the line object class elements include pipes, the basic information of the node object class elements includes coordinates, ground elevation and well bottom elevation, and the basic information of the line object class elements includes upstream nodes, downstream nodes, upstream bottom elevation, downstream bottom elevation, pipe diameter and pipe length;

[0010] Identify catchment area elements in the full-element CAD file and obtain the basic information of each catchment area, wherein the basic information of the catchment area includes vertex coordinates, area and outlet node;

[0011] Convert the basic information of each pipe network element and the basic information of each catchment area to obtain an INP file, and generate a drainage pipe network model according to the INP file.

[0012] The application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the method.

[0013] The application has the advantages that for a CAD file containing pipe network data and catchment area data, pipe network elements and basic information thereof are identified, and pipe network topology and key basic information are extracted, the catchment area is identified, and an outlet node thereof is identified, and the catchment area is extracted, the pipe network information and the catchment area information are exported into an INP format file that can be read by a SWMM model, and rapid modeling of a drainage pipe network model is realized. BRIEF DESCRIPTION OF DRAWINGS

[0014] Figure 1 A flow chart of the CAD-based drainage pipe network model construction method of the first embodiment of the application;

[0015] Figure 2 The node attribute represents the intention of the first embodiment of the application;

[0016] Figure 3 The pipe attribute represents the intention of the first embodiment of the application;

[0017] Figure 4 The pipe and node tolerance diagram of the first embodiment of the application;

[0018] Figure 5 The annotation extraction diagram of the first embodiment of the application;

[0019] Figure 6 The catchment area attribute represents the intention of the first embodiment of the application;

[0020] Figure 7 The SWMM model effect diagram of the first embodiment of the application;

[0021] Figure 8 The SWMM model effect diagram of the second embodiment of the application. DETAILED DESCRIPTION

[0022] To make the technical content, the achieved purposes and effects of the application clear, the following will be described in detail in combination with the embodiments and the accompanying drawings.

[0023] Please refer to Figure 1 A CAD-based drainage pipe network model construction method, comprising:

[0024] Obtain a full-element CAD file containing pipe network data and catchment area data;

[0025] Identify pipe network elements in the full-element CAD file and obtain basic information of each pipe network element, the pipe network elements including node object class elements and line object class elements, the node object class elements including inspection wells and outlet ports, the line object class elements including pipes, the basic information of the node object class elements including coordinates, ground elevations and well bottom elevations, and the basic information of the line object class elements including upstream nodes, downstream nodes, upstream bottom elevations, downstream bottom elevations, pipe diameters and pipe lengths;

[0026] Identify catchment area elements in the full-element CAD file and obtain basic information of each catchment area, the basic information of the catchment area including vertex coordinates, areas and outlet nodes;

[0027] Convert to obtain an INP file according to the basic information of each pipe network element and the basic information of each catchment area, and generate a drainage pipe network model according to the INP file.

[0028] From the above description, the beneficial effects of the present application are that the DWG format file can be converted into a SWMM recognizable model object containing full elements of pipe network and catchment area under the CAD platform, and rapid modeling based on the DWG format file is realized.

[0029] Further, the full-element CAD file is obtained, specifically as follows:

[0030] Obtain a CAD file of the pipe network and a CAD file of the catchment area, and merge pipe network data in the CAD file of the pipe network with catchment area data in the CAD file of the catchment area to obtain the full-element CAD file.

[0031] From the above description, by obtaining the full-element CAD file containing pipe network data and catchment area data, the extraction of the pipe network and the catchment area can be realized directly under the same CAD.

[0032] Further, the pipe network elements are identified in the full-element CAD file, and the basic information of each pipe network element is obtained, specifically as follows:

[0033] According to sample graphs of each pipe network element, the pipe network elements are identified in the full-element CAD file, and the coordinates of the node object class elements and the pipe lengths of the line object class elements are read;

[0034] If the distance between a node object class element and the middle part of a pipe is less than a preset first tolerance value, the pipe is divided into two pipes, and the node object class element is taken as an end point of the two pipes;

[0035] respectively calculate distances between each node object class element and two end points of each line object class element, and determine upstream nodes and downstream nodes of each line object class element according to the distances;

[0036] respectively determine ground elevations and well bottom elevations of each node object class element and upstream bottom elevations and downstream bottom elevations of pipelines connected with each node object class element according to position relationships between each annotation text, each annotation lead and each node object class element;

[0037] respectively determine pipe diameters of each line object class element according to distances between each annotation text and each line object class element.

[0038] It can be known from the above description that the accuracy of the pipe network topology structure is ensured by breaking the unbroken pipeline, and the elevations and pipe diameters and other information are extracted by recognizing the annotations and annotation texts.

[0039] Further, after the pipe network elements are recognized in the full-element CAD file according to the sample graphs of the pipe network elements, the coordinates of the node object class elements and the pipe lengths of the line object class elements are read, further comprising:

[0040] sequentially number each node object class element to obtain a node number of each node object class element, and sequentially number each line object class element to obtain a pipeline number of each line object class element;

[0041] if there are at least two line segments and a fold point in a line object class element, the coordinates of the fold point are obtained.

[0042] Further, the distances between each node object class element and two end points of each line object class element are respectively calculated, and upstream nodes and downstream nodes of each line object class element are determined according to the distances, specifically:

[0043] distances between each node object class element and two end points of each line object class element are respectively calculated;

[0044] if a distance between a node object class element and an end point of a pipeline is less than a preset second tolerance value, the node object class element is taken as an upstream node or a downstream node of the pipeline according to a position relationship between the end point of the pipeline and start and end points of the pipeline.

[0045] It can be known from the above description that the extraction of the pipe network topology structure is realized by determining the upstream nodes and the downstream nodes of each line object class element.

[0046] Further, after the distance between each node object class element and the two end points of each line object class element is calculated respectively, and the upstream node and the downstream node of each line object class element are determined according to the distance, the method further comprises:

[0047] If the direction from the upstream node to the downstream node of a pipeline is inconsistent with the actual flow direction of the pipeline, the upstream node and the downstream node of the pipeline are exchanged.

[0048] As can be seen from the above description, by adjusting the flow direction, the accuracy of the pipeline network topology is ensured.

[0049] Further, the ground elevation and the well bottom elevation of each node object class element and the upstream bottom elevation and the downstream bottom elevation of the pipeline connected with each node object class element are determined according to the positional relationship between each annotation text, each annotation lead and each node object class element; and the pipe diameter of each line object class element is determined according to each annotation text and the distance between each annotation text and each line object class element, specifically:

[0050] If the distance between an annotation text and an annotation lead is less than a preset third tolerance value, the annotation text and the annotation lead are associated;

[0051] If the distance between an end point of an annotation lead and a center point of a node object class element is less than a preset fourth tolerance value and the style of the annotation lead matches a preset node elevation annotation style, the ground elevation and the well bottom elevation of the node object class element are determined according to the annotation text corresponding to the annotation lead;

[0052] If the distance between an end point of an annotation lead and a center point of a node object class element is less than a preset fourth tolerance value and the style of the annotation lead matches a preset pipe bottom elevation annotation style, the upstream bottom elevation of a first pipeline and the downstream bottom elevation of a second pipeline are determined according to the annotation text corresponding to the annotation lead, wherein the upstream node of the first pipeline is the node object class element and the downstream node of the second pipeline is the node object class element;

[0053] If the distance between an annotation text and a center point of a node object class element is less than a preset fifth tolerance value, the ground elevation of the node object class element, the well bottom elevation of the node object class element, the upstream bottom elevation of a first pipeline or the downstream bottom elevation of a second pipeline are determined according to the annotation text; and if the distance between an annotation text and a line object class element is less than a preset sixth tolerance value and the annotation text matches a preset pipe diameter text style, the pipe diameter of the line object class element is determined according to the annotation text.

[0054] From the above description, by associating pipe network elements with labels / label texts, the extraction of information such as elevation and pipe diameter is realized.

[0055] Further, the catchment area element identification and the acquisition of basic information of each catchment area in the full-element CAD file are performed, and specifically:

[0056] According to the graphic features of the catchment area, the catchment area is identified in the full-element CAD file, and the area and the vertex coordinates of each catchment area are acquired;

[0057] According to the vertex coordinates of each catchment area, the centroid of each catchment area is calculated;

[0058] The node object element closest to the centroid of a catchment area is taken as the outlet node of the catchment area.

[0059] From the above description, the outlet node is assigned to the catchment area according to the nearest principle, and the extraction of catchment area information is realized.

[0060] Further, the calculation of the centroid of each catchment area according to the vertex coordinates of each catchment area is specifically:

[0061] According to the vertex coordinates of each vertex and the origin coordinates of a catchment area, the vector of each vertex is calculated;

[0062] The sum of the vectors of each vertex of the catchment area is calculated, and the vector of the centroid of the catchment area is calculated according to the sum of the vectors and the number of vertices of the catchment area;

[0063] According to the vector of the centroid and the origin coordinates, the centroid coordinates of the catchment area are calculated.

[0064] The application also provides a computer readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to realize the method described above.

[0065] Embodiment one

[0066] Please refer to Figures 1-7 , the embodiment one of the application is: a CAD-based drainage pipe network model construction method, which can realize the rapid modeling of the SWMM model.

[0067] As Figure 1 shown, the method comprises the following steps:

[0068] S1: acquiring a full-element CAD file, wherein the full-element CAD file contains pipe network data and catchment area data.

[0069] The basic data of the catchment area is usually a land use type map, and commonly used are shp format or DWG format files of GIS, the shp format file can be output as a CAD file, at this time the CAD file of the catchment area can be obtained, then the CAD file of the pipe network is acquired, and the pipe network data and the catchment area data are combined in CAD, so that the CAD file of all elements can be obtained.

[0070] S2: identifying pipe network elements in the CAD file of all elements and acquiring basic information of each pipe network element. The pipe network elements include node object class elements and line object class elements, the node object class elements include inspection wells and outlet ports, the line object class elements include pipelines, the basic information of the node object class elements mainly includes coordinates, ground elevation and well bottom elevation, and the basic information of the line object class elements mainly includes upstream nodes, downstream nodes, upstream bottom elevation, downstream bottom elevation, pipe diameter and pipe length.

[0071] For the drainage pipe network, the main data information includes three categories: the first category is the plane geometric information of the pipe network, mainly including the plane position coordinates of the node object class elements (inspection wells and outlet ports) and the end point and bend point plane position coordinates of the line object class elements (pipelines), which are contained in the CAD graph and can be directly read; the second category is the inherent basic attributes of the pipe network, which cannot be directly reflected by the plane geometric information of the graph, mainly including the ground elevation and well bottom elevation of the node object class elements (inspection wells and outlet ports) and the upstream and downstream bottom elevations, pipe diameter and pipe length information of the line object class elements (pipelines); the third category is the topological structure information of the pipe network, which represents the flow direction of the pipeline and is reflected in the model as the upstream and downstream node numbers of the line object class elements (pipelines). The basic attributes and the topological structure of the pipe network are the key to building the drainage model.

[0072] Specifically, the step includes the following steps:

[0073] S201: respectively according to the sample graphs of each pipe network element, identifying the pipe network elements in the CAD file of all elements, and reading the coordinates of the node object class elements and the pipe length of the line object class elements.

[0074] In the CAD view, the inspection wells, outlet ports and pipelines are respectively identified as elements, and the principle of identification is that the same graphic elements in the same layer are identified as the same class of objects at a time. Thus, the sample graphs representing the inspection wells, outlet ports and pipelines are respectively picked up, and then the objects of the same type in the layer are picked up as the inspection wells, outlet ports and pipelines. The identified objects are provided with an attribute table (the node object class elements correspond to the node attribute table, and the line object class elements correspond to the pipeline attribute table) for saving the relevant attributes. In the embodiment, as shown in FIG. 2, the sample graphs of the inspection wells, outlet ports and pipelines are respectively picked up, and then the objects of the same type in the layer are picked up as the inspection wells, outlet ports and pipelines. Figure 2As shown, the fields in the node attribute table include node ID, X coordinate, Y coordinate, ground elevation, well bottom elevation, and remarks. Figure 3 As shown, the fields in the pipe attribute table include pipe ID, upstream node number, downstream node number, length, height, width, shape, upstream bottom elevation, downstream bottom elevation, inflection point coordinate, and remarks.

[0075] After identifying the pipe network elements, each node object class element is sequentially numbered as a node ID, and each line object class element is sequentially numbered as a pipe ID. Further, when a pipe contains multiple line segments and has an inflection point, the inflection point coordinate in the pipe also needs to be saved.

[0076] At this time, the basic information of each pipe network element identified is empty except for the coordinates and pipe length, which can be directly read. That is, at this time Figure 2 the ground elevation and well bottom elevation in Figure 3 the upstream node number, downstream node number, length, height, width, shape, upstream bottom elevation, and downstream bottom elevation are all empty and are obtained through subsequent steps.

[0077] S202: Breaking the unbroken pipe, that is, if the distance between a node object class element and the middle part of a pipe is less than a preset first tolerance value, the pipe is divided into two pipes, and the node object class element is taken as the endpoint of the two pipes.

[0078] Since in the CAD drawing process, the pipe may not be broken at the node, only one pipe is identified at this time, but there should be two pipe segments at this place in fact, so the pipe needs to be broken at the node. Specifically, as shown in Figure 4 if the distance (such as S in Figure 4 ) between a node object class element and the middle part (i.e., the part other than the endpoint) of a pipe is less than a preset first tolerance value, the pipe will be broken at the node object class element, that is, the pipe is divided into two pipes, and the node object class element is taken as the endpoint of the two pipes.

[0079] S203: Calculating the distance between each node object class element and the two endpoints of each line object class element, and determining the upstream node and downstream node of each line object class element according to the distance.

[0080] Specifically, if the distance between a node object class element and one endpoint of a pipe (such as S in Figure 4If the distance between the center point of the node object class element and the end point of the one pipe is less than the preset second tolerance value, the node object class element is determined as an upstream node or a downstream node of the one pipe according to the positional relationship between the end point of the one pipe and the start and end points of the pipeline.

[0081] Further, the node ID of the node object class element is determined as the upstream node number or the downstream node number of the one pipe.

[0082] Through steps S202-S203, the pipes and nodes can be correctly identified even if there is a deviation in the positions.

[0083] After the upstream node and the downstream node of each pipe are determined, the flow direction of the pipe is also determined. Since the start and end points of the line segment drawn in CAD may not be consistent with the actual flow direction of the pipe, the upstream and downstream nodes of the pipe identified may be incorrect, and thus the pipe object identified needs to be sorted in terms of the flow direction.

[0084] Specifically, if the direction from the upstream node to the downstream node of the one pipe is inconsistent with the actual flow direction of the one pipe, the upstream node and the downstream node of the one pipe are exchanged.

[0085] The actual flow direction of the pipe can be obtained in various ways. Since the drainage pipe network is generally a one-way branched pipe network, the modeling engineer can determine the actual flow direction according to other topographic data, planning data or the elevation data marked in the pipe network, or the actual flow direction of the pipe can be indicated by an arrow on the edge in some CAD data.

[0086] Through the pipe breaking and the flow direction adjustment, the accuracy of the topological structure of the pipe network is ensured.

[0087] S204: The ground elevation and the well bottom elevation of each node object class element are determined according to the positional relationship between each mark and each mark text and each node object class element.

[0088] Specifically, if the distance between one mark text and one mark leader is less than a preset third tolerance value, the one mark text and the one mark leader are associated; if the distance between the end point of the one mark leader and the center point of one node object class element is less than a preset fourth tolerance value, the one mark leader and the one node object class element are associated. At this time, the association relationship among the mark text, the mark leader and the node object class element can be obtained through the above two association relationships.

[0089] Then, based on the style of the annotation leader, determine whether the corresponding annotation text corresponds to node elevation information (i.e., ground elevation and well bottom elevation) or pipe bottom elevation information (i.e., upstream bottom elevation and downstream bottom elevation of the pipeline).

[0090] Specifically, if the style of a marker leader matches the preset node elevation marker style, then the ground elevation and well bottom elevation of the node object class element corresponding to the marker leader are determined according to the marker text corresponding to the marker leader.

[0091] If the style of a marker leader line matches the preset pipe bottom elevation marker style, then the upstream bottom elevation of the first pipe and the downstream bottom elevation of the second pipe are determined according to the content and arrangement direction of the marker text corresponding to the marker leader line. The first pipe is the pipe with the node object class element as the upstream node, and the second pipe is the pipe with the node object class element as the downstream node.

[0092] In this embodiment, for the node elevation labeling style, the baseline in the label leader is in a straight line, with the ground elevation information and well bottom elevation information located on the upper and lower sides of the baseline, respectively. For the pipe bottom elevation labeling style, the baseline in the label leader is in a cross shape, with the pipe bottom elevation information located in different areas divided by the cross-shaped baseline. For example, as... Figure 5 As shown, Figure 5 The style of the leader line on the left side of the label is the node elevation label style. Figure 5 The style of the leader line in the middle is the pipe bottom elevation label style. In this style, the direction of the label text is parallel to the length direction of the corresponding pipe. The correspondence between the pipe and the numbers in the label text is determined by the arrangement of the text. Figure 5 In the diagram, "3.00" on the left represents the upstream or downstream bottom elevation of the pipe on the left, while "3.00" on the right represents the downstream or upstream bottom elevation of the pipe on the right. Furthermore, when three or four pipes connect to the same node, the pipe elevation annotation style will display corresponding numbers in three or four directions.

[0093] Furthermore, there are also cases where elevation information is directly labeled with text (i.e., without leader lines), such as... Figure 5 The rightmost label is used. In this case, the ground elevation, well bottom elevation, or upstream and downstream bottom elevation of the pipe connected to the node object element is determined directly based on the position between the label text and the node object element. Specifically, if the distance between a label text and the center point of a node object element is less than a preset fifth tolerance value, then the ground elevation, well bottom elevation, upstream bottom elevation of the first pipe, or downstream bottom elevation of the second pipe are determined based on the label text.

[0094] S205: Determine the pipe diameter of each line object element based on each annotation text and its distance from each line object element.

[0095] Specifically, if the distance between a label text and a line object element is less than a preset sixth tolerance value and the label text matches a preset pipe diameter text style, then the pipe diameter of the line object element is determined based on the label text.

[0096] For steps S204-S205, information such as the elevation and diameter of the pipeline network is usually marked in the form of text and graphic annotations. However, the graphic representing the pipeline network itself does not contain relevant information. Therefore, it is necessary to identify these text annotations and provide the elevation, diameter and other information to the nodes and pipelines according to the annotation leaders.

[0097] For example, such as Figure 5 As shown, Figure 5 The document shows four annotation styles, representing annotations for ground elevation and well bottom elevation (i.e., node elevation annotation style), annotations for pipe bottom elevation (i.e., pipe bottom elevation annotation style), annotations for ground elevation, well bottom elevation, or pipe bottom elevation, and annotations for pipe diameter. Figure 5 The meanings of AD in this context are as follows:

[0098] A: The distance between the endpoint of the label leader and the center point of the node object class feature;

[0099] B: The distance between the annotation text and the annotation leader line;

[0100] C: The distance between the annotation text and the center point of the node object element;

[0101] D: Distance between the label text and the pipe.

[0102] When B is less than the preset third tolerance value, it means that the annotation text is the text corresponding to the annotation leader.

[0103] When A is less than the preset fourth tolerance value, it indicates that the standard leader is a label for the node object class feature.

[0104] Figure 5 The leader line on the left side of the label is a node elevation label style. Since the ground elevation is generally higher than the well bottom elevation, therefore... Figure 5 The ground elevation of the leftmost node is 10.00, and the bottom elevation of the well is 7.00.

[0105] Figure 5 The style of the leader line in the middle is the pipe bottom elevation marking style, assuming Figure 5The flow direction of the middle pipeline is from left to right, that is, the middle node is the downstream node of the left pipeline and the upstream node of the right pipeline, and at this time, the downstream bottom elevation of the left pipeline is 3.00 and the upstream bottom elevation of the right pipeline is 3.00.

[0106] When C is less than the preset fifth tolerance value, the ground elevation, the well bottom elevation or the pipe bottom elevation of the pipeline connected thereto of the node object class element can be determined according to the annotation text. Figure 6 The middle rightmost annotation text has only one number, and therefore can be flexibly specified by the user as the ground elevation, the well bottom elevation or the pipe bottom elevation (the upstream bottom elevation of the first pipeline or the downstream bottom elevation of the second pipeline), or put into the remark field.

[0107] When D is less than the preset sixth tolerance value and the annotation text matches the preset pipe diameter text style, the pipe diameter of the pipeline can be determined according to the annotation text.

[0108] Currently, there are several commonly used circular pipe diameter annotation methods, which are not case sensitive: DN500 / dn500, De500 / de500, D500 / d500, Φ500 / φ500, 500. In addition, there is a commonly used rectangular pipe diameter annotation method, which is not case sensitive: 1000X500 / 1000x500. When matching these text styles, the pipe diameter can be recognized. Therefore, Figure 7 In the middle, the pipe diameters of the two pipelines are both 300 mm.

[0109] In this embodiment, the recognized pipe diameter is stored as width and height, and the cross-sectional shape of the pipeline is recorded.

[0110] Through steps S204-S205, it is ensured that the annotated text can be obtained by the node and the pipeline, and stored in the corresponding field of the attribute table, or separately saved in the remark field for flexible use. In this embodiment, the fourth tolerance value can be set as the radius of the inspection well; the third tolerance value and the sixth tolerance value can be set as 0-2 times the text height; and the fifth tolerance value can be set as the sum of 0-2 times the text height and the radius of the inspection well.

[0111] S3: Perform catchment area element recognition in the full-element CAD file, and obtain the basic information of each catchment area, wherein the basic information of the catchment area includes vertex coordinates, area and outlet node.

[0112] Specifically, this step includes the following steps:

[0113] S301: According to the graphical features of the catchment area, the catchment area is recognized in the full-element CAD file, and the area and vertex coordinates of each catchment area are obtained.

[0114] Closed polylines and filled shapes representing catchment areas, similar to pipe networks, can be identified as catchment areas. In other words, catchment areas are generally closed polygons in CAD. After identification, a catchment area attribute table is added. In this embodiment, as... Figure 8 As shown, the fields in the catchment area attribute table include catchment area ID, area, outlet node ID, vertex coordinates, and remarks.

[0115] After identifying each catchment area, they are sequentially numbered as catchment area IDs. The area and vertex coordinates of each catchment area can be obtained from existing graphic data in the CAD file. At this point, only the outlet node ID is empty in the catchment area attribute table.

[0116] S302: Calculate the centroid of each catchment area based on the vertex coordinates of each catchment area.

[0117] In this embodiment, the centroid calculation of the catchment area is performed according to the calculation process for a homogeneous polygon. Taking a polygon with n vertices as an example, the calculation process is as follows:

[0118] First, based on the vertex coordinates P of the catchment area i (x i y i Given the origin coordinates O(0, 0), calculate the vector V for each vertex. i =(x i -0, y i -0)=(x i y i ), where i = 1, 2, ..., n.

[0119] Then, calculate the sum of the vectors at each vertex.

[0120] Next, based on the sum of the vectors of each vertex and the number of vertices, the vector V of the centroid is calculated. center ,Right now

[0121]

[0122] Finally, the centroid coordinates are calculated based on the centroid vector and the origin coordinates.

[0123] S303: The node object class element that is closest to the centroid of each watershed is taken as the exit node of each watershed.

[0124] That is, the export node is distributed according to the principle of proximity, for each catchment, the centroid coordinates of the catchment are calculated, and the distance between the centroid and each node object class element is calculated, the node object class element with the smallest distance is taken as the export node of the catchment, and the node ID of the node object class element is taken as the export node ID of the catchment.

[0125] S4: According to the basic information of each pipe network element and the basic information of each catchment, the INP file is converted, and the drainage pipe network model is generated according to the INP file.

[0126] After the above steps, the basic information of the inspection well, the outlet, the pipeline and the catchment is obtained, and the basic information is converted into a standard INP file format to obtain an INP file that can be recognized by SWMM.

[0127] In this embodiment, when the INP file is opened by Notepad, the constituent parts contained therein include [SUBCATCHMENTS], [SUBAREAS], [INFILTRATION], [JUNCTIONS], [OUTFALLS], [CONDUITS], [XSECTIONS], [COORDINATES], [VERTICES] and [Polygons], a total of 10 parts, and the description of each part is shown in Table 1.

[0128] Table 1: INP text component detail table

[0129]

[0130]

[0131] Based on the extracted data of the inspection well, the outlet, the pipeline and the catchment, the data is sequentially corresponding to each part in the INP file. It should be noted that part of the data needs to be calculated and converted before being output to the INP file. For example, the inspection well object in SWMM does not have the field attribute of ground elevation, only two fields of well bottom elevation and maximum depth, so after obtaining the ground elevation and well bottom elevation of the inspection well, the maximum depth is calculated and output, maximum depth = ground elevation - well bottom elevation. There are two ways to represent the inner bottom elevation of the pipeline, and in this embodiment, the elevation offset method is used for output, so the elevation does not need to be converted.

[0132] In addition to the above-mentioned basic information extracted from CAD, other model parameters are set to uniform default parameters when generating the INP file.

[0133] The output completed INP file can be recognized by the SWMM model, and the model effect of the node, the pipeline and the catchment is as follows Figure 8As shown, the model can be used as a basic model for further application scenarios such as urban waterlogging analysis, sponge city planning scheme evaluation, etc.

[0134] In this embodiment, for the DWG pipe network data format file of AutoCAD, the pipe network topology structure, key basic information and other contents in the file can be quickly extracted, and the catchment area can be quickly identified and associated with the nearby inspection well to form a completed drainage model. The identified pipe network and catchment area can be exported as an INP format file and read by the SWMM model. This embodiment can realize rapid modeling of DWG format pipe network data, greatly improving the efficiency of model engineers in using DWG format files to construct drainage models and reducing the workload of modeling.

[0135] Embodiment two

[0136] Please refer to ​ This embodiment is a specific application scenario of embodiment one.

[0137] The basic data of a certain community is selected, including the DWG format community drainage pipe network diagram and land plan. In addition, it also includes external condition basic data such as rainfall and river water level.

[0138] Through the method of embodiment one, the nodes and pipes are identified, the topological structure of the pipe network is combed after identification, and the pipe network basic information labeled by text is sequentially extracted and identified as the required information to complete the collection of pipe network basic information; then the catchment area polygon is identified and associated with the nearby node. After the above steps are completed, the INP file is output.

[0139] For the model read by SWMM, add rain gauge and rainfall time sequence, and adjust other model parameters according to the needs, which can be used for operation simulation. The effect of the output INP file read by SWMM and successfully calculated is as shown in ​ .

[0140] On the basis of successful model running, pipe network drainage capacity analysis, waterlogging analysis, sponge scheme evaluation and other applications can be carried out.

[0141] Embodiment three

[0142] This embodiment is a computer readable storage medium corresponding to the above embodiment, which stores a computer program. The program is executed by a processor to realize each step of the CAD-based drainage pipe network model construction method in the above embodiment, and can achieve the same technical effect, which will not be repeated here.

[0143] In summary, the CAD-based sewer network model construction method and storage medium provided by the application, for a CAD file containing pipe network data and catchment area data, the pipe network elements and basic information thereof are identified to extract the pipe network topology structure and key basic information, the catchment area is identified, and the outlet node thereof is identified to extract the catchment area; the identified pipe network information and catchment area information are exported into an INP format file that can be read by the SWMM model, so that the rapid modeling of the sewer network model is realized. The application can realize the rapid modeling of the DWG format pipe network data, greatly improve the efficiency of the model engineer in constructing the sewer model by using the DWG format file, and reduce the modeling workload.

[0144] The above description is only an embodiment of the application, and does not limit the patent scope of the application, and any equivalent transformation or direct or indirect application in the related technical field by using the content of the specification and drawings is also included in the patent protection scope of the application.

Claims

1. A method for constructing a drainage pipe network model based on CAD, characterized in that, include: Obtain a full-feature CAD file, which includes pipeline network data and catchment area data; Pipeline network elements are identified in the full-element CAD file, and basic information of each pipeline network element is obtained. The pipeline network elements include node object type elements and line object type elements. The node object type elements include manholes and outlets, and the line object type elements include pipes. The basic information of the node object type elements includes coordinates, ground elevation and manhole bottom elevation, and the basic information of the line object type elements includes upstream nodes, downstream nodes, upstream bottom elevation, downstream bottom elevation, pipe diameter and pipe length. In the full-feature CAD file, water catchment area features are identified, and basic information of each water catchment area is obtained. The basic information of the water catchment area includes vertex coordinates, area, and outlet node. Based on the basic information of each pipeline network element and each catchment area, INP files are obtained, and a drainage pipeline network model is generated based on the INP files. The process of identifying pipeline network elements in the full-element CAD file and obtaining basic information about each pipeline network element specifically involves: Based on the example graphics of each pipeline element, the pipeline elements are identified in the full-element CAD file, and the coordinates of the node object type elements and the pipe length of the line object type elements are read. If the distance between a node object class element and the middle part of a pipeline is less than a preset first tolerance value, then the pipeline is divided into two pipelines, and the node object class element is used as the endpoint of the two pipelines. Calculate the distance between the two endpoints of each node object class element and each line object class element, and determine the upstream and downstream nodes of each line object class element based on the distances. Based on the positional relationships between each annotation text, each annotation leader line, and each node object type element, determine the ground elevation and well bottom elevation of each node object type element, as well as the upstream bottom elevation and downstream bottom elevation of the pipeline connected to each node object type element; The pipe diameter of each line object element is determined based on each annotation text and its distance from each line object element. The process of identifying catchment area features in the full-feature CAD file and obtaining basic information about each catchment area specifically involves: Based on the graphic features of the catchment area, the catchment area is identified in the full-feature CAD file, and the area and vertex coordinates of each catchment area are obtained. Calculate the centroid of each catchment area based on the vertex coordinates of each catchment area; The node object class element that is closest to the centroid of a water catchment area is taken as the exit node of the water catchment area.

2. The CAD-based drainage network model construction method according to claim 1, characterized in that, The acquisition of the full-feature CAD file specifically involves: Obtain the CAD files of the pipeline network and the CAD files of the catchment area, and merge the pipeline network data in the CAD file of the pipeline network with the catchment area data in the CAD file of the catchment area to obtain a full-element CAD file.

3. The CAD-based drainage network model construction method according to claim 1, characterized in that, The process of identifying pipeline elements in the full-feature CAD file based on sample drawings of each pipeline element, and reading the coordinates of node object type elements and the pipe length of line object type elements, further includes: Number each node object class element in sequence to obtain the node number of each node object class element; at the same time, number each line object class element in sequence to obtain the pipeline number of each line object class element. If there are at least two line segments and a turning point in a line object element, then obtain the coordinates of the turning point.

4. The method for constructing a drainage pipe network model based on CAD according to claim 1, characterized in that, The step of calculating the distance between the two endpoints of each node object class element and each line object class element, and determining the upstream and downstream nodes of each line object class element based on the distance, specifically involves: Calculate the distance between the two endpoints of each node object class feature and each line object class feature; If the distance between a node object element and one end point of a pipeline is less than a preset second tolerance value, then the node object element is regarded as the upstream or downstream node of the pipeline according to the positional relationship between one end point of the pipeline and the start and end points of the pipeline.

5. The CAD-based drainage network model construction method according to claim 1, characterized in that, After calculating the distance between the two endpoints of each node object class element and each line object class element, and determining the upstream and downstream nodes of each line object class element based on the distance, the process further includes: If the direction from the upstream node to the downstream node of a pipeline is inconsistent with the actual flow direction of the pipeline, then the upstream node and the downstream node of the pipeline will be swapped.

6. The CAD-based drainage network model construction method according to claim 1, characterized in that, The method involves determining the ground elevation and well bottom elevation of each node object type element, as well as the upstream and downstream bottom elevations of the pipes connected to each node object type element, based on the positional relationships between each annotation text, each annotation leader line, and each node object type element. Specifically, the method involves determining the pipe diameter of each line object type element based on the positional relationships between each annotation text and each line object type element. If the distance between a label text and a label leader is less than a preset third tolerance value, then the label text and the label leader are associated. If the distance between the endpoint of a label leader and the center point of a node object class element is less than the preset fourth tolerance value and the style of the label leader matches the preset node elevation label style, then the ground elevation and well bottom elevation of the node object class element are determined according to the label text corresponding to the label leader. If the distance between the endpoint of a label leader and the center point of a node object class feature is less than a preset fourth tolerance value and the style of the label leader matches the preset pipe bottom elevation label style, then the upstream bottom elevation of the first pipeline and the downstream bottom elevation of the second pipeline are determined according to the label text corresponding to the label leader. The upstream node of the first pipeline is the node object class feature, and the downstream node of the second pipeline is the node object class feature. If the distance between a label and the center point of a node object element is less than a preset fifth tolerance value, then the ground elevation, the well bottom elevation, the upstream bottom elevation of the first pipeline, or the downstream bottom elevation of the second pipeline of the node object element are determined based on the label. If the distance between a label and a line object element is less than a preset sixth tolerance value and the label matches a preset pipe diameter text style, then the pipe diameter of the line object element is determined based on the label.

7. The CAD-based drainage network model construction method according to claim 1, characterized in that, The centroid of each catchment area is calculated based on the vertex coordinates of each catchment area, specifically as follows: Calculate the vector of each vertex based on the vertex coordinates and origin coordinates of each vertex in a catchment area; Calculate the sum of the vectors of each vertex of the catchment area, and calculate the vector of the centroid of the catchment area based on the sum of the vectors and the number of vertices of the catchment area. The centroid coordinates of the catchment area are calculated based on the vector of the centroid and the coordinates of the origin.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • SWMM (storm water management model) Making method for quick extraction of pipeline information based on CAD (computer aided design) secondary development

    CN107423520A

  • Automatic SWMM hydraulic model building method based on rainwater pipe network design computation sheet

    CN105117572A