Parallelization finite element mesh sewing method for reactor unit assembly flow channel

Through the parallelized finite element grid suture method, combined with multiple algorithms and optimization techniques, the hollow cavity problem in parallel grid generation is solved, efficient and good-quality grid suture is achieved, and the efficiency of grid division is significantly improved.

CN119475875AActive Publication Date: 2025-02-18UNIV OF SCI & TECH BEIJING
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When parallel grid generation is generated using the propulsion wavefront method (AFT), collisions may occur, resulting in the inability to divide the collision areas and creating a cavity.

Method used

A parallelized finite element grid suture method for reactor unit component flow path is proposed. Through dotted suture algorithm, particle swarm algorithm, shortest path problem and propulsion wavefront method, combined with parallelized processing and tetrahedral mass detection optimization Algorithm to solve the problem of cavities classification and suture of different types of cavities.

Benefits of technology

It realizes high-efficiency stitching of large-scale grids while ensuring the overall grid quality, reduces the cost of three-dimensional grid generation, and is suitable for multiple cavity areas, significantly improving the efficiency and success rate of grid division.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475875A_ABST
    Figure CN119475875A_ABST
Patent Text Reader

Abstract

The invention discloses a parallelization finite element mesh sewing method for a reactor unit assembly flow channel, and belongs to the technical field of finite element meshes. According to the method, classification is carried out according to the characteristics of the cavities, and then different types of cavities are sewn by adopting different methods. The algorithm not only creatively creates a point-adding stitching algorithm, but also adaptively applies a plurality of algorithms such as a particle swarm algorithm, a shortest path problem, a wave-front propelling method and the like, and realizes large-scale grid high-efficiency stitching on the premise of ensuring the overall grid quality through algorithm parallelization processing and a tetrahedron quality detection optimization algorithm. According to the method, the optimization of the grid quality is facilitated, the application scene of a large-scale parallel grid division algorithm is popularized, the blank of the three-dimensional grid stitching technology is filled up, and the application development of the grid technology in the field of numerical calculation is further promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Thermal hydraulic analysis of reactors is crucial for various operating behaviors inside nuclear reactors and is the basis for safe operation of nuclear reactors. Computational fluid dynamics (CFD) can accurately capture the complex three-dimensional flow and heat transfer characteristics of coolant in reactors in a fine-grained manner. High-precision meshing of complex flow field areas is the core foundation of CFD analysis. In particular, high-precision meshing of complex geometric structures is one of the main challenges of CFD meshing. For example, there are 61 fuel rods arranged in a honeycomb shape inside the China Experimental Fast Reactor (CEFR) assembly, with wires spirally wound on the fuel rods. The diameter of the fuel rods is 6 mm and the diameter of the wires is 0.95 mm. When meshing, in order to make the mesh fit the geometric boundary better, it is necessary to subdivide the mesh, reduce the mesh unit and increase the mesh size, but subdividing the mesh will make meshing more difficult. Therefore, it is extremely difficult to perform high-precision meshing on complex geometric structures represented by CEFR. In addition, CFD simulation of the coolant flow area (channel) usually requires the generation of high-quality meshes of tens of millions to ensure the accuracy of the simulation results. However, for complex reactor core geometry with winding wires such as CEFR, it is extremely challenging to use commercial software to generate large-scale meshes that can be used for high-fidelity calculations. It is estimated that if the scale of the full core fluid mesh exceeds 10 billion, it will take more than 100 days and the memory consumption will exceed hundreds of TB.

[0003] By utilizing the isomorphism of components, the core structure is divided into unit segments to generate meshes, and then the original segment and the replica segment are merged by unit copying and translation, so that the mesh model of the entire core and any core position can be efficiently generated. The core of this meshing method utilizing the isomorphism of components is to solve the problem of mismatching the upper and lower surface meshes when the original segment and the replica segment are merged. It is necessary to fill in new flow channel segment mesh units between the mismatched upper and lower surfaces. This filling process is called mesh splicing, and the original segment and the filled segment are collectively called the flow channel basic mesh segment.

