Acceleration method for low-pressure sand mold casting solidification simulation process and related device

By using heterogeneous parallel systems in low -voltage sand -type casting solidification simulation, the parallel computing capabilities of central processors and graphics processors are used to solve the problem of slow calculation speed in existing technology, and efficient and real -time simulation calculations are achieved.

CN119376943AInactive Publication Date: 2025-01-28北京适创科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411518097.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When the prior art simulates the low-pressure sand casting solidification process, the calculation amount is huge, resulting in slow CPU calculation speed and unable to meet the real-time requirements.

Method used

The heterogeneous parallel system is adopted, combined with the central processor and graphics processor, and solving the configuration file through the mesh section and temperature to determine the initialization data of the target die and molds, and calculate the discrete equation of the temperature field in parallel, and simulate the solidification phase change process.

Benefits of technology

It significantly improves the calculation speed of low -pressure sand -type casting solidification simulation, meets the real -time requirements, while ensuring high -precision simulation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376943A_ABST
    Figure CN119376943A_ABST
Patent Text Reader

Abstract

The invention discloses an acceleration method of a low-pressure sand mold casting solidification simulation process and a related device, relates to the technical field of sand mold casting simulation, and is applied to a heterogeneous parallel system participating in a calculation process of a low-pressure sand mold casting solidification simulation system. The central processing unit calls a pre-written kernel function, controls the graphics processor to parallelly calculate each temperature field discrete equation obtained by discretization of the temperature control equation based on the initialized data to obtain temperature field data corresponding to the target die casting, and then obtains phase change data according to the temperature field data; and simulation of the low-pressure sand mold casting solidification process is completed. The graphic processor is introduced to cooperate with the central processor to accelerate the calculation process of low-pressure sand mold casting solidification simulation, the graphic processor can calculate the temperature field data of the target die casting in parallel, and the requirement of the low-pressure sand mold casting solidification simulation for the real-time performance of the calculation process is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of sand casting simulation, and in particular to a method for accelerating a low-pressure sand casting solidification simulation process and a related device. Background Art

[0002] Low-pressure sand casting is a common casting method widely used to manufacture metal parts with complex shapes. In the low-pressure sand casting process, liquid metal fills the sand mold cavity under low pressure, and the liquid metal filled in the sand mold cavity cools and solidifies to form a casting.

[0003] The solidification process of liquid metal has an important influence on the quality and performance of castings, especially the change of temperature field and phase change process are directly related to whether defects will be formed inside the casting, such as pores, shrinkage holes and cracks. Therefore, accurate simulation of the solidification process of liquid metal is of great significance for optimizing the casting process and improving the quality of castings.

[0004] In the prior art, the finite volume method (FVM) is generally used to simulate the solidification process of low-pressure sand castings, and the CPU (Central Processing Unit) completes the calculation work of the entire simulation process. However, when dealing with large-scale three-dimensional problems such as simulating the solidification of low-pressure sand casting, the finite volume method has a huge amount of calculation, and the CPU calculation speed is very slow, which cannot meet the real-time requirements of the low-pressure sand casting solidification simulation process for the calculation process. Summary of the invention

[0005] In view of the above problems, the present application provides a method and related device for accelerating the solidification simulation process of low-pressure sand casting, so as to provide a method for meeting the real-time and high-precision requirements of the calculation process of the low-pressure sand casting solidification simulation process. The specific scheme is as follows:

[0006] In a first aspect, the present application provides a method for accelerating a low-pressure sand casting solidification simulation process, which is applied to a heterogeneous parallel system participating in a calculation process of a low-pressure sand casting solidification simulation system, wherein the heterogeneous parallel system includes a central processing unit and a graphics processing unit; the method includes:

[0007] The central processing unit obtains a three-dimensional model of a target die casting part and a three-dimensional model of a mold, a meshing configuration file, and a temperature solution configuration file;

[0008] Divide the three-dimensional model of the target die casting part and the three-dimensional model of the mold into orthogonal hexahedral meshes according to the meshing configuration file; the orthogonal hexahedral meshes include a plurality of mesh units;

[0009] Determine initialization data of a target die casting part and a mold according to an orthogonal hexahedral mesh and a temperature solution configuration file; send the initialization data to a graphics processor;

[0010] The CPU calls the pre-written kernel function to control the GPU to calculate each temperature field discrete equation in parallel based on the initialization data to obtain the temperature field data corresponding to the target die casting. Each temperature field discrete equation is obtained by discretizing the temperature control equation and corresponds to the grid unit one by one.

[0011] The graphics processor simulates the solidification phase change process of the target die casting according to the temperature field data to obtain the phase change data;

[0012] The graphics processor sends the temperature field data and phase change data to the central processor;

