Python-based hydraulic tunnel node sequence generation method

Through the Python-based hydraulic tunnel node sequence generation method, the problems of low efficiency and inaccurate generation of tunnel node sequences in the prior art are solved, and automatic, efficient and accurate tunnel node sequence generation is realized, which is suitable for multiple engineering fields.

CN119416580APending Publication Date: 2025-02-11YELLOW RIVER ENG CONSULTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411546215.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The prior art is difficult to automatically, efficiently and accurately generate tunnel node sequences, especially when load-applied positions change, and finite element model units need to be re-divided, which is inefficient and error-prone.

Method used

Using Python-based hydraulic tunnel node sequence generation method, by obtaining tunnel shape, geometric parameters, total number of nodes and load application position information, preset the coordinate axis, determine the coordinates of the load application position, generate the coordinates of each node, and merge and sort them. Repeat, generate node numbers and unit sequence numbers according to the sequence.

Benefits of technology

It realizes automatic judgment and generation of tunnel node sequences that meet the needs of finite element calculation, improves the efficiency and accuracy of tunnel node sequence generation, and is suitable for water conservancy projects, water supply and drainage projects, tunnel engineering and other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416580A_ABST
    Figure CN119416580A_ABST
Patent Text Reader

Abstract

The invention discloses a Python-based hydraulic tunnel node sequence generation method, which automatically judges and generates a tunnel node sequence meeting a finite element calculation requirement according to preset tunnel geometric parameters, a total node number and a load applying position, can greatly improve the efficiency and accuracy of tunnel node sequence generation, and can improve the working efficiency and the working efficiency. The method is suitable for all work needing hydraulic tunnel engineering planning and design, including the fields of hydraulic engineering, water supply and drainage engineering, tunnel engineering and the like, and has wide application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer science and engineering, and is particularly applicable to a method for generating a hydraulic tunnel node sequence based on Python. Background Art

[0002] In the fields of water conservancy engineering, water supply and drainage engineering, tunnel engineering, etc., the generation of tunnel node sequence is a very important step. With the continuous expansion of the application of finite element calculation, efficient tunnel node sequence generation method is particularly important for the establishment of finite element model.

[0003] There are usually two ways to establish a traditional tunnel finite element model: one is to divide the model unit first, and the load can only be applied to the divided unit nodes. This method does not accurately determine the load application position; the other is to determine the load location first and take the load application location into account in the model unit division. This method usually relies on the engineer's experience and operation of model division. As the load position changes, the model needs to be re-divided into units, which is inefficient and prone to errors. Therefore, how to automatically, efficiently and accurately generate a tunnel node sequence that takes into account the load loading position is an urgent problem to be solved. Summary of the invention

[0004] The present invention aims to provide a Python-based method for generating a hydraulic tunnel node sequence, which is used to solve the problem of automatic, efficient and accurate division of tunnel node sequences.

[0005] To achieve the above object, the present invention adopts the following technical solutions: The Python-based hydraulic tunnel node sequence generation method of the present invention comprises the following steps: S1, obtain the tunnel shape, geometric parameters, total number of nodes and load application position information; S2, preset coordinate axis and coordinate origin; S3, determining the coordinates of the load application position according to the load application position information; S4, generating the coordinates of each node according to the total number of nodes and the initial node coordinates; S5, merging the coordinates of the load application position and the coordinates of each node and sorting them to remove duplicates; S6, generating node numbers according to the sequence, and generating unit sequence numbers between adjacent nodes according to the sequence.

[0006] Furthermore, in step S2, the circular tunnel takes the center of the circle as the coordinate origin; the gate-shaped tunnel and the horseshoe-shaped tunnel take the midpoint of the tunnel bottom plate as the coordinate origin.

[0007] Furthermore, step S4 is specifically to determine the coordinates of each node according to the total number of nodes by calculating the spacing in the straight line segment and the angle interval in the arc segment.

[0008] Furthermore, in step S4, the symmetry of the tunnel is used to divide the tunnel into two completely symmetrical parts. After determining the coordinates of each node of the first part, the coordinates of the nodes of the other part are obtained using the symmetric function.

[0009] Furthermore, the initial node coordinates are the coordinates of an intersection of the symmetry axis of the tunnel and the tunnel.

