Welding numerical simulation heat source optimization efficient calculation method based on computer vision

Through computer vision and genetic algorithms, the welding heat source parameters are optimized, and the cumbersome heat source adjustment in traditional welding simulation is solved, the simulation efficiency and accuracy are improved, and the automation optimization of multi-layer multi-pass welding is achieved.

CN120509265AActive Publication Date: 2025-08-19SHANDONG UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511000700.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-08-19
Estimated Expiration
2045-07-21

AI Technical Summary

Technical Problem

The adjustment of heat source parameters in traditional welding numerical simulations is cumbersome and dependent on researchers' experience, resulting in high modeling costs, limited efficiency and accuracy.

Method used

Using a computer vision-based method, combined with OpenCV and Abaqus software, the heat source parameters are automatically optimized through the dual ellipsoid heat source model and improved genetic algorithm to realize real-time monitoring and optimization of the melt pool shape.

Benefits of technology

The workload of manual adjustment is reduced, the efficiency and accuracy of welding temperature field simulation is improved, the dependence on researchers' experience is reduced, and the unified optimization of multi-layer and multi-pass welding is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509265A_ABST
    Figure CN120509265A_ABST
Patent Text Reader

Abstract

The invention provides a welding numerical simulation heat source optimization efficient calculation method based on computer vision, and belongs to the technical field of welding numerical simulation heat source models. S2, establishing a simplified finite element model, and loading heat source model simulation; s3, the maximum section of the molten pool is intercepted and treated; s4, a molten pool area and a boundary are extracted; s5, the fusion width and the fusion depth of the simulated weld joint and the actual weld joint are obtained, whether convergence is met or an iteration upper limit is reached or not is judged, and if not, an improved genetic algorithm is adopted to optimize heat source optimization parameters and iteration continues; and S6, after iteration is stopped, whether multi-layer and multi-pass welding exists or not is judged, and whether optimization continues or not is determined. According to the method, the molten pool image in the optimization process is provided in real time through multi-software cooperative calculation, unified optimization of multi-layer and multi-pass welding is achieved, meanwhile, a simplified geometric technology and an improved genetic algorithm are adopted, a weld joint activation method is designated as a field variable association method, calculation time is shortened, and efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of welding numerical simulation heat source models, and in particular to a computer vision-based efficient calculation method for optimizing welding numerical simulation heat sources. Background Art

[0002] As a key technology in modern industrial manufacturing, welding technology is crucial for ensuring the quality of equipment connections and long-term safe operation. With advances in computer technology, the finite element method (FEM) has largely replaced on-site welding tests. Finite element modeling is used to study the temperature field during welding. The temperature field during welding is influenced by the heat source model, heat dissipation conditions, and material properties. The heat source model describes the distribution of welding heat energy within the workpiece and is the foundation of temperature field analysis.

[0003] In traditional analysis methods, heat source parameters are determined through trial and error. Researchers set initial heat source parameters, perform simulation analysis, compare the parameters with the actual melt pool boundary, and then make adjustments until the simulation results are consistent with the actual melt pool boundary. This cumbersome process, requiring significant manual adjustments and post-processing, increases modeling costs. Furthermore, the efficiency and accuracy of the simulation are significantly affected by the researcher's experience.

[0004] Therefore, we propose an efficient computational method for heat source optimization in welding numerical simulation based on computer vision. Summary of the Invention

[0005] The purpose of the present invention is to provide an efficient calculation method for heat source optimization in welding numerical simulation based on computer vision to solve the problems raised in the above background technology.

[0006] To achieve the above object, the present invention adopts the following technical solutions: The present invention provides a computer vision-based efficient calculation method for heat source optimization in welding numerical simulation, comprising the following steps: S1: Confirm the heat source model and heat source optimization parameters, set the value range of the weight coefficient and the heat source optimization parameters, establish the heat source model and set the initial values of the heat source model parameters; S2: Use Abaqus software to establish a simplified finite element model and set initial conditions and boundary conditions. Load the heat source model into the simplified finite element model to calculate the welding temperature field. S3: Use OpenCV to intercept the maximum melt pool cross section and preprocess the intercepted image; S4: Use OpenCV to extract the melt pool area and boundary shape of the melt pool on the preprocessed image; S5: Use OpenCV to obtain the weld width and depth of the simulated weld. Combined with the actual weld width and depth obtained from the test, determine whether the weld width and depth of the simulated weld meet the convergence requirements or reach the maximum number of iterations. If so, stop the iterative calculation. If not, use the improved genetic algorithm to optimize the heat source optimization parameters and continue the iterative calculation until the convergence requirements are met or the maximum number of iterations is reached. S6: After stopping the iterative calculation, determine whether the weld is a multi-layer multi-pass weld. If not, obtain the optimal heat source optimization parameters; if so, use the heat source parameter temperature field calculation results after the optimization of the previous weld pass as the initial conditions to optimize the next weld pass.

