A parallel simulation method, device and equipment for a forging process and a medium
By evaluating node weights and decomposing the domain in the finite element mesh model during forging process simulation, and combining MPI and OpenMP technologies, the problem of unbalanced computational load in forging process simulation was solved, achieving efficient dynamic load balancing and accurate task scheduling, thus improving simulation efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 深圳十沣科技有限公司
- Filing Date
- 2026-04-20
- Publication Date
- 2026-07-10
AI Technical Summary
Traditional parallel simulation methods for forging processes suffer from unbalanced computational loads when dealing with large deformations, nonlinear material behavior, and complex contact boundary conditions, leading to wasted processor resources and low simulation efficiency. Existing research on dynamic load balancing in general fields has failed to effectively balance the unique physical characteristics of forging processes with numerical calculation modes.
By weighting the node states of the finite element mesh model during the forging process simulation, performing domain decomposition based on the weight values, and implementing dynamic load balancing under multi-process conditions, combined with MPI and OpenMP technologies to accelerate stiffness matrix calculation, dynamic load balancing and efficient task scheduling in the simulation process are achieved.
It achieves balanced distribution of dynamic load during forging process simulation, improves computational efficiency and simulation accuracy, and breaks through the computational bottleneck of large-scale high-precision forging simulation.
Smart Images

