A parallel finite element mesh stitching method for flow channels of reactor unit components

Through the parallelized finite element grid suture method, the cavity problem in the generation of reactor unit component flow channel is solved, and efficient and fast grid suture is achieved, which is suitable for reactor unit component flow channels with complex geometric structures.

CN119475875BActive Publication Date: 2025-08-26UNIV OF SCI & TECH BEIJING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411519582.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-08-26
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

In the prior art, when generating parallel grids of reactor unit component flow channels, cavity problems are prone to occur, resulting in low efficiency and excessive time-consuming grid generation.

Method used

The parallelized finite element grid suture method is adopted, and various algorithms such as dot suture algorithm, particle swarm optimization, shortest path problem and propulsion wavefront method are classified and processed for different cavity types to achieve efficient suture.

Benefits of technology

Improves the success rate and efficiency of grid generation, reduces the cost of 3D grid generation, is suitable for multiple cavity areas, and significantly reduces running time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475875B_ABST
    Figure CN119475875B_ABST
Patent Text Reader

Abstract

The present invention discloses a parallelized finite element mesh stitching method for flow channels of reactor unit assemblies, belonging to the field of finite element mesh technology; the present invention classifies cavities according to their characteristics, and then stitches cavities of different categories using different methods. In addition to the original point stitching algorithm, the algorithm also adaptively applies a variety of algorithms such as particle swarm optimization, shortest path problem, and advancing wavefront method, and achieves high-efficiency stitching of large-scale meshes while ensuring the overall mesh quality through parallel processing of the algorithm and tetrahedron quality detection optimization algorithm. The present invention helps to optimize mesh quality, promote the application scenarios of large-scale parallel mesh division algorithms, fill the gap in three-dimensional mesh stitching technology, and further promote the application and development of mesh technology in the field of numerical calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of finite element grids, and in particular to a parallelized finite element grid stitching method for flow channels of a reactor unit assembly. Background Art

[0002] Thermal-hydraulic analysis of nuclear reactors is crucial for understanding the various operational behaviors within a nuclear reactor and is fundamental to its safe operation. Computational fluid dynamics (CFD) accurately captures the complex three-dimensional flow and heat transfer characteristics of the coolant within the reactor at a fine-grained level. High-precision meshing of complex flow fields is a core foundation of CFD analysis. High-precision meshing of complex geometries is particularly challenging in CFD meshing. For example, the China Experimental Fast Reactor (CEFR) assembly contains 61 fuel rods arranged in a honeycomb pattern, with wire wound helically around them. The fuel rods have a diameter of 6 mm, and the wires have a diameter of 0.95 mm. When meshing, to ensure a better fit to the geometric boundaries, the mesh must be refined, reducing the mesh size and increasing the mesh size. However, this refinement makes meshing more difficult. Therefore, high-precision meshing of complex geometries, such as those in the CEFR, is extremely challenging. Furthermore, CFD simulations of the coolant flow region (channels) typically require the generation of high-quality meshes in the tens of millions to ensure accurate simulation results. However, for complex reactor core geometries like the CEFR with windings, generating large-scale meshes suitable for high-fidelity calculations using commercial software is extremely challenging. It is estimated that if the full core fluid mesh size exceeds tens of billions, the simulation time would exceed 100 days and the memory consumption would exceed hundreds of terabytes.

[0003] By leveraging the isomorphic nature of components, the core structure is divided into unit segments to generate a mesh. By merging the original segments with the replicated segments through methods such as unit copying and translation, a mesh model of the entire core and any core location can be efficiently generated. The core of this meshing method, which leverages component isomorphism, is to address the problem of mesh mismatch between the upper and lower surfaces of the original and replicated segments when they are merged. New flow channel segment mesh units are needed to fill in the gaps between the mismatched upper and lower surfaces. This filling process is called mesh splicing, and the original and replicated segments are collectively referred to as the flow channel basic mesh segment.

[0004] Considering the existence of spiral-shaped complex boundaries in the flow channel, unstructured grids are used for grid filling and splicing. The advantage of the Advancing Front Technique (AFT) is that it can efficiently generate boundary layer encrypted grids. AFT can be used for grid splicing to efficiently solve the stitching problem between the original segment and the copy segment. However, the traditional serial AFT algorithm has a large amount of calculation and low efficiency in generating grids. Parallelizing it can effectively improve the efficiency of grid generation. However, when using AFT for parallel grid generation, collisions may occur when different processes independently generate tetrahedral grids, resulting in the inability to complete the division of the collision area and the generation of cavities. In response to the above problems, the present invention proposes a parallel finite element grid stitching method for the flow channel of a reactor unit assembly. Summary of the Invention