[0007] Furthermore, in step S1, the heat source model adopts a double ellipsoid heat source model, and the double ellipsoid heat source model is established by editing the DFLUX heat source subroutine using Fortran. The heat flux density distribution function within the ellipsoid of the first half of the double ellipsoid heat source model is:

[0008] The heat flux density distribution function within the ellipsoid in the second half of the double ellipsoid heat source model is:

[0009] in, is the effective power of the arc, take ; is the welding voltage, is the welding current, is the welding thermal efficiency; 、 and are the coordinates of the heat source center; 、 、 and is the ellipsoid shape parameter; is the welding speed, mm / s ; The time for the welding process to proceed; and are the front and rear ellipsoid heat distribution parameters, respectively, and .

[0010] Furthermore, in step S2, the specific process of establishing the simplified finite element model is: after establishing the finite element model in Abaqus, the finite element model is simplified using simplified geometry technology.

[0011] Furthermore, in step S2, in the calculation of the welding temperature field, the weld activation method adopts the field variable association method.

[0012] Furthermore, the specific process of the field variable association method is as follows: Step 1: Define field variables: In the model definition, set field variables to represent different material states.

[0013] Step 2: Write the USDFLD subroutine: Write the USDFLD subroutine based on the Fortran language, dynamically adjust the material parameters according to the value of the field variable, and add the field variable value to the material properties.

[0014] Step 3: Associate material properties with field variables: In the material definition, associate material-related properties with field variables.

[0015] Furthermore, in step S3, the specific process of preprocessing the image is: setting the RGB value range of the molten pool shape in the image according to the welding simulation result of step S2.

[0016] Furthermore, in step S5, the optimization model for optimizing the heat source optimization parameters is:

[0017] in, is the plate thickness, mm ; 、 and is the error weight coefficient; 、 、 and is the ellipsoid shape parameter; The thermal efficiency of welding is different. The thermal efficiency ranges of different welding methods are different. is the ratio of the semi-axis of the rear half to the semi-axis of the front half of the ellipsoid shape, which is generally greater than 1 to simulate the different energy distributions in the front and rear halves during the movement of the heat source; Indicates the results of finite element simulation; subscript Indicates the actual weld size.

[0018] Furthermore, in the optimization model, the objective function R The molten pool shape is used as the basis for error calculation, and the penetration depth of the simulated weld cross section is calculated. 、 Melt width 、 Melt width Depth of penetration relative to the actual weld cross section 、 Melt width 、 Melt width The sum of squared errors is used as the objective function.

[0019] Furthermore, in step S5, the specific process of optimizing the heat source optimization parameters using the improved genetic algorithm includes: Step 1: Initialize the population and set parameters: Randomly generate the initial population, encode each individual's potential solution through chromosome encoding, and set key parameters, including population size, crossover probability, and mutation probability. Then, introduce a chaotic sequence as a tool for generating subsequent crossover points and mutation values. Step 2: Fitness evaluation and sorting: Calculate the fitness value of each individual according to the objective function, and sort all individuals in ascending / descending order according to the objective function value; Step 3: Pairing parents based on equal status: breaking the traditional random pairing rule, pairing individuals with similar fitness based on the ranking results; Step 4: Chaos-guided single-point crossover: Perform crossover on each pair of parent individuals; Step 5: Multi-gene chaotic mutation: Independent of the crossover operation, perform directed mutation; Step 6: Elite retention and population update: Merge the offspring generated by crossover and mutation into a new generation of population, while forcibly retaining the current best individual; Step 7: Termination condition judgment: Check whether the preset termination condition is met. If so, output the optimal solution; otherwise, return to step 2 to continue iterative optimization.