[0004] Considering the existence of spiral 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 copied 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, the efficient integration of reactor unitized meshes, and the unit assembly mesh is used as the basis for full-stack calculations to achieve efficient mesh stitching in parallel, thereby achieving complete division of the cavity body; 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 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 mesh stitching under the premise of ensuring overall mesh quality through algorithm parallel processing and 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 a flow channel of a reactor unit assembly specifically includes the following contents:

[0008] S1. Design of point adding processing algorithm based on cavity front face grouping: for the existing cavity area, general point adding attempt is made; the center of gravity of the faces contained in the cavity is calculated, the average value of the center of gravity is taken as the cavity point adding position, and the added points and the faces contained in the cavity are used to generate a tetrahedron;

[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 tetrahedron that collides, retain the added points in the cavity and generate tetrahedrons with the generated new frontier surface;

[0010] S3. Design of cavity segmentation algorithm based on the shortest path problem: reclassify the cavity according to its shape to determine the processing method; connect a loop in the cavity to be segmented, generate triangular faces with the edges on the loop to segment the cavity into two sub-cavities, and record the faces contained in the two sub-cavities respectively;

[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 frontier surface and associated tetrahedron: In parallel, find the surface contained only by a single tetrahedron as the frontier surface, record the tetrahedron as the associated tetrahedron, and add the inner wall surface and the upper and lower bottom surfaces of the ungenerated tetrahedron to the frontier surface;

[0014] S1.2, cavity grouping and sorting: group the cavities, find the common edge faces and record the group numbers. If there are multiple groups of numbers, merge them. After grouping, sort the front triangles according to the connection relationship and find the associated tetrahedrons in parallel.

[0015] S1.3, point addition and connection: add points to each group of cavities and calculate the mass of the tetrahedron; the point addition position is the center of the cavity, which is determined by calculating the average value of the centroid coordinates of all frontier surfaces; the ID number of the added point is the sum of the maximum number of points and the ID number of the cavity; connect the generated point with 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 edge for segmentation optimization.

[0017] Preferably, 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 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, the particle swarm algorithm is used to optimize the point position, the number of collision tetrahedrons after each optimization is calculated, and the point position is taken 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, the minimum distance from the cavity midpoint to the front surface is taken as the velocity boundary value, and the position constraint range is a cube with a side length of 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 the 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 the 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 calculate the fitness value again; 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 value of the 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 to the position to get the updated particle position x i1 ;

[0028] S2.3. Delete the associated tetrahedrons that collide: expand the cavity and delete the associated tetrahedrons that collide; sort the cavity faces, find the 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 with the newly generated front face to generate a tetrahedron, check the collision between the new tetrahedron and other tetrahedrons in the cavity, if there is still a collision, enter S3;

[0030] S2.5, Modify 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, 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, and other cavities are filled. The inner wall surfaces in 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 midpoint of the cavity in 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;

[0035] S3.3, obtain the shortest path: convert the edge sequence sorted by the 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 uses a nested dictionary to store the end point and edge length, where the edge length is the index value in the edge sequence plus one;

[0036] Using the undirected graph dictionary and the starting point, the breadth-first algorithm is used to obtain the shortest path dictionary and the shortest distance dictionary; the priority queue heapq is used to solve the shortest path problem, and the priority queue heapq is automatically sorted after adding elements and pops 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 to find the node connected to it, and the other nodes are automatically sorted in the queue, and the queue will pop out the shortest path; the adjacent nodes of the previously selected path endpoints are put in again to prevent finding duplicate points, and the points that have been found are recorded; the above process is repeated until the complete path is obtained; after obtaining the shortest path and shortest distance dictionary, the edge corresponding to the shortest path is found according to the end point and the path, the edge is connected into a triangular face, and the original cavity is separated 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 according to 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, 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 through common edge judgment.

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

[0040] S4.1. Generate tetrahedrons from the outside to the inside of each cavity: the frontier faces except the bottom face are used as the initial frontier queue, and advance from the outermost layer to the center of the cavity; select the points with the highest quality of the generated tetrahedron from the points on the bottom face as the vertices, and generate tetrahedrons layer by layer; after each layer is generated, detect the collision of tetrahedrons. If there is a collision, delete the collision tetrahedron and replace the bottom face vertices to regenerate, record a failure, and if the number of failures exceeds the set number, it means that there is a cavity area, and enter S4.2 for further processing;

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

[0042] S4.3, correct tetrahedron list: replace the incorrectly generated tetrahedron with the filling tetrahedron and the newly generated tetrahedron;

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

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

[0045] (1) Reducing the cost of 3D mesh generation: The present invention solves the problem that 3D mesh generation requires huge costs and repeated attempts, and achieves high-quality mesh stitching of the cavity area at the 3D mesh level. The present invention can be used together with the mesh generation algorithm to greatly improve the success rate and efficiency of mesh division. Compared with a single mesh generation algorithm that requires repeated attempts, the time required for mesh division is significantly reduced.

[0046] (2) Applicable to various cavity areas: The present invention solves the problem that a single method cannot be applied to cavity areas in different situations. The present invention classifies the causes and different shapes of cavity areas and develops a set of classification and processing methods that are generally applicable to all cavities, ensuring that the grid cavity area is effectively resolved after running the stitching algorithm.

[0047] (3) Faster running speed: The algorithm of the present invention realizes parallelization, which enables the program to obtain the final result faster and solves the problem of long running time. In addition, the algorithm of the present invention 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 stitching algorithms for components of mismatched surface meshes, which solves the problem of mismatch between the upper and lower bottom surfaces of unitized components that occurred in the previous complex core structure mesh division, and fills the gap in mesh stitching technology at the three-dimensional mesh level. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0050] Figure 2 This is a flow chart for implementing the parallel point adding processing algorithm based on cavity front surface grouping mentioned in Example 1 of the present invention;

[0051] Figure 3 This is a flow chart 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 flow chart 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 5Schematic diagram of the structure of the grid near the wire winding on the bottom surface of the generating section mentioned in Example 1 of the present invention, wherein the grid units near the wire winding are denser and smaller in size, so that the grid can be closer to the geometric shape of the flow channel near the wire winding, but if the cavity includes a larger triangle next to the wire winding, the cavity will be too long;

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

[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 described clearly and completely 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] Embodiment 1:

[0058] See also Figure 1 The present invention proposes a parallel finite element mesh stitching method for flow channels of reactor unit assemblies, which 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 algorithm, shortest path problem, and advancing wavefront method, and achieves high-efficiency stitching of large-scale grids while ensuring the overall grid quality through parallel processing of the algorithm and tetrahedron quality detection optimization algorithm. The method proposed by the present invention is further described below in conjunction with specific drawings, including the following contents:

[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 is carried out in sequence according to the four modules, such as Figure 1 shown.

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

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

[0062] (1) Find the frontier surface and associated tetrahedron: In parallel, find the surface that is only contained by a single tetrahedron as the frontier surface, record the tetrahedron as the associated tetrahedron, and add the inner wall surface and upper and lower bottom surfaces of the ungenerated tetrahedron to the frontier surface. The parallel operation uses the multiprocessing package in Python to realize the parallel operation of processes, and uses the Manager module to share data between processes. By creating a Process object and passing the required parameters into the args parameter, the start() method is called to generate the process, and the join() method is used to join the process queue for operation.

[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 front triangles according to the connection relationship 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 location of the added point is the center of the cavity, which is determined by calculating the average of the centroid coordinates of all frontier surfaces. The ID number of the added point is the sum of the maximum number of points and the ID number of the cavity. Connect the generated point to each frontier surface of the cavity to generate a tetrahedron.

[0065] (4) Tetrahedron quality calculation: For tetrahedrons with lower quality, point segmentation is performed on the longest edge 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, and 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 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 generated tetrahedrons. Therefore, after the cavity marked as 1 has processed the collision of the associated tetrahedron, the remaining collisions are all collisions between generated tetrahedrons.

[0068] (2) Particle swarm optimization: For the cavity marked as 1, use the particle swarm algorithm to optimize the point position, calculate the number of collision tetrahedrons after each optimization, and solve the point position 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 front 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 front surface and the remaining tetrahedrons, and uses weights to adjust the importance of the two types of collisions. Compare and update the global and local optimal solutions, substitute the optimal solution into the core formula to update the random point position, and calculate the fitness value again. After the collision is resolved or the number of iterations is reached, record the position of the optimized point and the generated tetrahedron.

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

[0070] (4) Generate tetrahedron: Add points and connect them to the newly generated front face 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 resolve 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 on 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 to use the segmentation method, so it is necessary to classify the shape and size of the cavity, segment and add points to longer cavities, and fill other cavities. Filter out the inner wall surfaces in the cavity and 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 point 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 segmented, find several triangles closest to the midpoint of the cavity on the upper and lower bottom surfaces and the front surface, 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 the distance to the midpoint of the cavity into a path dictionary of an undirected graph. 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. Take the root node out and find the node connected to it. Put other nodes into the queue and automatically sort them. The queue will pop out the shortest path. Put the adjacent nodes of the previously selected path endpoints again to prevent finding duplicate points and record the points that have been found. Repeat the above process until the complete path is obtained. After obtaining the shortest path and shortest distance dictionary, find the edge corresponding to the shortest path according to 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 according to 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 through common edge judgment.

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

[0080] (1) Each cavity generates tetrahedrons from the outside to the inside: the frontier faces except the bottom face are used as the initial frontier queue, and they are advanced from the outermost layer to the center of the cavity. The points with the highest quality of the generated tetrahedron are selected from the points on the bottom face as vertices, and tetrahedrons are generated layer by layer. After each layer is generated, tetrahedron collision is detected. If there is a collision, the collision tetrahedron is deleted and the bottom face vertices are 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 points again to connect the front surface queue and the unused bottom surface to generate a tetrahedron.

[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 tetrahedron is optimized. If it does not meet the quality requirements, the segmentation optimization is continued. Finally, all cavities are stitched, the tetrahedrons do not collide and the quality is good, and the tetrahedron list is saved.

[0084] The above is only a preferred specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. The parallelized three-dimensional grid 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 protection scope of the present invention. It should be pointed out that the above is a preferred implementation of the present invention. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be considered to be within the protection scope of the present invention.

Claims

1. A parallel finite element mesh stitching method for flow channels of a reactor unit assembly, characterized in that: Specifically include the following: S1. Design of point adding processing algorithm based on cavity front face grouping: for the existing cavity area, general point adding attempt is made; the center of gravity of the faces contained in the cavity is calculated, the average value of the center of gravity is taken as the cavity point adding position, and the added points and the faces contained in the cavity are used to generate a tetrahedron; 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 tetrahedron that collides, retain the added points in the cavity and generate tetrahedrons with the generated new frontier surface; S3. Design of cavity segmentation algorithm based on the shortest path problem: reclassify the cavity according to its shape to determine the processing method; connect a loop in the cavity to be segmented, generate triangular faces with the edges on the loop to segment the cavity into two sub-cavities, and record the faces contained in the two sub-cavities respectively; 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. A parallelized finite element mesh stitching method for flow channels of a reactor unit assembly according to claim 1, characterized in that: The S1 specifically includes the following contents: S1.

1. Finding the frontier surface and associated tetrahedron: In parallel, find the surface contained only by a single tetrahedron as the frontier surface, record the tetrahedron as the associated tetrahedron, and add the inner wall surface and the upper and lower bottom surfaces of the ungenerated tetrahedron to the frontier surface; S1.2, cavity grouping and sorting: group the cavities, find the common edge faces and record the group numbers. If there are multiple groups of numbers, merge them. After grouping, sort the front triangles according to the connection relationship and find the associated tetrahedrons in parallel. S1.3, point addition and connection: add points to each group of cavities and calculate the mass of the tetrahedron; the point addition position is the center of the cavity, which is determined by calculating the average value of the centroid coordinates of all frontier surfaces; the ID number of the added point is the sum of the maximum number of points and the ID number of the cavity; connect the generated point with each frontier surface of the cavity to generate a tetrahedron; S1.

4. Tetrahedron quality calculation: For tetrahedrons with lower quality, add points to the longest edge for segmentation optimization.

3. A parallelized finite element mesh stitching method for flow channels of a reactor unit assembly according to claim 2, 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 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, the particle swarm algorithm is used to optimize the point position, and the number of collision tetrahedrons after each optimization is calculated. The position of the point is taken as a multivariate function problem and is solved by the particle swarm algorithm; the number of particle swarm variables is set to 3, and the minimum distance from the cavity midpoint to the front 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 tetrahedron generated by the random point and the front surface and the remaining tetrahedrons, and the weight is used to adjust the importance of the two collisions described in S2.1: score=w1×num1+w2×num2 (1) Formula (1) is the fitness function, where num1 represents the number of collisions between the 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 the random point and the tetrahedron generated by the front surface; w2 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 calculate the fitness value again; 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 +c1×rand( )×(pbest i -x i )+c2×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 the 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 v calculated by formula (2) i1 >V max , then v i1 =V max ; rand() is a random number between (0,1); x i represents 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 to the position to get the updated particle position x i1 ; S2.

3. Delete the associated tetrahedrons that collide: expand the cavity and delete the associated tetrahedrons that collide; sort the cavity faces, find the 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 with the newly generated front face to generate a tetrahedron, check the collision between the new tetrahedron and other tetrahedrons in the cavity, if there is still a collision, enter S3; S2.5, Modify 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.

4. A parallelized finite element mesh stitching method for flow channels of a reactor unit assembly according to claim 3, 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, and other cavities are filled. The inner wall surfaces in 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 midpoint of the cavity in 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; S3.3, obtain the shortest path: convert the edge sequence sorted by the 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 uses a nested dictionary to store the end point and edge length, where the edge length is the index value in the edge sequence plus one; Using the undirected graph dictionary and the starting point, the breadth-first algorithm is used to obtain the shortest path dictionary and the shortest distance dictionary; the priority queue heapq is used to solve the shortest path problem, and the priority queue heapq is automatically sorted after adding elements and pops 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 to find the node connected to it, and the other nodes are automatically sorted in the queue, and the queue will pop out the shortest path; the adjacent nodes of the previously selected path endpoints are put in again to prevent finding duplicate points, and the points that have been found are recorded; the above process is repeated until the complete path is obtained; after obtaining the shortest path and shortest distance dictionary, the edge corresponding to the shortest path is found according to the end point and the path, the edge is connected into a triangular face, and the original cavity is separated 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 according to the vertex pairs and record them in the two sub-cavities; S3.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 through common edge judgment.

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

1. Generate tetrahedrons from the outside to the inside of each cavity: the frontier faces except the bottom face are used as the initial frontier queue, and advance from the outermost layer to the center of the cavity; select the points with the highest quality of the generated tetrahedron from the points on the bottom face as the vertices, and generate tetrahedrons layer by layer; after each layer is generated, detect the collision of tetrahedrons. If there is a collision, delete the collision tetrahedron and replace the bottom face vertices to regenerate, record a failure, and if the number of failures exceeds the set number, it means that there is a cavity area, and enter S4.2 for further processing; S4.2, point addition and stitching: for the cavity area that still exists after filling with the advancing wavefront method, point it again, connect the front face queue and the unused bottom face to generate a tetrahedron; S4.3, correct tetrahedron list: replace the incorrectly generated tetrahedron with the filling tetrahedron and the newly generated tetrahedron; S4.

4. Tetrahedron quality calculation: Perform quality optimization on the replaced tetrahedrons. If they do not meet the quality requirements, continue to perform segmentation optimization. Finally, all cavities are stitched together, tetrahedrons do not collide and have good quality, and the tetrahedron list is saved.

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

  • Method for generating a three-dimensional, locally-unstructured hybrid grid for sloping faults

    US5740342A