[0005] The purpose of the present invention is to propose a parallel finite element mesh stitching method for reactor unit assembly flow channels to solve the cavity problem generated when parallel mesh stitching is performed using the advancing wavefront method (AFT); the present invention is applied to the spatial discretization of numerical simulation calculations and the efficient integration of reactor unitized meshes. When calculating the entire reactor, the unit assembly mesh is used as the basis, and the mesh efficient stitching is achieved in parallel, thereby achieving complete division of the cavity body. When calculating the entire reactor, the unit assembly mesh is used as the basis, and the mesh efficient stitching is achieved in parallel, thereby achieving complete division of the cavity body; the present invention classifies the cavities according to their characteristics, and then stitches cavities of different categories using different methods; in addition to the original point stitching algorithm, the method also adaptively applies a variety of algorithms such as a particle swarm algorithm, a shortest path problem, and an advancing wavefront method, and achieves large-scale efficient stitching of meshes while ensuring overall mesh quality through algorithm parallel processing and a tetrahedron quality detection optimization algorithm.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] A parallelized finite element mesh stitching method for flow channels of a reactor unit assembly, specifically comprising the following contents:

[0008] S1. Design of a point addition processing algorithm based on cavity frontier surface grouping: A general point addition attempt is performed for the existing cavity area; the center of gravity of the surfaces contained in the cavity is calculated, and the average value of the center of gravity is taken as the cavity point addition position. A tetrahedron is generated by combining the added points and the surfaces contained in the cavity;

[0009] S2. Design of cavity expansion algorithm based on particle swarm optimization: perform collision detection between the tetrahedron generated by S1 and the original tetrahedron, delete the associated tetrahedrons that collide, retain the added points in the cavity and generate tetrahedrons with the generated new frontier surface;

[0010] S3. Design of a cavity segmentation algorithm based on the shortest path problem: Reclassify cavities based on their shapes to determine the processing method; connect a loop in the cavity to be segmented, and use the edges on the loop to generate triangular faces to split the cavity into two sub-cavities. Record the faces contained in each sub-cavity;

[0011] S4. Design of cavity filling algorithm based on advancing wavefront method: For cavities that cannot be processed by segmentation, the processing method described in S1 is combined with the idea of ​​generating grids layer by layer using the advancing wavefront method to perform tetrahedral filling and point stitching of the cavity.

[0012] Preferably, the S1 specifically includes the following contents:

[0013] S1.1. Finding the leading surface and associated tetrahedrons: In parallel, find the faces contained only by a single tetrahedron as the leading surface, record the tetrahedron as the associated tetrahedron, and add the inner wall faces and upper and lower base faces of the ungenerated tetrahedron to the leading surface;

[0014] S1.2. Cavity Grouping and Sorting: Group the cavities, find the common edges and record the group numbers. If there are multiple groups, merge them. After grouping, sort the frontier triangles according to their connectivity and find the associated tetrahedrons in parallel.

[0015] S1.3, Add points and connect: Add points to each group of cavities and calculate the mass of the tetrahedron; the location of the added points is the center of the cavity, determined by calculating the average coordinates of the centroids of all frontier surfaces; the ID number of the added points is the sum of the maximum number of points and the ID number of the cavity; connect the generated points to each frontier surface of the cavity to generate a tetrahedron;

[0016] S1.4. Tetrahedron quality calculation: For tetrahedrons with lower quality, add points to the longest side for segmentation optimization.

[0017] Preferably, the S2 specifically includes the following contents:

[0018] S2.1. Collision detection: Perform collision detection on the generated tetrahedron and the original tetrahedron, and classify and process them according to the collision situation of the cavity:

[0019] No collision is marked as 0; the cavity that collides with the associated tetrahedron is marked as 1, indicating that the added point is inside the cavity and the cavity needs to be expanded; the cavity that collides with other generated tetrahedrons is marked as 2, indicating that the added point is outside the cavity and the cavity needs to be split or filled;

[0020] S2.2, Particle Swarm Optimization: For the cavity marked as 1, use the particle swarm algorithm to optimize the point location. Calculate the number of collision tetrahedrons after each optimization, and solve the point location as a multivariate function problem using the particle swarm algorithm. Set the number of particle swarm variables to 3, take the minimum distance from the cavity midpoint to the frontier as the velocity boundary value, and constrain the position to a cube with a side length twice the velocity boundary value.

[0021] The fitness function generates the number of collisions between the tetrahedron generated by the random point and the frontier surface and the remaining tetrahedrons, and uses weights to adjust the importance of the two types of collisions described in S2.1:

[0022] score=w1×num1+w2×num2 (1)