[0020] Compared with the prior art, the present invention has the following technical effects: In this invention, by using multiple software programs for collaborative calculation, this method can provide real-time images of the molten pool during the optimization process and achieve unified optimization of multi-layer and multi-pass welds. By employing a simplified finite element model and an improved genetic algorithm, and specifying the field variable association method as the weld activation method, this method significantly reduces calculation time with negligible precision loss, possessing great application value in practical engineering. Compared with traditional trial-and-error methods, this method achieves automatic parameter solution, eliminating the need for manual operation during the entire process of heat source parameter verification and optimization. This reduces the workload of trial-and-error heat source parameter adjustment, reduces modeling costs, improves simulation efficiency and accuracy, and reduces the dependence of the efficiency and accuracy of welding temperature field simulation on the researcher's experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a flow chart of a method for efficiently optimizing heat sources in welding numerical simulation according to an embodiment of the present invention; Figure 2 Schematic diagram of molten pool image processing according to an embodiment of the present invention; Figure 3 Schematic diagram of a double ellipsoid heat source model according to an embodiment of the present invention; Figure 4 The finite element model and mesh division diagram of the single-sided V-groove butt weld before and after simplification according to an embodiment of the present invention; Figure 5 This is a flow chart of a field variable association method according to an embodiment of the present invention; Figure 6 A schematic cross-sectional view of a weld pool according to an embodiment of the present invention; Figure 7 Flowchart of an improved genetic algorithm according to an embodiment of the present invention; Figure 8 3. This is a comparison diagram of the actual molten pool shape of an embodiment of the present invention and the simulated molten pool shape calculated after heat source parameter calibration. DETAILED DESCRIPTION

[0022] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0023] In this article, terms such as "left, right, up, down, front, and back" are established based on the positional relationships shown in the drawings. Depending on the different drawings, the corresponding positional relationships may also change accordingly. Therefore, they cannot be understood as absolute limitations on the scope of protection.

[0024] See also Figures 1 to 8 This embodiment provides an efficient calculation method for heat source optimization of welding numerical simulation based on computer vision, comprising the following steps: S1: Confirm the heat source model and heat source optimization parameters, set the value range of the weight coefficient and the heat source optimization parameters, establish the heat source model and set the initial values of the heat source model parameters.

[0025] Specifically, before establishing a heat source model, confirm the heat source model. A dual-ellipsoid heat source model is used. Compared to the Gaussian and conical heat source models, the dual-ellipsoid heat source model requires more parameters to optimize and is the most challenging, so it is used. After selecting the heat source model, confirm the heat source optimization parameters and set the weight coefficients and value ranges for the heat source optimization parameters.

[0026] Specifically, a double ellipsoid heat source model is established using the DFLUX heat source subroutine written in Fortran language. The heat flux density described by the double ellipsoid heat source model is distributed within the ellipsoidal volume, which can reflect the characteristic of welding heating the weldment along the depth direction, and thus the welding temperature field can be accurately simulated.

[0027] Specifically, the first half and the second half of the double ellipsoid heat source model are both 1 / 2 ellipsoids. The heat flux density distribution is usually described by a Gaussian function. The heat flux density distribution equations in the first half of the ellipsoid and the second half of the ellipsoid are respectively:

[0028]

[0029] in, is the effective power of the arc, take ; is the welding voltage; is the welding current; is the welding thermal efficiency; 、 and are the coordinates of the heat source center; 、 、 and is the ellipsoid shape parameter; is the welding speed, mm / s ; The time for the welding process to proceed; and are the front and rear ellipsoid heat distribution parameters, respectively, and .

[0030] S2: Use Abaqus software to establish a simplified finite element model and set initial conditions and boundary conditions. Load the heat source model into the simplified finite element model to calculate the welding temperature field.

[0031] Specifically, Abaqus software is used to establish a three-dimensional welding finite element model of the weldment, and then the material property parameters such as thermal conductivity, specific heat capacity, thermal expansion coefficient, latent heat of melting and latent heat of evaporation of the weldment model are defined. At the same time, boundary conditions such as convection heat and radiation heat are set according to the actual working conditions. The setting of the boundary conditions refers to the actual processing conditions, and different conditions correspond to different boundary conditions. After the finite element model is established in the Abaqus software, the finite element model is simplified using simplified geometry technology. The simplified geometry technology assumes that the fusion zone is a local phenomenon, and the significant spatiotemporal changes of the temperature field are limited to the fusion zone. The purpose of shortening the calculation time can be achieved by simplifying the finite element model. The simplification process is a prior art and will not be described in detail here. The heat source model with the initial values of the heat source model parameters set in step S1 is then loaded as a load onto the simplified finite element model to calculate the welding temperature field.

