Full-automatic CFD Modeling Method and System for Laser and Its Hybrid Welding Process Based on Real Light Field Distribution

Through Python integration with Fluent software, a fully automatic CFD modeling system is created, which solves the simulation problems of light field distribution and multi-physical field coupling in laser composite welding, realizes high-precision and fully automatic welding process simulation, improves welding quality and efficiency, and is suitable for manufacturing industries with high-precision welding needs.

CN119538784BActive Publication Date: 2025-08-01HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411601501.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-08-01
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

In the prior art, it is difficult to achieve high-precision light field distribution simulation and multi-physical field coupling in the laser and its composite welding process, resulting in insufficient welding quality and efficiency, and lack of fully automated and intelligent modeling methods.

Method used

Through the integration of Python language and Fluent software, a fully automatic CFD modeling system is created, using a real light field distribution model, combining arc effect and melt pool dynamics, to achieve full-process simulation. The system includes a graphical user interface, material attribute library, automated meshing and simulation parameter setting, supporting multi-physics coupling and result visualization.

Benefits of technology

It improves the accuracy and efficiency of welding process simulation, reduces operational complexity, and realizes high-precision melt pool morphology prediction and welding quality control. It is suitable for high-precision welding fields such as automobile manufacturing and aerospace.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119538784B_ABST
    Figure CN119538784B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of welding technology and discloses a fully automatic CFD modeling method and system for laser and its hybrid welding processes. Based on the existing technology and aiming at the deficiencies in the laser and its hybrid welding processes, the present invention proposes a series of innovative improvements, thereby significantly enhancing the performance and application value of the system in multiple aspects. First of all, by introducing a laser heat source model based on the real light field distribution, the present invention greatly improves the accuracy of welding process simulation. Traditional welding heat source models usually assume uniform distribution of laser energy and ignore the non-uniformity of the light field in the actual space. This simplified assumption leads to a certain deviation between the simulation results and the actual situation. The heat source model of the present invention accurately calculates the distribution of laser energy in space and its interaction with the welding material through the ray tracing method. Especially under the conditions of multiple reflections and multiple scatterings, it can truly reflect the energy transfer path and distribution law during the laser welding process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of welding, and particularly relates to a fully automatic CFD modeling method and system for laser and its hybrid welding processes. Background Art

[0002] With the increasing demand of the manufacturing industry for high-efficiency and high-quality welding technologies, laser and its hybrid welding technologies have gradually become one of the important welding methods in modern manufacturing. Laser welding is widely used in fields such as automotive manufacturing, aerospace, and shipbuilding due to its advantages of concentrated energy, narrow weld seams, small heat-affected zones, and high welding speeds. Laser welding can effectively solve the problems existing in traditional welding methods when dealing with high-melting-point materials or high-strength alloy materials. At the same time, with the development of numerical control technology and intelligent manufacturing, the automation and intelligence levels of the welding process have been continuously improved, and a fully automatic welding system that can meet complex process requirements has become the future development direction. Currently, in high-precision and high-demand welding scenarios, hybrid welding technologies, such as laser-arc hybrid welding, have gradually shown unique advantages. Laser-arc hybrid welding combines the high energy density of laser welding and the flexibility of arc welding, making the welding process more stable and the weld quality better, and is suitable for thick plate welding and complex welding structure scenarios.

[0003] However, in complex welding processes, the selection and control of welding process parameters become the key factors affecting welding quality. Especially for the accurate simulation and prediction of the actual light field distribution, energy transfer, molten pool formation, and metal evaporation in the laser welding process, it has always been an important topic in the welding research field. Traditional welding simulation technologies usually rely on empirical formulas and experimental data, and it is difficult to fully consider the complex physical mechanisms in the light-matter interaction. Therefore, numerical simulation technologies based on computational fluid dynamics (CFD) have emerged and have been widely used in recent years. CFD can provide high-precision numerical analysis for fluid flow, heat conduction, molten pool dynamics, metal evaporation, and weld formation in the welding process, greatly improving the optimization efficiency of welding processes.

[0004] Currently, the modeling and simulation of laser and its hybrid welding processes mainly rely on finite element analysis. For the simulation of the heat source in the laser welding process, the ray tracing algorithm is usually used to calculate the energy distribution of the laser in the molten pool, while arc welding needs to consider the heating and acting force of the arc plasma on the molten pool. Such technologies have been applied to the optimization of welding processes, such as improving weld formation and reducing welding defects. However, there are still certain limitations in the existing technologies when simulating the real light field distribution. Usually, it is assumed that the energy of the light source is uniformly distributed, and it is difficult to accurately simulate the non-uniformity of the light field. In addition, various physical effects in hybrid welding, such as complex physical phenomena like metal evaporation, molten pool dynamics, thermal-fluid coupling, surface tension, and buoyancy, also make it difficult for traditional numerical simulation methods to achieve high-precision predictions.

[0005] In this technical field, the fully automatic modeling method for laser and its hybrid welding processes based on CFD is not yet mature. For example, how to accurately capture the coupled heat source of the laser and the arc, how to reflect the light field distribution in real time in three-dimensional space, and how to achieve the coupled simulation of multiple physical fields are all technical problems that need to be further solved. At present, existing research has proposed a solution to achieve refined welding simulation by customizing the heat source model and physical parameters, but a systematic and automated modeling and simulation method has not yet been formed. In addition, existing welding simulation software on the market, such as ANSYS Fluent, although it can perform CFD simulation analysis, its support for the welding heat source model is limited, and users often need to manually set complex parameters, lacking intelligent and automated support.

[0006] Through the above analysis, the problems and defects existing in the prior art are as follows:

[0007] Existing research has proposed a solution to achieve refined welding simulation by customizing the heat source model and physical parameters, but a systematic and automated modeling and simulation method has not yet been formed. In addition, existing welding simulation software on the market, such as ANSYS Fluent, although it can perform CFD simulation analysis, its support for the welding heat source model is limited, and users often need to manually set complex parameters, lacking intelligent and automated support. Summary of the Invention

[0008] In view of the problems existing in the prior art, the present invention provides a fully automatic CFD modeling method and system for laser and its hybrid welding processes.

[0009] The present invention is implemented as follows. A fully automatic CFD modeling method for laser and its hybrid welding processes includes:

[0010] Step 1: Use Python to call the Tkinter library to create a graphical user interface for the system, implementing a multi-level interactive interface for the welding simulation system, including a main menu and multiple sub-function interfaces, including a module for establishing a computational domain, selecting a welding method, setting a computational time step, and viewing calculation results;

[0011] Step 2: Create a material property library through a Python script for storing and managing the physical properties of various materials;

[0012] This material property library contains the density, viscosity, thermal conductivity, and specific heat capacity parameters of various common materials, and can be dynamically extended to support user-defined materials; the data structure of the material library is designed as a dictionary or JSON format for easy searching and calling; the physical properties of each material are indexed by a unique identifier to ensure that the material properties can be quickly retrieved and assigned during the simulation process;

[0013] Step 3: Read the content of the.rpl file through a Python script, dynamically generate the corresponding Tcl script, and call the ICEMCFD batch processing to execute, automatically execute the functions of creating a geometric model, specifying boundary conditions, and meshing, and generate a welding calculation domain.msh format file;

[0014] Step 4: Use Python to call the open() function to create a C language subroutine file welding.c for the laser welding basic module;

[0015] By defining a C language code string containing heat sources for welding, radiative heat dissipation, convective heat dissipation, recoil pressure, and evaporation condensation source terms in the Python script, calling the open() function to open the file in write mode ("w"), and using the write() method to write the C code string into the welding.c file, the generation of the C language module is achieved; this step ensures that the core calculation module for welding simulation can be saved in the form of C language for subsequent compilation and execution;

[0016] Step 5: Use Python to call the Fluent Python API to start the Ansys Fluent simulation software;

[0017] Use the pyfluent.launch_fluent method to set the simulation dimension (2D or 3D mode) and calculation accuracy (single precision or double precision); at the same time, specify the meshing mode (meshing_mode), working directory (work_dir), and Fluent root path (root_path), and enable parallel computing as needed (set parallel = True and the number of solverprocesses calculation cores); this step realizes the seamless connection between the Fluent software and the Python environment by accurately configuring the above parameters;

[0018] Step 6: Import the simulation mesh file through a Python script, and use the tui.file.read_mesh command in the Fluent TUI (Text User Interface) interface to load the mesh file at the specified path into the Fluent environment; this step realizes the initialization of the mesh model by calling the mesh file path;

[0019] Step 7: According to the material property library created in Step 1, use the Fluent TUI command to assign the physical parameters of the selected material in this step;

[0020] The Python script will call the material property library, use the material name as the index, retrieve the corresponding physical properties from the material library, and assign these parameters to the Fluent simulation model through the tui.define.materials.modify command; this step ensures that the material properties are correctly loaded into the simulation model;

[0021] Step 8: Compile and load the user-defined function (UDF) subroutine through the Python script, and use the Fluent TUI command tui.compile.uda to compile the specified UDF source file;

[0022] After successful compilation, use tui.define.user_defined.function_hooks.read to load the source terms or custom functions in the UDF file for subsequent calls during the simulation process; this step realizes the correct loading of the custom physical model or source terms;

[0023] Step 9: Set the boundary conditions in the simulation through the Fluent TUI command;