Figure CN122065612B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of simulation technology, and in particular to a parallel simulation method, apparatus, equipment and medium for forging processes. Background Technology
[0002] With the increasing demands for precision and performance in complex forgings in the high-end equipment manufacturing sector, digital simulation of forging processes has become an indispensable key means to optimize process parameters, predict forming defects, and shorten the R&D cycle. Traditional serial simulation methods are often computationally intensive and time-consuming when dealing with forging processes involving large deformations, nonlinear material behavior, and complex contact boundary conditions, making it difficult to meet the urgent needs of modern industry for design efficiency.
[0003] Currently, in existing parallel simulation practices for forging, static load distribution strategies based on initial meshes or fixed region partitioning are commonly used. Due to the drastic changes in workpiece geometry, concentrated local material flow, and frequent changes in contact states during forging, significant and unpredictable dynamic differences arise in the number of elements, contact computation, and nonlinear iterative convergence steps within each computational subdomain. This imbalance in computational load, under static task partitioning, causes some processors to become idle prematurely while others remain continuously busy, resulting in severe processor waiting and a sharp decline in parallel efficiency as the number of processor cores increases. Although some research on dynamic load balancing in general domains has been conducted, it often lacks in-depth consideration of the unique physical characteristics and numerical computation patterns of forging process simulation. For example, its balancing strategies struggle to effectively balance the accurate prediction of computational load, the communication overhead caused by frequent data redistribution, and the stability of simulation numerical values. Therefore, improving the dynamic load balancing of forging process simulation has become a significant technical challenge. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a parallel simulation method, device, equipment and medium for forging process. After meshing, the node state in the current mesh is processed to obtain weight values. Based on the weight values, the region is decomposed to achieve dynamic load balancing in the entire forging simulation iteration process, so as to adapt to the dynamic simulation characteristics of forging process and achieve accurate and efficient task scheduling.
[0005] This application provides a parallel simulation method for forging processes, the parallel simulation method including:
[0006] The geometric model required for forging process simulation is spatially discretized to generate a finite element mesh model, and boundary conditions are set for the finite element mesh model.
[0007] Based on the finite element mesh information of each workpiece in the finite element mesh model, the set of degrees of freedom and contact state of each finite element node in the current simulation analysis step are determined, and the weight of each finite element node is determined based on the set of degrees of freedom and contact state of each finite element node.
[0008] Based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model, the finite element mesh model is decomposed into multiple computational regions.
[0009] In a multi-process approach, the stiffness matrix is calculated and assembled simultaneously for each computational region. The forging process simulation is divided into multiple load steps for sequential loading. After the load step iterative convergence, a dynamic load balancing operation is performed.
[0010] After all computational domains have completed their respective iterative calculations, the main process collects the finite element node velocities and state variables at the integration points within each computational domain, and outputs the simulation results after interpolation and smoothing.
[0011] In one possible implementation, determining the set of degrees of freedom and contact state of each finite element node in the current simulation analysis step based on the finite element mesh information of each workpiece in the finite element mesh model includes:
[0012] For finite element mesh information of element type, if the finite element node is a tetrahedral element, it has velocity and pressure degrees of freedom; if the finite element node is a hexahedral element, it has velocity degrees of freedom.
[0013] For finite element mesh information as the analysis type, the temperature degree of freedom is not activated for finite element nodes in nonlinear static analysis without thermo-mechanical coupling, the temperature degree of freedom is activated for finite element nodes in thermo-mechanical coupling analysis, and only the temperature degree of freedom is activated for finite element nodes in pure thermal analysis, while the velocity and pressure degrees of freedom are not activated.
[0014] Contact detection is performed on the contact pairs between any two workpiece finite element nodes, and the finite element nodes in contact state are marked.
[0015] In one possible implementation, the weight of each finite element node is determined by the following formula:
[0016] ;
[0017] in, For the first i The weight of each finite element node, For temperature degrees of freedom, For velocity degree of freedom, For pressure degrees of freedom, This indicates the degree of freedom of whether or not contact is made. , , and These represent the weight coefficients corresponding to the degrees of freedom.
[0018] In one possible implementation, the process of performing region decomposition on the finite element mesh model based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model to determine multiple computational regions includes:
[0019] The weights of each finite element node are normalized to determine the weight vector;
[0020] Based on the hardware conditions and the number of regions specified by the user, the mesh topology and weight vector are input into the region decomposition program to perform region decomposition processing on the finite element mesh model and determine multiple computational regions.
[0021] In one possible implementation, the simultaneous calculation and assembly of the stiffness matrix for each computational region under a multi-process approach includes:
[0022] In each process, if the number of threads exceeds the threshold, a graph coloring algorithm is used to color the local mesh in the current process to ensure that all cells with the same color in the mesh do not share the topology.
[0023] The process iterates through different colors and uses OpenMP technology to calculate and assemble the stiffness matrix within the same color.
[0024] In one possible implementation, load step iteration convergence is determined by the following method:
[0025] When using the Newton iterative method, the tangent stiffness matrix and the right-hand side of the residual are determined in each iteration step, and a parallel sparse matrix solver is used to solve the problem and determine the corresponding solution for the computational domain of each process.
[0026] The corresponding solutions of each process's computation region are merged into the main process for residual convergence determination.
[0027] In one possible implementation, the step of performing dynamic load balancing after the load step iteration converges includes:
[0028] Update the velocity of each finite element node and the state variables at the integration points within the element in the computational region to determine the updated finite element mesh model;
[0029] The mesh quality of the updated finite element mesh model is determined. If the mesh quality is less than a preset threshold, the updated finite element mesh model is re-decomposed into regions. If the mesh quality is greater than or equal to the preset threshold, the loading of the next load step continues.
[0030] This application also provides a parallel simulation device for forging processes, the parallel simulation device comprising:
[0031] The mesh generation module is used to spatially discretize the geometric model required for forging process simulation, generate a finite element mesh model, and set boundary conditions for the finite element mesh model.
[0032] The weight allocation module is used to determine the set of degrees of freedom and contact state of each finite element node in the current simulation analysis step based on the finite element mesh information of each workpiece in the finite element mesh model, and to determine the weight of each finite element node based on the set of degrees of freedom and contact state of each finite element node.
[0033] The region decomposition module is used to perform region decomposition processing on the finite element mesh model based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model, thereby determining multiple computational regions.
[0034] The parallel computing module is used to simultaneously calculate and assemble the stiffness matrix for each computing region under a multi-process approach. It divides the forging process simulation into multiple load steps for sequential loading, and performs dynamic load balancing operation after the load step iterative convergence.
[0035] The output module is used to collect the finite element node velocities and state variables at the integration points within each element in each computational region after all computational regions have completed their respective iterative calculations. After interpolation and smoothing, the simulation results are output.
[0036] This application also provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the parallel simulation method for forging processes described above are performed.
[0037] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the parallel simulation method for forging processes described above.
[0038] This application provides a parallel simulation method, apparatus, equipment, and medium for forging processes. The parallel simulation method includes: spatially discretizing the geometric model required for forging process simulation to generate a finite element mesh model, and setting boundary conditions for the finite element mesh model; determining the set of degrees of freedom and contact state of each finite element node in the current simulation analysis step based on the finite element mesh information of each workpiece in the finite element mesh model, and determining the weight of each finite element node based on the set of degrees of freedom and contact state of each finite element node; performing region decomposition processing on the finite element mesh model based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model to determine multiple computational regions; simultaneously calculating and assembling the stiffness matrix for each computational region under multi-process conditions, dividing the forging process simulation process into multiple load steps for sequential loading, and performing dynamic load balancing operation after the load step iteration converges; after all computational regions have completed their respective iterative calculations, the main process collects the velocities of finite element nodes and the state variables at the integration points within the elements in each computational region, and outputs the simulation results after interpolation and smoothing processing. After meshing, the node states in the current mesh are processed to obtain weight values. Based on the weight values, the region is decomposed to achieve dynamic load balancing in the entire forging simulation iteration process, enabling it to adapt to the dynamic simulation characteristics of the forging process and achieve precise and efficient task scheduling.
[0039] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A flowchart illustrating a parallel simulation method for forging processes provided in this application embodiment;
[0042] Figure 2 A schematic diagram illustrating a parallel simulation method for forging processes provided in an embodiment of this application;
[0043] Figure 3 A schematic diagram of the structure of a parallel simulation device for forging processes provided in an embodiment of this application;
[0044] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.
[0046] First, the applicable application scenarios of this application will be introduced. This application can be applied to the field of simulation technology.
[0047] Research has revealed that while some studies on dynamic load balancing in general fields exist, they often lack in-depth consideration of the unique physical characteristics and numerical computation modes specific to forging process simulation. For example, their balancing strategies struggle to effectively balance the accurate prediction of computational load, the communication overhead caused by frequent data redistribution, and the stability of simulation numerical values. Therefore, improving the dynamic load balancing of forging process simulation has become a significant technical challenge.
[0048] Based on this, this application provides a parallel simulation method for forging processes. After meshing, the node states in the current mesh are processed to obtain weight values. Based on the weight values, the region is decomposed to achieve dynamic load balancing in the entire forging simulation iteration process, enabling it to adapt to the dynamic simulation characteristics of forging processes and achieve precise and efficient task scheduling.
[0049] Please see Figure 1 , Figure 1 This is a flowchart illustrating a parallel simulation method for forging processes provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the parallel simulation method includes:
[0050] S101: Spatial discretization is performed on the geometric model required for forging process simulation to generate a finite element mesh model, and boundary conditions are set on the finite element mesh model.
[0051] In this step, a thermo-mechanical coupled geometric model (including but not limited to billet, upper and lower dies, etc.) is established for the simulation of the forging process. The geometric model to be analyzed is spatially discretized, that is, a finite element mesh is generated to calculate the finite element mesh model.
[0052] It should be noted that boundary conditions (including mold velocity and constraints, billet constraints, contact pairs and friction coefficients between the mold and the billet, and material constitutive parameters and thermophysical parameters of the mold and the billet, etc.) are set for the generated finite element mesh model.
[0053] In specific embodiments, depending on the specific forging process simulation, the billet and die are divided into different finite element meshes. For example, in isothermal forging processes considering only nonlinear static analysis, the billet is generally divided into tetrahedral meshes, and the die is directly divided into triangular facet meshes. In free forging processes considering thermo-mechanical coupling but with simple contact relationships, both the billet and die are generally divided into hexahedral meshes. In hot die forging processes considering thermo-mechanical coupling but with complex contact relationships, both the billet and die are generally divided into tetrahedral meshes. The above mesh division selections for forging processes are only examples and do not represent the mandatory use of such mesh divisions in the simulation process.
[0054] Here, setting boundary conditions for the finite element mesh model includes setting the die velocity (translational and rotational velocities) and constraints, setting billet constraints, and setting the contact pair and friction coefficient between the die and the billet. Generally, shear friction corrected by the arctangent function is used to avoid contact convergence difficulties. The material constitutive parameters and thermophysical parameters of the die and billet are set according to the corresponding forging process. The die generally adopts a von Mises elastoplastic constitutive model, while the billet generally adopts a power-law hardened rigid-plastic constitutive model.
[0055] S102: Based on the finite element mesh information of each workpiece in the finite element mesh model, determine the set of degrees of freedom and contact state of each finite element node in the current simulation analysis step, and determine the weight of each finite element node based on the set of degrees of freedom and contact state of each finite element node.
[0056] In this step, the finite element mesh information of each workpiece in the current model is read, and the degrees of freedom of the corresponding finite element mesh nodes for each workpiece are counted to see if they are activated in the current analysis (including temperature, velocity, and pressure degrees of freedom). Contact detection is performed on the contact pairs between workpieces, and nodes in contact are marked. The weight of each finite element node is determined based on the set of degrees of freedom of each finite element node and the contact state.
[0057] In one possible implementation, determining the set of degrees of freedom and contact state of each finite element node in the current simulation analysis step based on the finite element mesh information of each workpiece in the finite element mesh model includes:
[0058] For finite element mesh information of element type, if the finite element node is a tetrahedral element, it has velocity and pressure degrees of freedom; if the finite element node is a hexahedral element, it has velocity degree of freedom. For finite element mesh information of analysis type, for finite element nodes in nonlinear static analysis without thermo-structure coupling, the temperature degree of freedom is not activated; for finite element nodes in thermo-structure coupling analysis, the temperature degree of freedom is activated; for finite element nodes in pure thermal analysis, only the temperature degree of freedom is activated, and the velocity and pressure degrees of freedom are not activated. Contact detection is performed on the contact pairs between finite element nodes of any two workpieces, and the finite element nodes in the contact state are marked.
[0059] Here, based on the multiphysics problem solved by the current simulated forging process, it is determined whether the degrees of freedom of the finite element mesh nodes corresponding to each workpiece are activated, and a hash table mapping relationship between nodes and elements is constructed to facilitate rapid contact detection between the workpiece and the billet. According to element type, tetrahedral elements have velocity and pressure degrees of freedom, while hexahedral elements only have velocity degrees of freedom. According to analysis type, for nonlinear static analyses without thermo-mechanical coupling (such as isothermal forging), the temperature degree of freedom is not activated; for thermo-mechanical coupled analyses (such as free forging and hot die forging), the temperature degree of freedom is activated. For purely thermal analyses (the pressure holding and heat dissipation process after forging), only the temperature degree of freedom is activated, and the velocity and pressure degrees of freedom are not activated. For billet and die nodes in contact, the contact degree of freedom is activated.
[0060] In one possible implementation, the weight of each finite element node is determined by the following formula:
[0061] ;
[0062] in, For the first i The weight of each finite element node, For temperature degrees of freedom, For velocity degree of freedom, For pressure degrees of freedom, This indicates the degree of freedom of whether or not contact is made. , , and These represent the weight coefficients corresponding to the degrees of freedom.
[0063] It should be noted that, , , and The values can be given empirically, or determined using the following method: Let the time for calculating and assembling the temperature stiffness matrix, velocity stiffness matrix, pressure-velocity coupling stiffness matrix, and friction stiffness matrix of all elements in each iteration step during serial calculation be respectively... , , and Then we have:
[0064]
[0065]
[0066]
[0067]
[0068] S103: Based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model, perform region decomposition processing on the finite element mesh model to determine multiple computational regions.
[0069] In this step, the finite element mesh model is decomposed into multiple computational regions based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model.
[0070] In one possible implementation, the process of performing region decomposition on the finite element mesh model based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model to determine multiple computational regions includes:
[0071] The weights of each finite element node are normalized to determine the weight vector. Based on the hardware conditions and the number of regions specified by the user, the mesh topology and weight vector are input into the region decomposition program to perform region decomposition on the finite element mesh model and determine multiple computational regions.
[0072] Here, the obtained node weights are normalized to obtain the input weight vector W for domain decomposition. Then, based on hardware conditions and the number of regions specified by the user, the mesh topology and weight vector of the entire model are adjusted. The data is passed to the domain decomposition subroutine, which performs domain decomposition on the entire model and identifies multiple computational regions.
[0073] S104: In a multi-process environment, the stiffness matrix is calculated and assembled simultaneously for each computational region. The forging process simulation is divided into multiple load steps for sequential loading. After the load step converges iteratively, a dynamic load balancing operation is performed.
[0074] In this step, MPI (Message Passing Interface) technology is used to perform parallel computation on each computational region. OpenMP (Open Multi-Processing) technology is simultaneously used to accelerate the calculation and assembly of the stiffness matrix under multi-process conditions. The forging process simulation is a strongly nonlinear process, divided into N load steps. Each load step requires M iterations to converge. Newton's iterative method is used in each iteration step until convergence. After the load step converges, a dynamic load balancing operation is performed.
[0075] In one possible implementation, the simultaneous calculation and assembly of the stiffness matrix for each computational region under a multi-process approach includes:
[0076] A: In each process's threads, if the number of threads exceeds the threshold, a graph coloring algorithm is used to color the local mesh in the current process, ensuring that all cells with the same color within the mesh do not share the topology.
[0077] Here, before the program starts running, the number of threads is set in the configuration file using `omp_set_num_threads()`. During iterative calculations in each MPI process, each process contains not only node and element information within its own partition, but also node and element information of the interface mesh shared with other processes; these are called ghost elements and nodes. Ghost elements and nodes are responsible for inter-process communication and require deduplication during merging. Within each process's threads, if the number of threads is greater than 2, multi-threaded OpenMP technology is used to accelerate the calculation and assembly of the stiffness matrix. To avoid conflicts in the calculation and assembly of the same location in the stiffness matrix, a graph coloring algorithm is first used to color the local mesh under the current process, ensuring that all elements of the same color within the mesh do not share topology.
[0078] B: Traverse different colors, and use OpenMP technology to calculate and assemble the stiffness matrix within the same color.
[0079] Here, different colors are traversed, and OpenMP technology is used within the same color to accelerate the calculation and assembly of the stiffness matrix in parallel.
[0080] In one possible implementation, load step iteration convergence is determined by the following method:
[0081] A: When using the Newton iteration method, the tangent stiffness matrix and the right-hand side of the residual are determined in each iteration step. A parallel sparse matrix solver is then used to solve the problem and determine the corresponding solution for the computational domain of each process.
[0082] Here, in each iteration step, the tangent stiffness matrix Kt and the right-hand side term RHS of the residual are first calculated for each process, where Kt is sparsely stored in the linked list LIL format and RHS is a one-dimensional array.
[0083] Based on Markov's variational principle, for rigid-viscoplastic materials:
[0084]
[0085] in For energy functionals, For strain energy term, The term that does work for external forces.
[0086] For hexahedral elements, a rigid-plastic finite element formula is established using the penalty function method. The volume incompressibility condition is introduced into the following functional using a penalty factor K:
[0087]
[0088] in, For energy functionals, For material equivalent stress, For the material's equivalent plastic strain, As an external force, For displacement boundary conditions, For the equivalent plastic strain component, The symbol is Kronecker, and V represents the volume field. Let K be the boundary of the external force, and K be the penalty factor.
[0089] Here, after the deformable body is discretized, the energy functional is a function of the velocities at each node. The condition for the energy functional to take stationary values is:
[0090]
[0091] Where J is the node number. For nodes I The speed.
[0092] To solve the above nonlinear equations, the Newton-Raphson method is used iteratively, employing Taylor series. After expanding the term and ignoring higher-order terms (second order and above), we get:
[0093]
[0094] in, It is about speed The first-order correction makes , The above equation can be written as a standard Newton-Raphson linear equation system:
[0095]
[0096] Where F is the external force (or residual) vector, Here is the tangent stiffness matrix. The correction amount is obtained by solving the system of equations for the round of iteration.
[0097] b: Merge the corresponding solutions of each process's computation region into the main process for residual convergence determination.
[0098] Here, a parallel sparse matrix solver is used to solve the large-scale linear equation system Kt*v=RHS. After solving, each process will obtain the corresponding solution for its own partitioned grid. The MPI interface is then used to merge it into the main process for residual convergence determination.
[0099] In one possible implementation, the step of performing dynamic load balancing after the load step iteration converges includes:
[0100] (1): Update the velocity of each finite element node in the computational region and the state variables at the integration points within the element to determine the updated finite element mesh model.
[0101] Here, if the current load step iteration converges, the velocity of all nodes in the model and the state variables (plastic strain rate, stress deviator tensor and spherical tensor, equivalent plastic strain rate and cumulative equivalent plastic strain, etc.) at the integration points within the elements are updated in the main process and distributed to N child processes using the MPI_Send interface.
[0102] (2): Determine the mesh quality of the updated finite element mesh model. If the mesh quality is less than a preset threshold, re-decompose the updated finite element mesh model into regions. If the mesh quality is greater than or equal to the preset threshold, continue loading the next load step.
[0103] Here, based on the minimum mass of the updated finite element mesh model, it is determined whether it is less than a given threshold. If it is less than the given threshold, mesh remapping is initiated, and an external mesh generator is called to regenerate the finite element mesh model. Then, the weight update is repeated to re-decompose the current model into regions. Otherwise, the load step continues to be loaded until the load step is completed.
[0104] The mesh quality is determined using the following method for tetrahedrons:
[0105]
[0106] in, Let be the radius of the sphere inscribed in the tetrahedron. Let be the radius of the circumscribed sphere of the tetrahedron. The mesh quality is for the tetrahedron.
[0107] Here, the mesh quality for a hexahedron is determined in the following way. :
[0108]
[0109] in, For the hexahedral unit i Scaling ratio of Accord at each node For the hexahedral unit, the Accord ratio, , and They are nodes i The product of the magnitudes of the three adjacent edge vectors at a given point is 1 in an ideal regular hexahedron.
[0110] S105: After all computational domains have completed their respective iterative calculations, the main process collects the finite element node velocities and state variables at the integration points within each computational domain, and outputs the simulation results after interpolation and smoothing.
[0111] In this step, after the calculation of each computational domain is completed, the MPI_Gather interface is used to merge the velocity of each computational node and the state variables (plastic strain rate, stress deviator tensor and spherical tensor, equivalent plastic strain rate and cumulative equivalent plastic strain, etc.) at the integration points in each element into the main process. The main process performs extrapolation and interpolation smoothing of the integration points, converts the integration point results into the nodal results, and finally outputs the simulation results.
[0112] For further details, please refer to Figure 2 , Figure 2 This is a schematic diagram illustrating a parallel simulation method for forging processes provided in an embodiment of this application. Figure 2As shown, the steps are as follows: Step 1: Establish the geometric model required for forging process simulation; Step 2: Discretize the geometric model space according to the specific forging process; Step 3: Set boundary constraints, material constitutive models, and contact friction pairs; Step 4: Determine the degrees of freedom and contact states of the activated nodes; Step 5: Calculate the weight of each node in the current model when performing domain decomposition; Step 6: Decompose the entire model into domains, assigning the computational regions to different processes, each process containing computational region topology and communication domain information; Step 7: Simultaneously calculate and assemble the stiffness matrix for each computational region under multi-process conditions. Step 8: Each load step requires M iterations to converge. Each iteration step uses the Newton iteration method until convergence. Step 9: If the current load step converges, update the velocity of all nodes in the model and determine whether mesh re-division is needed based on mesh distortion. If mesh re-division is needed, repeat steps 4-6 to re-decompose the current model into regions. Otherwise, continue loading the load step until it is complete. Step 10: After the calculation of each partition is completed, the main process is responsible for collecting all calculation results and outputting the simulation results.
[0113] In a specific embodiment, a thermo-mechanical coupled finite element model required for forging process simulation is first established. Taking into account the total degrees of freedom (temperature, velocity, and pressure degrees of freedom) and contact state of each node in the current mesh, different weights are applied to maintain a balanced computational load for each mesh region after domain decomposition. A graph-based domain decomposition method divides the billet's finite element mesh into N computational regions. MPI (Message Passing Interface) technology is used to achieve single-machine or cluster parallel computation for each computational region. Under multi-process conditions, OpenMP (Open Multi-Processing) technology is simultaneously used to accelerate the calculation and assembly of the stiffness matrix. After mesh re-partitioning due to distortion caused by large deformation, the node states in the current mesh are re-evaluated and weighted. Domain decomposition is then performed again based on the updated weights to achieve dynamic load balancing throughout the forging process simulation. This method further unleashes the potential of high-performance parallel computing, breaking through the key technical bottlenecks of large-scale, high-precision forging simulation.
[0114] This application provides a parallel simulation method for forging processes. The parallel simulation method includes: spatial discretizing the geometric model required for forging process simulation to generate a finite element mesh model, and setting boundary conditions for the finite element mesh model; determining the set of degrees of freedom and contact state of each finite element node in the current simulation analysis step based on the finite element mesh information of each workpiece in the finite element mesh model, and determining the weight of each finite element node based on the set of degrees of freedom and contact state of each finite element node; performing region decomposition processing on the finite element mesh model based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model to determine multiple computational regions; simultaneously calculating and assembling the stiffness matrix for each computational region under multi-process conditions, dividing the forging process simulation process into multiple load steps for sequential loading, and performing dynamic load balancing operation after the load step iteration converges; after all computational regions have completed their respective iterative calculations, the main process collects the velocities of finite element nodes and the state variables at the integration points within the elements in each computational region, and outputs the simulation results after interpolation and smoothing processing. After meshing, the node states in the current mesh are processed to obtain weight values. Based on the weight values, the region is decomposed to achieve dynamic load balancing in the entire forging simulation iteration process, enabling it to adapt to the dynamic simulation characteristics of the forging process and achieve precise and efficient task scheduling.
[0115] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a parallel simulation device for forging processes provided in an embodiment of this application. Figure 3 As shown, the parallel simulation device 300 for forging processes includes:
[0116] The mesh generation module 310 is used to spatially discretize the geometric model required for forging process simulation, generate a finite element mesh model, and set boundary conditions for the finite element mesh model.
[0117] The weight allocation module 320 is used to determine the set of degrees of freedom and contact state of each finite element node in the current simulation analysis step based on the finite element mesh information of each workpiece in the finite element mesh model, and to determine the weight of each finite element node based on the set of degrees of freedom and contact state of each finite element node.
[0118] The region decomposition module 330 is used to perform region decomposition processing on the finite element mesh model based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model, and to determine multiple computational regions.
[0119] The parallel computing module 340 is used to simultaneously calculate and assemble the stiffness matrix for each computing region under a multi-process approach, divide the forging process simulation process into multiple load steps for sequential loading, and perform dynamic load balancing operation after the load step iterative convergence.
[0120] The output module 350 is used to collect the finite element node velocities and state variables at the integration points within each element in each computational region after all computational regions have completed their respective iterative calculations. After interpolation and smoothing, the simulation results are output.
[0121] Furthermore, the weight allocation module 320 is used to determine the set of degrees of freedom and contact state of the finite element nodes participating in the calculation in the current simulation analysis step based on the finite element mesh information of each workpiece in the finite element mesh model.
[0122] For finite element mesh information of element type, if the finite element node is a tetrahedral element, it has velocity and pressure degrees of freedom; if the finite element node is a hexahedral element, it has velocity degrees of freedom.
[0123] For finite element mesh information as the analysis type, the temperature degree of freedom is not activated for finite element nodes in nonlinear static analysis without thermo-mechanical coupling, the temperature degree of freedom is activated for finite element nodes in thermo-mechanical coupling analysis, and only the temperature degree of freedom is activated for finite element nodes in pure thermal analysis, while the velocity and pressure degrees of freedom are not activated.
[0124] Contact detection is performed on the contact pairs between any two workpiece finite element nodes, and the finite element nodes in contact state are marked.
[0125] Furthermore, the weight allocation module 320 determines the weight of each finite element node using the following formula:
[0126] ;
[0127] in, For the first i The weight of each finite element node, For temperature degrees of freedom, For velocity degree of freedom, For pressure degrees of freedom, This indicates the degree of freedom of whether or not contact is made. , , and These represent the weight coefficients corresponding to the degrees of freedom.
[0128] Furthermore, the region decomposition module 330 is used to perform region decomposition processing on the finite element mesh model based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model, thereby determining multiple computational regions:
[0129] The weights of each finite element node are normalized to determine the weight vector;
[0130] Based on the hardware conditions and the number of regions specified by the user, the mesh topology and weight vector are input into the region decomposition program to perform region decomposition processing on the finite element mesh model and determine multiple computational regions.
[0131] Furthermore, the parallel computing module 340 is used to simultaneously calculate and assemble the stiffness matrix for each computational region under a multi-process approach:
[0132] In each process, if the number of threads exceeds the threshold, a graph coloring algorithm is used to color the local mesh in the current process to ensure that all cells with the same color in the mesh do not share the topology.
[0133] The process iterates through different colors and uses OpenMP technology to calculate and assemble the stiffness matrix within the same color.
[0134] Furthermore, the parallel computing module 340 determines the convergence of the load step iteration in the following way:
[0135] When using the Newton iterative method, the tangent stiffness matrix and the right-hand side of the residual are determined in each iteration step, and a parallel sparse matrix solver is used to solve the problem and determine the corresponding solution for the computational domain of each process.
[0136] The corresponding solutions of each process's computation region are merged into the main process for residual convergence determination.
[0137] Furthermore, the parallel computing module 340 is used to perform dynamic load balancing operations after the load step iteration converges:
[0138] Update the velocity of each finite element node and the state variables at the integration points within the element in the computational region to determine the updated finite element mesh model;
[0139] The mesh quality of the updated finite element mesh model is determined. If the mesh quality is less than a preset threshold, the updated finite element mesh model is re-decomposed into regions. If the mesh quality is greater than or equal to the preset threshold, the loading of the next load step continues.
[0140] This application provides a parallel simulation device for forging processes, comprising: a mesh generation module for spatially discretizing the geometric model required for forging process simulation, generating a finite element mesh model, and setting boundary conditions for the finite element mesh model; a weight allocation module for determining the set of degrees of freedom and contact state of each finite element node in the current simulation analysis step based on the finite element mesh information of each workpiece in the finite element mesh model, and determining the weight of each finite element node based on the set of degrees of freedom and contact state of each finite element node; and a domain decomposition module for decomposing the domain based on the set of degrees of freedom and contact state of each finite element node. The weights of the finite element nodes, the number of regions, and the topology of the finite element mesh model are used to perform region decomposition processing on the finite element mesh model to determine multiple computational regions. A parallel computing module is used to simultaneously calculate and assemble the stiffness matrix for each computational region under multi-process conditions, dividing the forging process simulation into multiple load steps for sequential loading. Dynamic load balancing is performed after the load step iteration converges. An output module is used to collect the finite element node velocities and state variables at the integration points within each computational region after all computational regions have completed their respective iterative calculations. The simulation results are then output after interpolation and smoothing. After mesh generation, the node states in the current mesh are processed to obtain weight values. Region decomposition is performed based on these weight values to achieve dynamic load balancing throughout the entire forging simulation iteration process, enabling it to adapt to the dynamic simulation characteristics of the forging process and achieve precise and efficient task scheduling.
[0141] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 400 includes a processor 410, a memory 420, and a bus 430.
[0142] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, they can perform the operations described above. Figure 1 as well as Figure 2 The steps of the parallel simulation method for forging process shown in the method embodiment can be found in the method embodiment for specific implementation, and will not be repeated here.
[0143] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 as well as Figure 2The steps of the parallel simulation method for forging process shown in the method embodiment can be found in the method embodiment for specific implementation, and will not be repeated here.
[0144] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0145] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0146] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0147] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0148] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0149] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A parallel simulation method for forging processes, characterized in that, The parallel simulation method includes: The geometric model required for forging process simulation is spatially discretized to generate a finite element mesh model, and boundary conditions are set for the finite element mesh model. Based on the finite element mesh information of each workpiece in the finite element mesh model, the set of degrees of freedom and contact state of each finite element node in the current simulation analysis step are determined, and the weight of each finite element node is determined based on the set of degrees of freedom and contact state of each finite element node. Based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model, the finite element mesh model is decomposed into multiple computational regions. In a multi-process approach, the stiffness matrix is calculated and assembled simultaneously for each computational region. The forging process simulation is divided into multiple load steps for sequential loading. After the load step iterative convergence, a dynamic load balancing operation is performed. After all computational domains have completed their respective iterative calculations, the main process collects the finite element node velocities and state variables at the integration points within each computational domain, and outputs the simulation results after interpolation and smoothing. The weight of each finite element node is determined using the following formula: ; in, For the first i The weight of each finite element node, For temperature degrees of freedom, For velocity degree of freedom, For pressure degrees of freedom, This indicates the degree of freedom of whether or not contact is made. , , and These represent the weight coefficients corresponding to the degrees of freedom; The weighting coefficients for each degree of freedom are determined using the following method: ; ; ; ; in, The time required to calculate and assemble the temperature stiffness matrix of all elements, The time required to calculate and assemble the velocity stiffness matrix of all elements, To calculate and assemble the pressure-velocity coupled stiffness matrix of all elements, The time required to calculate and assemble the friction stiffness matrix of all elements.
2. The parallel simulation method according to claim 1, characterized in that, Based on the finite element mesh information of each workpiece in the finite element mesh model, the set of degrees of freedom and contact state of each finite element node participating in the calculation in the current simulation analysis step are determined, including: For finite element mesh information of element type, if the finite element node is a tetrahedral element, it has velocity and pressure degrees of freedom; if the finite element node is a hexahedral element, it has velocity degrees of freedom. For finite element mesh information as the analysis type, the temperature degree of freedom is not activated for finite element nodes in nonlinear static analysis without thermo-mechanical coupling, the temperature degree of freedom is activated for finite element nodes in thermo-mechanical coupling analysis, and only the temperature degree of freedom is activated for finite element nodes in pure thermal analysis, while the velocity and pressure degrees of freedom are not activated. Contact detection is performed on the contact pairs between any two workpiece finite element nodes, and the finite element nodes in contact state are marked.
3. The parallel simulation method according to claim 1, characterized in that, The finite element mesh model is decomposed based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model to determine multiple computational regions, including: The weights of each finite element node are normalized to determine the weight vector; Based on the hardware conditions and the number of regions specified by the user, the mesh topology and weight vector are input into the region decomposition program to perform region decomposition processing on the finite element mesh model and determine multiple computational regions.
4. The parallel simulation method according to claim 1, characterized in that, The simultaneous calculation and assembly of the stiffness matrix for each computational region under a multi-process approach includes: In each process, if the number of threads exceeds the threshold, a graph coloring algorithm is used to color the local mesh in the current process to ensure that all cells with the same color in the mesh do not share the topology. The process iterates through different colors and uses OpenMP technology to calculate and assemble the stiffness matrix within the same color.
5. The parallel simulation method according to claim 1, characterized in that, The convergence of the load step iteration is determined in the following way: When using the Newton iterative method, the tangent stiffness matrix and the right-hand side of the residual are determined in each iteration step, and a parallel sparse matrix solver is used to solve the problem and determine the corresponding solution for the computational domain of each process. The corresponding solutions of each process's computation region are merged into the main process for residual convergence determination.
6. The parallel simulation method according to claim 1, characterized in that, The dynamic load balancing operation performed after the load step iteration converges includes: Update the velocity of each finite element node and the state variables at the integration points within the element in the computational region to determine the updated finite element mesh model; The mesh quality of the updated finite element mesh model is determined. If the mesh quality is less than a preset threshold, the updated finite element mesh model is re-decomposed into regions. If the mesh quality is greater than or equal to the preset threshold, the loading of the next load step continues.
7. A parallel simulation device for forging processes, characterized in that, The parallel simulation device includes: The mesh generation module is used to spatially discretize the geometric model required for forging process simulation, generate a finite element mesh model, and set boundary conditions for the finite element mesh model. The weight allocation module is used to determine the set of degrees of freedom and contact state of each finite element node in the current simulation analysis step based on the finite element mesh information of each workpiece in the finite element mesh model, and to determine the weight of each finite element node based on the set of degrees of freedom and contact state of each finite element node. The region decomposition module is used to perform region decomposition processing on the finite element mesh model based on the weight of each finite element node, the number of regions, and the topology of the finite element mesh model, thereby determining multiple computational regions. The parallel computing module is used to simultaneously calculate and assemble the stiffness matrix for each computing region under a multi-process approach. It divides the forging process simulation into multiple load steps for sequential loading, and performs dynamic load balancing operation after the load step iterative convergence. The output module is used to collect the finite element node velocities and state variables at the integration points within the elements in each computational region after all computational regions have completed their respective iterative calculations. After interpolation and smoothing, the simulation results are output. The weight allocation module determines the weight of each finite element node using the following formula: ; in, For the first i The weight of each finite element node, For temperature degrees of freedom, For velocity degree of freedom, For pressure degrees of freedom, This indicates the degree of freedom of whether or not contact is made. , , and These represent the weight coefficients corresponding to the degrees of freedom; The weighting coefficients for each degree of freedom are determined using the following method: ; ; ; ; in, The time required to calculate and assemble the temperature stiffness matrix of all elements, The time required to calculate and assemble the velocity stiffness matrix of all elements, To calculate and assemble the pressure-velocity coupled stiffness matrix of all elements, The time required to calculate and assemble the friction stiffness matrix of all elements.
8. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the parallel simulation method for forging processes as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the parallel simulation method for forging processes as described in any one of claims 1 to 6.