[0032] Specifically, a job file is created in Abaqus, converting the existing numerical simulation model into a job file. The job file is the core input file used to define and control the analysis job. It contains all model information, including geometry, material properties, loading conditions, boundary conditions, and analysis type. Then, using Python, batch submit the job files to the Abaqus solver. The solver will calculate the job files. During this process, a read_sta_file function can be defined in Python to automatically detect the completion status of the job files. After the calculation is completed, the results are output to obtain a temperature contour map of the weld layer.

[0033] Specifically, the weld activation method in the welding temperature field calculation adopts the field variable association method. The field variable association method is based on the dependence of material properties on temperature during the welding simulation process. The elastic modulus, thermal expansion coefficient, etc. are dynamically adjusted according to the temperature change of the integration point. The change of thermal conductivity is controlled by the integrated temperature to simulate the weld filling process. The specific process is as follows: Step 1: Define field variables: In the model definition, set field variables to represent different material states.

[0034] Step 2: Write the USDFLD subroutine: Write the USDFLD subroutine based on the Fortran language, dynamically adjust the material parameters according to the value of the field variable, and add the field variable value to the material properties.

[0035] Step 3: Associate material properties with field variables: In the material definition, associate material-related properties with field variables.

[0036] S3: Connect to the OpenCV computer vision library, set the Abaqus subroutine UVARM to add the peak temperature of the component as a custom output variable, and then use OpenCV to intercept the maximum melt pool cross-section and preprocess the intercepted image.

[0037] Specifically, the specific process of preprocessing the image is as follows: setting the RGB value range of the molten pool shape in the image according to the welding simulation result of step S2, so that OpenCV can extract the molten pool area and boundary shape of the molten pool.

[0038] S4: The melt pool area and boundary shape of the melt pool are extracted on the preprocessed image using OpenCV.

[0039] S5: Use OpenCV to obtain the weld width and depth of the simulated weld. Combined with the actual weld width and depth obtained from the test, determine whether the weld width and depth of this generation of simulated welds meet the convergence requirements or reach the maximum number of iterations. If so, stop the iterative calculation. If not, use the improved genetic algorithm in Python to optimize the heat source optimization parameters, and pass the next generation of heat source optimization parameters to the DFLUX heat source subroutine, apply them to Abaqus for temperature field calculation, and continue the iterative calculation until the convergence requirements are met or the maximum number of iterations is reached.

[0040] Specifically, the convergence requirements and the maximum number of iterations are the artificial termination limits set. During the optimization process of the heat source optimization parameters, if there are requirements for accuracy, the melt width and melt depth of the simulated weld are controlled to be within the set error range with the melt width and melt depth of the actual weld, so that the convergence requirements are met and no requirement is made for the maximum number of iterations; if there are requirements for time, the iterative calculation times are controlled to reach the set maximum number of iterations and the calculation is stopped, so that the maximum number of iterations is met and no requirement is made for convergence (i.e., accuracy).

[0041] Specifically, in step S5, the optimization model for optimizing the heat source optimization parameters is:

[0042] in, is the plate thickness, mm ; 、 and is the error weight coefficient; 、 、 and is the ellipsoid shape parameter; The thermal efficiency of welding is different. The thermal efficiency ranges of different welding methods are different. is the ratio of the semi-axis of the rear half to the semi-axis of the front half of the ellipsoid shape, which is generally greater than 1 to simulate the different energy distributions in the front and rear halves during the movement of the heat source; Indicates the results of finite element simulation; subscript Indicates the actual weld size.

[0043] In the optimization model, the objective function R The molten pool shape is used as the basis for error calculation, and the penetration depth of the simulated weld cross section is calculated. 、 Melt width 、 Melt width Depth of penetration relative to the actual weld cross section 、 Melt width 、 Melt width The sum of squared errors is used as the objective function.

[0044] Specifically, the specific process of optimizing the heat source optimization parameters using the improved genetic algorithm includes: Step 1: Initialize the population and set parameters: Randomly generate the initial population. Each individual represents the potential solution through chromosome encoding, and set key parameters, including population size, crossover probability, and mutation probability. Then, introduce a chaotic sequence as a tool for generating subsequent crossover points and mutation values to ensure controllable randomness.

[0045] Step 2: Fitness evaluation and sorting: Calculate the fitness value of each individual based on the objective function (smaller or larger function values correspond to different optimization directions), and sort all individuals in ascending / descending order according to the objective function value, laying the foundation for subsequent "equally matched" cross-matching.

[0046] Step 3: Equal-sex parent pairing: This method breaks the traditional random pairing rule and performs targeted pairing of individuals with similar fitness based on the ranking results. Individuals with smaller (better) objective function values are paired together to focus on mining high-quality solutions; individuals with larger (bad) objective function values are paired together to prevent inferior genes from interfering with high-quality populations.