[0013] The central processing unit processes the temperature field data and the phase change data into preset simulation results; the preset simulation results include a temperature field distribution cloud map and a solid phase fraction evolution process map.

[0014] In a possible implementation, the initialization data includes initial condition data and boundary condition data. The initialization data of the target die casting and the mold are determined based on the orthogonal hexahedral grid and the temperature solution configuration file, including:

[0015] The initial condition data and boundary condition data of the target die casting and mold on the orthogonal hexahedral grid are configured according to the temperature solution configuration file.

[0016] In a possible implementation, before the CPU calls the pre-written kernel function, it also includes:

[0017] The graphics processor writes kernel functions based on the discrete equations of each temperature field.

[0018] In a possible implementation, the graphics processor calculates various temperature field discrete equations in parallel based on the initialization data, including:

[0019] The graphics processor matches each grid unit on the orthogonal hexahedral grid corresponding to the target die casting with each temperature field discrete equation, inputs the initialization data into each temperature field discrete equation, and iteratively calculates each temperature field discrete equation in parallel.

[0020] In a possible implementation, the initialization data is input into each temperature field discrete equation, and each temperature field discrete equation is calculated iteratively in parallel, including:

[0021] The initialization data is input into the temperature field discrete equations corresponding to each grid unit, and the temperature data of the spatial discrete points corresponding to each temperature field discrete equation are iteratively solved to generate temperature field data from the temperature data.

[0022] In a possible implementation, the graphics processor simulates the solidification phase change process of the target die casting according to the temperature field data to obtain phase change data, including:

[0023] According to the change of temperature field data, a solidification phase change model of the target die casting is established; the solidification phase change model is configured to: based on the change of temperature field data, track the change process of the solid-liquid interface and the phase change area of ​​the target die casting, and output the phase change data.

[0024] The second aspect of the present application provides a device for accelerating a low-pressure sand casting solidification simulation process, the device comprising:

[0025] A central processing unit (CPU) and a graphics processing unit (GPU); wherein:

[0026] The central processing unit is used to obtain the three-dimensional model of the target die casting and the three-dimensional model of the mold, the mesh partitioning configuration file and the temperature solution configuration file; divide the three-dimensional model of the target die casting and the three-dimensional model of the mold into an orthogonal hexahedral mesh according to the mesh partitioning configuration file; the orthogonal hexahedral mesh includes a plurality of mesh units; determine the initialization data of the target die casting according to the orthogonal hexahedral mesh and the temperature solution configuration file; and send the initialization data to the graphics processing unit;

[0027] The central processing unit is used to call the pre-written kernel function to control the graphics processor to calculate each temperature field discrete equation in parallel based on the initialization data to obtain the temperature field data corresponding to the target die casting; each temperature field discrete equation is obtained by discretizing the temperature control equation and corresponds to the grid unit one by one;

[0028] A graphics processing unit is used to simulate the solidification phase change process of the target die casting according to the temperature field data to obtain the phase change data; and send the temperature field data and the phase change data to the central processing unit;

[0029] Finally, the central processing unit is used to process the temperature field data and phase change data into preset simulation results; the preset simulation results include a temperature field distribution cloud map and a solid phase fraction evolution process map.

[0030] The third aspect of the present application provides an acceleration device for a low-pressure sand casting solidification simulation process, comprising at least one processor and a memory connected to the processor, wherein:

[0031] The memory is used to store computer programs;

[0032] The processor is used to execute the computer program to implement the method for accelerating the low-pressure sand casting solidification simulation process as described in any one of the above.

[0033] A fourth aspect of the present application provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements a method for accelerating the low-pressure sand casting solidification simulation process as described in any one of the above.

[0034] The fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement a method for accelerating the low-pressure sand casting solidification simulation process as described in any one of the above.

[0035] In summary, the acceleration method and related device of the low-pressure sand casting solidification simulation process provided by the present application, the central processing unit divides the acquired three-dimensional model of the target die casting and the three-dimensional model of the mold into an orthogonal hexahedral grid including multiple grid units, and then determines the initialization data of the target die casting and the mold according to the orthogonal hexahedral grid and the temperature solution configuration file, and sends the initialization data to the graphics processor, the central processing unit calls the pre-written kernel function, and controls the graphics processor to parallelly calculate the various temperature field discrete equations discretized by the temperature control equation based on the initialization data, and obtains the temperature field data corresponding to the target die casting; then, the graphics processor simulates the solidification phase change process of the target die casting according to the temperature field data, and obtains the phase change data. Finally, the temperature field data and the phase change data are sent to the central processing unit, and the central processing unit processes the temperature field data and the phase change data into a preset simulation result. In this application, a graphics processor is introduced to cooperate with the central processing unit to accelerate the calculation process of the solidification simulation of low-pressure sand casting. The graphics processor can calculate the temperature field data of the target die casting in parallel, which greatly improves the calculation speed and meets the real-time requirements of the calculation process for the low-pressure sand casting solidification simulation. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0037] Figure 1 A schematic flow chart of a method for accelerating the low-pressure sand casting solidification simulation process provided in this application;