[0024] First, use the tui.define.boundary_conditions.set command to assign the corresponding physical conditions to the boundaries such as the inlet, outlet, and wall; for example, the velocity can be set for the inlet, the pressure can be set for the outlet, and the temperature or no-slip condition can be set for the wall; this step ensures that each boundary condition in the simulation correctly reflects the physical meaning;

[0025] Step 10: Associate the source terms in the compiled and loaded user-defined function with the corresponding regions or boundary conditions;

[0026] Through the tui.define.user_defined.function_hooks.source_term command, bind the loaded source terms to the boundary conditions or specific regions; this step ensures that during the simulation calculation process, the source terms can affect the boundary conditions and realize complex physical field simulations;

[0027] Step 11: Initialize the model by calling the Fluent TUI command through the Python script;

[0028] First, use the solver.tui.solve.initialize.initialize_flow() method for standard initialization, and specify that the initialization acts on all grid regions through set_parameters; then use set_reference_frame to set the reference frame relative to the cell region, and subsequently set the initial physical conditions for the flow field through set_initial_conditions; finally, execute the execute_initialization() command to start the initialization process to ensure the successful completion of model initialization;

[0029] Step 12: Call Fluent TUI commands through Python scripts to implement simulation calculation settings;

[0030] Use solver.tui.solve.set.time_step to set the time step; and set the number of time steps of the simulation through solver.tui.solve.set.number_of_time_steps;

[0031] Call solver.tui.solve.set.max_iterations_per_time_step to set the maximum number of iterations per time step, and solver.tui.solve.set.reporting_interval

[0032] and solver.tui.solve.set.profile_update_interval to set the reporting and profile update intervals;

[0033] Finally, execute solver.tui.solve.execute_calculation() to start the simulation calculation;

[0034] Step 13: Call the EnSight Python API through a Python script to import the simulation results of Fluent and export an MP4 format animation;

[0035] First, use the ens.Session() method to start an EnSight session, and call the session.data.import_fluid() method to import the Fluent.cas and.dat files;

[0036] Then, an isosurface of the temperature field is generated by the scene.add_iso_surface() method; subsequently, the output path and file format are specified as MP4 by the scene.animation.start_output() method, and the scene.animation.export_frames() is called to generate animation frames.

[0037] Finally, the scene.animation.stop_output() is used to complete the export of the MP4 format animation.

[0038] Step 14: Use Python to call the moviepy library and Tkinter to achieve real-time playback of the MP4 format video generated by EnSight in the simulation software interface.

[0039] First, use the VideoFileClip function of moviepy to load the video file at the specified path, and call the iter_frames method to read the video frame by frame.

[0040] Then, use PIL (Python Imaging Library) to convert each frame into an image format supported by Tkinter, and display it on the user interface through the Tkinter Label component; during playback, the video playback rate is adjusted in real time through the Scale control of Tkinter to ensure that the user can customize the playback speed and achieve a visual dynamic display of the simulation results.

[0041] Furthermore, the welding heat source, radiation heat dissipation, convective heat dissipation, recoil pressure, and evaporation condensation source terms include:

[0042] 1) Arc heat source term:

[0043] The energy source term of the arc is modeled using a 3D double ellipsoidal heat source, which captures the unique spatial characteristics of the arc and is defined by the following formula:

[0044]

[0045] where f f and fr represent the proportions of the total heat energy allocated to the front ellipsoid and the rear ellipsoid, respectively; U and I are the voltage and current intensities during the welding process; the semi-axes of the double ellipsoidal heat source in the x, y, and z directions are represented by af, b1, k1 for the front ellipsoid and ar, b2, k2 for the rear ellipsoid, and v represents the welding speed.

[0046] 2) Arc pressure source term:

[0047] Arc pressure is a key factor affecting the stability and depth of the molten pool and is modeled by the following formula:

[0048]

[0049] Among them, U0 is the permeability of free space, I is the current intensity; Ra is the radius affected by the arc, and ReARC is the coefficient of the arc pressure; the arc pressure is crucial when determining the force components of the arc on the molten material in the x, y, and z directions, and these components are defined as xarc_p, yarc_p, and zarc_p respectively;

[0050] 3) Electromagnetic force source term:

[0051] The arc generates electromagnetic force by making the plasma conduct electricity in the molten pool, which is defined by the following formula:

[0052]

[0053] Among them, u0 is the magnetic permeability of the medium, I is the current intensity, σ is the current distribution coefficient, and D represents the thickness of the workpiece;

[0054] 4) Droplet source term:

[0055] During the arc welding process, metal droplets are formed at the tip of the welding wire and then transferred to the molten pool; the metal transfer adopts the mode of one droplet per pulse, that is, the droplet separation frequency is consistent with the arc pulse frequency; in the simulation, each droplet is introduced at a specified position within the computational domain and is modeled as a spherical fluid; the mass-momentum source term is characterized by the fluid density, initial temperature, and velocity; the energy and momentum of the droplet are brought in when it fuses with the molten pool;

[0056] 5) Laser heat source:

[0057] The energy source term of the laser uses the ray tracing method to simulate the reflection and absorption of energy on the wall of the keyhole; this method simulates the interaction between the laser beam and the keyhole by calculating the path and reflection points of the rays and using trilinear interpolation; the trajectory of the laser ray starts from the point (x0, y0, z0) and is determined by the direction cosines (U, V, W), and is solved by the following equation:

[0058]

[0059] Among them, D represents the distance along the ray, and (Vx, Vy, Vz) represents the gradient of the VOF field in the computational cell; the Gaussian beam profile based on the TEM00 mode is used to simulate the laser energy distribution, where the intensity I0(r, z) is expressed as:

[0060]

[0061] The beam radius r(z) along the propagation direction is expressed as:

[0062]

[0063] Among them, Q represents the laser power, r0 is the focal radius at the focal plane, and zr is the Rayleigh length; the absorption rate R of the laser energy is calculated using the Fresnel reflection theory, considering the incident angle and the emissivity of the small hole wall, and is expressed as:

[0064]

[0065] Among them, φ is the incident angle, and ε is the emissivity of the small hole wall;

[0066] 6) Recoil pressure source term:

[0067] 7) Surface tension source term:

[0068] 8) Heat dissipation source term;

[0069] 9) Buoyancy source term.

[0070] Furthermore, the recoil pressure source term:

[0071] The recoil pressure generated during the laser welding process is defined by the following formula:

[0072]

[0073] Among them, Psat(T), P0, Lν, Tb, and R represent the saturation pressure, atmospheric pressure, latent heat of vaporization, boiling point temperature, and gas constant, respectively.

[0074] Furthermore, the surface tension source term:

[0075] The surface tension generated during the welding process is modeled as a function of temperature and is expressed as:

[0076]

[0077] Among them, γm represents the surface tension of the pure metal at the melting point Tm, A is a constant related to the temperature gradient of the surface tension, and Kseg is the equilibrium segregation coefficient.

[0078] Furthermore, the heat dissipation source term:

[0079] The radiative and convective heat transfer between the molten pool surface and the surrounding air is calculated by the following formula:

[0080]

[0081] Among them, εrad is the radiative heat dissipation coefficient, σ is the Stefan-Boltzmann constant, hconv is the convective coefficient, and T0 is the ambient temperature.

[0082] Furthermore, the buoyancy source term:

[0083] Since the density of liquid metal decreases with increasing temperature, a thermal buoyancy force is generated from the temperature gradient within the molten pool and is defined by the following equation:

[0084] F b =ραg(T - T m )

[0085] where ρ represents the density of the liquid metal, α is the coefficient of thermal expansion, g is the acceleration due to gravity, and Tm is the ambient temperature.

[0086] Another object of the present invention is to provide a fully automatic CFD modeling system for laser and its hybrid welding process, including:

[0087] A calling module, which is used to create a graphical user interface of the system by calling the Tkinter library through Python, to implement a multi-level interactive interface of the welding simulation system, including a main menu and multiple sub-function interfaces, including a module for establishing a computational domain, selecting a welding method, setting a computational time step, and viewing calculation results;

[0088] A storage management module, which is used to create a material property library through a Python script for storing and managing the physical properties of various materials; the material property library contains density, viscosity, thermal conductivity, and specific heat capacity parameters of various common materials, and can be dynamically extended to support user-defined materials; the data structure of the material library is designed as a dictionary or JSON format for easy searching and calling; the physical properties of each material are indexed by a unique identifier to ensure that the material properties can be quickly retrieved and assigned during the simulation process;

[0089] A reading module, which is used to read the content of the.rpl file through a Python script, dynamically generate a corresponding Tcl script, and call the ICEMCFD batch processing to execute automatically to create a geometric model, specify boundary conditions, and perform mesh generation functions, and generate a welding computational domain file in.msh format;

[0090] A calling module, which is used to create a C language subroutine file welding.c of the laser welding basic module by using Python to call the open() function; by defining a C language code string containing welding heat sources, radiative heat dissipation, convective heat dissipation, recoil pressure, and evaporation condensation source terms in the Python script, calling the open() function to open the file in write mode ("w"), and using the write() method to write the C code string into the welding.c file, the generation of the C language module is achieved; this step ensures that the core calculation module of the welding simulation can be saved in the form of C language for subsequent compilation and execution;