[0010] The advantage of the present invention is that it can automatically determine and generate a tunnel node sequence that meets the requirements of finite element calculation according to preset tunnel geometric parameters, total number of nodes and load application positions, which can greatly improve the efficiency and accuracy of tunnel node sequence generation. It is suitable for all work that requires planning and design of hydraulic tunnel projects, including water conservancy projects, water supply and drainage projects, tunnel projects and other fields, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 The present invention is a flow chart of the method.

[0012] Figure 2 Schematic diagram of a circular tunnel in the method of the present invention.

[0013] Figure 3 The present invention is a schematic diagram of automatically generating circular tunnel node numbers in the method of the present invention.

[0014] Figure 4 It is a schematic diagram of a city gate-shaped tunnel in the method described in the present invention.

[0015] Figure 5 The present invention is a schematic diagram of node serial numbers of a city gate-shaped tunnel automatically generated in the method of the present invention.

[0016] Figure 6 The present invention is a schematic diagram of automatically generating horseshoe-shaped tunnel node numbers in the method of the present invention. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] Example 1 like Figure 1 As shown, the Python-based hydraulic tunnel node sequence generation method of the present invention comprises the following steps: S1, obtain the tunnel shape, geometric parameters, total number of nodes and load application location information.

[0019] S2, preset coordinate axes and coordinate origin. The center of a circular tunnel is the coordinate origin; the midpoint of the tunnel floor is the coordinate origin for a gate-shaped tunnel and a horseshoe-shaped tunnel.

[0020] S3, determining the coordinates of the load application position according to the load application position information.

[0021] S4, based on the total number of nodes and the initial node coordinates, generate the coordinates of each node. Based on the total number of nodes, the coordinates of each node are determined by calculating the spacing in the straight line segment and the angle interval in the arc segment. The symmetry of the tunnel can be used to divide the tunnel into two completely symmetrical parts. After determining the coordinates of each node in the first part, the coordinates of the node in the other part can be obtained using the symmetry function. The initial node coordinates should be the coordinates of an intersection of the symmetry axis of the tunnel and the tunnel.

[0022] S5, merging the coordinates of the load application position and the coordinates of each node and sorting them to remove duplicates.

[0023] S6, generating node numbers according to the sequence, and generating unit sequence numbers between adjacent nodes according to the sequence.

[0024] Example 2 The specific implementation process of the Python-based hydraulic tunnel node sequence generation method of the present invention is illustrated by taking a circular tunnel as an example.

[0025] Obtain the shape, geometric parameters, total number of nodes and load application position information of the circular tunnel. Figure 2 As shown, the coordinate axis is preset, and the center of the circular tunnel is taken as the coordinate origin. The coordinates of the load application position are determined according to the load application position information of the circular tunnel.

[0026] The y-axis of the coordinate axis is used as the symmetry axis of the circular tunnel. The intersection of the positive direction of the y-axis and the circular tunnel is the initial node, and the node number is 1. The node coordinates of the left half are calculated by writing a function in Python in the counterclockwise direction. When calculating, the angle interval is calculated according to the arc segment, and the node coordinates and sequence of the left half are generated to form the coordinate set df1. Then, the node coordinates of the right half of the circular tunnel are obtained by writing a symmetric function in Python to form the coordinate set df2.

[0027] The load application position coordinates of the circular tunnel are added to df1 and df2, and the two are merged and the duplicate coordinates are eliminated to obtain the coordinate sequence set df.

[0028] Finally, the node numbers are generated according to the coordinate sequence in the sequence set df. At the same time, the two adjacent nodes are taken as a unit and the units are numbered to obtain the unit sequence number. Figure 3 As shown in the figure, a node sequence of a circular tunnel is generated. The red numbers are node numbers, and the blue circle numbers are unit numbers.

[0029] Example 3 The specific implementation process of the hydraulic tunnel node sequence generation method based on Python of the present invention is illustrated by taking the city gate tunnel as an example.

[0030] Obtain the shape, geometric parameters, total number of nodes and load application position information of the city gate tunnel. Figure 4 As shown, the coordinate axis is preset, and the midpoint of the bottom plate of the city gate tunnel is taken as the coordinate origin. The coordinates of the load application position are determined according to the load application position information of the city gate tunnel.

