A method, system, computer readable storage medium and electronic device for parametric generation of a structured mesh of a three-dimensional duct system
By employing spatial matrix transformation and Python generation methods, the problems of high difficulty in generating 3D pipeline systems and poor mesh quality in existing technologies have been solved. This method enables efficient and rapid generation of high-quality structured meshes, which are suitable for complex pipeline systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANJI MICROELECTRONICS TECH (SHANGHAI) CO LTD
- Filing Date
- 2024-12-30
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technologies face challenges in generating structured meshes for 3D pipeline systems, including high generation difficulty, poor mesh quality, and a large number of meshes. This is especially true in elongated structures such as pipeline systems, where commercial software generates meshes with low efficiency or poor quality, affecting the computational fluid dynamics results.
Using the spatial matrix transformation method, starting from the initial cross-section of the geometric structure of the 3D pipeline system, a structured mesh is generated using Python. The geometric parameters are then converted into a dictionary file using the blockMeshDict rule, resulting in a high-quality structured mesh for the 3D pipeline system.
It enables rapid parametric generation of structured meshes for 3D pipeline systems, improving mesh quality, reducing manual calculation time, and simplifying the calculation process. In particular, it improves generation efficiency for complex pipeline structures such as tees.
Smart Images

Figure CN122312955A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to pipe generation methods, and more particularly to a parametric generation method, system, computer-readable storage medium, and electronic device for a three-dimensional pipe system. Background Technology
[0002] Piping systems are an essential component of chemical plants, especially in fine chemicals where they are complex and involve significant variations in material properties. Understanding the characteristics of pipelines is crucial for understanding specific materials during plant design, modification, and optimization. Computational Fluid Dynamics (CFD) is an effective method for understanding pipeline characteristics, but high-quality meshes are essential for solving CFD problems. Current techniques typically involve creating 3D models using commercial 3D modeling software and then meshing them using commercial software. However, using commercial software is not always straightforward in the open-source world. Alternatively, OpenFOAM's snappyHexMesh tool can be used to generate meshes. However, snappyHexMesh is not very suitable for elongated structures like pipeline systems; it either generates an excessively large number of meshes, consuming significant computational resources, or produces poor-quality meshes that negatively impact the calculation results.
[0003] Therefore, how to generate high-quality, complex 3D pipeline system structured meshes in a simpler way has become a pressing technical problem in OpenFOaM. Summary of the Invention
[0004] To overcome the aforementioned technical deficiencies, the present invention aims to provide a parametric generation method, system, computer-readable storage medium, and electronic device for structured meshes of three-dimensional piping systems. Starting from an initial cross-section, the invention generates a three-dimensional piping system using spatial matrix transformations, solving the problems of difficulty in generating piping systems, poor mesh quality, and a large number of meshes in existing technologies. Using the method of the present invention, various pipe components can be arbitrarily combined, and three-dimensional piping systems can be quickly and parametrically generated, improving mesh quality.
[0005] This invention discloses a parametric method for generating structured meshes for a three-dimensional pipeline system, comprising:
[0006] Obtain the geometric structure of the three-dimensional pipeline system, divide the geometric structure into multiple parts, and obtain the geometric parameters of each part; the geometric parameters include, but are not limited to, the diameter of the initial cross section of the geometric structure;
[0007] Based on the diameter of the initial cross section of the geometric structure, construct the initial cross section of the geometric structure in the coordinate system, and obtain the coordinate points of the initial cross section and the coordinates of the coordinate points in the coordinate system;
[0008] Based on the coordinates of the starting section coordinates of the geometric structure, calculate the coordinates of the center point and the normal vector of the starting section of the geometric structure;
[0009] Based on the geometric parameters and the normal vector of the starting section of the geometric structure, a spatial matrix transformation is performed on the coordinate points of the starting section of the geometric structure to obtain the interface coordinate points of the geometric structure and the center coordinate points of the corresponding interface; the coordinates of the interface coordinate points of the geometric structure are obtained; the interface of the geometric structure includes the starting section of the geometric structure.
[0010] Using Python, the coordinate points of each part of the geometric structure interface and the corresponding geometric parameters of the three-dimensional pipeline system are generated into a dictionary file according to the blockMeshDict rule;
[0011] Execute the dictionary file to generate a structured mesh for the three-dimensional pipeline system.
[0012] Optionally, the geometry of the three-dimensional pipeline system is obtained, and the geometry is divided into multiple parts, including:
[0013] Obtain the geometric structure of the three-dimensional piping system, and divide the geometric structure into one or more of the following: straight pipe sections, elbow sections, reducer sections, and tee sections; the starting section of the geometric structure is the starting section of the straight pipe section, the elbow section, the reducer section, or the tee section; the coordinate points and center point of the starting section of the geometric structure are the coordinate points and center points of the starting section of the straight pipe section, the elbow section, the reducer section, or the tee section.
[0014] Optionally, obtaining the geometric parameters of each part includes: obtaining the length of the straight pipe section, the rotation direction, rotation radius and rotation angle of the elbow section, the length of the reducer section, the ratio of the starting cross-sectional diameter and the ending cross-sectional diameter of the reducer, and one or more of the radius of the tee main pipe, the radius of the tee branch pipe, and the length of the tee branch pipe.
[0015] Optionally, the step of generating a dictionary file using Python from the coordinates of the interface points of each part of the geometric structure in the 3D pipeline system and the corresponding geometric parameters according to the blockMeshDict rule specifically includes:
[0016] Based on the coordinates of the cross-sectional coordinates and center coordinates of the straight pipe section, the elbow section, the reducer section, and the tee section, and the corresponding geometric parameters, the structure of the straight pipe section, the elbow section, the reducer section, and the tee section is generated into a dictionary file using Python according to the blockMeshDict rule.
[0017] Optionally, the step of performing a spatial matrix transformation on the coordinate points based on the geometric parameters and the normal vector of the initial section of the geometric structure to obtain the interface coordinate points and center coordinate points of the geometric structure specifically includes:
[0018] Based on the length of the straight pipe section and the normal vector of the starting section of the straight pipe section, the coordinate points of the starting section of the straight pipe section are translated to obtain the coordinate points of the ending section and the center point of the straight pipe section.
[0019] Optionally, the step of performing a spatial matrix transformation on the coordinate points based on the geometric parameters and the normal vector of the initial section of the geometric structure to obtain the interface coordinate points and center coordinate points of the geometric structure specifically includes:
[0020] Based on the rotation direction of the elbow segment, the rotation radius and rotation angle of the elbow segment, and the normal vector of the starting section of the elbow segment, the coordinate points of the starting section of the elbow segment are translated and rotated to obtain the coordinate points of the middle section and the center section of the elbow segment, and the coordinate points of the ending section and the center section of the elbow segment.
[0021] Optionally, the steps to obtain the coordinates of the middle section and center point of the elbow segment, and the coordinates of the end section and center point of the elbow segment, specifically include:
[0022] The rotation center point is obtained based on the rotation direction of the elbow segment, the rotation radius of the elbow, and the center coordinate point of the starting section of the elbow segment;
[0023] Calculate and obtain the three-dimensional rotation matrix based on the rotation direction and the rotation angle;
[0024] Based on the coordinates of the starting section of the elbow segment, the rotation center, and the three-dimensional rotation matrix, the coordinates of the intermediate section and the center of the elbow segment, as well as the coordinates of the ending section and the center of the elbow segment, are obtained; the geometric interface includes the intermediate section.
[0025] Optionally, the step of performing a spatial matrix transformation on the coordinate points of the initial section of the geometric structure based on the geometric parameters and the normal vector of the initial section of the geometric structure to obtain the coordinate points of the interface and the center of the geometric structure specifically includes:
[0026] Based on the length of the large and small end segments and the normal vector of the starting section of the large and small end segments, the coordinate points of the starting section of the large and small end segments are translated to obtain the coordinate points of the ending section of the large and small end segments and the center coordinate point.
[0027] The coordinates of the end section and the center coordinates of the large and small head segments are obtained by scaling the center coordinates according to the ratio of the diameter of the starting section to the diameter of the ending section.
[0028] Optionally, the step of performing a spatial matrix transformation on the coordinate points of the initial section of the geometric structure based on the geometric parameters and the normal vector of the initial section of the geometric structure to obtain the coordinate points of the interface and the center of the geometric structure specifically includes:
[0029] Based on the diameter of the tee branch pipe and the normal vector of the starting section of the tee main pipe, the coordinate point of the starting section of the tee main pipe is translated three times to obtain the coordinate point of the ending section of the tee main pipe, and the coordinate points of the first intermediate section and the second intermediate section located between the starting section and the ending section of the tee main pipe.
[0030] Based on the coordinates of the first intermediate section and the second intermediate section, the length of the tee branch pipe, and the normal vector of the tee branch pipe, the coordinates of the starting section and the ending section of the tee branch pipe are obtained; based on the center coordinates of the ending section of the tee branch pipe, the coordinates of the four intersection points of the tee branch pipe with the X-axis and Y-axis in the coordinate system are obtained.
[0031] Optionally, the steps of obtaining the coordinates of the end section of the tee pipe, and the coordinates of the first intermediate section and the second intermediate section located between the starting section and the end section of the tee pipe specifically include:
[0032] Determine the length of the middle section based on the diameter of the branch pipe of the tee;
[0033] Based on the normal vector of the starting section of the tee pipe, the coordinate points of the starting section of the tee pipe are translated three times to obtain the coordinate points of the ending section of the tee pipe, the first intermediate section coordinate point, and the second intermediate section coordinate point located between the starting section and the ending section of the tee pipe.
[0034] Optionally, the steps of obtaining the coordinates of the starting section of the tee branch pipe, the coordinates of the ending section of the tee branch pipe, and the coordinates of the four intersection points of the tee branch pipe with the X-axis and Y-axis in the coordinate system specifically include:
[0035] Determine the center point of the tee branch pipe based on the coordinate points of the first and second intermediate sections;
[0036] Based on the normal vector of the tee branch pipe, select several coordinate points of the first intermediate section and the second intermediate section, such that the normal vector of the plane formed by the selected coordinate points is consistent with the normal vector direction of the tee branch pipe; the plane formed by the selected coordinate points is used as the starting section of the tee branch pipe.
[0037] Based on the aforementioned coordinate points, the normal vector and center coordinate point of the initial section of the tee branch pipe are obtained;
[0038] The coordinate points of the starting section of the tee branch pipe are translated according to the length of the tee branch pipe and the normal vector of the starting section of the tee branch pipe to obtain the coordinate points of the ending section and the center coordinate point of the tee branch pipe.
[0039] The coordinate points of the end section of the tee branch pipe are scaled up so that the coordinate points of the scaled end section of the tee branch pipe all fall on the arc of the tee branch pipe. The plane where the coordinate points of the scaled end section of the tee branch pipe are located is taken as the end section of the tee branch pipe. The normal vector and center coordinate point of the end section of the tee branch pipe are obtained.
[0040] Construct a local coordinate system for the end section of the tee branch pipe. According to the right-hand rule, the coordinate points of the end section of the tee branch pipe are used to form a unit vector in the X direction and a unit vector in the Y direction. The unit vector in the Z direction is the normal vector of the end section of the branch pipe.
[0041] Based on the center coordinates of the end section of the tee branch pipe, the radius of the tee branch pipe, and the unit vectors in the X and Y directions, obtain the coordinates of the intersection points of the tee branch pipe with the X and Y axes in the coordinate system.
[0042] Optionally, the step of generating a dictionary file of the structure of the tee pipe segment according to the blockMeshDict rule using Python, based on the coordinates of the cross-sectional coordinate points and the corresponding geometric parameters, specifically includes:
[0043] Based on the center coordinates of the starting section and the ending section of the tee pipe, and the radius of the tee pipe, the tee pipe structure is generated into a geometry dictionary file of type searchableCylinder, named cylinder1, according to the blockMeshDict rule;
[0044] Based on the center coordinates of the starting section and the ending section of the tee branch pipe, and the radius of the branch pipe, the structure of the tee branch pipe is generated into a geometry dictionary file according to the blockMeshDict rule, with the type being searchableCylinder; named cylinder2; the coordinates of the starting section of the tee branch pipe are generated into vertices dictionary files according to the blockMeshDict rule, and the keywords project, cylinder1, and cylinder2 are added;
[0045] The arc formed by the intersection of the main tee pipe and the branch pipe is generated into the edges dictionary file according to the blockMeshDict rule, and the keywords project, cylinder1, and cylinder2 are added.
[0046] Generate the above three-way main structure into a faces dictionary file according to the blockMeshDict rule, and add the project keyword and cylinder1.
[0047] Optionally, the step of generating a dictionary file of the straight pipe segment's structure according to the blockMeshDict rule using Python, based on the coordinates of the cross-sectional coordinate points and the center coordinate point, and the corresponding geometric parameters, specifically includes:
[0048] The coordinates of the starting section and the ending section of the straight pipe segment are used to generate a dictionary file for the structure of the straight pipe segment according to the blockMeshDict rule.
[0049] Optionally, the step of generating a dictionary file from the structure of the elbow segment according to the blockMeshDict rule using Python, based on the coordinates of the cross-sectional coordinate points and the center coordinate point, and the corresponding geometric parameters, specifically includes:
[0050] The coordinates of the starting section and the ending section of the elbow segment are generated into a blocks dictionary file according to the blockMeshDict rule;
[0051] The coordinates of the middle section of the bend segment, the corresponding coordinates of the end section of the bend segment, and the coordinates of the beginning section of the bend segment are generated into an edgs dictionary file according to the blockMeshDict rule, and the arc keyword is assigned to them.
[0052] Optionally, the step of generating a dictionary file from the structure of the large and small head segments according to the blockMeshDict rule using Python, based on the coordinates of the cross-sectional coordinate points and the center coordinate point of the large and small head segments, and the corresponding geometric parameters, specifically includes:
[0053] The coordinates of the starting section of the large and small head segments and the coordinates of the ending section of the large and small head segments are generated into corresponding dictionary files according to the blockMeshDict rule.
[0054] This invention also discloses a parametric generation system for structured meshes of three-dimensional piping systems, used to implement the parametric generation method for structured meshes of three-dimensional piping systems as described in any of the foregoing claims of this invention.
[0055] The structure division and parameter collection module is used to obtain the geometric structure of the three-dimensional pipeline system, divide the geometric structure into multiple parts, and obtain the geometric parameters of each part; the geometric parameters include, but are not limited to, the diameter of the initial cross section of the geometric structure.
[0056] The initial cross-section determination module is used to construct the initial cross-section of the geometric structure in a coordinate system based on the diameter of the initial cross-section of the geometric structure, and to obtain the coordinate points of the initial cross-section of the geometric structure and the coordinates of the coordinate points in the coordinate system.
[0057] The calculation module is used to calculate the coordinates of the center point and normal vector of the starting section of the geometric structure based on the coordinates of the starting section coordinates of the geometric structure; and to calculate the geometric structure interface coordinates and the center coordinates of the corresponding interface after spatial matrix transformation; and to obtain the coordinates of the geometric structure interface coordinates; wherein the geometric structure interface includes the starting section of the geometric structure;
[0058] The spatial matrix transformation module is used to perform spatial matrix transformation on the coordinate points of the starting section of the geometric structure based on the geometric parameters and the normal vector of the starting section of the geometric structure.
[0059] The dictionary file generation and execution module is used to generate a dictionary file from the interface coordinates and corresponding geometric parameters of each part of the geometric structure in the 3D pipeline system according to the blockMeshDict rule using Python; and to execute the dictionary file to generate a structured mesh of the 3D pipeline system.
[0060] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the preceding claims of the present invention.
[0061] The present invention also discloses an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor, when calling the computer program in the memory, implements the steps of the method described in any of the foregoing claims of the present invention.
[0062] Compared with existing technologies, the above technical solution has the following advantages:
[0063] 1. Starting from the initial cross-section of the geometric structure, a three-dimensional pipeline system is generated using the spatial matrix transformation method. This solves the problems of difficulty in generating pipeline systems, poor mesh quality, and large number of meshes in existing technologies. Using the method of this invention, various pipe components can be combined arbitrarily, and three-dimensional pipeline systems can be generated quickly and parametrically, thereby improving mesh quality.
[0064] 2. A traditional blockMeshDict file for a complex piping system may contain tens of thousands of lines of content, which is slow to generate and has high manual costs. Using this method, a blockMeshDict file can be generated in a few seconds, minimizing manual calculation time.
[0065] 3. In particular, for the three-way structure, the "project" keyword method is introduced in the dictionary file to write the dictionary file, which reduces a lot of Python calculations, simplifies the calculation process, and improves the generation efficiency. Attached Figure Description
[0066] Figure 1 A flowchart illustrating a method for parametrically generating a structured mesh for a three-dimensional pipeline system, in accordance with an embodiment of the present invention;
[0067] Figure 2 A schematic diagram of the coordinate points on the initial cross-section of the geometry of a three-dimensional pipeline system as determined by an embodiment of the present invention. Figure 1 ;
[0068] Figure 3 A schematic diagram of the coordinate points on the initial cross-section of the geometry of a three-dimensional pipeline system as determined by an embodiment of the present invention. Figure 2 ;
[0069] Figure 4 A schematic diagram of the coordinate points on the initial cross-section of the geometry of a three-dimensional pipeline system as determined by an embodiment of the present invention. Figure 3 ;
[0070] Figure 5 A schematic diagram of a bend segment model generated according to a parametric generation method for structured meshes of a three-dimensional piping system conforming to an embodiment of the present invention. Figure 1 ;
[0071] Figure 6 A schematic diagram of a bend segment model generated according to a parametric generation method for structured meshes of a three-dimensional piping system conforming to an embodiment of the present invention. Figure 2 ;
[0072] Figure 7 A schematic diagram of a bend segment model generated according to a parametric generation method for structured meshes of a three-dimensional piping system conforming to an embodiment of the present invention. Figure 3 ;
[0073] Figure 8 A schematic diagram of a large and small head segment model generated according to a parametric generation method for a structured mesh of a three-dimensional pipeline system conforming to an embodiment of the present invention;
[0074] Figure 9 A schematic diagram of a tee pipe model generated according to a parametric generation method for a structured mesh of a three-dimensional piping system conforming to an embodiment of the present invention. Figure 1 ;
[0075] Figure 10 A schematic diagram showing the intersection of the arc of the tee branch section with the X-axis and Y-axis in the local coordinate system based on the structured mesh of a three-dimensional piping system conforming to an embodiment of the present invention.
[0076] Figure 11 A schematic diagram of a tee pipe model generated according to a parametric generation method for a structured mesh of a three-dimensional piping system conforming to an embodiment of the present invention. Figure 2 ; Figure 12 A three-dimensional pipeline system is generated according to a parametric generation method for a structured mesh of a three-dimensional pipeline system conforming to an embodiment of the present invention;
[0077] Figure 13 Write the resulting graph for the geometry object portion;
[0078] Figure 14 Write the resulting graph for the vertices object portion;
[0079] Figure 15 Write the resulting graph for the edges object portion;
[0080] Figure 16 Write the resulting graph for the blocks object portion;
[0081] Figure 17 Write the resulting image for the faces object portion;
[0082] Figure 18 Write the result graph for the boundary object portion;
[0083] Figure 19 Here is a partial Python code example. Detailed Implementation
[0084] The advantages of the present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments.
[0085] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0086] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0087] In the description of this invention, it should be understood that the terms "inner" and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. The conventional geometric calculation processes used in the solutions of this invention are not described in detail, and are considered to be publicly disclosed calculation methods well known to those skilled in the art.
[0088] This invention provides a parametric method for generating structured meshes for three-dimensional piping systems, see reference. Figure 1 , Figure 1 A flowchart illustrating a parametric generation method for a structured mesh of a three-dimensional piping system conforming to the present invention is shown.
[0089] The parametric generation method for the structured mesh of the three-dimensional pipeline system includes:
[0090] S1: Obtain the geometric structure of the three-dimensional pipeline system, divide the geometric structure into multiple parts, and obtain the geometric parameters of each part; the geometric parameters include, but are not limited to, the diameter of the initial cross section of the geometric structure;
[0091] S2: Based on the diameter of the initial cross section of the geometric structure, construct the initial cross section of the geometric structure in the coordinate system, and obtain the coordinate points of the initial cross section of the geometric structure and the coordinates of the coordinate points in the coordinate system;
[0092] S3: Based on the coordinates of the starting section coordinates of the geometric structure, calculate the coordinates of the center point and the normal vector of the starting section of the geometric structure;
[0093] S4: Based on the geometric parameters and the normal vector of the starting section of the geometric structure, perform a spatial matrix transformation on the coordinate points of the starting section of the geometric structure to obtain the coordinate points of the geometric structure interface and the center coordinate points of the corresponding interface; obtain the coordinates of the coordinate points of the geometric structure interface; the geometric structure interface includes the starting section of the geometric structure, the ending section of the geometric structure, and may also include the intermediate section of the geometric structure.
[0094] S5: Using Python, generate a dictionary file containing the coordinate points of the interface of each part of the geometric structure in the three-dimensional pipeline system and the corresponding geometric parameters according to the blockMeshDict rule;
[0095] S6: Execute the dictionary file to generate a structured mesh for the three-dimensional pipeline system.
[0096] The solution provided by this invention divides the three-dimensional pipeline according to its geometric structure type. Starting from the initial cross-section of a certain geometric structure in the three-dimensional pipeline system, the initial cross-section is established and its coordinates are obtained. By fully utilizing spatial matrix transformations, the coordinates of the key interfaces of each geometric structure in the three-dimensional pipeline system are translated, rotated, and scaled to obtain the pipeline interface coordinates and their coordinates for each geometric structure. Using Python, the geometric parameters and interface coordinates of each part of the geometric structure are used to generate a blockMeshDict dictionary file according to the blockMeshDict rule. Executing the dictionary file for all geometric structures generates the structural model of the three-dimensional pipeline system. The generated structured mesh is of high quality and small in quantity. The division of the geometric structure can also be flexibly adjusted according to the actual pipeline layout of the factory.
[0097] The following section elaborates on the parametric generation method of structured meshes for three-dimensional pipeline systems.
[0098] Step S1: Obtain the geometric structure of the three-dimensional pipeline system, divide the geometric structure into multiple parts, and obtain the geometric parameters of each part; the geometric parameters include, but are not limited to, the diameter of the starting section of the geometric structure.
[0099] In step S1, the geometric structure of the three-dimensional pipeline system is obtained, and the geometric structure is divided into multiple parts, including:
[0100] Obtain the geometric structure of the three-dimensional piping system and divide the geometric structure into straight pipe sections, elbow sections, reducer sections, and tee sections.
[0101] The starting section of the geometric structure is the starting section of the straight pipe section, the elbow section, the reducer section, or the tee section. The coordinate points and center point of the starting section of the geometric structure are the coordinate points and center points of the starting section of the straight pipe section, the elbow section, the reducer section, or the tee section.
[0102] In step S1, obtaining the geometric parameters of each part includes: obtaining the length of the straight pipe section, the rotation direction, rotation radius and rotation angle of the elbow section, the length of the reducer section, the ratio of the starting cross-sectional diameter and the ending cross-sectional diameter of the reducer, the radius of the tee main pipe, the radius of the tee branch pipe and the length of the tee branch pipe.
[0103] Execution step S2: Based on the diameter of the initial cross-section of the geometric structure, construct the initial cross-section of the geometric structure in the coordinate system, and obtain the coordinate points of the initial cross-section and the coordinates of the coordinate points in the coordinate system, specifically including:
[0104] by Figure 2Taking the initial section as an example: take the center of the circle as the origin of the XYZ coordinate system, and the plane in which the circle is located as the XY plane. According to the diameter D of the circle, the coordinates of the four points on the dashed arc can be calculated. At the same time, according to the diameter of the circle, the four vertices of the inscribed square in the circle can be calculated.
[0105] In counter-clockwise order, the coordinates of the eight points are as follows: Figure 3 and Figure 4 The coordinates of the inner and outer circles can be determined according to Figure 2 By scaling the coordinates of the points in the graph appropriately, we can obtain the result.
[0106] Step S3: Calculate the coordinates of the center point and normal vector of the starting section of the geometric structure based on the coordinates of the starting section coordinate points.
[0107] Execution step S4: Based on the geometric parameters and the normal vector of the starting section of the geometric structure, perform a spatial matrix transformation on the coordinate points of the starting section of the geometric structure to obtain the interface coordinate points and the center coordinate points of the geometric structure; obtain the coordinates of the interface coordinate points of the geometric structure; the interface of the geometric structure includes the starting section of the geometric structure, the ending section of the geometric structure, and may also include the intermediate section of the geometric structure.
[0108] In step S4, the step of performing spatial matrix transformation on the coordinate points according to the geometric parameters and the normal vector of the starting section of the geometric structure to obtain the interface coordinate points and center coordinate points of the geometric structure is specifically including but not limited to any one or a combination of the following. The combination method of the present invention does not limit the number of geometric structures in each of the following embodiments, and the steps in the following schemes can be arbitrarily combined to obtain the interface coordinate points and center points of the required three-dimensional pipeline system, so as to generate the dictionary file of the required three-dimensional pipeline system.
[0109] In one optional implementation, the coordinate points of the starting section of the straight pipe segment are translated according to the length of the straight pipe segment and the normal vector of the starting section of the straight pipe segment to obtain the coordinate points of the ending section and the center point of the straight pipe segment.
[0110] In another optional implementation, the method further includes: spatially translating and rotating the coordinate points of the starting section of the elbow segment according to the rotation direction of the elbow segment, the rotation radius of the elbow segment, the rotation angle, and the normal vector of the starting section of the elbow segment, to obtain the coordinate points of the middle section and the center section of the elbow segment, and the coordinate points of the ending section and the center section of the elbow segment.
[0111] In a further embodiment of this scheme, the process of obtaining the coordinate points and center coordinate points of the middle section and the end section of the elbow segment includes: obtaining the rotation center point based on the rotation direction of the elbow segment, the rotation radius of the elbow, and the center coordinate point of the starting section of the elbow segment; calculating and obtaining a three-dimensional rotation matrix based on the rotation direction and the rotation angle; and obtaining the coordinate points and center coordinate points of the middle section and the end section of the elbow segment, based on the coordinate points of the starting section of the elbow segment, the rotation center, and the three-dimensional rotation matrix. The rotation angle is determined as follows: the rotation angle of the middle section coordinate point of the elbow segment is half of the elbow rotation angle. The most common elbow components in industrial pipelines are 90-degree elbows, 45-degree elbows, and 180-degree elbows. For a 90-degree bend, the rotation angle of the middle section is 45 degrees, and the rotation angle of the end section is 90 degrees; for a 45-degree bend, the rotation angle of the middle section is 22.5 degrees, and the rotation angle of the end section is 45 degrees; for a 180-degree bend, it is generated as two 90-degree bends or four 45-degree bends. The embodiments of this invention can generate, but are not limited to, the following: Figures 5-7 The elbow section shown.
[0112] In other optional implementations, the step of performing a spatial matrix transformation on the coordinate points of the starting section of the geometric structure based on the geometric parameters and the normal vector of the starting section to obtain the interface coordinate points and center coordinate points of the geometric structure specifically includes: translating the coordinate points of the starting section of the large and small ends based on the length of the large and small ends and the normal vector of the starting section of the large and small ends to obtain the coordinate points of the ending section of the large and small ends and the center coordinate points; and updating the coordinate points of the ending section of the large and small ends and the center coordinate points by scaling them according to the ratio of the diameter of the starting section to the diameter of the ending section, with the center coordinate point as the center, and then updating the coordinate points of the ending section of the large and small ends and the center coordinate points. This invention can generate, but is not limited to, [the following]... Figure 8 The size of the head segment is shown.
[0113] In another optional implementation, a tee pipe can also be generated. The specific method includes: based on the diameter of the tee branch pipe and the normal vector of the starting section of the tee main pipe, the coordinate point of the starting section of the tee main pipe is translated three times to obtain the coordinate point of the ending section of the tee main pipe, and the coordinate points of the first intermediate section and the second intermediate section located between the starting section and the ending section of the tee main pipe.
[0114] Based on the coordinates of the first and second intermediate cross-sections, the length of the tee branch pipe, and the normal vector of the tee branch pipe, the coordinates of the starting and ending cross-sections of the tee branch pipe are obtained. Based on the center coordinates of the ending cross-section of the tee branch pipe, the coordinates of the intersection points of the tee branch pipe with the X and Y axes of the coordinate system are obtained. The normal vector direction of the tee branch pipe is perpendicular to the normal vector direction of the starting cross-section of the main tee pipe. In a specific example, if four coordinate points are selected to determine the coordinates of the ending cross-section of the tee branch pipe, then the obtained tee branch pipe intersects the X and Y axes of the coordinate system at four points.
[0115] In a further embodiment of the scheme, the steps of obtaining the coordinate points of the end section of the tee main pipe and the coordinate points of the first intermediate section and the second intermediate section located between the starting section and the end section of the tee main pipe specifically include: determining the length of the intermediate section according to the diameter of the branch pipe of the tee pipe, such that the length of the intermediate pipe section is equal to the diameter of the branch pipe; and translating the coordinate points of the starting section of the tee main pipe three times according to the normal vector of the starting section of the tee main pipe to obtain the coordinate points of the end section of the tee main pipe and the coordinate points of the first intermediate section and the second intermediate section located between the starting section and the end section of the tee main pipe.
[0116] In a further embodiment of this scheme, the steps of obtaining the coordinates of the starting section of the tee branch pipe, the coordinates of the ending section of the tee branch pipe, and the coordinates of the four intersection points of the tee branch pipe with the X-axis and Y-axis in the local coordinate system specifically include: determining the center point of the tee branch pipe based on the first intermediate section coordinate point and the second intermediate section coordinate point; selecting several first intermediate section coordinate points and second intermediate section coordinate points based on the normal vector of the tee branch pipe, such that the normal vector of the plane formed by the selected coordinate points is consistent with the normal vector direction of the tee branch pipe; using the plane formed by the selected coordinate points as the starting section of the tee branch pipe; obtaining the normal vector and center coordinate point of the starting section of the tee branch pipe based on the selected coordinate points; and translating the selected coordinate points of the starting section of the tee branch pipe according to the length of the tee branch pipe and the normal vector of the starting section of the tee branch pipe. Obtain the coordinates of the end section and center point of the tee branch pipe. Using the center point of the end section as the center, scale the coordinates of the end section according to the scaling ratio so that all the scaled coordinates fall on the arc of the tee branch pipe's cross-section (the arc of the tee branch pipe's end section). The plane containing the scaled coordinates of the end section is taken as the end section of the tee branch pipe. Obtain the normal vector and center coordinates of the end section. Construct a local coordinate system for the end section. Using the right-hand rule, form unit vectors in the X and Y directions from the coordinates of the end section. The Z-direction unit vector is the normal vector of the end section. Based on the center coordinates of the end section, the radius of the tee branch pipe, and the X and Y direction unit vectors, obtain the coordinates of the intersection point between the tee branch pipe and the X and Y axes in the local coordinate system. This implementation scheme can generate, for example... Figure 9 The tee pipe shown. The specific process for obtaining the coordinates of the intersection points of the tee branch pipe with the X-axis and Y-axis in the coordinate system is as follows: Figure 10 As shown, combined with Figure 9 The calculation process for the coordinates of the four corner points of the tee branch pipe is explained below: Figure 10 In the diagram, points A, B, C, and D are extracted from the two intermediate sections of the main pipe, then obtained through matrix translation and scaling; points E, F, G, and H are calculated based on the local coordinate system of the branch pipe's end section and the branch pipe's diameter. E, F, G, and H are the intersection points of the branch pipe's cross-sectional arc with the X and Y axes in the local coordinate system.
[0117] Step S5: Using Python, generate a dictionary file from the coordinates of the interface points of each part of the geometric structure in the three-dimensional pipeline system and the corresponding geometric parameters according to the blockMeshDict rule.
[0118] Step S5 specifically includes: based on the coordinates of the cross-sectional coordinate points and the center coordinate point of the straight pipe section, the elbow section, the reducer section, and the tee section, and the corresponding geometric parameters, generating dictionary files for one or more of the structures of the straight pipe section, the elbow section, the reducer section, and the tee section according to the blockMeshDict rule using Python. The following implementation scheme uses Python to generate corresponding dictionary files for the structures of the straight pipe section, the elbow section, the reducer section, or the tee section.
[0119] In an optional scheme, the step of generating a dictionary file of the structure of the straight pipe segment according to the blockMeshDict rule using Python based on the coordinates of the cross-sectional coordinate points and the center coordinate point of the straight pipe segment and the corresponding geometric parameters specifically includes: generating a corresponding dictionary file of the structure of the straight pipe segment from the starting cross-sectional coordinate points and the ending cross-sectional coordinate points of the straight pipe segment according to the blockMeshDict rule.
[0120] In an optional scheme, the step of generating a dictionary file of the elbow segment structure according to the blockMeshDict rule using Python, based on the coordinates of the elbow segment cross-section coordinate points and the center coordinate point, and the corresponding geometric parameters, specifically includes: generating a blocks dictionary file from the elbow segment's starting cross-section coordinate points and ending cross-section coordinate points according to the blockMeshDict rule; generating an edgs dictionary file from the elbow segment's middle cross-section coordinate points and the corresponding ending and starting cross-section coordinate points according to the blockMeshDict rule, and assigning the arc keyword to ensure a smooth transition of the elbow. Figure 15 The image shows the result of generating a portion of the edgs dictionary files.
[0121] In an optional scheme, the step of generating a dictionary file of the structure of the large and small head segments according to the blockMeshDict rule using Python based on the coordinates of the cross-sectional coordinates of the large and small head segments, the coordinates of the center coordinates, and the corresponding geometric parameters specifically includes: generating the coordinates of the starting cross-section of the large and small head segments and the coordinates of the ending cross-section of the large and small head segments into corresponding dictionary files according to the blockMeshDict rule.
[0122] In an optional scheme, the step of generating a dictionary file of the tee pipe segment structure according to the blockMeshDict rule using Python, based on the coordinates of the cross-sectional coordinate points of the tee pipe segment and the corresponding geometric parameters, specifically includes: generating the tee pipe structure into a geometry dictionary file of type searchableCylinder, named cylinder1, based on the center coordinates of the starting cross-section of the tee pipe and the center coordinates of the ending cross-section of the tee pipe, and the radius of the tee pipe; and generating the structure of the tee branch pipe into a geometry dictionary file of type searchableCylinder, based on the center coordinates of the starting cross-section of the tee branch pipe and the center coordinates of the ending cross-section of the tee branch pipe, and the radius of the branch pipe, using Python. Name it "cylinder2"; generate the coordinates of the starting section of the tee branch pipe into a "vertices" dictionary file according to the "blockMeshDict" rule, and add the keywords "project", "cylinder1", and "cylinder2"; generate the arc formed by the intersection lines of the tee main pipe and branch pipe into an "edges" dictionary file according to the "blockMeshDict" rule, and add the keywords "project", "cylinder1", and "cylinder2"; generate the above tee main pipe structure, specifically including the initial section, the end section, and the three-dimensional surface between them, into a "faces" dictionary file according to the "blockMeshDict" rule, and add the keywords "project" and "cylinder1". For example... Figure 14 The resulting image shows the generation of a portion of the vertices dictionary files.
[0123] In this approach, the dictionary file is written using the "project" keyword method, which reduces a significant amount of Python computation, simplifies the calculation process, and improves generation efficiency.
[0124] Optionally, if a four-way pipe needs to be generated, simply use the coordinates of the end section of the previous pipe component as the coordinates of the starting section of the four-way pipe. The specific steps for generating the four-way pipe are similar to those for a tee pipe, except that two sets of coordinate points need to be selected, ensuring that the plane normal vector formed by each set of coordinate points is consistent with the direction (three-dimensional unit vector) of the four-way branch pipe that needs to be perforated. Each set of coordinate points serves as the starting section of a branch pipe. Simultaneously, in the blockMeshDict geometry dictionary, the main pipe is named cylinder3, and the two branch pipes are named cylinder4 and cylinder5 respectively. The names of the cylinders in the geometry dictionary cannot be duplicated. Other steps and methods are consistent with those for a tee pipe, and will not be elaborated upon here. The generated four-way pipe is as follows: Figure 11 As shown.
[0125] Step S6: Execute the dictionary file to generate a structured mesh for the three-dimensional pipeline system.
[0126] This invention utilizes the Python scripting language. Based on the shape of the target geometry, it arbitrarily combines and selects the geometric generation steps to obtain the corresponding coordinate points and geometric parameters. These are then generated into corresponding `blockMeshDict` dictionary files according to the rules of `blockMeshDict`, including `geometry`, `vertices`, `edges`, `blocks`, `faces`, and `boundary`. Executing the `blockMesh` command on all dictionary files yields the required 3D pipeline system structured mesh. This can be flexibly adjusted according to the actual pipeline layout of the factory, generating high-quality, low-quantity structured meshes. Some of the `geometry`, `vertices`, `edges`, `blocks`, `faces`, and `boundary` dictionary files are shown below. Figure 13-18 As shown, some Python scripting languages, such as Figure 19 As shown. In specific examples, Figure 12 This invention illustrates a three-dimensional pipeline system structure generated using the above-described technical solution of the present invention; the preferred starting cross-section is either one of the two ends, or a cross-section at one end of a certain geometric structure in the middle can be selected.
[0127] In summary, this invention provides a parametric generation method for structured meshes of 3D piping systems based on the OpenFOAM open-source toolbox. The method calculates the geometric coordinates of each point on the initial cross-section of the pipe based on the pipe diameter at the starting end; calculates the geometric coordinates of each point on the end cross-section of the straight pipe section; calculates the geometric coordinates of each point on the end cross-section and the middle cross-section of the elbow; calculates the geometric coordinates of the end cross-sections of reducers; calculates the geometric coordinates of the two end cross-sections of tees; and calculates the geometric coordinates of the three end cross-sections of crosses. In this invention, the end cross-section of the first pipe structural component can be used as the starting cross-section of the second pipe structural component, and so on, continuously extending the range. Based on the obtained geometric coordinates, all the pipe components are generated into a blockMeshDict file; the blockMesh command is executed to generate a structured mesh. This method solves the problems of difficulty in generating piping systems, poor mesh quality, and a large number of meshes in existing technologies. Using the method of this invention, various pipe components can be freely combined, and 3D piping systems can be quickly and parametrically generated, improving mesh quality. Furthermore, the "project" keyword is introduced into the dictionary file to reduce a large amount of Python computation, simplify the calculation process, and improve generation efficiency.
[0128] This invention also discloses a parametric generation system for structured meshes of three-dimensional piping systems, used to implement the parametric generation method for structured meshes of three-dimensional piping systems as described in any of the foregoing claims of this invention.
[0129] The structure division and parameter collection module is used to obtain the geometric structure of the three-dimensional pipeline system, divide the geometric structure into multiple parts, and obtain the geometric parameters of each part; the geometric parameters include, but are not limited to, the diameter of the initial cross section of the geometric structure.
[0130] The initial cross-section determination module is used to construct the initial cross-section of the geometric structure in a coordinate system based on the diameter of the initial cross-section of the geometric structure, and to obtain the coordinate points of the initial cross-section of the geometric structure and the coordinates of the coordinate points in the coordinate system.
[0131] The calculation module is used to calculate the coordinates of the center point and normal vector of the starting section of the geometric structure based on the coordinates of the starting section coordinates of the geometric structure; and to calculate the geometric structure interface coordinates and the center coordinates of the corresponding interface after spatial matrix transformation; and to obtain the coordinates of the geometric structure interface coordinates; wherein the geometric structure interface includes the starting section of the geometric structure;
[0132] The spatial matrix transformation module is used to perform spatial matrix transformation on the coordinate points of the starting section of the geometric structure based on the geometric parameters and the normal vector of the starting section of the geometric structure.
[0133] The dictionary file generation and execution module is used to generate a dictionary file from the interface coordinates and corresponding geometric parameters of each part of the geometric structure in the 3D pipeline system according to the blockMeshDict rule using Python; and to execute the dictionary file to generate a structured mesh of the 3D pipeline system.
[0134] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the preceding claims of the present invention.
[0135] The present invention also discloses an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor, when calling the computer program in the memory, implements the steps of the method described in any of the foregoing claims of the present invention.
[0136] It should be noted that the embodiments of the present invention have better implementability and are not intended to limit the present invention in any way. Any person skilled in the art may use the above-disclosed technical content to change or modify it into equivalent effective embodiments. However, any modifications or equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of the technical solution of the present invention.
Claims
1. A parametric method for generating structured meshes for a three-dimensional pipeline system, characterized in that, include: Obtain the geometric structure of the three-dimensional pipeline system, divide the geometric structure into multiple parts, and obtain the geometric parameters of each part; the geometric parameters include, but are not limited to, the diameter of the initial cross section of the geometric structure; Based on the diameter of the initial cross section of the geometric structure, construct the initial cross section of the geometric structure in the coordinate system, and obtain the coordinate points of the initial cross section and the coordinates of the coordinate points in the coordinate system; Based on the coordinates of the starting section coordinates of the geometric structure, calculate the coordinates of the center coordinates and the normal vector of the starting section of the geometric structure; Based on the geometric parameters and the normal vector of the starting section of the geometric structure, a spatial matrix transformation is performed on the coordinate points of the starting section of the geometric structure to obtain the interface coordinate points of the geometric structure and the center coordinate points of the corresponding interface. Obtain the coordinates of the coordinate points of the geometric structure interface; the geometric structure interface includes the initial cross section of the geometric structure. Using Python, the coordinate points of each part of the geometric structure interface and the corresponding geometric parameters of the three-dimensional pipeline system are generated into a dictionary file according to the blockMeshDict rule; Execute the dictionary file to generate a structured mesh for the three-dimensional pipeline system.
2. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 1, characterized in that, Obtain the geometry of the three-dimensional pipeline system, and divide the geometry into multiple parts, including: Obtain the geometric structure of the three-dimensional piping system, and divide the geometric structure into one or more of the following: straight pipe sections, elbow sections, reducer sections, and tee sections; the starting section of the geometric structure is the starting section of the straight pipe section, the elbow section, the reducer section, or the tee section; the coordinate points and center point of the starting section of the geometric structure are the coordinate points and center points of the starting section of the straight pipe section, the elbow section, the reducer section, or the tee section.
3. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 2, characterized in that, Obtaining the geometric parameters of each part includes: Obtain the length of the straight pipe section, the rotation direction of the elbow section, the elbow rotation radius, and the rotation angle. The length of the reducer section, the ratio of the starting cross-sectional diameter to the ending cross-sectional diameter of the reducer, the radius of the tee main pipe, the radius of the tee branch pipe, and the length of the tee branch pipe are one or more of the following:
4. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 3, characterized in that, The steps of generating a dictionary file using Python from the coordinates of the interface points and corresponding geometric parameters of each part of the geometric structure in the 3D pipeline system according to the blockMeshDict rule specifically include: Based on the coordinates of the cross-sectional coordinate points of the straight pipe section, the elbow section, the reducer section, and the tee section, and the corresponding geometric parameters, the structure of the straight pipe section, the elbow section, the reducer section, and the tee section is generated into a dictionary file using Python according to the blockMeshDict rule.
5. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 4, characterized in that, The steps of performing spatial matrix transformation on the coordinate points based on the geometric parameters and the normal vector of the initial cross section of the geometric structure to obtain the coordinate points of the geometric structure interface and the corresponding center coordinate points of the interface specifically include: Based on the length of the straight pipe section and the normal vector of the starting section of the straight pipe section, the coordinate points of the starting section of the straight pipe section are translated to obtain the coordinate points of the ending section and the center point of the straight pipe section.
6. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 4, characterized in that, The steps of performing spatial matrix transformation on the coordinate points based on the geometric parameters and the normal vector of the initial cross section of the geometric structure to obtain the coordinate points of the geometric structure interface and the corresponding center coordinate points of the interface specifically include: Based on the rotation direction of the elbow segment, the rotation radius and rotation angle of the elbow segment, and the normal vector of the starting section of the elbow segment, the coordinate points of the starting section of the elbow segment are translated and rotated to obtain the coordinate points of the middle section and the center section of the elbow segment, and the coordinate points of the ending section and the center section of the elbow segment.
7. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 6, characterized in that, The steps to obtain the coordinates of the middle section and center point of the elbow segment, and the coordinates of the end section and center point of the elbow segment, specifically include: The rotation center point is obtained based on the rotation direction of the elbow segment, the rotation radius of the elbow, and the center coordinate point of the starting section of the elbow segment; Calculate and obtain the three-dimensional rotation matrix based on the rotation direction and the rotation angle; Based on the coordinates of the starting section of the elbow segment, the rotation center, and the three-dimensional rotation matrix, the coordinates of the middle section and center of the elbow segment, and the coordinates of the ending section and center of the elbow segment are obtained; the geometric interface includes the middle section.
8. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 4, characterized in that, The step of performing a spatial matrix transformation on the coordinate points of the initial section of the geometric structure based on the geometric parameters and the normal vector of the initial section of the geometric structure to obtain the interface coordinate points and center coordinate points of the geometric structure specifically includes: Based on the length of the large and small end segments and the normal vector of the starting section of the large and small end segments, the coordinate points of the starting section of the large and small end segments are translated to obtain the coordinate points of the ending section and the center coordinate point of the large and small end segments. For the coordinate points of the end section and the center coordinate point of the large and small head segments, the coordinate points of the end section and the center coordinate point are updated by scaling according to the ratio of the diameter of the starting section and the diameter of the ending section, with the center coordinate point as the center.
9. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 4, characterized in that, The specific steps of performing spatial matrix transformation on the coordinate points of the initial section of the geometric structure based on the geometric parameters and the normal vector of the initial section of the geometric structure to obtain the interface coordinate points and center coordinate points of the geometric structure include: Based on the diameter of the tee branch pipe and the normal vector of the starting section of the tee main pipe, the coordinate point of the starting section of the tee main pipe is translated three times to obtain the coordinate point of the ending section of the tee main pipe, and the coordinate points of the first intermediate section and the second intermediate section located between the starting section and the ending section of the tee main pipe. Based on the coordinates of the first intermediate section and the second intermediate section, the length of the tee branch pipe, and the normal vector of the tee branch pipe, the coordinates of the starting section and the ending section of the tee branch pipe are obtained; based on the center coordinates of the ending section of the tee branch pipe, the coordinates of the four intersection points of the tee branch pipe with the X-axis and Y-axis in the coordinate system are obtained.
10. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 9, characterized in that, The steps of obtaining the coordinates of the end section of the tee main pipe, and the coordinates of the first intermediate section and the second intermediate section located between the starting section and the end section of the tee main pipe, specifically include: Determine the length of the middle section based on the diameter of the branch pipe of the tee; Based on the normal vector of the starting section of the tee pipe, the coordinate points of the starting section of the tee pipe are translated three times to obtain the coordinate points of the ending section of the tee pipe, the first intermediate section coordinate point, and the second intermediate section coordinate point located between the starting section and the ending section of the tee pipe.
11. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 9, characterized in that, The steps of obtaining the coordinates of the starting section of the tee branch pipe, the coordinates of the ending section of the tee branch pipe, and the coordinates of the four intersection points of the tee branch pipe with the X-axis and Y-axis in the coordinate system specifically include: Determine the center point of the tee branch pipe based on the coordinate points of the first and second intermediate sections; Based on the normal vector of the tee branch pipe, select several coordinate points of the first intermediate section and the second intermediate section, such that the normal vector of the plane formed by the selected coordinate points is consistent with the normal vector direction of the tee branch pipe; the plane formed by the selected coordinate points is used as the starting section of the tee branch pipe. Based on the aforementioned coordinate points, the normal vector and center coordinate point of the initial section of the tee branch pipe are obtained; The coordinate points of the starting section of the tee branch pipe are translated according to the length of the tee branch pipe and the normal vector of the starting section of the tee branch pipe to obtain the coordinate points of the ending section and the center coordinate point of the tee branch pipe. The coordinate points of the end section of the tee branch pipe are scaled up so that the coordinate points of the scaled end section of the tee branch pipe all fall on the arc of the tee branch pipe section. The plane where the coordinate points of the scaled end section of the tee branch pipe section are located is taken as the end section of the tee branch pipe. The normal vector and center coordinate point of the end section of the tee branch pipe are obtained. Construct a local coordinate system for the end section of the tee branch pipe. According to the right-hand rule, the coordinate points of the end section of the tee branch pipe are used to form a unit vector in the X direction and a unit vector in the Y direction. The unit vector in the Z direction is the normal vector of the end section of the branch pipe. Based on the center coordinates of the end section of the tee branch pipe, the radius of the tee branch pipe, and the unit vectors in the X and Y directions, obtain the coordinates of the intersection points of the tee branch pipe with the X and Y axes in the coordinate system.
12. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 11, characterized in that, Based on the coordinates of the cross-sectional coordinate points of the tee pipe section and the corresponding geometric parameters, the... The steps of generating a dictionary file from the structure of the tee pipe segment using Python according to the blockMeshDict rule specifically include: Based on the center coordinates of the starting section and the ending section of the tee pipe, and the radius of the tee pipe, the tee pipe structure is generated into a geometry dictionary file of type searchableCylinder, named cylinder1, according to the blockMeshDict rule; Based on the center coordinates of the starting section and the ending section of the tee branch pipe, and the radius of the branch pipe, the structure of the tee branch pipe is generated into a geometry dictionary file according to the blockMeshDict rule. The file is of type searchableCylinder and named cylinder2. The coordinates of the starting section of the tee branch pipe are generated into a dictionary file called vertices according to the blockMeshDict rule, and the keywords project, cylinder1, and cylinder2 are added. The arc formed by the intersection of the main tee pipe and the branch pipe is generated into the edges dictionary file according to the blockMeshDict rule, and the keywords project, cylinder1, and cylinder2 are added. Generate the above three-way main structure into a faces dictionary file according to the blockMeshDict rule, and add the project keyword and cylinder1.
13. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 5, characterized in that, Based on the coordinates of the cross-sectional coordinate points of the straight pipe section and the corresponding geometric parameters, through The steps by which Python generates a dictionary file for the structure of the straight pipe segment according to the blockMeshDict rule specifically include: The coordinates of the starting section and the ending section of the straight pipe segment are used to generate a dictionary file for the structure of the straight pipe segment according to the blockMeshDict rule.
14. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 7, characterized in that, Based on the geometric parameters corresponding to the coordinates of the cross-sectional coordinate points of the elbow segment, the steps of generating a dictionary file of the elbow segment structure using Python according to the blockMeshDict rule specifically include: The coordinates of the starting section and the ending section of the elbow segment are generated into a blocks dictionary file according to the blockMeshDict rule; The coordinates of the middle section of the bend segment, the corresponding coordinates of the end section of the bend segment, and the coordinates of the beginning section of the bend segment are generated into an edgs dictionary file according to the blockMeshDict rule, and the arc keyword is assigned to them.
15. The parametric generation method for structured meshes of a three-dimensional pipeline system as described in claim 8, characterized in that, Based on the coordinates of the cross-sectional coordinate points of the large and small head segments and their corresponding geometric parameters, the steps of generating a dictionary file from the structure of the large and small head segments using Python according to the blockMeshDict rule specifically include: The coordinates of the starting section of the large and small head segments and the coordinates of the ending section of the large and small head segments are generated into corresponding dictionary files according to the blockMeshDict rule.
16. A parametric generation system for structured meshes of a three-dimensional piping system, used to implement the parametric generation method for structured meshes of a three-dimensional piping system as described in any one of claims 1-15, characterized in that, The structure division and parameter collection module is used to obtain the geometric structure of the three-dimensional pipeline system, divide the geometric structure into multiple parts, and obtain the geometric parameters of each part; the geometric parameters include, but are not limited to, the diameter of the starting section of the geometric structure. The initial cross-section determination module is used to construct the initial cross-section of the geometric structure in a coordinate system based on the diameter of the initial cross-section of the geometric structure, and to obtain the coordinate points of the initial cross-section of the geometric structure and the coordinates of the coordinate points in the coordinate system. The calculation module is used to calculate the coordinates of the center point and the normal vector of the starting section of the geometric structure based on the coordinates of the starting section coordinate points. And the coordinates of the geometric interface points and the center coordinates of the corresponding interface obtained after spatial matrix transformation; Obtain the coordinates of the coordinate points of the geometric structure interface; the geometric structure interface includes the initial cross section of the geometric structure. The spatial matrix transformation module is used to perform spatial matrix transformation on the coordinate points of the starting section of the geometric structure based on the geometric parameters and the normal vector of the starting section of the geometric structure. The dictionary file generation and execution module is used to generate a dictionary file from the interface coordinates and corresponding geometric parameters of each part of the geometric structure in the three-dimensional pipeline system according to the blockMeshDict rule using Python. And for executing the dictionary file to generate a structured mesh for a three-dimensional pipeline system.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-15.
18. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program, and the processor invokes the computer program in the memory to implement the steps of the method as described in claims 1-15.