[0091] The startup module is used to start the Ansys Fluent simulation software by calling the Fluent Python API through Python. Using the pyfluent.launch_fluent method, set the simulation dimension (2D or 3D mode) and calculation accuracy (single precision or double precision). At the same time, specify the meshing mode, working directory, and Fluent root path, and enable parallel computing as needed (set parallel=True and the number of solver processes, i.e., the number of computing cores). By accurately configuring the above parameters in this step, seamless connection between the Fluent software and the Python environment is achieved.

[0092] The import module is used to import the simulation mesh file through a Python script. Use the tui.file.read_mesh command in the Fluent TUI (Text User Interface) interface to load the mesh file at the specified path into the Fluent environment. By calling the mesh file path in this step, initialization of the mesh model is achieved.

[0093] The assignment module is used to assign physical parameters of the selected material using Fluent TUI commands in this step based on the created material property library. The Python script will call the material property library, use the material name as an index to retrieve the corresponding physical properties from the material library, and assign these parameters to the Fluent simulation model through the tui.define.materials.modify command. This step ensures that the material properties are correctly loaded into the simulation model.

[0094] The loading module is used to compile and load the user-defined function (UDF) subroutine through a Python script. Use the Fluent TUI command tui.compile.uda to compile the specified UDF source file. After successful compilation, use tui.define.user_defined.function_hooks.read to load the source terms or custom functions in the UDF file for subsequent calls during the simulation process. This step achieves the correct loading of the custom physical model or source terms.

[0095] The setting module is used to set the boundary conditions in the simulation using Fluent's TUI commands.

[0096] An association module for associating source terms in user-defined functions compiled and loaded with corresponding regions or boundary conditions; binding the loaded source terms to boundary conditions or specific regions through the tui.define.user_defined.function_hooks.source_term command; this step ensures that during the simulation calculation process, the source terms can affect the boundary conditions and achieve complex physical field simulations;

[0097] An initialization module for initializing the model by calling Fluent TUI commands through a Python script;

[0098] A calculation settings module for implementing simulation calculation settings by calling Fluent TUI commands through a Python script;

[0099] An export module for importing the simulation results of Fluent and exporting an MP4-format animation by calling the EnSight Python API through a Python script;

[0100] A generation module for realizing the real-time playback of the MP4-format video generated by EnSight in the simulation software interface by calling the moviepy library and Tkinter through Python.

[0101] Another object of the present invention is to provide a computer device, which includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the full-automatic CFD modeling method for laser and its hybrid welding process.

[0102] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor executes the steps of the full-automatic CFD modeling method for laser and its hybrid welding process.

[0103] Another object of the present invention is to provide an information data processing terminal for implementing the full-automatic CFD modeling system for laser and its hybrid welding process.

[0104] Combined with the above technical solutions and solved technical problems, the advantages and positive effects of the technical solution to be protected by the present invention are:

[0105] First, the present invention proposes a fully automatic CFD modeling method and system for laser and its hybrid welding processes based on the real light field distribution, which can achieve high-precision and fully automatic simulation of the laser welding process. Based on the existing CFD simulation technology, the present invention integrates the control of Python language and Fluent software to automatically generate a welding heat source model containing the real light field distribution, and combines factors such as arc effect and molten pool dynamics during the welding process to realize the full-process simulation and analysis of the laser and its hybrid welding processes.

[0106] Based on the existing technology, the present invention proposes a series of innovative improvements to address the deficiencies in the laser and its hybrid welding processes, thereby significantly enhancing the performance and application value of the system in multiple aspects. First, by introducing a laser heat source model based on the real light field distribution, the present invention greatly improves the accuracy of the welding process simulation. Traditional welding heat source models usually assume uniform distribution of laser energy and ignore the non-uniformity of the light field in the actual space. This simplified assumption leads to a certain deviation between the simulation results and the actual situation. The heat source model of the present invention accurately calculates the distribution of laser energy in space and its interaction with the welding material through the ray tracing method. Especially under the conditions of multiple reflections and multiple scattering, it can truly reflect the energy transfer path and distribution law during the laser welding process. This improvement ensures a high degree of consistency between the numerical simulation and the actual welding results, thus better predicting the molten pool shape and welding quality.

[0107] Secondly, the present invention adopts a fully automatic CFD modeling process, which greatly reduces the operation complexity of the numerical simulation of the welding process. When establishing the CFD model of laser-arc hybrid welding in the existing technology, it is often necessary to manually set multiple boundary conditions, heat source parameters, and complex physical models, with cumbersome operations and easy errors. By using Python to call the Fluent software and combining its TUI interface, the present invention realizes a fully automatic modeling and solving process. This method realizes a fully automatic process from geometric modeling, heat source loading to numerical solution by automatically identifying material properties, generating grids, and calling preset physical parameters, greatly improving the modeling efficiency and accuracy. In addition, the automatic process not only reduces the possibility of human operation errors, but also enables the simulation and optimization of large-scale welding processes, providing a solid technical guarantee for the welding quality monitoring in the production process.

[0108] Beyond the optimization of the welding heat source model, the present invention innovatively introduces a complex source term model based on ray tracing and multi-physics field coupling, including complex source terms such as arc pressure, electromagnetic force, and droplet detachment. The introduction of these physical fields further improves the simulation accuracy of the hybrid welding process, and can more realistically reflect the molten pool behavior under the coupling action of laser and arc and the microscopic dynamic changes during the welding process. These improvements not only ensure the welding quality and structural performance, but also reduce the cost and time of process debugging, making the numerical simulation of complex welding processes more efficient and reliable.

[0109] Generally speaking, through improvements at multiple key technical points in the laser and its hybrid welding process, the present invention has achieved a significant improvement in simulation accuracy, automation level, and operation convenience. It not only significantly improves the accuracy of welding quality control, but also provides a more reliable and efficient technical means for the simulation and optimization of complex welding processes.

[0110] Second, as the creative auxiliary evidence of the claims of the present invention, it is also reflected in the following important aspects:

[0111] (1) The expected benefits and commercial value after the transformation of the technical solution of the present invention are:

[0112] The technical solution of the present invention provides a fully automated CFD modeling system for the laser and its hybrid welding process based on the real light field distribution, significantly improving the simulation accuracy and efficiency of the welding process. The automation feature of this system reduces the need for manual intervention, making the simulation of complex welding processes more convenient and rapid. The expected benefits include shortening the R & D cycle, reducing production costs, and reducing quality problems caused by welding defects. The commercial value is reflected in that this system can be widely applied to industries such as automobile manufacturing, aerospace, and shipbuilding that require high-precision welding, helping enterprises improve production efficiency and product quality, and having great market potential.

[0113] (2) The technical solution of the present invention fills the technical gaps in the domestic and international industries:

[0114] The fully automated CFD modeling and simulation system based on the real light field distribution proposed by the present invention fills the technical gap in the multi-physics field coupling simulation technology in the laser and its hybrid welding process. Existing welding simulation technologies usually cannot accurately reflect the complex light field distribution in the actual welding process, especially the heat source distribution and energy transfer of the laser-arc coupling. By innovatively combining CFD simulation technology and custom physical parameters, the present invention realizes high-precision simulation of complex welding phenomena and solves the limitations of traditional methods in dealing with multi-physics effects such as metal evaporation, molten pool dynamics, and thermal-fluid coupling, providing an advanced technical tool for the domestic and international laser welding fields and filling the gap in automated and intelligent modeling.

[0115] (3) The technical solution of the present invention solves the technical problems that people have been eager to solve but have never been successful in:

[0116] The present invention solves the long-term unsolved technical problem of accurate simulation of multiple physical fields in the process of laser and its hybrid welding. In the past, it was difficult to comprehensively and accurately describe the light field distribution, energy transfer, molten pool dynamics, and complex thermal-fluid coupling phenomena in the welding process through existing numerical simulation technologies. Traditional simulation methods usually rely on empirical formulas or manual setting of complex parameters, and are difficult to cope with the dynamic changes in the welding process, especially showing obvious deficiencies in dealing with non-uniform light source distributions and multi-physical effects. By combining CFD simulation, automated modeling, and custom heat source models, the present invention has achieved accurate simulation of these complex phenomena for the first time, and can provide comprehensive numerical analysis for laser and its hybrid welding processes, truly breaking through the technical bottleneck that has long troubled the welding field.

[0117] (4) The technical solution of the present invention overcomes technical prejudices:

[0118] Traditionally, the simulation of laser and its hybrid welding usually assumes a uniform distribution of light source energy, ignores the actual non-uniformity of the light field, and has inherent simplifications and limitations in dealing with complex multi-physical field coupling phenomena. In the prior art, welding simulation mainly relies on empirical formulas or manual setting of parameters, and it is difficult to achieve refined and automated simulation. By innovatively adopting a real light field distribution, full-automatic CFD modeling, and multi-physical field coupling simulation, the present invention breaks this traditional prejudice, no longer being limited to overly simplified assumptions, but comprehensively improving the accuracy and efficiency of simulation through more accurate physical models and automated processes.

[0119] Third, the technical problems of the prior art solved by the technical solution of the present invention in industrial applications and the significant technical progress:

[0120] 1. Technical problems of the prior art:

[0121] Low degree of automation: In the existing laser and its hybrid welding process, traditional computational fluid dynamics (CFD) modeling requires a lot of manual intervention, especially in the simulation of welding heat sources, the assignment of material properties, and the setting of boundary conditions, relying on manual operations and having low efficiency.

[0122] Multi-step complexity: In the prior art, each step of welding simulation is scattered in different software modules. For example, mesh generation, material property assignment, heat source setting, etc. all require manual execution of different tools or scripts, resulting in a cumbersome process.

[0123] Poor visualization of simulation results: In the prior art, the simulation results of the welding process lack intuitive visualization means and often require professional software to view, which is not conducive to the real-time feedback and dynamic display of the results.

[0124] Insufficient flexibility of the material library: The existing management of material properties is not flexible, and the material database is difficult to expand, unable to quickly adapt to the welding requirements of different materials.

[0125] 2. Technological progress:

[0126] Achieving fully automated modeling: The present invention automatically executes a series of simulation modeling processes from mesh generation, material property assignment to boundary condition setting through Python scripts, greatly improving the automation level of simulation modeling, reducing manual intervention, and enhancing the simulation efficiency.

[0127] Integrated interactive interface: A multi-level interactive interface of the system is created through Python's Tkinter library, integrating all modeling and simulation steps. Users can complete all operations of welding simulation within the same interface, simplifying the operation process and improving the usability.

[0128] Dynamic material library: The present invention creates a dynamically expandable material property library, which can flexibly store and manage the physical properties of different materials. Users can customize materials according to needs, greatly enhancing the flexibility and efficiency of material property assignment.

[0129] Automatically generating simulation result animations: Through seamless docking with Fluent and EnSight, the present invention can automatically generate simulation result animations in MP4 format after simulation calculations and display them in real time through the user interface, which greatly enhances the visualization effect of simulation results.

[0130] Parallel computing and optimization: This method calls parallel computing through Python scripts, improving the calculation speed of welding simulation. Especially in complex three-dimensional simulations, it can complete the simulation in a shorter time, improving the production efficiency in industrial applications.

[0131] Therefore, while solving the problems of the prior art, the present invention realizes fully automated modeling, dynamic visualization of simulation results, and flexible management of the material library, with significant technological progress, capable of effectively enhancing the efficiency and operability of welding simulation, and having great industrial application value. Description of the Drawings

[0132] Figure 1 is the flowchart of the fully automated CFD modeling method for laser and its hybrid welding process provided by the embodiments of the present invention.

[0133] Figure 2It is the structural block diagram of the full-automatic CFD modeling system for laser and its composite welding process provided by the embodiments of the present invention.

[0134] Figure 3 It is the system interface diagram provided by the embodiments of the present invention.

[0135] Figure 4 It is the welding material and its physical property parameter diagram provided by the embodiments of the present invention.

[0136] Figure 5 It is the welding calculation domain establishment diagram provided by the embodiments of the present invention.

[0137] Figure 6 It is the welding parameter and simulation environment configuration diagram provided by the embodiments of the present invention.

[0138] Figure 7 It is the loading calculation domain material property diagram provided by the embodiments of the present invention.

[0139] Figure 8 It is the boundary condition and source term loading diagram provided by the embodiments of the present invention.

[0140] Figure 9 It is the setting calculation time step diagram provided by the embodiments of the present invention.

[0141] Figure 10 It is the Ensight generating welding process video file diagram provided by the embodiments of the present invention.

[0142] Figure 11 It is the welding simulation process real-time monitoring diagram provided by the embodiments of the present invention. Specific embodiments

[0143] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0144] As Figure 1 shown, a full-automatic CFD modeling method for laser and its composite welding process provided by the embodiments of the present invention includes the following steps:

[0145] S101: Create a graphical user interface of the system by calling the Tkinter library through Python, implement a multi-level interactive interface of the welding simulation system, including a main menu and multiple sub-function interfaces, including establishing a calculation domain, selecting a welding method, setting a calculation time step, and viewing calculation result modules;

[0146] S102: Create a material property library through a Python script for storing and managing the physical properties of various materials;

[0147] This material property library contains density, viscosity, thermal conductivity, and specific heat capacity parameters of various common materials, and can be dynamically extended to support user-defined materials. The data structure of the library is designed in dictionary or JSON format for easy searching and calling. The physical properties of each material are indexed by a unique identifier to ensure rapid retrieval and assignment of material properties during the simulation process.

[0148] S103: Read the content of the.rpl file through a Python script, dynamically generate the corresponding Tcl script, and call the ICEMCFD batch processing to execute, automatically performing functions such as creating a geometric model, specifying boundary conditions, and meshing, and generating a welding calculation domain.msh format file.

[0149] S104: Use Python to call the open() function to create a C language subroutine file welding.c for the laser welding basic module.

[0150] By defining a C language code string containing heat sources, radiation heat dissipation, convective heat dissipation, recoil pressure, and evaporation condensation source terms in a Python script, calling the open() function to open the file in write mode ("w"), and using the write() method to write the C code string into the welding.c file, the generation of the C language module is achieved. This step ensures that the core calculation module of the welding simulation can be saved in C language form for subsequent compilation and execution.

[0151] S105: Start the Ansys Fluent simulation software by calling the Fluent Python API through Python.

[0152] Using the pyfluent.launch_fluent method, set the simulation dimension (2D or 3D mode) and calculation accuracy (single precision or double precision). At the same time, specify the meshing mode, working directory, and Fluent root path, and enable parallel computing as needed (set parallel = True and the number of solver processes for the number of computing cores). This step realizes the seamless connection between the Fluent software and the Python environment by accurately configuring the above parameters.

[0153] S106: Import the simulation mesh file through a Python script, and use the tui.file.read_mesh command in the Fluent TUI (Text User Interface) interface to load the mesh file at the specified path into the Fluent environment. This step realizes the initialization of the mesh model by calling the mesh file path.

[0154] S107: According to the material property library created in step S101, use Fluent TUI commands in this step to assign physical parameters to the selected materials;

[0155] The Python script will call the material property library, use the material name as an index to retrieve the corresponding physical properties from the material library, and assign these parameters to the Fluent simulation model through the tui.define.materials.modify command; this step ensures that the material properties are correctly loaded into the simulation model;

[0156] S108: Compile and load the user-defined function (UDF) subroutine through a Python script, and use the Fluent TUI command tui.compile.uda to compile the specified UDF source file;

[0157] After successful compilation, use tui.define.user_defined.function_hooks.read to load the source terms or custom functions in the UDF file for subsequent calls during the simulation process; this step realizes the correct loading of the custom physical model or source terms;

[0158] S109: Set the boundary conditions in the simulation through Fluent's TUI commands;

[0159] First, use the tui.define.boundary_conditions.set command to assign corresponding physical conditions to boundaries such as inlets, outlets, and walls; for example, the velocity can be set for the inlet, the pressure can be set for the outlet, and the temperature or no-slip condition can be set for the wall; this step ensures that each boundary condition in the simulation correctly reflects the physical meaning;

[0160] S110: Associate the source terms in the compiled and loaded user-defined function with the corresponding regions or boundary conditions;

[0161] Through the tui.define.user_defined.function_hooks.source_term command, bind the loaded source terms to the boundary conditions or specific regions; this step ensures that during the simulation calculation process, the source terms can affect the boundary conditions and realize complex physical field simulations;

[0162] S111: Call Fluent TUI commands through a Python script to initialize the model;

[0163] First, use the solver.tui.solve.initialize.initialize_flow() method for standard initialization, and specify through set_parameters that the initialization acts on all grid regions; then use set_reference_frame to set the reference frame relative to the cell region, and subsequently set the initial physical conditions for the flow field through set_initial_conditions; finally, execute the execute_initialization() command to start the initialization process and ensure the successful completion of model initialization;

[0164] S112: Call Fluent TUI commands through Python scripts to achieve simulation calculation settings;

[0165] Use solver.tui.solve.set.time_step to set the time step; and set the number of time steps for the simulation through solver.tui.solve.set.number_of_time_steps;

[0166] Call solver.tui.solve.set.max_iterations_per_time_step to set the maximum number of iterations per time step, and solver.tui.solve.set.reporting_interval

[0167] and solver.tui.solve.set.profile_update_interval to set the reporting and profile update intervals;

[0168] Finally, execute solver.tui.solve.execute_calculation() to start the simulation calculation;

[0169] S113: Import the simulation results of Fluent and export an MP4-format animation by calling the EnSight Python API through a Python script;

[0170] First, use the ens.Session() method to start an EnSight session, and call the session.data.import_fluid() method to import the Fluent.cas and.dat files;

[0171] Then, an isosurface of the temperature field is generated through the scene.add_iso_surface() method; subsequently, the output path and file format are specified as MP4 through the scene.animation.start_output() method, and the scene.animation.export_frames() is called to generate animation frames.

[0172] Finally, the scene.animation.stop_output() is used to complete the export of the MP4 format animation.

[0173] S114: Use Python to call the moviepy library and Tkinter to achieve real-time playback of the MP4 format video generated by EnSight in the simulation software interface.

[0174] First, use the VideoFileClip function of moviepy to load the video file at the specified path, and call the iter_frames method to read the video frame by frame.