[0031] The y-axis of the coordinate axis is the symmetry axis of the gate-shaped tunnel, the intersection of the positive direction of the y-axis and the gate-shaped tunnel (i.e., the midpoint of the vault) is the initial node, the node number is 1, and the node coordinates of the left half are calculated by writing a function in Python in the counterclockwise direction. Since the gate-shaped tunnel consists of a circular vault, a straight wall, and a vault bottom. Therefore, when calculating, the node coordinates and sequence of the left half are generated according to the principle of calculating the angle interval for the circular arc segment and the spacing for the straight line segment, forming the coordinate set df1. Then, the node coordinates of the right half of the gate-shaped tunnel are obtained by writing a symmetric function in Python, forming the coordinate set df2.

[0032] The load application position coordinates of the city gate tunnel are added to df1 and df2, and the two are merged and the duplicate coordinates are eliminated to obtain the coordinate sequence set df.

[0033] Finally, the node numbers are generated according to the coordinate sequence in the sequence set df. At the same time, the adjacent coordinates are taken as a unit and the units are numbered to obtain the unit sequence number. Figure 5 As shown in the figure, a node sequence of a city gate tunnel is generated. The red numbers are node numbers, and the blue circle numbers are unit numbers.

[0034] Example 4 The horseshoe-shaped tunnel is taken as an example to illustrate the specific implementation process of the Python-based hydraulic tunnel node sequence generation method of the present invention.

[0035] The shape, geometric parameters, total number of nodes and load application position information of the horseshoe-shaped tunnel are obtained. The coordinate axis is preset according to the method of the city gate tunnel, and the midpoint of the bottom plate of the horseshoe-shaped tunnel is used as the coordinate origin. The coordinates of the load application position are determined according to the load application position information of the horseshoe-shaped tunnel.

[0036] The y-axis of the coordinate axis is the symmetry axis of the horseshoe tunnel, the intersection of the positive direction of the y-axis and the horseshoe tunnel (i.e. the midpoint of the vault) is the initial node, the node number is 1, and the node coordinates of the left half are calculated by writing a function in Python in the counterclockwise direction. Since the horseshoe tunnel consists of a circular vault, side walls, and bottom vaults. Therefore, when calculating, the node coordinates and sequence of the left half are generated according to the principle of calculating the angle interval of the arc segment according to the different centers and radii of the circular vault, side walls, and bottom vault, forming the coordinate set df1. Then, the node coordinates of the right half of the horseshoe tunnel are obtained by writing a symmetric function in Python, forming the coordinate set df2.

[0037] The load application position coordinates of the horseshoe-shaped tunnel are added to df1 and df2, and the two are merged and the duplicate coordinates are eliminated to obtain the coordinate sequence set df.

[0038] Finally, the node numbers are generated according to the coordinate sequence in the sequence set df. At the same time, one unit is added between two adjacent coordinates, and the units are numbered to obtain the unit sequence number. Figure 6 As shown in the figure, a node sequence of a horseshoe-shaped tunnel is generated. The red numbers are node numbers, and the blue circle numbers are unit numbers.

Claims

1. A method for generating hydraulic tunnel node sequence based on Python, characterized in that: The following steps are involved: S1, obtain the tunnel shape, geometric parameters, total number of nodes and load application position information; S2, preset coordinate axis and coordinate origin; S3, determining the coordinates of the load application position according to the load application position information; S4, generating the coordinates of each node according to the total number of nodes and the initial node coordinates; S5, merging the coordinates of the load application position and the coordinates of each node and sorting them to remove duplicates; S6, generating node numbers according to the sequence, and generating unit sequence numbers between adjacent nodes according to the sequence.

2. The Python-based hydraulic tunnel node sequence generation method according to claim 1 is characterized in that: In step S2, the circular tunnel takes the center of the circle as the coordinate origin; the gate-shaped tunnel and horseshoe-shaped tunnel take the midpoint of the tunnel bottom plate as the coordinate origin.

3. The Python-based hydraulic tunnel node sequence generation method according to claim 1 is characterized in that: Step S4 specifically includes determining the coordinates of each node based on the total number of nodes by calculating the spacing in the straight line segment and the angle interval in the arc segment.

4. The Python-based hydraulic tunnel node sequence generation method according to claim 1 is characterized in that: In step S4, the symmetry of the tunnel is used to divide the tunnel into two completely symmetrical parts. After determining the coordinates of each node in the first part, the node coordinates of the other part are obtained using the symmetric function.

5. The Python-based hydraulic tunnel node sequence generation method according to claim 1 is characterized in that: The initial node coordinates are the coordinates of an intersection of the symmetry axis of the tunnel and the tunnel.