[0038] Figure 2 The orthogonal hexahedral mesh obtained by segmenting the target die casting and the mold provided in this application and the example diagram of the initial temperature distribution;

[0039] Figure 3 An example diagram of heterogeneous computing nodes provided for this application;

[0040] Figure 4 Schematic diagram of the CUDA heterogeneous parallel model of the unified computing architecture provided for this application;

[0041] Figure 5 An example diagram of the solution process of the unified computing architecture CUDA provided in this application;

[0042] Figure 6 An example flow chart of the low-pressure sand casting solidification simulation process provided in this application;

[0043] Figure 7 A schematic diagram of the structure of an acceleration device for a low-pressure sand casting solidification simulation process provided in an embodiment of the present application;

[0044] Figure 8 A schematic diagram of the structure of an accelerating device for a low-pressure sand casting solidification simulation process provided in this application. DETAILED DESCRIPTION

[0045] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0046] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0047] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0048] Low-pressure sand casting is a casting method that uses low pressure to press liquid metal into a mold and solidify it under pressure to form a casting. The solidification process of liquid metal has an important influence on the quality and performance of the casting, especially the change of temperature field and phase change process are directly related to the formation of internal defects of the casting. Therefore, accurately simulating the solidification process of liquid metal is of great significance to optimize the casting process and improve the quality of castings.

[0049] The finite volume method is commonly used in numerical algorithms for heat transfer and fluid flow simulation. The algorithm can ensure the local conservation of conserved quantities and is suitable for the calculation of complex geometric shapes. In the known technology, the finite volume method is used to simulate the casting solidification process of low-pressure sand castings, and the central processing unit is used to complete the calculation work in the entire simulation process. However, the calculation amount of the entire simulation process is huge, and the traditional central processing unit has a slow calculation speed, which cannot meet the real-time requirements of the low-pressure sand casting solidification simulation process for the calculation process.

[0050] In order to solve the above problems, the present application proposes a method and related device for accelerating the low-pressure sand casting solidification simulation process.

[0051] The acceleration method of the low-pressure sand casting solidification simulation process provided in this application is applied to a heterogeneous parallel system participating in the calculation process of the low-pressure sand casting solidification simulation system. The heterogeneous parallel system includes a unified computing architecture composed of a central processing unit and a graphics processing unit (GPU). The system mainly relies on the powerful parallel computing capability of the graphics processing unit in the unified computing architecture to coordinate with the central processing unit to accelerate the simulation of the low-pressure sand casting solidification process, greatly improving the computing performance of the entire low-pressure sand casting solidification simulation process, and enabling real-time simulation calculation.

[0052] Specifically, the present application continues the finite volume method in the known technology to simulate the low-pressure sand casting solidification process. That is, the present application adopts a unified computing architecture to accelerate the solution process of the finite volume method, which can meet the real-time requirements in industrial production while ensuring the calculation accuracy, and further improve the efficiency of casting process optimization.

[0053] Optional, see Figure 1 , a schematic flow chart of a method for accelerating the low-pressure sand casting solidification simulation process provided in the present application.

[0054] like Figure 1 As shown, the method for accelerating the low-pressure sand casting solidification simulation process includes the following steps:

[0055] Step 101: The central processing unit obtains a three-dimensional model of a target die casting and a three-dimensional model of a mold, a meshing configuration file, and a temperature solution configuration file.

[0056] To simulate the solidification process of low-pressure sand casting, the 3D models of the target die casting and the mold must first be meshed. Therefore, the CPU first needs to control the acquisition of the 3D model of the target die casting, the 3D model of the mold, and the meshing configuration file, and then mesh the 3D model of the target die casting and the 3D model of the mold according to the meshing configuration file. Meshing is mainly to discretize the 3D model of the target die casting and the 3D model of the mold into units and nodes with a limited amount of data for numerical calculation.

[0057] It should also be noted that the function of the temperature solution configuration file is to define the temperature field solution parameters and methods during the simulation process. It mainly includes the path of the mesh file obtained after meshing the 3D model of the target die casting and the 3D model of the mold, the path of the output simulation result file, the physical properties of the target die casting and the mold, etc. The main function of the temperature solution configuration file is to initialize the data of the target die casting and the mold. The temperature solution configuration file is generally in the yaml file format and is written by the simulation personnel.