[0175] Then, use PIL (Python Imaging Library) to convert each frame into an image format supported by Tkinter, and display it on the user interface through the Tkinter Label component; during the playback process, the video playback rate is adjusted in real time through the Scale control of Tkinter to ensure that the user can customize the playback speed and achieve a visual dynamic display of the simulation results.

[0176] The welding heat source, radiation heat dissipation, convective heat dissipation, recoil pressure, and evaporation condensation source terms provided by the embodiments of the present invention include:

[0177] 1) Arc heat source term:

[0178] The energy source term of the arc is modeled using a 3D double-ellipsoid heat source, which captures the unique spatial characteristics of the arc and is defined by the following formula:

[0179]

[0180] Among them, ff and fr respectively represent the proportions of the total thermal energy allocated to the front ellipsoid and the rear ellipsoid; U and I are the voltage and current intensities during the welding process; the semi-axes of the double-ellipsoid heat source in the x, y, and z directions are represented by af, b1, k1 for the front ellipsoid and ar, b2, k2 for the rear ellipsoid, and v represents the welding speed.

[0181] 2) Arc pressure source term:

[0182] Arc pressure is a key factor affecting the stability and depth of the molten pool, and is modeled by the following formula:

[0183]

[0184] Among them, U0 is the permeability of free space, I is the current intensity; Ra is the radius affected by the arc, and ReARC is the coefficient of the arc pressure; the arc pressure is crucial when determining the force components of the arc on the molten material in the x, y, and z directions, and these components are defined as xarc_p, yarc_p, and zarc_p respectively;

[0185] 3) Electromagnetic force source term:

[0186] The arc generates electromagnetic force by making the plasma conduct electricity in the molten pool, which is defined by the following formula:

[0187]

[0188] Among them, u0 is the magnetic permeability of the medium, I is the current intensity, σ is the current distribution coefficient, and D represents the thickness of the workpiece;

[0189] 4) Droplet source term:

[0190] During the arc welding process, metal droplets are formed at the tip of the welding wire and then transferred to the molten pool; the metal transfer adopts the mode of one droplet per pulse, that is, the droplet separation frequency is consistent with the arc pulse frequency; in the simulation, each droplet is introduced at a specified position in the computational domain and modeled as a spherical fluid; the mass-momentum source term is characterized by the fluid density, initial temperature, and velocity; the energy and momentum of the droplet are brought in when it fuses with the molten pool;

[0191] 5) Laser heat source:

[0192] The energy source term of the laser uses the ray tracing method to simulate the reflection and absorption of energy on the wall of the keyhole; this method simulates the interaction between the laser beam and the keyhole by calculating the path and reflection points of the rays and using trilinear interpolation; the trajectory of the laser ray starts from the point (x0, y0, z0) and is determined by the direction cosines (U, V, W), and is solved by the following equation:

[0193]

[0194] Among them, D represents the distance along the ray, and (Vx, Vy, Vz) represents the gradient of the VOF field in the computational cell; the Gaussian beam profile based on the TEM00 mode is used to simulate the laser energy distribution, where the intensity I0(r, z) is expressed as:

[0195]

[0196] The beam radius r(z) along the propagation direction is expressed as:

[0197]

[0198] Among them, Q represents the laser power, r0 is the focal radius at the focal plane, and zr is the Rayleigh length; the absorption rate R of the laser energy is calculated using the Fresnel reflection theory, considering the incident angle and the emissivity of the hole wall, and is expressed as:

[0199]

[0200] Among them, φ is the incident angle, and ε is the emissivity of the hole wall;

[0201] 6) Recoil pressure source term:

[0202] 7) Surface tension source term:

[0203] 8) Heat dissipation source term;

[0204] 9) Buoyancy source term.

[0205] The recoil pressure source term provided by the embodiment of the present invention:

[0206] The recoil pressure generated during the laser welding process is defined by the following formula:

[0207]

[0208] Among them, Psat(T), P0, Lν, Tb, and R represent the saturation pressure, atmospheric pressure, latent heat of vaporization, boiling point temperature, and gas constant, respectively.

[0209] The surface tension source term provided by the embodiment of the present invention:

[0210] The surface tension generated during the welding process is modeled as a function of temperature and is expressed as:

[0211]

[0212] Among them, γm represents the surface tension of pure metal at the melting point Tm, A is a constant related to the temperature gradient of the surface tension, and Kseg is the equilibrium segregation coefficient.

[0213] The heat dissipation source term provided by the embodiment of the present invention:

[0214] The radiative and convective heat transfer between the molten pool surface and the surrounding air is calculated by the following formula:

[0215]

[0216] Among them, εrad is the radiative heat dissipation coefficient, σ is the Stefan-Boltzmann constant, hconv is the convection coefficient, and T0 is the ambient temperature.

[0217] The buoyancy source term provided by the embodiment of the present invention:

[0218] Since the density of liquid metal decreases as the temperature increases, thermal buoyancy is generated from the temperature gradient within the molten pool and is defined by the following equation:

[0219] F b = ραg(T - T m )

[0220] where ρ represents the density of the liquid metal, α is the coefficient of thermal expansion, g is the acceleration due to gravity, and Tm is the ambient temperature.

[0221] As Figure 2 shown, a full-automatic CFD modeling system for laser and its hybrid welding process provided by an embodiment of the present invention includes:

[0222] A calling module, which is used to create a graphical user interface of the system by calling the Tkinter library through Python, implement a multi-level interactive interface of the welding simulation system, including a main menu and multiple sub-function interfaces, including a calculation domain establishment module, a welding method selection module, a calculation time step setting module, and a calculation result viewing module;

[0223] A storage management module, which is used to create a material property library through a Python script for storing and managing the physical properties of various materials; the material property library contains the density, viscosity, thermal conductivity, and specific heat capacity parameters of various common materials and can be dynamically extended to support user-defined materials; the data structure of the material library is designed as a dictionary or JSON format for easy searching and calling; the physical properties of each material are indexed by a unique identifier to ensure that the material properties can be quickly retrieved and assigned during the simulation process;

[0224] A reading module, which is used to read the content of the.rpl file through a Python script, dynamically generate a corresponding Tcl script, call the ICEMCFD batch processing to execute, and automatically execute functions such as creating a geometric model, specifying boundary conditions, and mesh generation to generate a welding calculation domain.msh format file;

[0225] A calling module, which is used to create a C language subroutine file welding.c of the laser welding basic module by calling the open() function through Python; by defining a C language code string containing welding heat sources, radiative heat dissipation, convective heat dissipation, recoil pressure, and evaporation condensation source terms in the Python script, calling the open() function to open the file in write mode ("w"), and using the write() method to write the C code string into the welding.c file, the generation of the C language module is realized; this step ensures that the core calculation module of the welding simulation can be saved in the form of C language for subsequent compilation and execution;

[0226] A startup module for launching the Ansys Fluent simulation software by calling the Fluent Python API through Python. Using the pyfluent.launch_fluent method, set the simulation dimension (2D or 3D mode) and calculation accuracy (single precision or double precision). At the same time, specify the meshing mode, working directory, and Fluent root path, and enable parallel computing as needed (set parallel=True and the number of solver processes as the number of computing cores). This step achieves a seamless connection between the Fluent software and the Python environment by accurately configuring the above parameters.

[0227] An import module for importing the simulation mesh file through a Python script. Use the tui.file.read_mesh command in the Fluent TUI (Text User Interface) interface to load the mesh file at the specified path into the Fluent environment. This step initializes the mesh model by calling the mesh file path.

[0228] An assignment module for assigning physical parameters of the selected material using Fluent TUI commands in this step according to the created material property library. The Python script will call the material property library, use the material name as an index to retrieve the corresponding physical properties from the material library, and assign these parameters to the Fluent simulation model through the tui.define.materials.modify command. This step ensures that the material properties are correctly loaded into the simulation model.

[0229] A loading module for compiling and loading user-defined function (UDF) subroutines through a Python script. Use the Fluent TUI command tui.compile.uda to compile the specified UDF source file. After successful compilation, use tui.define.user_defined.function_hooks.read to load the source terms or custom functions in the UDF file for calling in subsequent simulation processes. This step achieves the correct loading of the custom physical model or source terms.

[0230] A setting module for setting the boundary conditions in the simulation using Fluent's TUI commands.

[0231] An association module, used to associate the source terms in the user-defined functions compiled and loaded with the corresponding regions or boundary conditions; through the tui.define.user_defined.function_hooks.source_term command, bind the loaded source terms to the boundary conditions or specific regions; this step ensures that during the simulation calculation process, the source terms can affect the boundary conditions and achieve complex physical field simulations;

[0232] An initialization module, used to initialize the model by calling Fluent TUI commands through Python scripts;

[0233] A calculation settings module, used to implement simulation calculation settings by calling Fluent TUI commands through Python scripts;

[0234] An export module, used to import the simulation results of Fluent and export animations in MP4 format by calling the EnSight Python API through Python scripts;

[0235] A generation module, used to realize the real-time playback of the MP4 format video generated by EnSight in the simulation software interface by calling the moviepy library and Tkinter through Python.

[0236] Another object of the present invention is to provide a computer device, the computer device includes a memory and a processor, the memory stores a computer program, when the computer program is executed by the processor, the processor executes the steps of the full-automatic CFD modeling method for the laser and its hybrid welding process.