[0047] Step 4: Chaos-guided single-point crossover: For each pair of parent individuals, perform crossover according to the following process.

[0048] (1) Crossover decision: Use the crossover probability to decide whether to crossover. If not, directly copy the parent generation.

[0049] (2) Chaotic intersection point determination: Use pre-generated chaotic sequences (such as logistic mapping) to dynamically determine the single-point intersection position.

[0050] (3) Weak intensity crossover: Only the gene fragments after the crossover point are exchanged, which reduces the optimization perturbation intensity, suppresses the optimization chattering during the iteration process, and improves the convergence accuracy.

[0051] Step 5: Multi-gene chaotic mutation: Independent of the crossover operation, perform directed mutation according to the following rules.

[0052] (1) Mutation decision: Determine whether to mutate based on the mutation probability.

[0053] (2) Multi-gene selection: randomly generate chaotic integers between [2, 101] to locate the gene positions to be mutated in the chromosome.

[0054] (3) Chaotic value replacement: Generate new gene values based on chaotic sequences to replace the original genes, enhance population diversity, and prevent premature convergence of the algorithm.

[0055] Step 6: Elite retention and population update: Merge the offspring generated by crossover and mutation into a new generation of population, while forcibly retaining the current optimal individual (elite retention strategy) to ensure the convergence stability of the algorithm.

[0056] Step 7: Termination condition judgment: Check whether the preset termination condition (whether the objective function is satisfied) is met. If so, output the optimal solution; otherwise, return to step 2 to continue iterative optimization.

[0057] Specifically, in order to speed up the solution, the original code of the improved genetic algorithm should be optimized in parallel in Python.

[0058] Specifically, the improved genetic algorithm separates mutation from crossover, allowing for parallel implementation and improving efficiency. Using the weakest single-point crossover ensures accurate convergence and mitigates the optimization chattering problem associated with high crossover intensity. Using a higher-intensity multi-gene chaotic mutation algorithm addresses premature maturation, which can be caused by single-point crossover.

[0059] S6: After stopping the iterative calculation, determine whether the weld is a multi-layer multi-pass weld. If not, obtain the optimal heat source optimization parameters; if so, use the heat source parameter temperature field calculation results after the optimization of the previous weld pass as the initial conditions to optimize the next weld pass.

[0060] Specifically, the present invention utilizes multi-software collaborative computing to provide real-time images of the molten pool during the optimization process and achieve unified optimization of multi-layer, multi-pass welds. By employing a simplified finite element model and an improved genetic algorithm, and specifying the field variable association method as the weld activation method, this method significantly reduces computation time with negligible loss of accuracy, demonstrating its significant application value in practical engineering. Compared to traditional trial-and-error methods, this method achieves automatic parameter determination, eliminating the need for manual operation during the entire heat source parameter calibration and optimization process. This reduces the workload of trial-and-error heat source parameter adjustment, lowers modeling costs, improves simulation efficiency and accuracy, and reduces the reliance of the efficiency and accuracy of welding temperature field simulation on the researcher's experience.

[0061] Example 1 The following analysis is based on the Q355B plate. The welding process is as follows: In gas shielded welding, a double ellipsoid heat source model is used to simulate the moving heat source in welding. The double ellipsoid heat source model has many heat source parameters, but the shape of the double ellipsoid heat source model needs to determine four parameters. 、 、 and , is the semi-axis length of the first half of the ellipsoid in the weld length direction, is the semi-axis length of the rear half of the ellipsoid in the weld length direction, is the semi-axis length of the ellipsoid in the direction of the weld width, which is used to control the energy distribution area in the direction of the weld width; The length of the semi-axis of the ellipsoid in the direction of the weld depth is used to control the energy distribution area in the direction of the weld depth. The size of these four parameters will directly affect the distribution of the temperature field during welding. The smaller the heat source shape parameter, the more concentrated the heat source energy is distributed in this direction. The larger the heat source shape parameter, the flatter the energy distribution. Too small or too large a value will increase the error between the simulation result and the actual size. Therefore, determining these four parameters is the key, and the heat source shape parameter is used as the optimization design variable. The shape parameter determines the distribution of energy inside the heat source, and the welding thermal efficiency Determine the total energy of the heat source. If the calculation model has a corresponding temperature test, the actual calculation of thermal efficiency is based on the calibration of the thermocouple far away from the weld. It is also used as an optimization variable. The value range of the optimization variable is shown in Table 1, and the weight coefficient 、 and Take 1 for both.