[0058] Optionally, the central processing unit obtains a three-dimensional model of a target die casting part and a three-dimensional model of a mold, as well as a pre-written meshing configuration file and a temperature solution configuration file.

[0059] Step 102: Divide the three-dimensional model of the target die casting and the three-dimensional model of the mold into orthogonal hexahedral meshes according to the meshing configuration file; the orthogonal hexahedral meshes include a plurality of mesh units.

[0060] It should be noted that in the present application, dividing the three-dimensional model of the target die-casting and the three-dimensional model of the mold into orthogonal hexahedral grids has many advantages: the orthogonal hexahedral grid can better adapt to the target die-castings and molds of different complexities, thereby improving the accuracy of the simulation; dividing into orthogonal hexahedral grids can simplify the preprocessing process of the three-dimensional model of the target die-casting and the three-dimensional model of the mold, and facilitate fast and effective meshing of the target die-casting and the mold; the orthogonal hexahedral grid helps to improve the efficiency of numerical solution during the simulation process; the orthogonal hexahedral grid is conducive to the visualization of the results, making defect prediction and microstructure analysis more intuitive; most importantly, the orthogonal hexahedral grid is easy to implement parallel computing.

[0061] In addition, the orthogonal hexahedral mesh obtained by dividing the three-dimensional model of the target die casting and the three-dimensional model of the mold includes multiple grid units, which can also be called computational domain grid points or temperature field discrete units. The principle of mesh division is to discretize the continuous physical space into a finite number of small units to approximate the entire solution domain. Each grid unit on the orthogonal hexahedral mesh is a discretized solution domain.

[0062] Optionally, according to the meshing parameters and methods in the meshing configuration file, and specifically based on the size and accuracy requirements of the three-dimensional model of the target die-casting part and the three-dimensional model of the mold, the three-dimensional model of the target die-casting part and the three-dimensional model of the mold are discretized into orthogonal hexahedral meshes.

[0063] Step 103: Determine the initialization data of the target die casting and the mold according to the orthogonal hexahedral grid and the temperature solution configuration file.

[0064] It should be noted that the initialization data includes the initial condition data and boundary condition data of the target die casting and the mold. Specifically, the initialization data includes the initial temperature and boundary conditions of the target die casting and the mold.

[0065] Optionally, set the initial temperature and boundary conditions for the target die casting and mold in an orthogonal hexahedral mesh according to the temperature solution profile.

[0066] In the actual casting solidification process, the initial temperature of the target die casting is the temperature distribution of the molten metal after filling. In this application, the setting of the initial temperature is simplified, and the initial temperature of the target die casting is set to the pouring temperature of the liquid metal, and the initial temperature of the mold is set to the ambient temperature. It is not difficult to understand that the ambient temperature can be specifically the air temperature.

[0067] For example, see Figure 2 , the present application provides an orthogonal hexahedral mesh obtained by segmenting the target die casting and the mold, and an example diagram of the initial temperature distribution.

[0068] like Figure 2 As shown in the figure, each computational domain grid point in the orthogonal hexahedral grid can be divided into three categories: casting (target die casting), mold and air (environment).

[0069] The initial temperature settings of different types of computational domain grid points are different. The initial temperature of the casting can be set to 690 degrees Celsius, and the mold and air temperatures can be set to 25 degrees Celsius.

[0070] After setting the initial temperature of the target die casting and the mold, it is necessary to set the boundary conditions between the target die casting and the mold, and between the mold and the environment. Setting the boundary conditions is a key step in simulating the casting solidification process. Assuming that the ambient temperature is constant, the boundary conditions between the target die casting and the mold are set according to the heat transfer coefficient between the target die casting and the mold in the temperature solution configuration file; the boundary conditions between the mold and the environment are set according to the heat transfer coefficient between the mold and the environment in the temperature solution configuration file.

[0071] Step 104: Send the initialization data to the graphics processor.

[0072] Afterwards, the initial condition data and boundary condition data of the target die casting and the mold are sent to the graphics processor.

[0073] The graphics processor can perform iterative calculations according to the temperature field discrete equation, which is obtained by discretizing the temperature control equation.

[0074] The temperature control equation is an equation based on Fourier's law that describes the relationship between temperature, time and space during casting solidification. The temperature control equation can also be called the energy conservation equation. The temperature control equation can be specifically as follows:

[0075]

[0076] Where, T is temperature; is the thermal diffusion coefficient; Q represents the internal heat source, which can handle source items such as latent heat in the simulation of casting solidification.

[0077] Afterwards, the explicit finite volume method is used to discretize the above temperature control equation, and the continuous temperature control equation is discretized into an algebraic equation in a finite volume unit, that is, it is discretized into multiple temperature field discrete equations, and the temperature field discrete equation corresponds one-to-one to each grid unit in the orthogonal hexahedral grid corresponding to the target die casting and the mold. The formula of the temperature field discrete equation can be:

[0078]

[0079] in, Represents the temperature value at the nth time step; , ,and Respectively , and The spatial step lengths in the three directions, (i, j, k) are the spatial coordinates of the spatial discrete points corresponding to the grid cells; represents the time step, represents density, Represents specific heat capacity.

[0080] After obtaining each temperature field discrete equation, a kernel function is written according to each temperature field discrete equation. The kernel function is used to solve the temperature for each grid unit in the orthogonal hexahedral grid, specifically, to iteratively solve each spatial discrete point formed by the target die casting and the mold. It can be seen from the temperature field discrete equation of the above example that the equation iteratively solves the temperature of the spatial discrete point (i, j, k), that is, the temperature field data of (i, j, k) at time n+1 can be obtained from the temperature field data at time n.

[0081] Step 105, the CPU calls a pre-written kernel function to control the GPU to parallelly calculate each temperature field discrete equation based on the initialization data to obtain temperature field data corresponding to the target die casting; each temperature field discrete equation is obtained by discretizing the temperature control equation and corresponds to the grid unit one by one.

[0082] The pre-configured kernel function is written from the temperature field discrete equation stored in the GPU. The kernel function can also be called a core function. When the CPU calls the kernel function, the GPU will call thousands or even tens of thousands of threads to solve the temperature field discrete equation, and implement the temperature iterative solution of the temperature field discrete equation on the GPU.

[0083] It can be seen that this application adopts heterogeneous parallel computing of graphics processors to accelerate the simulation of the low-pressure sand mold solidification process, and uses the unified computing architecture CUDA to perform parallel computing on the CPU+GPU heterogeneous computing platform.

[0084] Optional, see Figure 3 , an example diagram of heterogeneous computing nodes provided in this application.

[0085] Generally speaking, a heterogeneous computing node usually includes two multi-core CPU slots and two or more GPUs. In this application, one GPU corresponds to one CPU core to complete the calculation.

[0086] Among them, GPU is the coprocessor of CPU, connected to CPU through PCIe Bus. CPU is called host side, GPU is device side, CPU and GPU are both processing units, but their design purposes are very different, CPU is the computing core, with powerful arithmetic operation unit (ALU, Arithmetic Logic Unit), large cache (Cache) and complex logic control unit (Control), CPU is good at logic control and serial computing; GPU has many arithmetic operation units, can support large-scale multi-threaded computing, suitable for processing data parallel computing intensive loops.

[0087] CUDA is a parallel computing platform and programming model developed by NVIDIA. In this application, the powerful parallel computing capability of GPU is applied to significantly improve the computing performance of the low-pressure sand casting solidification simulation process.

[0088] For example, see Figure 4 , a schematic diagram of the unified computing architecture CUDA heterogeneous parallel model provided in this application.

[0089] Specifically, the establishment of the CUDA heterogeneous parallel model requires the pre-writing of CUDA parallel programs. CUDA parallel programs mainly include data transmission between the host (CPU) and the device (GPU) and calling kernel functions to operate data on the device. Therefore, the writing of CUDA programs mainly includes three parts: data memory management, kernel function writing, and thread configuration.

[0090] For data memory management, the CUDA heterogeneous parallel model assumes that the host and device have their own independent memory spaces. CUDA provides a series of functions, such as the cudaMalloc function for allocating memory on the device, the cudaMemcpy function for data transfer between the host and device memory, and the cudaFree function for releasing memory on the device.

[0091] For kernel function writing, the kernel function is the code executed on the device, including global memory access and data calculation on the thread. When the kernel function is called, thousands of threads execute the same instructions on different data at the same time. The kernel function is modified with _global_, which means that the kernel function can be called by the host and the device and executed on the device.

[0092] Optional, see Figure 5 , an example diagram of the solution process of the unified computing architecture CUDA provided in this application.

[0093] First, the data is copied from the CPU to the GPU. The data here refers to the initialization data of the target die-casting and mold, that is, the initial temperature and boundary conditions of the target die-casting and mold. Then the CPU calls the kernel function, defines the thread configuration, starts the kernel function, and calls thousands of threads on the GPU to calculate the temperature of each grid unit in the orthogonal hexahedral grid corresponding to the target die-casting and mold to obtain the temperature field data. After that, the temperature field data is copied back to the CPU for aggregation.

[0094] Specifically, the code body of the kernel function can be:

[0095] / / Write the temperature solution kernel function

[0096] _global_void temperatureUpdata()

[0097] / / Calculate thread number

[0098] const int id=threadIdx.x+blockDom.x*blockIdx.x

[0099] / / If the thread number is less than the total number of grid points, the thread is responsible for calculating the idth grid point