[0237] Another object of the present invention is to provide a computer-readable storage medium, storing a computer program, when the computer program is executed by a processor, the processor executes the steps of the full-automatic CFD modeling method for the laser and its hybrid welding process.

[0238] Another object of the present invention is to provide an information data processing terminal, the information data processing terminal is used to implement the full-automatic CFD modeling system for the laser and its hybrid welding process.

[0239] Specific implementation of the present invention:

[0240] Step 1: Create a graphical user interface (GUI) of the system by calling the Tkinter library through Python, and implement a multi-level interactive interface of the welding simulation system, including a main menu and multiple sub-function interfaces, including modules such as establishing a computational domain, selecting a welding method, setting a calculation time step, and viewing calculation results, as Figure 3 shown.

[0241] Step 2: Create a material property library through a Python script for storing and managing the physical properties of various materials. This material property library contains parameters such as density, viscosity, thermal conductivity, specific heat capacity, etc. of various common materials, and can be dynamically extended to support user-defined materials. The data structure of the material library is designed as a dictionary or JSON format for easy searching and calling. The physical properties of each material are indexed by a unique identifier (such as material name or ID) to ensure that the material properties can be quickly retrieved and assigned during the simulation process, such as Figure 4 shown as selecting 316L stainless steel as the welding material.

[0242] Step 3: Read the content of the.rpl file through a Python script and dynamically generate the corresponding Tcl script, which is called by ICEMCFD batch processing to automatically execute functions such as creating a geometric model, specifying boundary conditions, and mesh generation, and generate a welding calculation domain.msh format file, such as Figure 5 shown as the calculation domain creation interface and the established calculation domain.

[0243] Step 4: Use Python to call the open() function to create a C language subroutine file welding.c for the laser welding basic module. By defining a C language code string containing source terms such as welding heat source, radiative heat dissipation, convective heat dissipation, recoil pressure, and evaporation condensation in the Python script, call the open() function to open the file in write mode ("w"), and use the write() method to write the C code string into the welding.c file, realizing the generation of the C language module. This step ensures that the core calculation module of the welding simulation can be saved in the form of C language for subsequent compilation and execution. The theoretical parts of source terms such as welding heat source, radiative heat dissipation, convective heat dissipation, recoil pressure, and evaporation condensation are as follows:

[0244] 1. Arc heat source term:

[0245] The energy source term of the arc is modeled using a 3D double ellipsoidal heat source, which captures the unique spatial characteristics of the arc and is defined by the following formula:

[0246]

[0247] where ff and fr represent the proportions of the total thermal energy allocated to the front ellipsoid and the rear ellipsoid, respectively. U and I are the voltage and current intensities during the welding process. The semi-axes of the double ellipsoidal heat source in the x, y, and z directions are represented by af, b1, k1 for the front ellipsoid and ar, b2, k2 for the rear ellipsoid, and v represents the welding speed.

[0248] 2. Arc pressure source term:

[0249] The arc pressure is a key factor affecting the stability and depth of the molten pool and is modeled by the following formula:

[0250]

[0251] where μ0 is the permeability of free space, I is the current intensity, Ra is the radius affected by the arc, and ReARC is the coefficient of the arc pressure. The arc pressure is crucial in determining the force components of the arc on the molten material in the x, y, and z directions, which are defined as xarc_p, yarc_p, and zarc_p, respectively.

[0252] 3. Electromagnetic force source term:

[0253] The arc generates electromagnetic force by making the plasma conductive within the molten pool and is defined by the following formula:

[0254]

[0255] where μ is the magnetic permeability of the medium, I is the current intensity, σ is the current distribution coefficient, and D represents the thickness of the workpiece.

[0256] 4. Droplet source term:

[0257] During arc welding, metal droplets form at the tip of the welding wire and are subsequently transferred into the molten pool. The metal transfer adopts a one-droplet-per-pulse mode, i.e., the droplet separation frequency is consistent with the arc pulse frequency. In the simulation, each droplet is introduced at a specified position within the computational domain and is modeled as a spherical fluid. The mass-momentum source term is characterized by the fluid density, initial temperature, and velocity. The energy and momentum of the droplet are brought in when it fuses with the molten pool.

[0258] 5. Laser heat source:

[0259] The energy source term of the laser uses the ray tracing method to simulate the reflection and absorption of energy on the wall of the keyhole. This method simulates the interaction between the laser beam and the keyhole by calculating the path and reflection points of the rays and using trilinear interpolation. The trajectory of the laser ray starts from the point (x0, y0, z0) and is determined by the direction cosines (U, V, W) and is solved by the following equation:

[0260]

[0261] where D represents the distance along the ray, and (Vx, Vy, Vz) represents the gradient of the VOF field in the computational cell. The Gaussian beam profile based on the TEM00 mode is used to simulate the laser energy distribution, where the intensity I0(r, z) is expressed as:

[0262]

[0263] The beam radius r(z) along the propagation direction is expressed as:

[0264]

[0265] Among them, Q represents the laser power, r0 is the focal radius at the focal plane, and zr is the Rayleigh length. The absorption rate R of the laser energy is calculated using the Fresnel reflection theory, considering the incident angle and the emissivity of the hole wall, and is expressed as:

[0266]

[0267] Among them, φ is the incident angle and ε is the emissivity of the hole wall.

[0268] 6. Recoil pressure source term:

[0269] The recoil pressure generated during the laser welding process is defined by the following formula:

[0270]

[0271] Among them, Psat(T), P0, Lν, Tb, and R represent the saturation pressure, atmospheric pressure, latent heat of vaporization, boiling point temperature, and gas constant, respectively.

[0272] 7. Surface tension source term:

[0273] The surface tension generated during the welding process is modeled as a function of temperature and is expressed as:

[0274]

[0275] Among them, γm represents the surface tension of the pure metal at the melting point Tm, A is a constant related to the temperature gradient of the surface tension, and Kseg is the equilibrium segregation coefficient.

[0276] 8. Heat dissipation source term

[0277] The radiative and convective heat transfer between the molten pool surface and the surrounding air is calculated by the following formula:

[0278]

[0279] Among them, εrad is the radiative heat dissipation coefficient, σ is the Stefan-Boltzmann constant, hconv is the convective coefficient, and T0 is the ambient temperature.

[0280] 9. Buoyancy source term:

[0281] Since the density of the liquid metal decreases as the temperature increases, the thermal buoyancy is generated from the temperature gradient in the molten pool and is defined by the following formula:

[0282] F b = ραg(T - T m )

[0283] Among them, ρ represents the density of the liquid metal, α is the coefficient of thermal expansion, g is the acceleration due to gravity, and Tm is the ambient temperature.

[0284] Step 5: Use Python to call the Fluent Python API to start the Ansys Fluent simulation software. With the pyfluent.launch_fluent method, set the simulation dimension (2D or 3D mode) and calculation accuracy (single precision or double precision). At the same time, specify the meshing mode, working directory, and Fluent root path, and enable parallel computing as needed (set parallel = True and the number of solver processes, i.e., the number of computing cores). Also, write relevant process parameters such as laser power, welding speed, and defocus amount into the welding.c subroutine. By accurately configuring the above parameters in this step, seamless connection between the Fluent software and the Python environment is achieved, as Figure 6 shown.

[0285] Step 6: Import the simulation mesh file through a Python script. Use the tui.file.read_mesh command in the Fluent TUI (Text User Interface) interface to load the mesh file at the specified path into the Fluent environment. By calling the mesh file path in this step, the initialization of the mesh model is achieved.

[0286] Step 7: According to the material property library created in Step 1, use Fluent TUI commands to assign physical parameters of the selected materials in this step. The Python script will call the material property library, use the material name as an index to retrieve the corresponding physical properties (such as density, viscosity, thermal conductivity, and specific heat capacity) from the material library, and assign these parameters to the Fluent simulation model through the tui.define.materials.modify command. This step ensures that the material properties are correctly loaded into the simulation model, as Figure 7 shown.

[0287] Step 8: Compile and load the user-defined function (UDF) subroutine through a Python script. Use the Fluent TUI command tui.compile.uda to compile the specified UDF source file. After successful compilation, use tui.define.user_defined.function_hooks.read to load the source terms or custom functions in the UDF file for calling in subsequent simulation processes. This step achieves the correct loading of the custom physical model or source terms.

[0288] Step 9: Set the boundary conditions in the simulation through Fluent's TUI commands. First, use the tui.define.boundary_conditions.set command to assign corresponding physical conditions to boundaries such as inlets, outlets, and walls. For example, the velocity can be set for the inlet, the pressure for the outlet, and the temperature or no-slip condition for the wall. This step ensures that each boundary condition in the simulation correctly reflects the physical meaning, as Figure 8 shown.

[0289] Step 10: Associate the source terms in the compiled and loaded user-defined functions with the corresponding regions or boundary conditions. Use the tui.define.user_defined.function_hooks.source_term command to bind the loaded source terms to the boundary conditions or specific regions. This step ensures that during the simulation calculation process, the source terms can affect the boundary conditions and achieve complex physical field simulations. As Figure 8 shown.

[0290] Step 11: Initialize the model by calling Fluent TUI commands through a Python script. First, use the solver.tui.solve.initialize.initialize_flow() method for standard initialization and specify that the initialization acts on all mesh regions through set_parameters. Then use set_reference_frame to set the reference frame relative to the cell region, and subsequently use set_initial_conditions to set the initial physical conditions for the flow field. Finally, execute the execute_initialization() command to start the initialization process and ensure the successful completion of the model initialization.