[0062] Table 1 Value range of optimization variables

[0063] In this embodiment, the welding process is a total of 4 layers of welds from top to bottom, including a ceramic liner bottom weld, two filling welds, and a cover weld. The specific welding process is as follows: before the bottom weld, a ceramic liner is placed at the bottom of the groove gap, and the welding specimen is raised as a whole to keep it level, and then Gas shielded welding is performed using a linear feeder for root welding. After root welding, interpass cooling is performed to reduce the interpass temperature to below 100°C before continuing with the filler and cap welding processes. The welding process parameters for each layer are shown in Table 2.

[0064] Table 2 Welding process parameters

[0065] S1: Before the heat source model is established, the heat source model and heat source optimization parameters are determined, and the value range of the weight coefficient and heat source optimization parameters are set. Use the Fortran language to write the DFLUX heat source subroutine to establish the double ellipsoid heat source model and set the parameters, such as Figure 3 As shown in the figure, the heat flux density distribution equations in the first half of the double ellipsoid heat source model and the heat flux density distribution equations in the second half of the ellipsoid are:

[0066]

[0067] in, is the effective arc power, W ,Pick ; is the welding voltage, V ; is the welding current, A ; is the welding thermal efficiency; 、 and are the coordinates of the heat source center; 、 、 and is the ellipsoid shape parameter; is the welding speed, mm / s ; The time for the welding process to proceed; and are the front and rear ellipsoid heat distribution parameters, respectively, and ,Pick =0.6, =1.4.

[0068] S2: Use Abaqus finite element software to establish a three-dimensional welding finite element model and set the initial conditions and boundary conditions. Set the model size to 600mm×400mm×14mm, the welding type to full penetration butt weld, the groove type to a single-sided V-groove without blunt edges, the groove angle to 65°, the groove gap to 3mm, and the three-point constraint rigid body displacement as the boundary condition. The welding process is Gas shielded welding was performed, with Q355B as the base material. Based on the principle of equal strength matching, 1.2mm diameter ER50-6 welding wire was selected as the filler material. Due to the similar chemical composition of the deposited metals of Q355B and ER50-6 welding wires, their thermophysical properties can be considered equivalent. The room temperature was set at 20°C. The weldment model was meshed using a 4:2 transition ratio, with a fine mesh near the weld and a gradually coarser mesh away from the weld. The finite element model was simplified using simplified geometry techniques to improve computational efficiency without sacrificing accuracy. The simplified geometry model had only 10,080 elements and 11,571 nodes, compared to 87,600 elements and 95,126 nodes in the original model. The incremental step size was fixed so that the heat source center was located at a node at each step.

[0069] The heat source model, with its initial parameters set, is loaded as a load onto the finite element model to calculate the welding temperature field. The created numerical simulation model is converted into a job file in Abaqus. Then, using Python, the job files are submitted in batches to the Abaqus solver. The solver then calculates the job files. During this process, a function called read_sta_file is defined in Python to automatically detect the completion status of the job files. After the calculation is complete, the results are output to obtain a temperature contour map of the weld layer.

[0070] The weld activation method in the welding temperature field calculation adopts the field variable association method. During the simulation process, the material is associated with the field variable. Based on the dependence of the material properties on temperature during the welding simulation, the elastic modulus, thermal expansion coefficient, etc. are dynamically adjusted according to the temperature change of the integration point. The change of thermal conductivity is controlled by the integral temperature to simulate the weld filling process. The thermal insulation phenomenon of the material is achieved by reducing the thermal conductivity of the material by 2 orders of magnitude. In actual operation, the field variable ( FV ) related, among which FV =2, the thermal conductivity of the material is 1% of the thermal conductivity at room temperature to simulate an inactive weld; FV =1, set to normal weld material parameters; 1< FV When <2, the material properties are smoothly transitioned by linear interpolation to set the material parameters; FV =0, set to the material parameters of the base material.

[0071] like Figure 5 As shown, the weld field variables are set at the initial and cooling stages. FV =1, and the change of field variables during welding is affected by the distance between the node and the center of the heat source. z When the distance between the node and the heat source center z Larger than the effective heat source radius r Distance from the heat source d When the FV =2; when less than the effective heat source radius r Distance from the heat source d but greater than the distance traveled by the heat source d hour, FV Between 1 and 2; when less than or equal to the distance traveled by the heat source d hour, FV =1. Initial setting of parent material FV = 0, the change of field variables during welding is reflected by the node temperature ( NT ) changes. Taking 1500℃ (Q355B steel generally regards the part with temperature exceeding 1500℃ as welding pool area) as the dividing point, the node temperature is greater than or equal to 1500℃. FV=1, the node temperature is less than 1500℃, FV = 0. Final cooling stage of base material FV It should be set according to whether the node temperature exceeds 1500℃ during welding. If it exceeds, FV =1, if not exceeded, then FV =0.