[0100] if(id<NODRS)

[0101] / / Solve the temperature at the idth grid point

[0102] It can be seen that the kernel function configures how the thread calculates each grid cell on the orthogonal hexahedral grid corresponding to the target die casting and mold.

[0103] For thread configuration, when the kernel function is called by the host, the program execution is transferred to the device, and thousands of threads are generated at the same time. Organizing threads is a very important part of the CUDA programming model. The CUDA programming model has three levels of parallelism: grid, block, and thread.

[0104] Among them, each grid in each CUDA model can correspond one-to-one to each grid unit on the orthogonal hexahedral grid, that is, the temperature field discrete equation corresponding to each grid unit is calculated in parallel.

[0105] Step 106: The graphics processor simulates the solidification phase change process of the target die casting according to the temperature field data to obtain phase change data.

[0106] Optionally, after the graphics processor obtains the temperature field data, it will establish a solidification phase change model of the target die casting according to the changes in the temperature field data. The model can track the changes in the solid-liquid interface and the phase change area in real time according to the changes in the temperature field, and output the phase change data.

[0107] In addition, the equivalent specific heat capacity method can also be used to understand the heat released by a unit mass of metal when the unit temperature is reduced within the solidification temperature range as specific heat capacity, thereby correcting the calculation process of the above temperature field. This correction process is realized based on the high parallel processing capability of the graphics processor.

[0108] Step 107: The graphics processor sends the temperature field data and the phase change data to the central processor.

[0109] Optionally, the graphics processor copies the temperature field data and phase change data back to the central processor, and the central processor processes the calculated simulation result data into an appropriate file format.

[0110] Step 108: The central processing unit processes the temperature field data and the phase change data into a preset simulation result; the preset simulation result includes a temperature field distribution cloud map and a solid phase fraction evolution process map.

[0111] The preset model results are in an appropriate file format. The preset simulation results of the temperature field data include but are not limited to the temperature field distribution cloud map, and the preset simulation results of the phase change data include but are not limited to the solid phase fraction evolution process diagram.

[0112] Optionally, after receiving the temperature field data and phase change data copied from the graphics processor, the central processing unit processes the temperature field data into a temperature field distribution cloud diagram and processes the phase change data into a solid phase fraction evolution process diagram.

[0113] For example, see Figure 6 , an example flow chart of the simulation of the low-pressure sand casting solidification process provided in this application.

[0114] like Figure 6 As shown in the figure, the simulation process is mainly divided into two parts: the pre-processing part and the solution part.

[0115] In the pre-processing process, the target die casting and mold are first meshed, and then the mesh obtained and the pre-configured calculation configuration file are imported to initialize the macro quantities of the target die casting and mold and set the boundary conditions. Then, the initialized data is copied from the CPU to the GPU.

[0116] After being copied to the GPU, the solution is started. The temperature and solid phase fraction are iteratively calculated on the GPU. After the iteration, the temperature data and solid phase fraction are obtained and copied to the CPU for storage.

[0117] It should be noted that, after testing, it was found that the simulation calculation using a 16-core CPU in the known technology takes 4 hours to complete, while the unified computing architecture used in this application can complete the simulation calculation within 19 minutes. It can be seen that the acceleration method for the low-pressure sand casting solidification simulation process provided in this application significantly improves the calculation efficiency of the simulation, so that high-precision simulation results can be provided under complex casting processes, thereby meeting the needs of modern process production for efficient, accurate and real-time simulation.

[0118] In summary, the acceleration method of the low-pressure sand casting solidification simulation process provided by the present application, the central processing unit divides the acquired three-dimensional model of the target die casting and the three-dimensional model of the mold into an orthogonal hexahedral grid including multiple grid units. Then, the initialization data of the target die casting and the mold are determined according to the orthogonal hexahedral grid and the temperature solution configuration file, and the initialization data is sent to the graphics processor. The central processing unit calls the pre-written kernel function to control the graphics processor to parallelly calculate the various temperature field discrete equations discretized by the temperature control equation based on the initialization data, and obtain the temperature field data corresponding to the target die casting; then, the graphics processor simulates the solidification phase change process of the target die casting according to the temperature field data, and obtains the phase change data. Finally, the temperature field data and the phase change data are sent to the central processing unit, and the central processing unit processes the temperature field data and the phase change data into a preset simulation result. In this application, a graphics processor is introduced to cooperate with the central processing unit to accelerate the calculation process of the solidification simulation of low-pressure sand casting. The graphics processor can calculate the temperature field data of the target die casting in parallel, which greatly improves the calculation speed and meets the real-time requirements of the low-pressure sand casting solidification simulation process for the calculation process.