[0023] Formula (1) is the fitness function, where num1 represents the number of collisions between a random point and the tetrahedron generated by the front surface and the cavity associated tetrahedron; w1 represents the weight value of the collision, which is between (0, 1); num2 represents the number of collisions between a random point and the tetrahedron generated by the front surface; w2 represents the weight value of the collision, which is between (0, 1);

[0024] Compare and update the global and local optimal solutions, substitute the optimal solution into the core formula to update the random point velocity, obtain the random point position from the velocity and recalculate the fitness value; after the collision is resolved or the number of iterations is reached, record the position of the optimized point and generate a tetrahedron:

[0025] v i1 =w×v i +c1×rand()×(pbest i -x i )+c2×rand( )×(gbest i -x i ) (2)

[0026] x i1 =x i +v i1 (3)

[0027] Formula (2) is the core formula of the particle swarm algorithm, where i = 1, 2, ..., N, N represents the total number of particles in the group; v i is the original velocity of the particle, v i1 Is the speed of the particle after update, the maximum speed is V max >0, if v calculated by formula (2) i1 >V max , then v i1 =V max ; rand() is a random number between (0,1); x iRepresents the current position of the particle; c1 and c2 are learning factors; w is the inertia factor, which is non-negative; a large w value means a strong global optimization capability and a weak local optimization capability; a small w value means a weak global optimization capability and a strong local optimization capability; the updated particle velocity v i1 Substitute into formula (3) and add it to the position to get the updated particle position x i1 ;

[0028] S2.3. Delete associated tetrahedrons that collide: Expand the cavity and delete associated tetrahedrons that collide; sort the cavity faces, find associated tetrahedrons of the deleted tetrahedrons, and update the generated tetrahedron list and the associated tetrahedron list;

[0029] S2.4, generate tetrahedron: add points and connect them to the newly generated frontier surface to generate a tetrahedron, check the collision between the new tetrahedron and other tetrahedrons in the cavity, if there is still a collision, go to S3;

[0030] S2.5. Modify the tetrahedron list: replace the deleted tetrahedrons in the grid list with the newly generated tetrahedrons;

[0031] S2.6. Calculate the quality of the new tetrahedrons generated for each group of cavities: For tetrahedrons with lower quality, add points to the longest edge for segmentation optimization.

[0032] Preferably, the S3 specifically includes the following contents:

[0033] S3.1. Cavity Reclassification: Cavities marked as 2 are classified according to shape and size. Long cavities are segmented and dotted, while other cavities are filled. The inner wall surfaces of the cavities are screened to determine whether they come from the same group of fuel rods and windings. If they come from the same group, they are marked as 4; otherwise, they are marked as 3.

[0034] S3.2, Path Connection: For the cavity to be segmented, find several triangles closest to the cavity midpoint on the upper and lower base surfaces and the leading edge of the cavity. Calculate the distance from each edge of the triangle to the known midpoint. After adjusting the weights, connect the edges using the shortest path in the undirected graph.

[0035] S3.3. Obtain the shortest path: Convert the edge sequence sorted by distance to the cavity midpoint into a path dictionary of an undirected graph. The key value of the dictionary is the starting point of the edge, and the value is a nested dictionary storing the end point and edge length, where the edge length is the index value in the edge sequence plus one.

[0036] Using an undirected graph dictionary and a starting point, a breadth-first algorithm is used to obtain a shortest path dictionary and a shortest distance dictionary. A priority queue, heapq, is used to solve the shortest path problem. The priority queue, heapq, automatically sorts after adding elements and pops out the element with the smallest number when using heappop. Initially, only the root node is in the queue. The root node is taken out and the nodes connected to it are found. The other nodes are automatically sorted in the queue, and the shortest path is popped out of the queue. The adjacent nodes of the previously selected path endpoints are added again to prevent finding duplicate points and record the points that have been found. The above process is repeated until the complete path is obtained. After obtaining the shortest path and shortest distance dictionaries, the edges corresponding to the shortest path are found based on the end point and the path, and the edges are connected into triangular faces, separating the original cavity into two sub-cavities on the left and right.

[0037] S3.4. Connect the path edges into triangles: Classify and sort the points in the path according to the upper and lower bases to form vertex pairs, and generate triangular faces based on the vertex pairs and record them in the two sub-cavities;

[0038] S3.5. Split the cavity: Split the front surface of the original cavity, and divide the triangles closest to the split point into two sub-cavities based on their left and right positions. Then, divide the remaining front surfaces into a sub-cavity list based on the common edge judgment.

[0039] Preferably, the S4 specifically includes the following contents:

[0040] S4.1. Generate tetrahedrons for each cavity from the outside inward: The frontier surfaces other than the bottom surface serve as the initial frontier queue, advancing from the outermost layer toward the center of the cavity. Select the points with the highest quality from the bottom surface as vertices, and generate tetrahedrons layer by layer. After each layer is generated, check for tetrahedron collisions. If a collision occurs, delete the colliding tetrahedron and regenerate it with the bottom surface vertices. Record a failure. If the number of failures exceeds the set number, it indicates that a cavity area exists, and proceed to S4.2 for further processing.

[0041] S4.2, point addition and stitching: For the cavity areas that still exist after filling with the advancing wavefront method, point them again and connect the front face queue and the unused bottom face to generate a tetrahedron;

[0042] S4.3. Correct the tetrahedron list: replace the incorrectly generated tetrahedrons with the filled tetrahedrons and the newly generated tetrahedrons;

[0043] S4.4. Tetrahedron quality calculation: Perform quality optimization on the replaced tetrahedrons. If the quality requirements are not met, continue segmentation optimization. Finally, all cavities are stitched together, tetrahedrons do not collide, and the quality is good. Save the tetrahedron list.

[0044] Compared with the prior art, the present invention provides a parallelized finite element mesh stitching method for flow channels of reactor unit assemblies, which has the following beneficial effects:

[0045] (1) Reduced 3D mesh generation costs: This invention solves the problem of 3D mesh generation requiring costly and repeated attempts, enabling high-quality mesh stitching of cavity regions at the 3D mesh level. Using this invention in conjunction with a mesh generation algorithm can significantly improve the success rate and efficiency of mesh generation. Compared to a single mesh generation algorithm that requires repeated attempts, the time required for mesh generation is significantly reduced.

[0046] (2) Applicable to various cavity regions: This invention solves the problem that a single method cannot be applied to different cavity regions. This invention classifies the causes and different shapes of cavity regions and develops a set of classification and processing methods that are universally applicable to all cavities, ensuring that the mesh cavity regions are effectively resolved after running the patching algorithm.

[0047] (3) Faster execution speed: The algorithm of the present invention implements parallelization, enabling the program to obtain the final result more quickly, thus solving the problem of long execution time. In addition, the algorithm of the present invention improves and adopts a variety of classic algorithms such as heuristic algorithms and breadth-first traversal, so that each module of the algorithm consumes as little time as possible.

[0048] In summary, the present invention proposes a set of parallel component stitching algorithms for mismatched surface meshes, which solves the problem of mismatch between the upper and lower bottom surfaces of unitized components that occurred in the previous mesh division of complex core structures, and fills the gap in mesh patching technology at the three-dimensional mesh level. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 This is an overall flow chart of the parallelized finite element mesh stitching method for the flow channel of the reactor unit assembly mentioned in Example 1 of the present invention;

[0050] Figure 2 This is a flowchart of the implementation of the parallel point addition processing algorithm based on cavity front surface grouping mentioned in Example 1 of the present invention;

[0051] Figure 3 This is a flowchart of the implementation of the parallel cavity expansion algorithm based on particle swarm optimization mentioned in Example 1 of the present invention;

[0052] Figure 4 This is a flowchart of the implementation of the parallel cavity segmentation algorithm based on the shortest path problem mentioned in Example 1 of the present invention;

[0053] Figure 5This is a schematic diagram of the structure of the grid near the wire wrap on the upper bottom surface of the generating section mentioned in Example 1 of the present invention. The grid cells near the wire wrap are denser and smaller in size, which can make the grid more closely follow the geometry of the flow channel near the wire wrap. However, if the cavity includes the larger triangle next to the wire wrap, the cavity will become too long.

[0054] Figure 6 This is a schematic diagram of the node pair grouping and triangle division according to the node pairs mentioned in Example 1 of the present invention, wherein the nodes on the fuel rod and wire winding surfaces in the upper and lower bottom surfaces are first paired, then the node pairs are grouped, and finally triangles are divided according to each node pair;

[0055] Figure 7 This is a flow chart of the parallel cavity point filling algorithm based on the advancing wavefront method mentioned in Example 1 of the present invention. DETAILED DESCRIPTION

[0056] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0057] Example 1:

[0058] See also Figure 1 This invention proposes a parallelized finite element mesh stitching method for reactor unit assembly flow channels. This method categorizes cavities according to their characteristics and stitches different cavities using different methods. In addition to the original point stitching algorithm, this algorithm also adaptively applies multiple algorithms, including particle swarm optimization, shortest path problem, and advancing wavefront method. By combining parallel processing with a tetrahedron quality detection optimization algorithm, this method achieves high-efficiency stitching of large-scale meshes while ensuring overall mesh quality. The method proposed in this invention is further described below with reference to the accompanying figures, including the following details:

[0059] The present invention is mainly divided into four technical modules: the design of a point processing algorithm based on cavity front surface grouping, the design of a cavity expansion algorithm based on particle swarm optimization, the design of a cavity segmentation algorithm based on the shortest path problem, and the design of a cavity filling algorithm based on the advancing wavefront method. The present invention proceeds in sequence according to the four modules, as follows: Figure 1 shown.

[0060] The specific contents of each of the above modules are as follows:

[0061] Please refer to Figure 2 The specific process of designing the point processing algorithm based on cavity front surface grouping is as follows:

[0062] (1) Finding the frontier surface and associated tetrahedrons: Parallel searches for faces contained only by a single tetrahedron as the frontier surface, records the tetrahedron as the associated tetrahedron, and adds the inner wall and upper and lower bottom surfaces of the ungenerated tetrahedron to the frontier surface. Parallel operation uses the multiprocessing package in Python to implement parallel process execution. The Manager module is used to share data between processes. By creating a Process object and passing the required parameters to the args parameter, the start() method is called to generate the process, and the join() method is used to join the process queue.

[0063] (2) Cavity Grouping and Sorting: Group the cavities, find the common edges and record the group numbers. If there are multiple groups, merge them. After grouping, sort the frontier triangles according to their connectivity and find the associated tetrahedrons in parallel.

[0064] (3) Add points and connect: Add points to each group of cavities and calculate the mass of the tetrahedron. The point location is the center of the cavity, determined by calculating the average coordinates of the centroids of all frontier faces. The ID number of the added point is the sum of the maximum number of points and the ID number of the cavity. Connecting the generated points to each frontier face of the cavity generates a tetrahedron.

[0065] (4) Tetrahedron quality calculation: For tetrahedrons with lower quality, point segmentation is performed on the longest side for optimization.

[0066] See also Figure 3 ,The specific process of cavity expansion algorithm design based on particle swarm optimization is as follows:

[0067] (1) Collision detection: Perform collision detection on the generated tetrahedron and the original tetrahedron. Classify and process according to the collision situation of the cavity: no collision is marked as 0, the cavity that collides with the associated tetrahedron is marked as 1, indicating that the added point is inside the cavity and the cavity needs to be expanded; the cavity that collides with other generated tetrahedrons is marked as 2, indicating that the added point is outside the cavity and the cavity needs to be split or filled. The collision between the generated tetrahedrons should be detected first, and then the collision with the associated tetrahedron should be detected. The situation where both collisions exist will be marked as 1, and the cavity marked as 2 only has collisions between the generated tetrahedrons. Therefore, after the cavity marked as 1 has processed the collision of the associated tetrahedron, the remaining collisions are all collisions between the generated tetrahedrons.

[0068] (2) Particle swarm optimization: For the cavity marked as 1, the particle swarm algorithm is used to optimize the position of the added points, and the number of collision tetrahedrons after each optimization is calculated. The position of the point is treated as a multivariate function problem and handed over to the particle swarm algorithm for solution. The number of particle swarm variables is set to 3, and the minimum distance from the cavity midpoint to the frontier surface is taken as the velocity boundary value. The position constraint range is a cube with a side length of twice the velocity boundary value. The fitness function is the number of collisions between the random point and the frontier surface generated tetrahedron and the remaining tetrahedrons, and the weight is used to adjust the importance of the two collisions. Compare and update the global and local optimal solutions, substitute the optimal solution into the core formula to update the position of the random point, and calculate the fitness value again. After the collision is resolved or the number of iterations is reached, the position of the optimized point and the generated tetrahedron are recorded.

[0069] (3) Delete the associated tetrahedrons that collide: Expand the cavity and delete the associated tetrahedrons that collide. Arrange the cavity surface, find the associated tetrahedrons of the deleted tetrahedron, and update the generated tetrahedron list and the associated tetrahedron list.

[0070] (4) Generate tetrahedron: Add points and connect them to the newly generated frontier surface to generate a tetrahedron. Check the collision between the new tetrahedron and other tetrahedrons in the cavity. If there is still a collision, use subsequent methods to solve it.

[0071] (5) Modify the tetrahedron list: Replace the deleted tetrahedrons in the grid list with the newly generated tetrahedrons.

[0072] (6) Calculate the quality of the new tetrahedrons generated for each group of cavities: For tetrahedrons with lower quality, add points to the longest side for segmentation optimization.

[0073] See also Figure 4 ,The specific process of designing the cavity segmentation algorithm based on the ,shortest path problem is as follows:

[0074] (1) Cavity reclassification: Cavities marked as 2 are classified according to shape and size. The shape of the cavity determines whether the segmentation method is adopted. Therefore, the shape and size of the cavity need to be classified. Longer cavities are segmented and dotted, while other cavities are filled. The inner wall surfaces in the cavity are screened out to determine whether the inner wall surfaces come from the same group of fuel rods and windings. If they come from the same group, they are marked as 4, otherwise they are marked as 3. The cavity marked as 3 indicates that the dot addition error is caused by the cavity being too long, and it is suitable for further segmentation and then filling. Figure 5 As shown, the cavity marked 4 is directly filled.

[0075] (2) Path connection: For the cavity to be split, find several triangles closest to the midpoint of the cavity on the upper and lower bottom surfaces and the front surface of the cavity, calculate the distance from each edge of the triangle to the known midpoint, and after sorting the weights, connect the edges by the shortest path in the undirected graph.

[0076] (3) Obtain the shortest path: Convert the edge sequence sorted by distance to the cavity midpoint into an undirected graph path dictionary. The key value of the dictionary is the starting point of the edge, and the value uses a nested dictionary to store the end point and edge length. The edge length is the index value in the edge sequence plus one. Using the undirected graph dictionary and the starting point, use the breadth-first algorithm to obtain the shortest path dictionary and the shortest distance dictionary. When solving the shortest path problem, use the priority queue heapq. This queue will automatically sort after adding elements and pop out the element with the smallest number when using heappop. At the beginning, only the root node is in the queue. The root node is taken out and the node connected to it is found. The other nodes are automatically sorted in the queue, and the shortest path is popped out of the queue. The adjacent nodes of the previously selected path endpoint are added again to prevent finding duplicate points and record the points found. The above process is repeated until the complete path is obtained. After obtaining the shortest path and shortest distance dictionary, find the edge corresponding to the shortest path based on the end point and path, connect the edges into triangular faces, and separate the original cavity into two sub-cavities on the left and right.

[0077] (4) Connecting the path edges into triangles: Classify and sort the points in the path according to the upper and lower bases to form vertex pairs, and generate triangular faces based on the vertex pairs and record them in the two sub-cavities, such as Figure 6 shown.

[0078] (5) Split the cavity: Split the front surface of the original cavity, divide the triangles closest to the split point into two sub-cavities according to the left and right positions, and then divide the remaining front surfaces into the sub-cavity list by common edge judgment.

[0079] See also Figure 7 The specific process of cavity filling algorithm design based on the advancing wavefront method is as follows:

[0080] (1) Each cavity generates tetrahedrons from the outside inward: the frontier surfaces except the bottom surface are used as the initial frontier queue, and advance from the outermost layer to the center of the cavity. The points with the highest quality in generating tetrahedrons are selected from the points on the bottom surface as vertices, and tetrahedrons are generated layer by layer. After each layer is generated, tetrahedron collisions are detected. If a collision occurs, the collision tetrahedron is deleted and the bottom vertex is replaced and regenerated. A failure is recorded. If the number of failures exceeds the set number, it means that there is a cavity area, which is further processed by the point stitching algorithm.

[0081] (2) Adding points and stitching: After some cavities are filled using the advancing wavefront method, there are still cavity areas. These cavity areas are added with points again, and the front surface queue and the unused bottom surface are connected to generate tetrahedrons.

[0082] (3) Correct the tetrahedron list: replace the incorrectly generated tetrahedrons with filling tetrahedrons and newly generated tetrahedrons.

[0083] (4) Tetrahedron quality calculation: The quality of the replaced tetrahedrons is optimized. If the quality does not meet the requirements, the segmentation optimization is continued. Finally, all cavities are stitched together, the tetrahedrons do not collide, and the quality is good. The tetrahedron list is saved.

[0084] The above is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. The parallelized three-dimensional mesh stitching technology based on numerical reactor unit components involved in the present invention, including the point processing algorithm based on cavity front surface grouping, the cavity expansion algorithm based on particle swarm optimization, the cavity segmentation algorithm based on the shortest path problem, and the cavity filling algorithm based on the advancing wavefront method, are all considered to be within the scope of protection of the present invention. It should be noted that the above is a preferred embodiment of the present invention. For those skilled in the art, various improvements and modifications can be made without departing from the principles of the present invention, and such improvements and modifications should also be considered to be within the scope of protection of the present invention.

Claims

1. A parallel finite element mesh stitching method for flow channels of reactor unit assemblies, characterized in that: Specifically include the following: S1. Design of a point addition processing algorithm based on cavity frontier surface grouping: A general point addition attempt is made for the existing cavity area; the center of gravity of the surfaces contained in the cavity is calculated, and the average value of the center of gravity is taken as the cavity point addition position. A tetrahedron is generated by combining the added points and the surfaces contained in the cavity; specifically, the following contents are included: S1.