[0072] S3: Connect to the OpenCV computer vision library, set the Abaqus subroutine UVARM to add the peak temperature of the component as a custom output variable, and then OpenCV intercepts the maximum molten pool cross-section. Then, according to the welding simulation results of step S2, the RGB value range of the molten pool shape in the image is set to 160-180, that is, 160≤R&G&B≤180, completing image preprocessing.

[0073] S4: The melt pool area and boundary shape of the melt pool are extracted on the preprocessed image using OpenCV.

[0074] S5: Use OpenCV to obtain the weld width and depth of the simulated weld. Combined with the actual weld width and depth obtained from the test, determine whether the weld width and depth of this generation of simulated welds meet the convergence requirements or reach the maximum number of iterations. If so, stop the iterative calculation. If not, use the improved genetic algorithm in Python to optimize the heat source optimization parameters, and pass the next generation of heat source optimization parameters to the DFLUX heat source subroutine, apply them to Abaqus for temperature field calculation, and continue the iterative calculation until the convergence requirements are met or the maximum number of iterations is reached.

[0075] S6: After stopping the iterative calculation, it is determined that the weld is a multi-layer multi-pass weld, and the calculation results of the heat source parameter temperature field after the optimization of the previous weld pass are used as the initial conditions to optimize the next weld pass.

[0076] In this embodiment, the optimization of the heat source optimization parameters is time-sensitive; it is sufficient to reach the maximum number of iterations, which is set to 15 generations. The heat source optimization parameters were optimized using an improved genetic algorithm. The 15th generation evolution results (initial population size: 10) were used for each of the four weld passes. The resulting heat source optimization parameters are shown in Table 3.

[0077] Table 3 Optimization results of heat source optimization parameters

[0078] The comparison between the simulated molten pool shape after heat source optimization parameters optimization and the actual molten pool shape is shown in the figure below. Figure 8Table 4 shows a comparison of the measured and simulated weld width and depth. (Since the weld is a full penetration weld, the measured weld depth equals the simulated weld depth.) The simulated and actual weld pool shapes are nearly identical, with the measured and simulated weld widths and depths for each weld pass differing within 5%.

[0079] Table 4 Comparison of measured weld width, weld depth and simulated weld width, weld depth

[0080] The above embodiments merely illustrate the basic principles and features of the present invention and are not intended to be limiting. It should be understood that various changes and modifications may be made to the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and such changes and modifications are intended to fall within the scope of the present invention as claimed. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. An efficient calculation method for heat source optimization in welding numerical simulation based on computer vision, characterized by: The following steps are involved: S1: Confirm the heat source model and heat source optimization parameters, set the value range of the weight coefficient and the heat source optimization parameters, establish the heat source model and set the initial values of the heat source model parameters; S2: Use Abaqus software to establish a simplified finite element model and set initial conditions and boundary conditions. Load the heat source model into the simplified finite element model to calculate the welding temperature field. S3: Use OpenCV to intercept the maximum melt pool cross section and preprocess the intercepted image; S4: Use OpenCV to extract the melt pool area and boundary shape of the melt pool on the preprocessed image; S5: Use OpenCV to obtain the weld width and depth of the simulated weld. Combined with the actual weld width and depth obtained from the test, determine whether the weld width and depth of the simulated weld meet the convergence requirements or reach the maximum number of iterations. If so, stop the iterative calculation. If not, use the improved genetic algorithm to optimize the heat source optimization parameters and continue the iterative calculation until the convergence requirements are met or the maximum number of iterations is reached. S6: After stopping the iterative calculation, determine whether the weld is a multi-layer multi-pass weld. If not, obtain the optimal heat source optimization parameters; if so, use the heat source parameter temperature field calculation results after the optimization of the previous weld pass as the initial conditions to optimize the next weld pass.