[0119] A method for accelerating a low-pressure sand casting solidification simulation process provided by an embodiment of the present application is introduced above. A device for executing the above-mentioned method for accelerating a low-pressure sand casting solidification simulation process will be introduced below.

[0120] See also Figure 7 , Figure 7 A schematic structural diagram of an acceleration device for a low-pressure sand casting solidification simulation process provided in an embodiment of the present application.

[0121] The device comprises a central processing unit 10 and a graphics processing unit 20; wherein:

[0122] The central processing unit 10 is used to obtain the three-dimensional model of the target die casting and the three-dimensional model of the mold, the mesh generation configuration file and the temperature solution configuration file; divide the three-dimensional model of the target die casting and the three-dimensional model of the mold into an orthogonal hexahedral mesh according to the mesh generation configuration file; the orthogonal hexahedral mesh includes a plurality of mesh units; determine the initialization data of the target die casting according to the orthogonal hexahedral mesh and the temperature solution configuration file; and send the initialization data to the graphics processing unit 20;

[0123] The central processing unit 10 is used to call a pre-written kernel function to control the graphics processor to calculate each temperature field discrete equation in parallel based on the initialization data to obtain the temperature field data corresponding to the target die casting; each temperature field discrete equation is obtained by discretizing the temperature control equation and corresponds to the grid unit one by one;

[0124] The graphics processing unit 20 is used to simulate the solidification phase change process of the target die casting according to the temperature field data to obtain the phase change data; and send the temperature field data and the phase change data to the central processing unit 10;

[0125] Finally, the CPU processing unit 10 is used to process the temperature field data and the phase change data into a preset simulation result; the preset simulation result includes a temperature field distribution cloud diagram and a solid phase fraction evolution process diagram.

[0126] In one embodiment, the initialization data in the CPU processing unit 10 includes initial condition data and boundary condition data, and the CPU processing unit 10 is specifically used for:

[0127] The initial condition data and boundary condition data of the target die casting and mold on the orthogonal hexahedral grid are configured according to the temperature solution configuration file.

[0128] In one embodiment, the graphics processing unit 20 is specifically configured to:

[0129] Before the CPU processing unit 10 calls the pre-written kernel function, the GPU processing unit 20 writes the kernel function according to each temperature field discrete equation. In one embodiment, the GPU processing unit 20 is specifically used to:

[0130] Each grid unit on the orthogonal hexahedral grid corresponding to the target die casting is matched with each temperature field discrete equation, initialization data is input into each temperature field discrete equation, and each temperature field discrete equation is calculated iteratively in parallel.

[0131] In one embodiment, the graphics processing unit 20 is specifically configured to:

[0132] The initialization data is input into the temperature field discrete equations corresponding to each grid unit, and the temperature data of the spatial discrete points corresponding to each temperature field discrete equation are iteratively solved to generate temperature field data from the temperature data.

[0133] In one embodiment, the graphics processing unit 20 is specifically configured to:

[0134] According to the change of temperature field data, a solidification phase change model of the target die casting is established; the solidification phase change model is configured to: based on the change of temperature field data, track the change process of the solid-liquid interface and the phase change area of ​​the target die casting, and output the phase change data.

[0135] The present application also provides an accelerating device for the low-pressure sand casting solidification simulation process. Figure 8As shown, it shows a schematic diagram of the structure of an acceleration device suitable for implementing the low-pressure sand casting solidification simulation process in the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 8 The acceleration device for the low-pressure sand casting solidification simulation process shown is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present application.

[0136] like Figure 8 As shown, the acceleration device of the low-pressure sand casting solidification simulation process may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage device 608 to the random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through the bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.

[0137] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the acceleration device of the low-pressure sand casting solidification simulation process to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The acceleration device of the low-pressure sand casting solidification simulation process having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0138] An embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements a method for accelerating the low-pressure sand casting solidification simulation process as described in any one of the above.

[0139] A computer storage medium is also provided in an embodiment of the present application. The computer storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement a method for accelerating the low-pressure sand casting solidification simulation process as described in any one of the above.

[0140] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0141] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0142] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0143] The computer program product includes one or more computer instructions. When loading and executing the computer program instructions on the computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integration. Available media can be magnetic media, (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state hard disk (SSD)), etc.

Claims