[0291] Step 12: Call Fluent TUI commands through a Python script to achieve simulation calculation settings. Use solver.tui.solve.set.time_step to set the time step, and use solver.tui.solve.set.number_of_time_steps to set the number of time steps for the simulation. Call solver.tui.solve.set.max_iterations_per_time_step to set the maximum number of iterations per time step, and use solver.tui.solve.set.reporting_interval and solver.tui.solve.set.profile_update_interval to set the reporting and profile update intervals. Finally, execute solver.tui.solve.execute_calculation() to start the simulation calculation, as Figure 9 shown.

[0292] Step 13: Call the EnSight Python API through a Python script to import the Fluent simulation results and export an animation in MP4 format. First, use the ens.Session() method to start an EnSight session, and call the session.data.import_fluid() method to import the Fluent.cas and.dat files. Then, generate an isosurface of the temperature field through the scene.add_iso_surface() method. Subsequently, specify the output path and file format as MP4 through the scene.animation.start_output() method, and call scene.animation.export_frames() to generate animation frames. Finally, use scene.animation.stop_output() to complete the export of the MP4 format animation, as Figure 10 shown.

[0293] Step 14: Use Python to call the moviepy library and Tkinter to achieve real-time playback of the MP4 format video generated by EnSight in the simulation software interface. First, use the VideoFileClip function of moviepy to load the video file at the specified path, and call the iter_frames method to read the video frame by frame. Then, use PIL (Python Imaging Library) to convert each frame into an image format supported by Tkinter, and display it on the user interface through the Tkinter Label component. During the playback, the video playback rate is adjusted in real time through the Scale control of Tkinter to ensure that the user can customize the playback speed and achieve a visual dynamic display of the simulation results, such as Figure 11 shown

[0294] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those of ordinary skill in the art can understand that the above devices and methods can be implemented using computer-executable instructions and / or included in processor control code, such as provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuits of programmable hardware devices such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable logic devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, or can be implemented by a combination of the above hardware circuits and software, such as firmware.

[0295] As described above, only the specific embodiments of the present invention are provided, but the protection scope of the present invention is not limited thereto. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention by those skilled in the art within the technical scope disclosed by the present invention shall be covered by the protection scope of the present invention.

Claims

1. A fully automatic CFD modeling method for a laser and its composite welding process, characterized in that, It includes the following steps: Create the graphical user interface of the system by calling the Tkinter library in Python, and implement the multi-level interactive interface of the welding simulation system, including the main menu and multiple sub-function interfaces; Create a material property library through Python scripts to store and manage the physical properties of various materials. The material library is stored in dictionary or JSON format; Read the content of the.rpl file through Python scripts, generate the corresponding Tcl script, and call ICEMCFD to perform geometric model creation, boundary condition specification, and mesh generation, generating a welding calculation domain in.msh format; Generate a C language subroutine file welding.c through Python scripts for simulating heat sources, radiative heat dissipation, convective heat dissipation, recoil pressure, and evaporation condensation source terms in welding; Call the Fluent Python API to start the Ansys Fluent simulation software, import the simulation mesh file, and load the mesh model, set the simulation boundary conditions, and initialize the physical field through the Fluent TUI interface; Compile and load the user-defined function UDF, associate the source terms in the UDF with the simulation region or boundary conditions, and perform complex simulations of the physical field; Call the Fluent TUI command to set the simulation calculation, including time step and number of iterations, and start the simulation calculation; Import the simulation results through the EnSight Python API, generate temperature field isosurfaces, and export MP4 format animations; Implement real-time playback of simulation results through Python's call to the moviepy library and Tkinter, and dynamically display the simulation calculation results.

2. The fully automatic CFD modeling method for the laser and its composite welding process according to claim 1, characterized in that, Specifically, it includes the following steps: Step 1: Create the graphical user interface of the system by calling the Tkinter library in Python, and implement the multi-level interactive interface of the welding simulation system, including the main menu and multiple sub-function interfaces, including modules for establishing the calculation domain, selecting the welding method, setting the calculation time step, and viewing the calculation results; Step 2: Create a material property library through Python scripts to store and manage the physical properties of various materials; This material property library contains density, viscosity, thermal conductivity, and specific heat capacity parameters of various common materials, and can be dynamically extended to support user-defined materials; the data structure of the material library is designed as a dictionary or JSON format for easy searching and calling; the physical properties of each material are indexed by a unique identifier to ensure that the material properties can be quickly retrieved and assigned during the simulation process; Step 3: Read the content of the.rpl file through Python scripts and dynamically generate the corresponding Tcl script, and call ICEMCFD batch execution to automatically perform functions such as creating geometric models, specifying boundary conditions, and mesh generation, generating a welding calculation domain in.msh format; Step 4: Use Python to call the open() function to create a C language subroutine file welding.c for the laser welding basic module; By defining a C language code string containing welding heat source, radiative heat dissipation, convective heat dissipation, recoil pressure, and evaporation condensation source terms in a Python script, calling the open() function to open a file in write mode "w", and using the write() method to write the C code string into the welding.c file, the generation of the C language module is achieved; this step ensures that the core calculation module for welding simulation can be saved in the form of C language for subsequent compilation and execution; Step 5: Start the Ansys Fluent simulation software by calling the Fluent Python API through Python; Using the pyfluent.launch_fluent method, set the simulation dimension to 2D or 3D mode and the calculation precision to single precision or double precision; at the same time, specify the meshing mode meshing_mode, working directory work_dir, and Fluent root path root_path, and enable parallel computing as needed, setting parallel = True and the number of solverprocesses calculation cores; this step realizes the seamless connection between the Fluent software and the Python environment by accurately configuring the above parameters; Step 6: Import the simulation mesh file through a Python script and use the tui.file.read_mesh command in the FluentTUI (Text User Interface) interface to load the mesh file at the specified path into the Fluent environment; this step realizes the initialization of the mesh model by calling the mesh file path; Step 7: According to the material property library created in Step 1, use the FluentTUI command in this step to assign the physical parameters of the selected material; The Python script will call the material property library, use the material name as an index to retrieve the corresponding physical properties from the material library, and assign these parameters to the Fluent simulation model through the tui.define.materials.modify command; this step ensures that the material properties are correctly loaded into the simulation model; Step 8: Compile and load the user-defined function (UDF) subroutine through a Python script, and use the Fluent TUI command tui.compile.uda to compile the specified UDF source file; After successful compilation, use tui.define.user_defined.function_hooks.read to load the source terms or custom functions in the UDF file for calling in the subsequent simulation process; this step realizes the correct loading of the custom physical model or source terms; Step 9: Set the boundary conditions in the simulation through the Fluent TUI command; First, use the tui.define.boundary_conditions.set command to assign corresponding physical conditions to boundaries such as inlets, outlets, and walls; the velocity can be set for the inlet, the pressure for the outlet, and the temperature or no-slip condition for the wall; this step ensures that each boundary condition in the simulation correctly reflects the physical meaning; Step 10: Associate the source terms in the compiled and loaded user-defined functions with the corresponding regions or boundary conditions; Through the tui.define.user_defined.function_hooks.source_term command, bind the loaded source terms to the boundary conditions or specific regions; this step ensures that during the simulation calculation process, the source terms can affect the boundary conditions, enabling the simulation of complex physical fields; Step 11: Initialize the model by calling FluentTUI commands through a Python script; First, use the solver.tui.solve.initialize.initialize_flow() method for standard initialization and specify through set_parameters that the initialization acts on all mesh regions; then use set_reference_frame to set the reference frame relative to the cell region, and subsequently use set_initial_conditions to set the initial physical conditions for the flow field; finally, execute the execute_initialization() command to start the initialization process, ensuring the successful completion of the model initialization; Step 12: Implement the simulation calculation settings by calling FluentTUI commands through a Python script; Use solver.tui.solve.set.time_step to set the time step; and use solver.tui.solve.set.number_of_time_steps to set the number of time steps for the simulation; Call solver.tui.solve.set.max_iterations_per_time_step to set the maximum number of iterations per time step, and solver.tui.solve.set.reporting_interval and solver.tui.solve.set.profile_update_interval to set the reporting and profile update intervals; Finally, execute solver.tui.solve.execute_calculation() to start the simulation calculation; Step 13: Import the Fluent simulation results and export an MP4-format animation by calling the EnSightPythonAPI through a Python script; First, start an EnSight session using the ens.Session() method and call the session.data.import_fluid() method to import the Fluent.cas and.dat files; Then, generate an isosurface of the temperature field using the scene.add_iso_surface() method; subsequently, specify the output path and file format as MP4 using the scene.animation.start_output() method and call the scene.animation.export_frames() method to generate animation frames, Finally, use the scene.animation.stop_output() method to complete the export of the MP4 format animation; Step 14: Use Python to call the moviepy library and Tkinter to achieve real-time playback of the MP4 format video generated by EnSight in the simulation software interface; First, use the VideoFileClip function of moviepy to load the video file at the specified path and call the iter_frames method to read the video frame by frame; Then, use PIL, that is, Python Imaging Library, to convert each frame into an image format supported by Tkinter and display it on the user interface through the Tkinter Label component; during the playback process, use the Scale control of Tkinter to adjust the video playback rate in real time to ensure that the user can customize the playback speed and achieve a visual dynamic display of the simulation results.