2. The efficient calculation method for heat source optimization of welding numerical simulation based on computer vision according to claim 1 is characterized in that: In step S1, the heat source model adopts a double ellipsoid heat source model, and the double ellipsoid heat source model is established by editing the DFLUX heat source subroutine using Fortran. The heat flux density distribution function within the ellipsoid of the first half of the double ellipsoid heat source model is: The heat flux density distribution function within the ellipsoid in the second half of the double ellipsoid heat source model is: in, is the effective power of the arc, take ; is the welding voltage, is the welding current, is the welding thermal efficiency; 、 and are the coordinates of the heat source center; 、 、 and is the ellipsoid shape parameter; is the welding speed, mm / s ; The time for the welding process to proceed; and are the front and rear ellipsoid heat distribution parameters, respectively, and .

3. The efficient calculation method for heat source optimization of welding numerical simulation based on computer vision according to claim 1 is characterized in that: In step S2, the specific process of establishing the simplified finite element model is: after establishing the finite element model in Abaqus, the finite element model is simplified using simplified geometry technology.

4. The efficient calculation method for heat source optimization of welding numerical simulation based on computer vision according to claim 1 is characterized in that: In step S2, in the calculation of the welding temperature field, the weld activation method adopts the field variable association method.

5. The computer vision-based efficient calculation method for heat source optimization of welding numerical simulation according to claim 4 is characterized in that: The specific process of the field variable association method is as follows: Step 1: Define field variables: In the model definition, set field variables to represent different material states; Step 2: Write the USDFLD subroutine: Write the USDFLD subroutine based on the Fortran language, dynamically adjust the material parameters according to the values of the field variables, and add the field variable values to the material properties; Step 3: Associate material properties with field variables: In the material definition, associate material-related properties with field variables.

6. The computer vision-based efficient calculation method for heat source optimization of welding numerical simulation according to claim 1 is characterized in that: In step S3, the specific process of pre-processing the image is: setting the RGB value range of the molten pool shape in the image according to the welding simulation result of step S2.

7. The efficient calculation method for heat source optimization of welding numerical simulation based on computer vision according to claim 1 is characterized in that: In step S5, the optimization model for optimizing the heat source optimization parameters is: in, is the plate thickness, mm ; 、 and is the error weight coefficient; 、 、 and is the ellipsoid shape parameter; The thermal efficiency of welding is different. The thermal efficiency ranges of different welding methods are different. is the ratio of the semi-axis of the rear half to the semi-axis of the front half of the ellipsoid shape, which is used to simulate the different energy distributions in the front and rear halves during the movement of the heat source; Indicates the results of finite element simulation; subscript Indicates the actual weld size.

8. The computer vision-based efficient calculation method for heat source optimization of welding numerical simulation according to claim 7 is characterized in that: In the optimization model, the objective function R The molten pool shape is used as the basis for error calculation, and the penetration depth of the simulated weld cross section is calculated. 、 Melt width 、 Melt width Depth of penetration relative to the actual weld cross section 、 Melt width 、 Melt width The sum of squared errors is used as the objective function.

9. The computer vision-based efficient calculation method for heat source optimization of welding numerical simulation according to claim 1, characterized in that: In step S5, the specific process of optimizing the heat source optimization parameters using the improved genetic algorithm includes: Step 1: Initialize the population and set parameters: Randomly generate the initial population, encode each individual's potential solution through chromosome encoding, and set key parameters, including population size, crossover probability, and mutation probability. Then, introduce a chaotic sequence as a tool for generating subsequent crossover points and mutation values. Step 2: Fitness evaluation and sorting: Calculate the fitness value of each individual according to the objective function, and sort all individuals in ascending / descending order according to the objective function value; Step 3: Pairing parents based on equal status: breaking the traditional random pairing rule, pairing individuals with similar fitness based on the ranking results; Step 4: Chaos-guided single-point crossover: Perform crossover on each pair of parent individuals; Step 5: Multi-gene chaotic mutation: Independent of the crossover operation, perform directed mutation; Step 6: Elite retention and population update: Merge the offspring generated by crossover and mutation into a new generation of population, while forcibly retaining the current best individual; Step 7: Termination condition judgment: Check whether the preset termination condition is met. If so, output the optimal solution; otherwise, return to step 2 to continue iterative optimization.

Citation Information

Patent Citations

  • Determination method for heat source model parameters in multiplewire submerged-arc welding by numerical simulation

    CN102637235A

  • Method for predicting surfacing cladding layer components based on numerical analog simulation

    CN117272712A

  • Simulation optimization method for heat source distribution of alloy welding structural member and terminal

    CN119623250A

  • Method for determining a heat source model for a weld

    US6324491B1

  • Heat source model for an arc welding process

    WO2022233991A2