A casting heat transfer simulation method based on deep learning, medium and equipment
Patent Information
- Application Number
- CN202311207829.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-09-19
AI Technical Summary
[0003]然而,本申请的发明人在研究中发现,铸造凝固过程中的温度变化过程并不均匀,由于结晶潜热的存在,一般会存在温度变化的平台期,正是由于平台期的温度变化的影响,现有的利用深度学习预测铸件任意时间段的凝固过程的温度场时,其预测的准确性,还有待进一步提高
[0015] The present invention, by adopting the above technical solution, has the following advantages: The present invention includes: acquiring input data and inputting the input data into a pre-constructed and trained neural network model. The input data includes: a geometric model of the casting and a temperature field at the initial time t0 of the prediction time period, as well as temperature change curves of n preset feature points of the casting during the prediction time period; using the neural network model, predicting and outputting the temperature field of the casting at the target time t1 of the prediction time period. Compared with existing models, the present invention is better suited to heat transfer processes that change over time, improving the accuracy of training results and prediction accuracy, and facilitating engineering applications. The technical solution of the present invention can not only be used for simulation of the casting process, but also for heat transfer simulation in other fields.
Smart Images

Figure CN117610218B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of materials processing and manufacturing technology, and in particular to a deep learning-based simulation method for heat transfer in casting and a computer-readable storage medium. Background Technology
[0002] Numerical simulation technology can optimize casting processes by creating models that closely resemble real-world conditions. Currently, deep learning methods can replace traditional numerical simulations due to their fast learning speed and simple simulation process, offering significant advantages and promising applications.
[0003] However, the inventors of this application discovered in their research that the temperature change process during casting solidification is not uniform. Due to the presence of latent heat of crystallization, there is generally a plateau period in temperature change. It is precisely because of the influence of temperature change during the plateau period that the accuracy of existing methods for predicting the temperature field of the solidification process of castings at any time period using deep learning needs to be further improved. Summary of the Invention
[0004] To address the aforementioned issues, the purpose of this application is to provide a deep learning-based method, apparatus, and medium for simulating heat transfer in casting, applicable to heat transfer processes that vary over time, improving the accuracy of training results and predictions, and facilitating engineering applications.
[0005] To achieve the above objectives, this application adopts the following technical solution: Firstly, this application provides a deep learning-based simulation method for heat transfer in casting, the method comprising: The input data is acquired and fed into a pre-built and trained neural network model. The input data includes: the geometric model of the casting and the temperature field at the initial time t0 of the prediction time period, as well as the temperature change curves of n preset feature points of the casting during the prediction time period. Using the neural network model, the temperature field of the casting at the target time t1 within the predicted time period is predicted and output.
[0006] In one implementation of this application, the neural network model is a double U-shaped convolutional neural network model; The upper U-shaped network of the double U-shaped convolutional neural network model is used to process the geometric model of the casting; the lower U-shaped network of the double U-shaped convolutional neural network model is used to process the temperature field at time t0. There is an input branch between the upper U-shaped network and the lower U-shaped network, which is used to input the temperature change curve of n preset feature points of the casting during the prediction time period; The arithmetic mean of the outputs of the upper U-shaped network and the lower U-shaped network is used as the prediction and output of the temperature field at time t1.
[0007] In one implementation of this application, the upper U-shaped network and the lower U-shaped network are composed of w encoders and decoders symmetrically arranged on the left and right sides and a connection part in the middle. The encoders first perform convolution operation using convolution kernels and activation operation using activation function, and then perform pooling operation. The decoders first perform upsampling operation, and then perform convolution operation and activation operation using activation function.
[0008] In one implementation of this application, the value of w ranges from 3 to 5.
[0009] In one implementation of this application, encoders and decoders at the same level in the upper and lower U-shaped networks are spliced in the dimensional direction by weighting. The number of channels of the convolution kernel doubles with each encoding process, and the number of channels of the convolution kernels in the symmetrical encoder and decoder parts is the same.
[0010] In one implementation of this application, the method further includes pre-constructing a training set and performing training; The training set includes a large number of geometric model images of castings, temperature field distribution images of castings and molds at times t0 and t1, isothermal horizontal lines of n feature points with the temperature value at time t0 as the reference, and real temperature change curve data of n feature points. The training process involves inputting the shape models of the castings and molds in the training set and the temperature field at time t0 into the initial positions of the upper and lower U-shaped networks, respectively. The isothermal horizontal lines of n feature points with the temperature value at time t0 as the reference are input into the middle input branch. The training is performed using the actual temperature change curves of the n feature points. The output of the middle input branch is then connected to the bottom of the lower U-shaped network through calculation.
[0011] In one implementation of this application, the value of n ranges from 16 to 400.
[0012] In one implementation of this application, the method of generating and integrating temperature curves as training sets into the network includes: representing temperature curves at different pixel locations in the form of a two-dimensional array, with rows arranged according to temperature values at different times as they change over time; columns arranged according to the order of the points; numbering n feature points in a single order; and adding the two-dimensional array to the bottom of the lower U-shaped network by concatenation. In one implementation of this application, the time intervals in the temperature change curves of the n feature points of the intermediate input branch are uniform or non-uniform, but the m intermediate moments within the training time period of all points are the same.
[0013] Secondly, this application provides a computer-readable storage medium storing a computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute the deep learning-based casting heat transfer simulation method described in the first aspect.
[0014] Thirdly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the deep learning-based casting heat transfer simulation method described in the first aspect.
[0015] The present invention, by adopting the above technical solution, has the following advantages: The present invention includes: acquiring input data and inputting the input data into a pre-constructed and trained neural network model. The input data includes: a geometric model of the casting and a temperature field at the initial time t0 of the prediction time period, as well as temperature change curves of n preset feature points of the casting during the prediction time period; using the neural network model, predicting and outputting the temperature field of the casting at the target time t1 of the prediction time period. Compared with existing models, the present invention is better suited to heat transfer processes that change over time, improving the accuracy of training results and prediction accuracy, and facilitating engineering applications. The technical solution of the present invention can not only be used for simulation of the casting process, but also for heat transfer simulation in other fields. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the network architecture of a deep learning-based casting heat transfer simulation method according to an embodiment of this application. Figure 2 This is a schematic diagram showing the location of feature points on the temperature curve in an embodiment of this application; Figure 3a This is the actual temperature curve of the casting from 0 to 10 minutes in the embodiments of this application; Figure 3b This is the actual temperature profile of the casting at 170-180 min in the embodiments of this application; Figure 4a This is a schematic diagram showing the predicted temperature field of the casting over 10 minutes according to an embodiment of this application. Figure 4b This is a schematic diagram showing the predicted temperature field of the casting over 180 minutes according to an embodiment of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention are within the scope of protection of the present invention.
[0018] To address the technical problem that existing models for predicting the temperature field of castings and molds over arbitrary time periods suffer from low accuracy due to the influence of latent heat of crystallization, this application provides a casting heat transfer simulation method, medium, and computer equipment based on deep learning. The method includes: acquiring input data and inputting the input data into a pre-constructed and trained neural network model. The input data includes: a geometric model of the casting, the temperature field at the initial time t0 of the prediction time period, and the temperature change curves of n preset feature points of the casting during the prediction time period; using the neural network model, predicting and outputting the temperature field of the casting at the target time t1 of the prediction time period. This technical solution can improve prediction accuracy.
[0019] In conjunction with further accompanying drawings, one aspect of an embodiment of this application provides a deep learning-based method for simulating heat transfer in casting.
[0020] like Figure 1 This is a schematic diagram of the architecture of the neural network model in an embodiment of this application.
[0021] This application embodiment involves constructing a sandwich-shaped double-U-shaped convolutional neural network. The double-U-shaped network includes an upper U-shape and a lower U-shape. The upper U-shape network is used to process the shape model of the casting and mold, and the lower U-shape network is used to process the temperature field at time t0 (initial or current). The two U-shaped bodies are independent, and their outputs are arithmetically averaged to obtain the temperature field output at time t1 (target). The upper and lower U-shaped networks consist of w symmetrical encoders and decoders on the left and right sides, and a connection part in the middle. The encoders first perform convolution operations using convolution kernels and activation functions, and then perform pooling operations. The decoders first perform upsampling operations, and then perform convolution operations and activation functions. Encoders and decoders at the same level in the upper and lower U-shaped networks are concatenated in the same dimension direction through weighted summation. The number of channels of the convolution kernel doubles with each encoding process, and the number of channels of the convolution kernels in the symmetrical encoder and decoder parts is the same. The bottom of the U-shape is a feature map of pixels b×b, and the other parts of the upper and lower U-shaped networks are the same. An input branch INB is added between the upper and lower U-shaped networks to output the temperature change curve data of n feature points over time. The temperature change curve data is processed by performing convolution operations using convolution kernels and activation functions. The output of the INB input branch is connected to the bottom of the lower U-shaped network through computation.
[0022] Specifically, a sandwich double-U-shaped convolutional neural network can be constructed using the TensorFlow library in Python. The upper and lower U-shaped networks consist of four symmetrical encoders and decoders on the left and right sides, and a central connection. The inputs to the two U-shapes are the shape models of the casting and the mold, and the temperature field at time t0, respectively. The outputs of the two U-shapes are arithmetically averaged to obtain the temperature field output at time t1. The central INB input branch takes the isothermal horizontal line of the feature points based on the temperature at time t0 as its reference. The output is then processed and connected to the bottom of the lower U-shaped network. The specific network architecture is as follows: Figure 1 .
[0023] In this embodiment, to train the convolutional neural network, a training set needs to be constructed, including a large number of geometric model images of castings and molds, temperature field distribution images of castings and molds at times t0 and t1, isothermal horizontal lines for n feature points with the temperature at time t0 as the baseline, and actual temperature change curves for n feature points. The geometric model images of castings and molds are distinguished by different colors, with the same color for the same material. The temperature fields of the castings and molds at different times are obtained using common numerical simulation methods and represented as images, using color scales corresponding to temperature values and colors, with different colors corresponding to different temperature levels. The temperature at time t0 of each feature point is extracted and copied m times to represent the temperature values at m intermediate times within the training period, forming isothermal horizontal lines with the temperature at time t0 as the baseline. The number of temperature curves for the n feature points is represented as an m×n matrix. In the numerical simulation calculation, the actual temperature change curves for the n feature points in the casting and mold models are output.
[0024] Specifically, a training set is constructed, which may include, but is not limited to, 302 sets of geometric models of castings and molds, the temperature field of castings and molds from 0 to 180 minutes with a time step of 10 minutes, temperature change curves composed of the initial temperature values of 16 feature points at each time step, and the actual temperature change curves of 16 points. The geometric model images of castings and molds are distinguished by different colors, with the same color for the same material. The temperature field of the castings and molds at different times is obtained using a numerical simulation method based on Python and represented as an image, using color scales corresponding to temperature values and colors, with different colors corresponding to different temperature levels. The model image is divided into 25 equal parts, and the pixel positions of the vertices of these parts (excluding the boundaries) are selected as feature points, totaling 16. The temperature at the initial time step of each feature point in each time step is extracted and extended to the temperature values at 16 intermediate time steps, forming a horizontal temperature curve. The actual temperature change curve of each feature point is output using a numerical simulation method based on Python, such as... Figure 2 .
[0025] In this embodiment, the training process is as follows: The shape models of the casting and mold in the training set and the temperature field at time t0 are input into the initial positions of the upper and lower U-shaped networks, respectively. The temperature change curve formed by the temperature values of n feature points at time t0 is input into the middle INB input branch. Training is performed using the real temperature change curve of the n feature points. The output of the INB input branch is connected to the bottom of the lower U-shaped network through calculation. Specifically, firstly, the temperature values of n feature points at time t0 are extracted from the temperature field at time t0. The initial temperature of each feature point is copied m times to represent the temperature values of m intermediate times within the training period, forming an isothermal horizontal line based on the temperature value at time t0. The isothermal horizontal line data of the n feature points is represented as an m×n matrix M. fThe columns represent the selected locations, and the rows represent the temperature values of the feature points at different times. The actual changes of n feature points over time are represented in the same form as an m×n matrix M. t M f and M t Normalize the two matrices to obtain the true matrix M. t The matrix M at time t0 is trained using convolution operations with convolution kernels and activation functions. f The training results are convolved using a convolution kernel and activated with an activation function, followed by pooling. This process is repeated until a b×b array matrix is obtained. The resulting matrix is then concatenated with the original matrix at the bottom of the U-shape along its dimension. The concatenated result is then convolved using a 1×1 kernel and activated with an activation function to restore the original number of channels for subsequent calculations. Training parameters are then set, and the neural network is trained.
[0026] For example, specifically, the shape models of castings and molds in the training set and the temperature field at time t0 are input into the initial positions of the upper and lower U-shaped networks (time t0 is the initial time of each time interval with a time step of 10 minutes). The isothermal horizontal line formed by the temperature values at time t0 of the 16 feature points is input into the middle INB input branch. Training is performed using the actual temperature change curves of the 16 feature points. The output of the INB input branch is then processed and connected to the bottom of the lower U-shaped network. Specifically, firstly, the temperature values at time t0 of the 16 feature points are extracted from the temperature field at time t0. Then, the initial temperature of each feature point is copied 16 times to represent the temperature values at 16 intermediate times within the training period, forming the isothermal horizontal line. The temperature curve data of the 16 feature points is represented as a 16×16 matrix M. f The columns represent the selected locations, and the rows represent the temperature values of the feature points at different times. The actual changes of the 16 feature points over time are represented in the same format as a 16×16 matrix M. t M f and M t Normalize the two matrices to obtain the true matrix M. tThe labels are used for two convolution operations with 1×2 kernels and activated by an activation function. Then, a single convolution operation with a 1×1 kernel and activation function is performed to train the matrix at the current time step. The training result is then subjected to two more convolution operations with 1×2 kernels and activation function, followed by one pooling operation, and then two more convolution operations with 1×2 kernels and activation function to obtain an 8×8 array matrix. The resulting matrix is then concatenated with the original matrix at the bottom of the U-shape using functions from the TensorFlow library, and the concatenated result is used to restore the original number of channels for subsequent operations through a 1×1 convolution kernel and activation function. Training parameters are set, and the neural network is trained.
[0027] After training, it can be used for prediction. Inputting the geometric model of the casting and mold, and the temperature field at time t0, it extracts the temperature values at time t0 of n feature points and transforms them into a two-dimensional matrix M representing isothermal horizontal lines, as in the training process. f As the INB input branch in the middle of the temperature change curve input, it utilizes the matrix M at time t0 in two dimensions. f Predicting the two-dimensional true matrix M t The obtained matrix is then fed into the bottom of the lower U-shaped network for further calculations, and the temperature field at time t1 is predicted using the double U-shaped network.
[0028] In the application scenarios of this application embodiment, such as Figure 4a and Figure 4b Input the geometric model of the casting and mold, and the 0-minute temperature field. Extract the 0-minute temperature values of 16 feature points from the 0-minute temperature field and convert them into a two-dimensional matrix M representing the temperature change curve, as in the training process. f As the INB input branch in the middle of the temperature change curve input, it utilizes a two-dimensional 0min matrix M. f Predicting the two-dimensional true matrix M t The obtained matrix is fed into the bottom of the U-shaped network for further calculations. The double U-shaped network is used to predict the temperature field for 10 minutes, and then the temperature field for 20 minutes is predicted using the 10-minute temperature field as input. This process is repeated until the temperature field for 180 minutes is finally predicted.
[0029] In summary, the method provided in this application, compared to existing models, is better suited to heat transfer processes that vary over time, improving the accuracy of training results and predictions, and facilitating engineering applications. The technical solution of this invention can be used not only for simulation of casting processes but also for heat transfer simulation in other fields.
[0030] In another aspect of the embodiments of this application, a computer storage medium is also provided, which stores a computer program that, when executed by a computer, implements the aforementioned method.
[0031] This application also relates to a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the methods described in the foregoing embodiments of this application.
[0032] In the several embodiments provided by this invention, it should be understood that the disclosed methods can be implemented in other ways. For example, the embodiments described above are merely illustrative.
[0033] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0034] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A deep learning-based simulation method for heat transfer in casting, characterized in that, The method includes: The input data is acquired and fed into a pre-built and trained neural network model. The input data includes: the geometric model of the casting and the temperature field at the initial time t0 of the prediction time period, as well as the temperature change curves of n preset feature points of the casting during the prediction time period. Using the neural network model, the temperature field of the casting at the target time t1 within the predicted time period is predicted and output. The neural network model is a double U-shaped convolutional neural network model, including an upper U-shaped network and a lower U-shaped network; The upper U-shaped network of the double U-shaped convolutional neural network model is used to process the geometric model of the casting; the lower U-shaped network of the double U-shaped convolutional neural network model is used to process the temperature field at time t0. The upper U-shaped network and the lower U-shaped network are independent of each other. There is an input branch INB between the upper U-shaped network and the lower U-shaped network, which is used to input the isothermal horizontal lines of n preset feature points of the casting with the temperature value at time t0 as the reference. The arithmetic mean of the outputs of the upper U-shaped network and the lower U-shaped network is used as the prediction and output of the temperature field at time t1; The upper U-shaped network and the lower U-shaped network are composed of w encoders and decoders symmetrically arranged on the left and right, and a connection part in the middle. In the encoder, convolution operation is first performed using convolution kernels and activation operation is performed using activation function, and then pooling operation is performed. In the decoder, upsampling operation is first performed, and then convolution operation is performed and activation operation is performed using activation function. In the U-shaped network, encoders and decoders at the same level are spliced together in the dimensional direction through weighting. The number of channels of the convolution kernel doubles with each encoding process. The number of channels of the convolution kernels in the symmetrical encoder and decoder parts is the same. The bottom of the upper and lower U-shaped networks is a feature map of pixels b×b, and the other parts of the upper and lower U-shaped networks are the same. An input branch INB is added between the upper and lower U-shaped networks to output the temperature change curve of n feature points over time. The temperature change curve data is processed by using convolution kernels for convolution operations and activation functions for activation. The output of the INB input branch is connected to the bottom of the lower U-shaped network through calculation.
2. The deep learning-based casting heat transfer simulation method according to claim 1, characterized in that, The value of w ranges from 3 to 5.
3. The deep learning-based casting heat transfer simulation method according to claim 1, characterized in that, The method also includes pre-constructing a training set and training the program. The training set includes a large number of geometric model images of castings, temperature field distribution images of castings and molds at times t0 and t1, isothermal horizontal lines of n feature points with the temperature value at time t0 as the reference, and real temperature change curve data of n feature points. The training process involves inputting the shape models of the castings and molds in the training set and the temperature field at time t0 into the initial positions of the upper and lower U-shaped networks, respectively. The isothermal horizontal lines of n feature points with the temperature value at time t0 as the reference are input into the middle input branch. The training is performed using the actual temperature change curves of the n feature points. The output of the middle input branch is then connected to the bottom of the lower U-shaped network through calculation.
4. The deep learning-based casting heat transfer simulation method according to claim 3, characterized in that, The value of n ranges from 16 to 400.
5. The deep learning-based casting heat transfer simulation method according to claim 3, characterized in that, The methods for generating and integrating temperature curves as training sets into the network include: representing temperature curves at different pixel locations as a two-dimensional array, with rows arranged according to temperature values at different times as they change over time; columns arranged according to the order of the points, numbering n feature points in a single order, and adding this two-dimensional array to the bottom of the lower U-shaped network in a concatenated manner.
6. The deep learning-based casting heat transfer simulation method according to claim 3, characterized in that, The time intervals in the temperature change curves of the n feature points in the intermediate input branch may be uniform or non-uniform, but the m intermediate moments within the training time period of all points are the same.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed, controls the device containing the computer-readable storage medium to perform the deep learning-based casting heat transfer simulation method according to any one of claims 1 to 6.
8. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the deep learning-based casting heat transfer simulation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Finite element and neural network combined steel plate quenching temperature prediction method
CN114925569A