Automatic modeling method for three-dimensional model of composite material pressure vessel
Automatic modeling of the three-dimensional model of composite pressure vessels is achieved through the programming interface of Gmsh software, solving the problems of low manual modeling efficiency and poor accuracy, and achieving efficient, accurate and flexible modeling and analysis, suitable for aerospace, energy, chemical and other fields.
Patent Information
- Application Number
- CN202510855752.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-25
AI Technical Summary
In the prior art, manual modeling methods are inefficient and have poor accuracy, making it difficult to meet the design and analysis needs of complex structures of composite pressure vessels.
The API Fortran programming interface of Gmsh software is adopted to realize the modeling of the three-dimensional model of composite pressure vessels through automated processes, including two-dimensional coordinate data import, geometric transformation, physical group grouping and meshing, and is inspected and corrected in combination with finite element calculation software.
Improve modeling efficiency and accuracy, ensure the integrity and flexibility of the model, support rapid design and analysis, and is suitable for aerospace, energy, chemical and other fields.
Smart Images

Figure CN120374869A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of the design of composite pressure vessels, and specifically discloses an automatic modeling method for a three-dimensional model of a composite pressure vessel. Background Art
[0002] With the rapid development of composite material technology, composite pressure vessels have been widely used in many fields such as aerospace, automotive, and chemical industries due to their remarkable characteristics such as light weight, high strength, and corrosion resistance. However, the complex structural design and material properties of composite pressure vessels make it a challenging task to accurately construct a three-dimensional model and extract relevant information during the design and simulation processes.
[0003] In the existing technologies, a manual modeling method is usually adopted to construct the three-dimensional model of a composite pressure vessel. However, this method not only has low efficiency but also is difficult to ensure the accuracy and integrity of the model. Especially in the case of dealing with complex structures and multi-material properties, the manual modeling method is more powerless and difficult to meet the high requirements of modern industry for rapid design and analysis.
[0004] In addition, with the continuous expansion of the application fields of composite pressure vessels, the demand for modeling and simulation analysis is also increasing day by day. The traditional modeling methods have been unable to meet the needs of the rapid development of modern industry, so there is an urgent need for an efficient, accurate, and flexible automatic modeling technology to support the research and development and production of composite pressure vessels. Summary of the Invention
[0005] Aiming at the problems of low efficiency and poor accuracy existing in the manual modeling method in the prior art, the present invention proposes an automatic modeling method for a three-dimensional model of a composite pressure vessel based on the programming Gmsh software. The method aims to accurately describe and model the complex structure of the composite pressure vessel by integrating advanced algorithms and programming technologies, improve the modeling efficiency and accuracy, and provide strong support for the optimal design of products.
[0006] The above-mentioned automatic modeling method for the three-dimensional model of a composite pressure vessel includes the following steps: S1. Read the two-dimensional coordinate point data of the 1 / 4 model of the composite pressure vessel. The two-dimensional coordinate point data includes the geometric information of all regions of the composite pressure vessel, and import the two-dimensional coordinate point data into the Gmsh software as the initial data for modeling to generate a two-dimensional 1 / 4 model of the composite pressure vessel; S2. Use the Gmsh software to perform geometric transformation operations on the two-dimensional 1 / 4 model to obtain a three-dimensional 1 / 8 model; S3. Divide the elements and nodes of each region in the three-dimensional 1 / 8 model into the corresponding physical groups respectively. The physical group label is i, where i starts from 1 and loops, with the total number of regions ndomain in the composite pressure vessel as the total number of loop times. S4. Using the three-dimensional 1 / 8 model obtained in step S2 as the three-dimensional basic model, perform geometric transformation operations again using Gmsh software to obtain a three-dimensional 2 / 8 model. S5. Divide the elements and nodes of each region in the three-dimensional 2 / 8 model into the corresponding physical groups respectively. The physical group label is i + ndomain, where i starts from 1 and loops, with the total number of regions ndomain in the composite pressure vessel as the total number of loop times. S6. Repeat step S4 until a complete three-dimensional overall model is obtained. After each execution of step S4, perform physical group grouping on the three-dimensional n / 8 model obtained in step S4 according to step S5, where n is 3, 4, 5, 6, 7, 8, to obtain six groups of physical groups. The corresponding physical group labels are i + 2 ndomain, i + 3 ndomain, i + 4 ndomain, i + 5 ndomain, i + 6 ndomain, i + 7 ndomain; S7. Integrate the physical groups belonging to the same region in steps S3, S5, and S6 to obtain the physical groups of the three-dimensional overall model. The corresponding physical group label is i + 8 ndomain; S8. According to the preset mesh generation parameters, perform mesh generation on each region in the physical group i + 8 ndomain, extract and output the element information and node information of each region, and save them. S9. Use finite element calculation software to read the element and node information obtained in step S8, and check and correct the three-dimensional overall model.
[0007] Steps S1 - S9 are implemented by writing a script program through the API Fortran programming interface of Gmsh software.
[0008] The regions in the composite pressure vessel include the liner, the plug, and each ply. The geometric information of each region includes the coordinate point data, line segment data, and the number of line segments within the region.
[0009] In step S1, the two-dimensional coordinate point data of the 1 / 4 model of the composite pressure vessel is stored in a TXT file.
[0010] In steps S2, S4, and S6, the two-dimensional 1 / 4 model is rotated by 90° using Gmsh software to obtain a three-dimensional 1 / 8 model, and then the three-dimensional 1 / 8 model is rotated, mirrored, and translated to obtain a complete three-dimensional model.
[0011] In step S8, the mesh generation parameters include mesh size and mesh shape; the element information includes element type, and the node information includes node coordinates; the saved file is in el3 format.
[0012] In step S9, the inspection of the three-dimensional overall model includes geometric integrity, correctness of physical group grouping, and mesh quality.
[0013] Compared with the prior art, the present invention has the following beneficial effects.
[0014] 1. High efficiency: By programming to implement the automated modeling process of Gmsh software, a complete three-dimensional model of a composite pressure vessel can be quickly generated, and the required information can be extracted, greatly improving the modeling efficiency.
[0015] 2. Accuracy: Based on accurate coordinate data and precise control of programming operations, the accuracy and integrity of the model can be ensured, providing a reliable basis for subsequent analysis.
[0016] 3. Flexibility: By programming to implement functions such as physical group grouping and information output, the modeling parameters and output formats can be flexibly adjusted according to specific requirements, improving the flexibility and accuracy of analysis.
[0017] 4. Scalability: This method is implemented based on the programming interface of Gmsh software, and other functions such as optimization algorithm integration can be extended according to needs, further improving the efficiency and accuracy of modeling and analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 is a flowchart of an automatic modeling method for a three-dimensional model of a composite pressure vessel; Figure 2 is a schematic diagram of two-dimensional coordinate point data of a 1 / 4 model of a composite pressure vessel; Figure 3 is a schematic diagram of the position map of a three-dimensional 1 / 8 model; Figure 4It is a schematic diagram of the three-dimensional overall model and mesh generation in Gmsh software; Figure 5 It is a schematic diagram of the lining physical group and mesh generation in Gmsh software; Figure 6 It is a schematic diagram of the ply physical group and mesh generation in Gmsh software; Figure 7 It is a schematic diagram of the plug physical group and mesh generation in Gmsh software; Figure 8 It is a schematic diagram for reading the output node and finite element element information of a single ply in the finite element calculation software; Figure 9 It is a schematic diagram for reading the output node and finite element element information of two plies in the finite element calculation software.
[0020] In the figure: 1 - lining area; 2 - ply area; 3 - plug area. Specific implementation manner
[0021] Next, the technical solution of the present invention will be clearly and completely described in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0022] Embodiment 1 This embodiment provides an automatic modeling method for a three-dimensional model of a composite pressure vessel, which is implemented by writing a script program through the API Fortran programming interface of Gmsh software. It can make full use of computer technology and programming technology to accurately describe and model the complex structure of the composite pressure vessel, improve the modeling efficiency and accuracy, and meet the requirements of modern industry for rapid design and analysis. Specifically, it includes the following steps.
[0023] S1, Import of two-dimensional coordinate data: Read the two-dimensional coordinate point data of the 1 / 4 model of the composite pressure vessel stored in a TXT file. The two-dimensional coordinate point data includes the geometric information of all regions of the composite pressure vessel. The regions in the composite pressure vessel include the lining, the plug, and each ply. The geometric information of each region includes the coordinate point data, line segment data, and the number of line segments within the region. Import the two-dimensional coordinate point data into Gmsh software as the initial data for modeling to generate a two-dimensional 1 / 4 model of the composite pressure vessel.
[0024] S2, Geometric transformation and three-dimensional solid generation: Use Gmsh software to rotate the two-dimensional 1 / 4 model by 90° to obtain a three-dimensional 1 / 8 model.
[0025] S3, Physical Grouping: Divide the elements and nodes of the liner, plug, and each ply in the three-dimensional 1 / 8 model into their corresponding physical groups respectively. The physical group label is i, where i starts from 1 and loops, with the total number of regions ndomain in the composite pressure vessel as the total number of loop iterations.
[0026] S4, Geometric Transformation and Three-Dimensional Solid Generation Again: Using the three-dimensional 1 / 8 model obtained in step S2 as the three-dimensional basic model, perform geometric transformation operations again using Gmsh software to obtain a three-dimensional 2 / 8 model.
[0027] S5, Physical Grouping Again: Divide the elements and nodes of the liner, plug, and each ply in the three-dimensional 2 / 8 model into their corresponding physical groups respectively. The physical group label is i + ndomain, where i starts from 1 and loops, with the total number of regions ndomain in the composite pressure vessel as the total number of loop iterations.
[0028] S6, Repeat step S4 until a complete three-dimensional overall model is obtained. After each step S4, perform physical grouping on the three-dimensional n / 8 model obtained in step S4 according to step S5, where n is 3, 4, 5, 6, 7, 8, to obtain six groups of physical groups, and the corresponding physical group labels are i + 2 ndomain, i + 3 ndomain, i + 4 ndomain, i + 5 ndomain, i + 6 ndomain, and i + 7 ndomain.
[0029] During the geometric transformation process, it is necessary to ensure the symmetry and integrity of the model to ensure that the finally generated three-dimensional overall model meets the design requirements.
[0030] Performing physical grouping helps to define independent material properties and set boundary conditions for different physical groups in subsequent finite element analysis.
[0031] S7, Integrate the physical groups belonging to the same region in steps S3, S5, and S6 to obtain the physical groups of the three-dimensional overall model, and the corresponding physical group label is i + 8 ndomain.
[0032] S8, Mesh Generation and Information Output: Mesh generation is a key step in finite element analysis, which determines the accuracy and efficiency of the analysis. According to the preset mesh generation parameters (mesh generation parameters include mesh size and mesh shape, etc.), perform mesh generation on physical group i + 8 Mesh the liner, plug, and each ply in the ndomain, extract and output key data such as the element type and node coordinates of the liner, plug, and each ply, and save them in the el3 format for subsequent reading and use by finite element calculation software.
[0033] S9, Model inspection and correction: Use finite element calculation software to read the element information and node information obtained in step S8, check the three-dimensional overall model. The inspection contents include aspects such as the geometric integrity, physical group grouping correctness, and mesh quality of the three-dimensional overall model. If problems are found in the three-dimensional overall model (such as geometric discontinuity, incorrect physical group grouping, poor mesh quality, etc.), corrections and optimizations are carried out. The correction and optimization operations include remeshing, adjusting the physical group grouping, etc. The corrected and optimized model will be inspected again to ensure that the accuracy and integrity of the three-dimensional overall model meet the design requirements.
[0034] Example 2 This example is specifically illustrated by an example of three-dimensional modeling and finite element mesh generation of a single-ply composite pressure vessel. In this example, the regions in the composite pressure vessel include three regions consisting of a plug, a liner, and a single ply, that is, the total number of regions ndomain in the composite pressure vessel is 3.
[0035] S1, Obtain Figure 2 The coordinate point data of the 1 / 4 composite pressure vessel in the two-dimensional plane shown is used as the initial data for modeling. It includes 65 coordinate points, 67 line segments, and 3 regions. The 3 regions are the liner region 1, the ply region 2, and the plug region 3 respectively. Its two-dimensional plane data includes coordinate point data, line segment data, and the number of line segments in each region. For example, the closed loop region of the plug region 3 is composed of line segments numbered 1, 2, 3, 65, 66, and 67; line segment 1 is composed of coordinate point 1 and coordinate point 2; line segment 2 is composed of coordinate point 2 and coordinate point 3; line segment 3 is composed of coordinate point 3 and coordinate point 4; line segment 65 is composed of coordinate point 4 and coordinate point 64; line segment 66 is composed of coordinate point 64 and coordinate point 65; line segment 67 is composed of coordinate point 65 and coordinate point 1; the coordinate of coordinate point 1 is (100.0, 180.0); the coordinate of coordinate point 2 is (130.0, 180.0); the coordinate of coordinate point 3 is (136.65, 179.60); the coordinate of coordinate point 4 is (140.0, 179.039); the coordinate of coordinate point 64 is (14.0, 200.0); the coordinate of coordinate point 65 is (100.0, 200.0). The liner region 1, the ply region 2, and the plug region 3 are similar. Import the two-dimensional coordinate point data into the Gmsh software as the initial data for modeling to generate a 1 / 4 two-dimensional model of the composite pressure vessel.
[0036] S2. First, rotate the two-dimensional 1 / 4 model. Since Gmsh will coincide with the original figure after rotating a full circle, rotate it by 90° to obtain the three-dimensional 1 / 8 model as shown in Figure 3 the following.
[0037] S3. Define the physical groups for the three-dimensional 1 / 8 model. Divide the elements and nodes in the lining area 1, the ply area 2, and the plug area 3 of the three-dimensional 1 / 8 model into the corresponding physical groups respectively. The physical group label is i, and i starts from 1 and loops. The total number of loops is 3 times. That is, the physical group labels corresponding to the lining area 1, the ply area 2, and the plug area 3 in the three-dimensional 1 / 8 model are 1, 2, and 3 in sequence.
[0038] S4. Using the three-dimensional 1 / 8 model obtained in step S2 as the three-dimensional basic model, perform composite operations such as rotation, mirroring, and translation on it using Gmsh software to obtain the three-dimensional 2 / 8 model.
[0039] S5. Group the physical groups again: Define the physical groups for the three-dimensional 2 / 8 model. Divide the elements and nodes in the lining area 1, the ply area 2, and the plug area 3 of the three-dimensional 2 / 8 model into the corresponding physical groups respectively. The physical group label is i + ndomain, and i starts from 1 and loops. The total number of loops is 3 times. That is, the physical group labels corresponding to the lining area 1, the ply area 2, and the plug area 3 in the three-dimensional 2 / 8 model are 4, 5, and 6 in sequence.
[0040] S6. Repeat step S4 until the complete three-dimensional overall model is obtained. After each step S4, group the physical groups according to step S5. The physical group labels corresponding to the lining area 1, the ply area 2, and the plug area 3 in the three-dimensional 3 / 8 model are 7, 8, and 9 in sequence. The physical group labels corresponding to the lining area 1, the ply area 2, and the plug area 3 in the three-dimensional 4 / 8 model are 10, 11, and 12 in sequence. The physical group labels corresponding to the lining area 1, the ply area 2, and the plug area 3 in the three-dimensional 5 / 8 model are 13, 14, and 15 in sequence. The physical group labels corresponding to the lining area 1, the ply area 2, and the plug area 3 in the three-dimensional 6 / 8 model are 16, 17, and 18 in sequence. The physical group labels corresponding to the lining area 1, the ply area 2, and the plug area 3 in the three-dimensional 7 / 8 model are 19, 20, and 21 in sequence. The physical group labels corresponding to the lining area 1, the ply area 2, and the plug area 3 in the three-dimensional 8 / 8 model are 22, 23, and 24 in sequence.
[0041] S7. Integrate the physical groups belonging to the same region in steps S3, S5, and S6 to obtain the physical group labels corresponding to the lining area 1, the ply area 2, and the plug area 3 in the three-dimensional overall model as 25, 26, and 27 in sequence, as shown in Figures 4 - 7 . For example, physical groups 1, 4, 7, 10, 13, 16, 19, 22 all belong to the lining area 1, and integrate them to obtain the physical group 25 of the lining area 1 in the three-dimensional overall model, as shown in Figure 5This grouping method helps to define independent material properties and set boundary conditions for different physical groups in subsequent finite element analysis.
[0042] S8. According to the preset mesh generation parameters (such as mesh size, shape, etc.), mesh generation is performed on the lining area 1, the ply area 2, and the plug area 3 in the three-dimensional overall model. A program can be written to set the maximum and minimum characteristic constants of the mesh to 50 and 10 respectively. 50 represents the set upper limit, that is, the characteristic length of the generated mesh will not exceed this value; 10 is usually used to control the fineness of the mesh. The smaller the value, the finer the generated mesh. The program is written to set the number of smoothing times of the mesh to 2000, which is used to control the mesh smoothing process. The larger the value, the more smoothing times, and the smoother the generated mesh. The values set above can all be modified to meet the requirements of subsequent three-dimensional finite element analysis with different precisions.
[0043] After the mesh generation is completed, only the element information and node information of physical groups 25, 26, and 27 are extracted and output and saved in a specific file format el3, which is read by finite element calculation software, as Figure 8 shown.
[0044] S9. Model inspection and correction.
[0045] For a composite pressure vessel with a multi-layer ply structure, the above automatic modeling method is also applicable. The total number of regions ndomain in the composite pressure vessel is the sum of the plug, the lining, and the multi-layers. In the physical group grouping and mesh generation steps, a separate physical group is set for each ply. Subsequently, the element data of different plies can also be output separately. Figure 9 Reading of node and finite element element information output for two plies.
[0046] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An automatic modeling method for a three-dimensional model of a composite material pressure vessel, characterized in that It includes the following steps: S1. Read the two-dimensional coordinate point data of the 1 / 4 model of the composite pressure vessel. The two-dimensional coordinate point data includes the geometric information of all regions of the composite pressure vessel. Import the two-dimensional coordinate point data into Gmsh software as the initial data for modeling, and generate a two-dimensional 1 / 4 model of the composite pressure vessel; S2. Use Gmsh software to perform geometric transformation operations on the two-dimensional 1 / 4 model to obtain a three-dimensional 1 / 8 model; S3. Divide the elements and nodes of each region in the three-dimensional 1 / 8 model into the corresponding physical groups respectively. The physical group label is i, and i starts to loop from 1, with the total number of regions ndomain in the composite pressure vessel as the total number of loop times; S4. Take the three-dimensional 1 / 8 model obtained in step S2 as the three-dimensional basic model, and use Gmsh software to perform geometric transformation operations again to obtain a three-dimensional 2 / 8 model; S5. Divide the elements and nodes of each region in the three-dimensional 2 / 8 model into the corresponding physical groups respectively. The physical group label is i + ndomain, and i starts to loop from 1, with the total number of regions ndomain in the composite pressure vessel as the total number of loop times; S6. Repeat step S4 until a complete three-dimensional overall model is obtained. After each execution of step S4, perform physical group grouping on the three-dimensional n / 8 model obtained in step S4 according to step S5, where n is 3, 4, 5, 6, 7, 8, to obtain six physical groups, and the corresponding physical group labels are i + 2 ndomain, i + 3 ndomain, i + 4 ndomain, i + 5 ndomain, i + 6 ndomain, i + 7 ndomain; S7. Integrate the physical groups belonging to the same region in steps S3, S5, and S6 to obtain the physical groups of the three-dimensional overall model, and the corresponding physical group label is i + 8 ndomain; S8. According to the preset mesh division parameters, perform mesh division on each region in the physical group i + 8 in the ndomain, extract and output the element information and node information of each region, and save them; S9. Use a finite element calculation software to read the element and node information obtained in step S8, and check and correct the three-dimensional overall model.
2. The automatic modeling method of the three-dimensional model of the composite material pressure vessel according to claim 1, characterized in that, Steps S1 - S9 are implemented by writing a script program through the API Fortran programming interface of Gmsh software.
3. The automatic modeling method of the three-dimensional model of the composite material pressure vessel according to claim 1, characterized in that The regions in the composite pressure vessel include the inner liner, the plug, and each ply. The geometric information of each region includes the coordinate point data, line segment data, and the number of line segments within the region.
4. The automatic modeling method of the three-dimensional model of the composite material pressure vessel according to claim 1, wherein, In step S1, the two-dimensional coordinate point data of the 1 / 4 model of the composite pressure vessel is stored in a TXT file.
5. The automatic modeling method of the three-dimensional model of the composite material pressure vessel according to claim 1, characterized in that, In steps S2, S4, and S6, use Gmsh software to rotate the two-dimensional 1 / 4 model by 90° to obtain a three-dimensional 1 / 8 model, and then perform rotation, mirroring, and translation on the three-dimensional 1 / 8 model to obtain a complete three-dimensional solid model.
6. The automatic modeling method of the three-dimensional model of the composite material pressure vessel according to claim 1, characterized in that In step S8, the mesh division parameters include the mesh size and the mesh shape; The element information includes the element type, and the node information includes the node coordinates; The saved file is in the el3 format.
7. The automatic modeling method of the three-dimensional model of the composite material pressure vessel according to claim 1, wherein In step S9, the inspection of the three-dimensional overall model includes geometric integrity, correctness of physical group grouping, and mesh quality.
Citation Information
Patent Citations
Rock discrete fracture network modeling method based on Gmsh-FLAC3D-Python
CN118334267A
Three-dimensional boundary layer grid generation method based on generalized regression neural network
CN118429568A
Method and apparatus for preparation of a computational fluid dynamics model
US20140365184A1