1. Finding the leading surface and associated tetrahedrons: In parallel, find the faces contained only by a single tetrahedron as the leading surface, record the tetrahedron as the associated tetrahedron, and add the inner wall faces and upper and lower base faces of the ungenerated tetrahedron to the leading surface; S1.

2. Cavity Grouping and Sorting: Group the cavities, find the common edges and record the group numbers. If there are multiple groups, merge them. After grouping, sort the frontier triangles according to their connectivity and find the associated tetrahedrons in parallel. S1.3, Add points and connect: Add points to each group of cavities and calculate the mass of the tetrahedron; the location of the added points is the center of the cavity, determined by calculating the average coordinates of the centroids of all frontier surfaces; the ID number of the added points is the sum of the maximum number of points and the ID number of the cavity; connect the generated points to each frontier surface of the cavity to generate a tetrahedron; S1.

4. Tetrahedron quality calculation: For tetrahedrons with lower quality, add points on the longest side for segmentation optimization; S2. Design of cavity expansion algorithm based on particle swarm optimization: perform collision detection between the tetrahedron generated by S1 and the original tetrahedron, delete the associated tetrahedrons that collide, retain the added points in the cavity and generate tetrahedrons with the generated new frontier surface; S3. Design of a cavity segmentation algorithm based on the shortest path problem: Reclassify cavities based on their shapes to determine the processing method; connect a loop in the cavity to be segmented, and use the edges on the loop to generate triangular faces to split the cavity into two sub-cavities. Record the faces contained in each sub-cavity; S4. Design of cavity filling algorithm based on advancing wavefront method: For cavities that cannot be processed by segmentation, the processing method described in S1 is combined with the idea of ​​generating grids layer by layer using the advancing wavefront method to perform tetrahedral filling and point stitching of the cavity.

2. The parallelized finite element mesh stitching method for flow channels of a reactor unit assembly according to claim 1, characterized in that: The S2 specifically includes the following contents: S2.

1. Collision detection: Perform collision detection on the generated tetrahedron and the original tetrahedron, and classify and process them according to the collision situation of the cavity: No collision is marked as 0; the cavity that collides with the associated tetrahedron is marked as 1, indicating that the added point is inside the cavity and the cavity needs to be expanded; the cavity that collides with other generated tetrahedrons is marked as 2, indicating that the added point is outside the cavity and the cavity needs to be split or filled; S2.2, Particle Swarm Optimization: For the cavity marked as 1, use the particle swarm algorithm to optimize the point location, calculate the number of collision tetrahedrons after each optimization, and solve the point location as a multivariate function problem by the particle swarm algorithm. Set the number of particle swarm variables to 3, take the minimum distance from the cavity midpoint to the frontier surface as the velocity boundary value, and the position constraint range is a cube with a side length of twice the velocity boundary value. The fitness function is the number of collisions between the tetrahedron generated by the random point and the frontier surface and the remaining tetrahedrons. Use weights to adjust the emphasis on the two types of collisions described in S2.1: score = w 1× num 1+ w 2× num 2(1) Formula (1) is the fitness function, where num 1 indicates the number of collisions between a random point and the frontier surface generation tetrahedron and the cavity associated tetrahedron; w 1 represents the weight value of the collision, which is between (0,1); num 2 represents the number of collisions between random points and the tetrahedron generated by the frontier surface; w 2 represents the weight value of the collision, which is between (0,1); Compare and update the global and local optimal solutions, substitute the optimal solution into the core formula to update the random point velocity, obtain the random point position from the velocity and recalculate the fitness value; after the collision is resolved or the number of iterations is reached, record the position of the optimized point and generate a tetrahedron: v i1 = w × v i + c 1× rand ( )×( pbest i - x i )+ c 2× rand ( )×( gbest i - x i )(2) x i1 = x i + v i1 (3) Formula (2) is the core formula of the particle swarm algorithm, where i =1,2,…, N , N represents the total number of particles in this group; v i is the original velocity of the particle, v i1 Is the speed of the particle after update, the maximum value of the speed is V max >0, if the formula (2) is calculated v i1 > V max ,but v i1 = V max ; rand() is a random number between (0,1); x i Indicates the current position of the particle; c 1 and c 2 is the learning factor; w is the inertia factor, and its value is non-negative; w The larger the value, the stronger the global optimization ability is, but the weaker the local optimization ability is. w The smaller the value, the weaker the global optimization ability and the stronger the local optimization ability. v i1 Substitute into formula (3) and add it to the position to get the updated particle position x i1 ; S2.