1. A method for accelerating the solidification simulation process of low-pressure sand casting, characterized in that: A heterogeneous parallel system is applied to a computing process of a low-pressure sand casting solidification simulation system, wherein the heterogeneous parallel system includes a central processing unit and a graphics processing unit; the method includes: The central processing unit obtains a three-dimensional model of a target die casting and a three-dimensional model of a mold, a meshing configuration file, and a temperature solution configuration file; Dividing the three-dimensional model of the target die casting and the three-dimensional model of the mold into orthogonal hexahedral grids according to the grid division configuration file; the orthogonal hexahedral grids include a plurality of grid units; Determining initialization data of the target die casting and the mold according to the orthogonal hexahedral grid and the temperature solution configuration file; sending the initialization data to the graphics processor; The central processing unit calls a pre-written kernel function to control the graphics processing unit to calculate each temperature field discrete equation in parallel based on the initialization data to obtain temperature field data corresponding to the target die casting; each temperature field discrete equation is obtained by discretizing the temperature control equation and corresponds to the grid unit one by one; The graphics processor simulates the solidification phase change process of the target die casting according to the temperature field data to obtain phase change data; The graphics processor sends the temperature field data and the phase change data to the central processor; The central processing unit processes the temperature field data and the phase change data into a preset simulation result; the preset simulation result includes a temperature field distribution cloud diagram and a solid phase fraction evolution process diagram.

2. The method for accelerating the low-pressure sand casting solidification simulation process according to claim 1, characterized in that: The initialization data includes initial condition data and boundary condition data; the initialization data of the target die casting and the mold are determined based on the orthogonal hexahedral grid and the temperature solution configuration file, including: Initial condition data and boundary condition data of the target die casting and the mold on the orthogonal hexahedral grid are configured according to the temperature solution configuration file.

3. The method for accelerating the low-pressure sand casting solidification simulation process according to claim 1, characterized in that: Before the central processing unit calls the pre-written kernel function, it also includes: The graphics processor writes the kernel function according to the respective temperature field discrete equations.

4. The method for accelerating the solidification simulation process of low-pressure sand casting according to claim 1, characterized in that: The graphics processor calculates each temperature field discrete equation in parallel based on the initialization data, including: The graphics processor matches each grid unit on the orthogonal hexahedral grid corresponding to the target die casting with each temperature field discrete equation, inputs the initialization data into each temperature field discrete equation, and iteratively calculates each temperature field discrete equation in parallel.

5. The method for accelerating the low-pressure sand casting solidification simulation process according to claim 4, characterized in that: Inputting the initialization data into each discrete temperature field equation, and iteratively calculating each discrete temperature field equation in parallel, including: The initialization data is input into the temperature field discrete equations corresponding to the respective grid units, the temperature data of the spatial discrete points corresponding to the respective temperature field discrete equations are iteratively solved, and the temperature field data is generated from the temperature data.

6. The method for accelerating the solidification simulation process of low-pressure sand casting according to claim 1, characterized in that: The graphics processor simulates the solidification phase change process of the target die casting according to the temperature field data to obtain phase change data, including: According to the change of the temperature field data, a solidification phase change model of the target die casting is established; the solidification phase change model is configured to: based on the change of the temperature field data, track the change process of the solid-liquid interface and the phase change area of ​​the target die casting, and output the phase change data.

7. An accelerating device for low-pressure sand casting solidification simulation process, characterized in that: The device includes: A central processing unit (CPU) and a graphics processing unit (GPU); wherein: The central processing unit is used to obtain a three-dimensional model of a target die casting and a three-dimensional model of a mold, a meshing configuration file, and a temperature solution configuration file; divide the three-dimensional model of the target die casting and the three-dimensional model of the mold into an orthogonal hexahedral grid according to the meshing configuration file; the orthogonal hexahedral grid includes a plurality of grid units; determine initialization data of the target die casting according to the orthogonal hexahedral grid and the temperature solution configuration file; and send the initialization data to the graphics processing unit; The central processing unit is used to call a pre-written kernel function to control the graphics processor to parallelly calculate each temperature field discrete equation based on the initialization data to obtain temperature field data corresponding to the target die casting; each temperature field discrete equation is obtained by discretizing the temperature control equation and corresponds to the grid unit one by one; The graphics processing unit is used to simulate the solidification phase change process of the target die casting according to the temperature field data to obtain phase change data; and send the temperature field data and the phase change data to the central processing unit; Finally, the central processing unit is used to process the temperature field data and the phase change data into a preset simulation result; the preset simulation result includes a temperature field distribution cloud map and a solid phase fraction evolution process map.

8. An accelerating device for low-pressure sand casting solidification simulation process, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to implement the method for accelerating the low-pressure sand casting solidification simulation process as claimed in any one of claims 1 to 6.

9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method for accelerating the low-pressure sand casting solidification simulation process as claimed in any one of claims 1 to 6 is implemented.

10. A computer storage medium, characterized in that: The computer storage medium carries one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the method for accelerating the low-pressure sand casting solidification simulation process as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for identifying total heat absorptivity of heating furnace

    CN111125913A

  • Continuous casting billet on-line temperature field prediction method based on CPU + GPU heterogeneous parallelism

    CN115828571A

  • Prediction method for material solidification process

    CN118467150A