3. The full-automatic CFD modeling method for the laser and its composite welding process according to claim 1, characterized in that, The welding heat source, radiation heat dissipation, convective heat dissipation, recoil pressure, and evaporation condensation source terms include: 1) Arc heat source term: The energy source term of the arc is modeled using a 3D double ellipsoidal heat source, which is defined by the following formula by capturing the unique spatial characteristics of the arc: where ff and fr respectively represent the proportions of the total heat energy allocated to the front ellipsoid and the rear ellipsoid; U and I are the voltage and current intensities during the welding process; the semi-axes of the double ellipsoidal heat source in the x, y, and z directions are represented by af, b1, k1 for the front ellipsoid and ar, b2, k2 for the rear ellipsoid, and v represents the welding speed; 2) Arc pressure source term: Arc pressure is a key factor affecting the stability and depth of the molten pool and is modeled by the following formula: where U0 is the vacuum permeability, I is the current intensity; Ra is the radius affected by the arc, and ReARC is the coefficient of arc pressure; arc pressure is crucial in determining the force components of the arc on the molten material in the x, y, and z directions, which are defined as xarc_p, yarc_p, and zarc_p respectively; 3) Electromagnetic force source term: The arc generates an electromagnetic force by making the plasma conductive in the molten pool and is defined by the following formula: where u0 is the magnetic permeability of the medium, I is the current intensity, σ is the current distribution coefficient, and D represents the thickness of the workpiece; 4) Droplet source term: During the arc welding process, metal droplets form at the tip of the welding wire and are then transferred to the molten pool; the metal transfer adopts a mode of one droplet per pulse, that is, the droplet separation frequency is consistent with the arc pulse frequency; in the simulation, each droplet is introduced at a specified position within the computational domain and is modeled as a spherical fluid; the mass-momentum source term is characterized by the fluid density, initial temperature, and velocity; the energy and momentum of the droplet are brought in when it fuses with the molten pool. 5) Laser heat source: The energy source term of the laser uses the ray tracing method to simulate the reflection and absorption of energy on the wall of the keyhole; this method simulates the interaction between the laser beam and the keyhole by calculating the path and reflection points of the rays and using trilinear interpolation; the trajectory of the laser ray starts from the point (x0, y0, z0) and is determined by the direction cosines (U, V, W), and is solved by the following equation: where D represents the distance along the ray, and (Vx, Vy, Vz) represents the gradient of the VOF field in the computational cell; the Gaussian beam profile based on the TEM00 mode is used to simulate the laser energy distribution, where the intensity I0(r, z) is expressed as: The beam radius r(z) along the propagation direction is expressed as: where Q represents the laser power, r0 is the focal radius at the focal plane, and zr is the Rayleigh length; the absorption rate R of the laser energy is calculated using the Fresnel reflection theory, considering the incident angle and the emissivity of the keyhole wall, and is expressed as: where φ is the incident angle and ε is the emissivity of the keyhole wall. 6) Recoil pressure source term: 7) Surface tension source term: 8) Heat dissipation source term; 9) Buoyancy source term.

4. The fully automatic CFD modeling method for the laser and its composite welding process according to claim 3, characterized in that, The recoil pressure source term: The recoil pressure generated during the laser welding process is defined by the following formula: where Psat(T), P0, Lν, Tb, and R represent the saturation pressure, atmospheric pressure, latent heat of vaporization, boiling point temperature, and gas constant, respectively.

5. The fully automatic CFD modeling method for the laser and its composite welding process according to claim 3, characterized in that The surface tension source term: The surface tension generated during the welding process is modeled as a function of temperature and is expressed as: where γm represents the surface tension of pure metal at the melting point Tm, A is a constant related to the temperature gradient of the surface tension, and Kseg is the equilibrium segregation coefficient.

6. The fully automatic CFD modeling method for the laser and its hybrid welding process according to claim 3, characterized in that, The heat dissipation source term: The radiative and convective heat transfer between the surface of the molten pool and the surrounding air is calculated by the following formula: where εrad is the radiative heat dissipation coefficient, σ is the Stefan-Boltzmann constant, hconv is the convective coefficient, and T0 is the ambient temperature.

7. The fully automatic CFD modeling method for the laser and its composite welding process according to claim 3, characterized in that The buoyancy source term: Since the density of liquid metal decreases with increasing temperature, thermal buoyancy is generated from the temperature gradient within the molten pool and is defined by the following formula: F b = ραg(T - T m ) where ρ represents the density of liquid metal, α is the coefficient of thermal expansion, g is the acceleration due to gravity, and Tm is the ambient temperature.

8. A full-automatic CFD modeling system for a laser and its hybrid welding process, which implements the full-automatic CFD modeling method for the laser and its hybrid welding process according to any one of claims 1-7, is characterized in that, The full-automatic CFD modeling system for the laser and its hybrid welding process includes: A calling module for creating the graphical user interface of the system by calling the Tkinter library through Python, implementing the multi-level interactive interface of the welding simulation system, including the main menu and multiple sub-function interfaces, including the establishment of the computational domain, selection of the welding method, setting of the computational time step, and viewing of the calculation results module. The storage management module is used to create a material property library through Python scripts for storing and managing the physical properties of various materials. The material property library contains the density, viscosity, thermal conductivity, and specific heat capacity parameters of various common materials and can be dynamically extended to support user-defined materials. The data structure of the material library is designed as a dictionary or JSON format for easy searching and calling. The physical properties of each material are indexed by a unique identifier to ensure that the material properties can be quickly retrieved and assigned during the simulation process. The reading module is used to read the content of the.rpl file through Python scripts and dynamically generate the corresponding Tcl script, which is called by ICEMCFD batch processing to automatically execute functions such as creating a geometric model, specifying boundary conditions, and meshing, and generate a welding calculation domain file in the.msh format. The calling module is used to use Python to call the open() function to create a C language subroutine file welding.c for the laser welding basic module. By defining a C language code string containing the welding heat source, radiative heat dissipation, convective heat dissipation, recoil pressure, and evaporation condensation source terms in the Python script, the open() function is called to open the file in write mode "w", and the write() method is used to write the C code string to the welding.c file, realizing the generation of the C language module. This step ensures that the core calculation module of the welding simulation can be saved in the form of C language for subsequent compilation and execution. The startup module is used to start the Ansys Fluent simulation software by calling the Fluent Python API in Python. Using the pyfluent.launch_fluent method, the simulation dimension (2D or 3D mode) and calculation accuracy (single-precision or double-precision) are set. At the same time, the meshing mode, working directory, and Fluent root path are specified, and parallel computing can be enabled as needed by setting parallel = True and the number of computing cores solverprocesses. This step realizes the seamless connection between the Fluent software and the Python environment by accurately configuring the above parameters. The import module is used to import the simulation mesh file through Python scripts and load the mesh file at the specified path into the Fluent environment using the tui.file.read_mesh command in the Fluent TUI (Text User Interface) interface. This step realizes the initialization of the mesh model by calling the mesh file path. Assignment module, which is used to assign physical parameters of the selected material in this step according to the created material property library by using Fluent TUI commands; the Python script will call the material property library, retrieve the corresponding physical properties from the material library using the material name as an index, and assign these parameters to the Fluent simulation model through the tui.define.materials.modify command; this step ensures that the material properties are correctly loaded into the simulation model; Loading module, which is used to compile and load the user-defined function UDF subroutine through a Python script, and compile the specified UDF source file using the Fluent TUI command tui.compile.uda; after successful compilation, use tui.define.user_defined.function_hooks.read to load the source terms or custom functions in the UDF file for calling during subsequent simulation processes; this step realizes the correct loading of the custom physical model or source terms; Setting module, which is used to set the boundary conditions in the simulation through Fluent's TUI commands; Association module, which is used to associate the source terms in the compiled and loaded user-defined functions with the corresponding regions or boundary conditions; through the tui.define.user_defined.function_hooks.source_term command, bind the loaded source terms to the boundary conditions or specific regions; this step ensures that during the simulation calculation process, the source terms can affect the boundary conditions and realize complex physical field simulations; Initialization module, which is used to initialize the model by calling Fluent TUI commands through a Python script; Calculation settings module, which is used to implement simulation calculation settings by calling Fluent TUI commands through a Python script; Export module, which is used to import the simulation results of Fluent and export an MP4-format animation by calling the EnSight Python API through a Python script; Generation module, which is used to realize the real-time playback of the MP4-format video generated by EnSight in the simulation software interface by calling the moviepy library and Tkinter through Python; 9. A computer-readable storage medium storing a computer program, which when executed by a processor causes the processor to execute the steps of the full-automatic CFD modeling method for laser and its hybrid welding process according to any one of claims 1-7.

10. An information data processing terminal, characterized in that, The information data processing terminal is used to implement the full-automatic CFD modeling system for laser and its hybrid welding process according to claim 8.

Citation Information

Patent Citations

  • Keyhole dynamic forming numerical simulation method of laser deep melting point welding

    CN103279630A

  • Numerical modeling method for improving morphology simulation precision of continuous laser deep penetration welding molten pool

    CN113627063A