3. Delete associated tetrahedrons that collide: Expand the cavity and delete associated tetrahedrons that collide; sort the cavity faces, find associated tetrahedrons of the deleted tetrahedrons, and update the generated tetrahedron list and the associated tetrahedron list; S2.4, generate tetrahedron: add points and connect them to the newly generated frontier surface to generate a tetrahedron, check the collision between the new tetrahedron and other tetrahedrons in the cavity, if there is still a collision, go to S3; S2.

5. Modify the tetrahedron list: replace the deleted tetrahedrons in the grid list with the newly generated tetrahedrons; S2.

6. Calculate the quality of the new tetrahedrons generated for each group of cavities: For tetrahedrons with lower quality, add points to the longest edge for segmentation optimization.

3. The parallelized finite element mesh stitching method for flow channels of a reactor unit assembly according to claim 2, characterized in that: The S3 specifically includes the following contents: S3.

1. Cavity Reclassification: Cavities marked as 2 are classified according to shape and size. Long cavities are segmented and dotted, while other cavities are filled. The inner wall surfaces of the cavities are screened to determine whether they come from the same group of fuel rods and windings. If they come from the same group, they are marked as 4; otherwise, they are marked as 3. S3.2, Path Connection: For the cavity to be segmented, find several triangles closest to the cavity midpoint on the upper and lower base surfaces and the leading edge of the cavity. Calculate the distance from each edge of the triangle to the known midpoint. After adjusting the weights, connect the edges using the shortest path in the undirected graph. S3.

3. Obtain the shortest path: Convert the edge sequence sorted by distance to the cavity midpoint into a path dictionary of an undirected graph. The key value of the dictionary is the starting point of the edge, and the value is a nested dictionary storing the end point and edge length, where the edge length is the index value in the edge sequence plus one. Using an undirected graph dictionary and a starting point, a breadth-first algorithm is used to obtain a shortest path dictionary and a shortest distance dictionary. A priority queue, heapq, is used to solve the shortest path problem. The priority queue, heapq, automatically sorts after adding elements and pops out the element with the smallest number when using heappop. Initially, only the root node is in the queue. The root node is taken out and the nodes connected to it are found. The other nodes are automatically sorted in the queue, and the shortest path is popped out of the queue. The adjacent nodes of the previously selected path endpoints are added again to prevent finding duplicate points and record the points that have been found. The above process is repeated until the complete path is obtained. After obtaining the shortest path and shortest distance dictionaries, the edges corresponding to the shortest path are found based on the end point and the path, and the edges are connected into triangular faces, separating the original cavity into two sub-cavities on the left and right. S3.

4. Connect the path edges into triangles: Classify and sort the points in the path according to the upper and lower bases to form vertex pairs, and generate triangular faces based on the vertex pairs and record them in the two sub-cavities; S3.

5. Split the cavity: Split the front surface of the original cavity, and divide the triangles closest to the split point into two sub-cavities based on their left and right positions. Then, divide the remaining front surfaces into a sub-cavity list based on the common edge judgment.

4. The parallelized finite element mesh stitching method for flow channels of a reactor unit assembly according to claim 3, characterized in that: The S4 specifically includes the following contents: S4.

1. Generate tetrahedrons for each cavity from the outside inward: The frontier surfaces other than the bottom surface serve as the initial frontier queue, advancing from the outermost layer toward the center of the cavity. Select the points with the highest quality from the bottom surface as vertices, and generate tetrahedrons layer by layer. After each layer is generated, check for tetrahedron collisions. If a collision occurs, delete the colliding tetrahedron and regenerate it with the bottom surface vertices. Record a failure. If the number of failures exceeds the set number, it indicates that a cavity area exists, and proceed to S4.2 for further processing. S4.2, point addition and stitching: For the cavity areas that still exist after filling with the advancing wavefront method, point them again and connect the front face queue and the unused bottom face to generate a tetrahedron; S4.

3. Correct the tetrahedron list: replace the incorrectly generated tetrahedrons with the filled tetrahedrons and the newly generated tetrahedrons; S4.

4. Tetrahedron quality calculation: Perform quality optimization on the replaced tetrahedrons. If the quality requirements are not met, continue segmentation optimization. Finally, all cavities are stitched together, tetrahedrons do not collide, and the quality is good. Save the tetrahedron list.

Citation Information

Patent Citations

  • Constraint curved surface multi-resolution control preprocessing method

    CN110335357A

  • Parallel partition dynamic grid encryption optimization method and system for reactor flow field simulation

    CN118551399A