High-strength aluminum alloy selective laser melting forming thermal stress prediction method based on deep learning
By combining finite element analysis and deep learning technology, a thermal stress prediction model was established, which solved the problems of complex finite element analysis calculations and high resource consumption, achieved efficient and accurate thermal stress prediction, optimized SLM process parameters, improved part quality and performance, and was applied in the field of additive manufacturing.
Patent Information
- Application Number
- CN202510746617.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-19
AI Technical Summary
Existing finite element analysis methods are computationally complex and resource-intensive when predicting thermal stress in SLM forming, making it difficult to meet the needs of real-time monitoring and rapid feedback. In addition, simplified models and approximate algorithms lack accuracy and reliability, limiting the widespread application and production costs of SLM technology.
Combining finite element analysis and deep learning technology, by establishing a heat transfer model and a thermal-mechanical coupling model, using convolutional neural networks and generative adversarial networks, and training deep learning models, efficient and accurate thermal stress prediction can be achieved.
It achieves fast and accurate thermal stress prediction, reduces computing resource consumption, improves prediction efficiency, optimizes process parameters, improves the quality and performance of formed parts, and promotes the development of additive manufacturing technology.
Smart Images

Figure CN120671446A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of additive manufacturing technology, and in particular to a method for predicting thermal stress in selective laser melting of high-strength aluminum alloys based on deep learning. Background Art
[0002] Selective laser melting (SLM), as an advanced additive manufacturing technology, is widely used in aerospace, automotive manufacturing, and other fields. However, during the SLM forming process, high residual thermal stresses are generated due to uneven heating by the laser and differences in thermal expansion and contraction near the molten pool. This thermal stress can cause problems such as warping, fatigue crack propagation, and cracking in the formed parts, seriously affecting the quality and performance of the parts. Although traditional finite element analysis can be used to predict thermal stresses, its calculations are complex and resource-intensive, making it difficult to meet the needs of real-time monitoring and rapid feedback.
[0003] Although some studies have attempted to reduce thermal stress by optimizing process parameters, there is a lack of efficient, accurate, and large-scale data prediction methods. Therefore, developing a method that can quickly and accurately predict thermal stress distribution is of great significance for optimizing SLM process parameters, reducing defects, and improving part quality.
[0004] Existing finite element analysis methods are computationally complex and resource-intensive when predicting thermal stress during SLM forming, making them inadequate for simulation. In SLM forming, finite element analysis must simulate complex processes such as the interaction between the laser and the powdered material, the formation and solidification of the melt pool, heat conduction, and the thermal expansion and contraction of the part. This involves the coupled calculation of multiple physical fields (such as temperature and stress fields), significantly increasing the computational complexity.
[0005] The high computational complexity of finite element analysis requires a large amount of computing resources, including high-performance processors, large-capacity memory, and fast storage devices. In actual production environments, especially small and medium-sized enterprises or laboratories with limited resources, they may not be equipped with sufficient computing resources to meet the needs of finite element analysis. This further limits the application of finite element analysis in the prediction of thermal stress in SLM forming. At present, although some studies have attempted to reduce computational complexity by simplifying models and adopting approximate algorithms, these methods often sacrifice prediction accuracy to a certain extent. For example, simplified models may ignore some important physical phenomena or material properties, resulting in a large deviation between the prediction results and the actual situation; although approximate algorithms can speed up the calculation, their accuracy and reliability are difficult to guarantee when dealing with complex multi-physics field coupling problems. In summary, these factors not only limit the widespread application of SLM technology, but also increase production costs and scrap rates.
[0006] Therefore, developing an efficient, accurate thermal stress prediction method suitable for real-time monitoring and rapid feedback is of great practical significance. Summary of the Invention
[0007] The present application provides a deep learning-based thermal stress prediction method for high-strength aluminum alloy selective laser melting forming, which can be used to solve the technical problem that thermal stress prediction methods cannot take into account both high accuracy and low energy consumption.
[0008] This paper proposes a deep learning-based method for predicting thermal stress in high-strength aluminum alloy selective laser melting. By combining finite element analysis and deep learning technology, this method achieves efficient and accurate thermal stress prediction. The specific technical solution is as follows:
[0009] Step 1, finite element model establishment and simulation:
[0010] A heat transfer model and a thermomechanical coupling model were established. Taking the SLM process as the simulation object, a Gaussian model was used to define the laser heat source, and the thermal stress distribution under different process parameters and sample sizes was simulated. The process parameters included laser power, scanning speed, and hatch spacing.
[0011] Simulate different process parameters for the same size;
[0012] Set the sample size: fix the sample size to a cube model of 5 cm × 5 cm × 5 cm.
[0013] Simulate different process parameters;
[0014] Multiple laser power values, including 100W, 150W, 200W, 250W, and 300W, were selected to simulate the heating effect of the laser on the material at different powers. High laser power will cause the material to absorb more energy in a short period of time, the molten pool temperature will increase, and the thermal stress distribution range may increase, but it may also cause local stress concentration.
[0015] Select different scanning speeds, including 500mm / s, 800mm / s, 1000mm / s, 1200mm / s, and 1500mm / s; analyze the effect of scanning speed on thermal stress; low scanning speed causes the laser to stay on the material surface for a longer time, resulting in relatively large heat input, which may lead to thermal stress accumulation, while high scanning speed may make the thermal stress distribution relatively uniform, but may result in insufficient melting.
[0016] Different hatch spacings, including 0.1mm, 0.15mm, 0.2mm, 0.25mm, and 0.3mm, were set to study the effect of hatch spacing on thermal stress. Smaller hatch spacing will make the laser scanning path denser, and the heat-affected zones will overlap more, which may cause complex thermal stress interactions. Larger hatch spacing will reduce the overlap of heat-affected zones, and the thermal stress distribution will be relatively independent.
[0017] Multiple simulation experiments are conducted for each combination of process parameters to record thermal stress distribution data, including stress magnitude, distribution area, and stress concentration location, to provide data for subsequent data analysis and model training.
[0018] Simulate samples of different sizes:
[0019] Cube models of various sizes were selected for simulation, including 3cm×3cm×3cm, 4cm×4cm×4cm, 6cm×6cm×6cm, and 8cm×8cm×8cm;
[0020] Keeping process parameters constant, thermal stress simulations were performed on samples of varying sizes. The effects of dimensional changes on the magnitude and distribution of thermal stress were analyzed. For example, as the size increases, thermal stress may gradually increase in certain areas or new stress concentration points may appear. Size effects may also cause the thermal stress distribution to become more complex. Thermal stress data for samples of varying sizes was recorded for subsequent training and validation of deep learning models to improve the accuracy of the model's thermal stress predictions for large-scale components.
[0021] Step 2: Data processing and deep learning model training; including data preprocessing, determining the neural network model architecture, generating adversarial network parts,
[0022] Step 21, data preprocessing;
[0023] Data cleaning: Carefully check the thermal stress distribution data obtained from the finite element simulation to remove outliers and noise data; for example, eliminate stress values that are clearly beyond the physical range (possibly due to errors in the simulation process or software anomalies). At the same time, smooth the data to reduce noise interference and improve data quality.
[0024] Data annotation: The cleaned data is annotated in detail according to the process parameters and sample size, and the corresponding laser power, scanning speed, hatch spacing and sample size of each data sample are clearly defined so that the deep learning model can accurately learn the relationship between these factors and the thermal stress distribution;
[0025] Data partitioning: The data is divided into training set, validation set, and test set in a ratio of 7:2:1. The training set is used for model training, the validation set is used for real-time evaluation and adjustment of the model during training, and the test set is used for the final evaluation of the model's performance and generalization ability to ensure that the model can accurately predict thermal stress distribution.
[0026] Step 22, determining the neural network model architecture;
[0027] Convolutional Neural Networks (CNNs) include:
[0028] Input layer: The size of the input layer is determined according to the dimensions of the thermal stress data (such as spatial dimension and stress component dimension). For two-dimensional thermal stress distribution data, the size of the input layer is set to [sample size × sample size × number of stress components];
[0029] Convolutional layers: Multiple convolutional layers are set up, each containing a certain number of convolution kernels (e.g., 32, 64, or 128). The size of the convolution kernel is selected based on the spatial characteristics of the data (e.g., 3×3, 5×5, etc.). The convolution operation can extract the local variation trend and distribution pattern of thermal stress in the data.
[0030] Activation function: An activation function, such as the ReLU (Rectified Linear Unit) function, is added after each convolutional layer. This function can introduce nonlinear factors, making the model more expressive and better able to fit complex thermal stress distribution relationships.
[0031] Pooling layer: Add a pooling layer after the convolutional layer and activation function; such as a max pooling layer or an average pooling layer. The pooling window size can be set to 2×2 or 3×3. Pooling can reduce the spatial dimension of the data and reduce the computational effort while preserving key feature information and enhancing the model's translation invariance.
[0032] Fully connected layer: A fully connected layer is added after the convolutional layer, activation function, and pooling layer. The number of neurons in the fully connected layer can be set according to actual needs, such as 256 or 512. The fully connected layer can synthesize and integrate the local features extracted previously to establish a global feature representation, further improving the model's predictive ability;
[0033] Step 23, Generative Adversarial Network (GAN) part: The adversarial network includes input layer, fully connected layer and reshape operation, convolution inversion layer, activation function, output layer, discriminator, and output layer;
[0034] Among them, input layer: the input of the generator is set to 100 dimensions;
[0035] Fully connected layer and reshape operation: The input random vector is converted into a tensor form suitable for subsequent convolution inversion operation through the fully connected layer, and converted into a tensor of [initial size × initial size × number of channels]. The initial size is smaller, such as 4×4 or 8×8;
[0036] Convolution inversion layer (Transposed Convolution Layer): Set multiple convolution inversion layers, each layer contains a certain number of convolution kernels (such as 64, 32, 16), and the size of the convolution kernel is selected according to the spatial characteristics of the generated data (such as 3×3, 5×5, etc.) to generate thermal stress distribution data with higher resolution.
[0037] Activation function: An activation function is added after each convolutional inversion layer to match the actual thermal stress data distribution;
[0038] Output layer: The output layer of the generator generates simulated data with the same dimensions as the actual thermal stress data, which is used to train the discriminator and output as the prediction result;
[0039] Discriminator: The structure of the discriminator is similar to that of the CNN mentioned above, consisting of convolutional layers, activation function layers, pooling layers, and fully connected layers. Its input is actual thermal stress data or simulated data generated by the generator. The convolutional layers extract local features, the pooling layers reduce spatial dimensions, and the fully connected layers perform feature integration.
[0040] Output layer: The output layer of the discriminator contains one neuron, which outputs a probability value between 0 and 1, indicating the probability that the input data is actual heat stress data;
[0041] During the training process, the discriminator continuously distinguishes between actual data and generated data, and conducts adversarial training with the generator, prompting the generator to generate more realistic simulated data.
[0042] Step 24: Model configuration and training;
[0043] Step 241, first configure the hyperparameters, including the learning rate, the number of network layers, and the number of neurons;
[0044] Learning rate: Choosing an appropriate learning rate is crucial for model training. After multiple experiments and verifications, the learning rate was initially set to 0.001. During training, the learning rate was dynamically adjusted using a learning rate scheduler (such as StepLR or ReduceLROnPlateau) based on the model's convergence and loss changes. When the model's verification loss no longer decreases significantly within a certain number of epochs, the learning rate was reduced to 0.1 times to accelerate model convergence and improve training accuracy.
[0045] The number of network layers and neurons in CNNs and GANs should be appropriately set. For CNNs, start with 3-5 convolutional layers, with the number of convolution kernels per layer ranging from 32-128. For the generator of a GAN, start with 3-4 convolutional inversion layers, gradually reducing the number of convolution kernels from 64 to 32 to 16. The number of network layers and convolution kernels in the discriminator should be similar to that of the CNN, and should be adjusted based on actual conditions. During training, the number of network layers and neurons can be optimized through experimentation and verification to achieve optimal model performance.
[0046] Step 242, then select the loss function and configure the optimizer;
[0047] The mean squared error (MSE) is selected as the loss function for the deep learning model to measure the difference between predicted thermal stress and actual simulated thermal stress. The MSE loss function effectively reflects the error between the predicted and true values and has good mathematical properties, making it easy to optimize. In the GAN training process, in addition to the MSE loss, it is also necessary to consider the adversarial loss, which is the difference between the discriminator's judgment of the generated data and the true label. The binary cross-entropy loss function is typically used to represent the adversarial loss. Combining the MSE and adversarial losses creates an overall loss function to guide the model training process.
[0048] Use the optimizer to adjust weights; the Adam optimizer combines momentum and adaptive learning rate methods, which can automatically adjust the learning rate according to the gradient information of the model parameters, accelerate the model convergence speed and improve the training stability.
[0049] Step 243: Perform model training:
[0050] Data loading and preprocessing: Before training begins, the training set data is loaded into memory and necessary preprocessing is performed. Data normalization is performed to scale the thermal stress data to the range of [0, 1] or [-1, 1]. Data augmentation is performed to rotate, translate, and flip the thermal stress data to expand the diversity of the dataset, thereby improving the generalization ability of the model and the training effect.
[0051] Forward propagation and loss calculation: The preprocessed data is input into the deep learning model and forward propagation calculation is performed to obtain the model's predicted thermal stress output. Then, based on the actual thermal stress data and the predicted thermal stress data, the loss function values are calculated, including the MSE loss and the adversarial loss (for the GAN part).
[0052] Backpropagation and weight update: The backpropagation algorithm is used to calculate the gradient of the loss function with respect to the model parameters, and the Adam optimizer is used to update the model weight parameters based on the gradient information. After each weight update, the model loss value and performance indicators (such as the mean square error and correlation coefficient on the validation set) are recorded to monitor the model training process and performance changes.
[0053] Verification and Adjustment: During the training process, the model is regularly verified using the validation set to evaluate its performance on unseen data. Based on the verification results, the model's hyperparameters, including the learning rate, batch size, and number of network layers, are adjusted to optimize the model's performance. At the same time, the model's loss curve and performance indicator curve are observed to determine whether the model is overfitting or underfitting, and appropriate measures are taken to address the problem, including adding regularization terms, adjusting the network structure, and expanding the dataset.
[0054] Stopping conditions and model saving: Set the stopping conditions for model training, such as reaching the maximum number of training epochs or the verification loss no longer decreasing for a certain number of times (early stopping method). When the stopping conditions are met, stop model training and save the trained model parameters and related training information (such as loss value, performance indicators, etc.) for subsequent model evaluation, testing, and application.
[0055] Step 3, model evaluation and optimization:
[0056] Test set evaluation: After the model training is completed, the test set is used to conduct a comprehensive performance evaluation of the model; the mean square error (MSE), mean absolute error (MAE), and coefficient of determination (R 2 ) and other indicators to evaluate the model's prediction accuracy and generalization ability for thermal stress distribution; at the same time, a visual analysis of some data in the test set was performed to compare the thermal stress distribution predicted by the model with the actual simulated thermal stress distribution to demonstrate the model's prediction effect and error;
[0057] Error Analysis and Optimization: Detailed error analysis is performed on the test results to identify data samples and regions with large model prediction errors. Possible causes include the model's insensitivity to certain process parameters or dimensional changes, or the model's structure being insufficient to capture complex thermal stress relationships. Based on the error analysis results, targeted model optimization is performed, such as adjusting the network structure, increasing training data, and improving the loss function, to improve the model's predictive performance and accuracy.
[0058] Model validation and comparison with actual application: In addition to evaluation on the test set, the model prediction results are compared and verified with the thermal stress data measured during the actual additive manufacturing process. Thermal stress test data of high-strength aluminum alloy SLM-formed parts in actual production are collected and compared with the thermal stress distribution predicted by the model to verify the effectiveness and reliability of the model in actual application. Based on the actual comparison results, the model is further optimized and improved to enable it to better meet actual production needs.
[0059] Step 4: Thermal stress prediction and process optimization
[0060] Input new parameters and predict: New process parameters, including laser power, scanning speed, hatch spacing, and part size data, are input into the trained deep learning model. The model quickly outputs the corresponding thermal stress distribution prediction results. The prediction results include the magnitude of thermal stress, distribution area, and stress concentration location, providing intuitive guidance for process optimization.
[0061] Single-factor process parameter optimization: Single-factor adjustment based on prediction results: Based on the model's predicted thermal stress distribution, a single process parameter is optimized and adjusted. For example, if the prediction results indicate that thermal stress is concentrated in a certain area under the current process parameters and may cause defects, the laser power can be appropriately reduced to reduce the heat input and observe the changes in thermal stress in that area in the predicted results. Alternatively, the scanning speed can be adjusted to optimize the thermal stress distribution by varying the laser's exposure time on the material surface. By adjusting one process parameter at a time, while keeping the other parameters constant, the optimal process parameter values are gradually found to achieve a uniform thermal stress distribution and minimize stress concentration effects.
[0062] Multi-factor comprehensive optimization: Considering the interactions between process parameters, multi-factor optimization methods such as response surface methodology (RSM) and genetic algorithm (GA) are used to simultaneously optimize multiple process parameters. The thermal stress distribution predicted by the deep learning model is used as the objective function, and the process parameters are used as variables to establish an optimization model. The optimization algorithm is used to search for the optimal process parameter combination that meets the thermal stress requirements. This method can fully consider the complex relationship between process parameters, improve optimization efficiency and effect, and find more optimal process parameter settings.
[0063] Process adjustments based on size factors: For components of different sizes, the impact of dimensional changes on thermal stress is analyzed based on model prediction results, and corresponding process adjustment strategies are formulated. For example, for large components, it may be necessary to appropriately reduce laser power or increase scanning speed to reduce heat accumulation and thermal stress concentration. For small components, the laser power can be appropriately increased or the scanning speed can be reduced to ensure sufficient melting and bonding of the material. At the same time, based on actual production needs and equipment limitations, process parameters are reasonably adjusted to ensure high-quality formed parts of different sizes.
[0064] Evaluation and iteration of optimization effects: Apply the optimized process parameters in actual production, and evaluate the effect of process optimization by measuring the performance indicators of formed parts, including hardness, tensile strength, fatigue life, and observing defects, including cracks and porosity. Compare and analyze the actual measurement results with the model prediction results to verify the accuracy and reliability of the model. If a large deviation is found between the actual effect and the prediction result, it is necessary to re-examine the model training data, model structure, and optimization strategy, further improve and optimize the model, and then re-optimize the process parameters and verify the actual production, forming an iterative optimization closed-loop process to continuously improve the quality and performance of formed parts.
[0065] The beneficial effects of this application include:
[0066] Innovative combination of deep learning and finite element analysis: Deep learning models learn complex patterns in finite element simulation data to achieve efficient and accurate thermal stress prediction, solving the problems of complex calculations and high resource consumption of traditional finite element analysis.
[0067] We have developed an efficient thermal stress prediction system, integrating multiple functions and providing a user-friendly UI. Users simply input the desired dimensions and receive output of the maximum thermal stress and distribution. This provides a convenient prediction tool for actual production and promotes the development of additive manufacturing technology.
[0068] Optimize process parameters, reduce defects caused by thermal stress, improve the quality and performance of formed parts, and promote the application of additive manufacturing technology in high-end manufacturing fields such as aerospace.
[0069] The deep learning model enables rapid and accurate prediction of thermal stress distribution during selective laser melting of high-strength aluminum alloys, significantly improving prediction efficiency and reducing computational resource consumption. This provides a general thermal stress prediction method suitable for optimizing a variety of materials and process parameters, with broad applicability and potential for widespread adoption. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 A flow chart of the method provided in the embodiment of the present application;
[0071] Figure 2 Thermal stress curves at different scanning speeds, hatch spacings, and laser powers provided in the embodiments of this application;
[0072] Figure 3 A simulated data graph with fixed width and height and variable length provided in an embodiment of the present application;
[0073] Figure 4 A simulation data graph with fixed length and height and variable width provided in an embodiment of the present application;
[0074] Figure 5 A simulated data graph with fixed length and width and variable height provided in an embodiment of the present application;
[0075] Figure 6 A length dimension prediction diagram provided in an embodiment of the present application;
[0076] Figure 7 A prediction diagram of the width dimension provided in an embodiment of the present application;
[0077] Figure 8 This is a height dimension prediction map provided in an embodiment of the present application. DETAILED DESCRIPTION
[0078] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0079] The following first introduces the embodiments of the present application with reference to the accompanying drawings.
[0080] Before executing specific steps, the high-strength aluminum alloy powder undergoes comprehensive physical property testing, measuring key parameters such as elastic modulus, Poisson's ratio, mass density, shear modulus, thermal conductivity, thermal expansion coefficient, and specific heat. Simultaneously, morphological characterization is performed, including particle size testing, bulk density, tap density, angle of repose, dispersion, and hollow powder fraction, to ensure that the powder quality meets the requirements of the Selective Laser Melting (SLM) process. These parameters will serve as the basis for subsequent finite element analysis and deep learning model training, providing a material property basis for accurately predicting thermal stress distribution.
[0081] In the embodiment of this study, the material parameters of the high-strength aluminum alloy were first defined in Ansys software, including density ρ = 2780 kg / m3, thermal conductivity k = 180 W / (m\cdotpK), specific heat capacity cp = 896 J / (kg\cdotpK), thermal expansion coefficient αe = 23.1×10 -6 K -1, elastic modulus E = 70 GPa, Poisson's ratio μ = 0.33 and yield strength σy = 345 MPa. Next, the selective laser melting process was used as the main simulation object, and a fiber laser was used. Its heat source was defined as a Gaussian model, and its mathematical expression is q(r) = πω22APexp(-ω22r 2 ), where q is the heat flux, P is the laser power (range: 200W≤P≤400W), r is the radial distance from the laser center to the outside, ω=0.4mm is the beam radius, and A=0.6 is the laser absorptivity of the forming material.
[0082] Then, a heat transfer model is established, heat flux density is defined as qr = drkΔT, and the interlayer circulation heat transfer equation is designed as At the same time, the three-dimensional heat conduction equation to simulate the heat transfer process, where Q = q(r) is the heat value per unit volume. In terms of the thermomechanical coupling model, the thermal strain εth = αeT is calculated, and the total strain {εii} = {εf} + {εth} is obtained. The initial conditions are set to T|t = 0 = 20 ° C, σ|t = 0 = 0, ε|t = 0 = 0, and the displacements u, v, and w are all 0 at the initial moment. The boundary conditions take into account the natural convection of air and the surrounding radiation. The heat flux at the boundary is equal to the laser heat flux at the boundary unit, and the expression is It can also be expressed as Where h = 10W / (m2\cdotpK) is the heat transfer coefficient, Tf = 293K is the ambient gas temperature, ε = 0.8 is the blackbody radiation coefficient, and σ = 5.67×10-8W / (m2\cdotpK4) is the Stefan-Boltzmann constant.
[0083] Through finite element simulation, thermal stress distribution data under different process parameters were obtained. The data was then cleaned and labeled, and divided into training set, validation set, and test set in a ratio of 7:2:1. The convolutional neural network (CNN) and generative adversarial network (GAN) model architecture were adopted, and hyperparameters such as learning rate of 0.001, batch size of 32, number of network layers of 5, and number of neurons of 128 were configured. The mean square error (MSE) was selected as the loss function, and the Adam optimizer was used for weight adjustment. During the training process, the model learns the patterns in the data, and the performance is evaluated on the validation set to prevent overfitting. Finally, the test set is used to test the model performance to ensure that it has good generalization ability and prediction accuracy, thereby realizing the prediction of the thermal stress magnitude of large-scale components under the optimal process parameters.
[0084] (1) Simulation of different process parameters under the same size
[0085] In this study, we simulated the 5×5×5mm3 The effects of uniform size and gradient process parameters (power 120W, 160W, and 200W; scanning speed 0.6mm / s, 0.8mm / s, 1.0mm / s, and 1.2mm / s; hatch spacing 0.08mm, 0.09mm, and 0.1mm) on the thermal stress of the material were investigated. The results showed that high power (200W) caused a rapid increase in thermal stress, while low power (120W) resulted in a more gradual increase. High scanning speed (1.2mm / s) caused the thermal stress to peak rapidly and then decline, while low scanning speed (0.6mm / s) caused the thermal stress to continue to rise. Small hatch spacing (0.08mm) resulted in a uniform thermal stress distribution and a smooth curve, while large hatch spacing (0.1mm) caused thermal stress to fluctuate or exhibit local peaks. The different parameter combinations resulted in different peak locations and magnitudes of thermal stress, as well as varying degrees of curve fluctuation, reflecting the differences in thermal stress in the materials.
[0086] (2) Simulation of different sizes under the same process parameters
[0087] The ExpDec1 model (y = A1 * exp(-x / t1) + y0) provides excellent fitting results when processing data from samples of varying dimensions. Data for different lengths, widths, and heights, along with the fitted curves, are shown in the figure. The thick line represents the original data, while the thin line represents the fitted curve.
[0088] It can be found that as the length (width, height) increases, it gradually approaches a fixed value, and the product of the other two size parameters determines the size of this fixed value. In the case of different heights, this approach can be achieved faster, so it can be observed that Figure 3 When the height reaches about 50 mm, the curves have already approached a fixed value; in the case of different lengths and widths, this approach takes longer to reach, i.e. Figure 4 and Figure 5 Can be roughly regarded as Figure 3 The magnification form is between 20mm and 50mm on the horizontal axis. (3) Predicting the thermal stress of large-scale components through deep learning
[0089] Based on simulation data under different additive manufacturing process parameters and different sample sizes, a reasonable prediction model is used to identify the node location of the maximum stress distribution and the maximum stress value, and prediction is performed based on the input process parameters.
[0090] The Bayesian ARD regression model, GBDT model, random forest regression model, K nearest neighbor model, and neural network model were used for prediction and their accuracy was evaluated, as shown in Tables 1 and 2. The neural network model used the PyTorch framework to identify and learn the maximum stress position distribution image, node positions, and maximum stress values.
[0091] Table 1 F1 scores of node position prediction models
[0092]
[0093] Table 2 Evaluation indicators of maximum stress numerical prediction model
[0094]
[0095] The neural network model achieved the best F1 score when predicting the locations of nodes with maximum stress distribution. The F1 score is the harmonic mean of precision and recall. High precision and recall result in a high F1 score. The F1 score ranges from 0 to 1, with an F1 of 1 indicating perfect precision and recall. The formula for calculating the F1 score is as follows.
[0096]
[0097] When predicting the maximum stress value, the neural network model ensures a sufficiently high correlation coefficient R 2 When , it also has the smallest MSE (mean square error). MSE is a commonly used indicator for evaluating model prediction performance. It is measured by calculating the average of the squares of the differences between the predicted values and the true values, and is calculated using the following formula.
[0098]
[0099] Correlation coefficient R 2 The calculation formula is as follows. 2 The closer it is to 1, the greater the correlation.
[0100]
[0101] In both formulas, n is the number of samples, y i is the true value of the i-th sample, is the corresponding predicted value.
[0102] The data is reorganized into a structured DataFrame using multiple layers of loops. When reorganizing the data, the correspondence between d (scan spacing), v (scan velocity), P (power), node_number (node number), and stress (equivalent stress) is ensured to be accurate. The data is normalized using the MinMaxScaler. The normalization range defaults to [0, 1]. The model contains a shared layer and two output heads, one for predicting node number and the other for equivalent stress. The shared layer extracts common features, reducing model complexity. The shared layer of the model contains two fully connected layers, each with 128 neurons. The model uses mean squared error (MSE) as the loss function, which is suitable for regression problems. The Adam optimizer is used to ensure model convergence.
[0103] When converting data to PyTorch tensors, the script uses torch.tensor and specifies the data type as torch.float32. During model training, the shapes of the input and target tensors must match the model's input and output layers. During data preprocessing, ensure that the tensor shapes meet the model's requirements. When using DataLoader, data is automatically batched, and the batch dimension is automatically appended to the front of the tensor. Ensure that the model's input layer correctly handles the batch dimension to avoid errors caused by shape mismatches.
[0104] In the process of identifying stress distribution images, transforms.ToTensor is used to convert the image into a PyTorch tensor, and a deep learning model is defined, which includes the following parts:
[0105] (1) Fully connected layer: The input parameters (shape is (N, 1)) are expanded to the shape of (N, 3, 128, 128) through multiple fully connected layers, and the ReLU activation function is used.
[0106] (2) Reshape layer: The output of the fully connected layer is reshaped to (N, 3, 128, 128), where 3 represents the RGB channels.
[0107] (3) Deconvolution layer: The image is further processed through multiple deconvolution layers (ConvTranspose2d). The ReLU activation function is used, and finally the Sigmoid activation function is used to limit the output value to the range [0, 1].
[0108] (4) Output: The image tensor output by the model has the same shape as the target image tensor, i.e. (N, 3, 128, 128).
[0109] During training, the mean squared error (MSELoss) loss function was used, and the Adam optimizer was used with a learning rate of 0.001. The training was conducted for 200 epochs, with each epoch processing the training data in batches (batch size = 32) and printing the loss value after each epoch.
[0110] It can be found that as the length (width, height) increases, it gradually approaches a fixed value, and the product of the other two size parameters determines the size of this fixed value. In the case of different heights, this approach can be achieved faster, so it can be observed that Figure 3 When the height reaches about 50 mm, the curves have already approached a fixed value; in the case of different lengths and widths, this approach takes longer to reach, i.e. Figure 4 and Figure 5 Can be roughly regarded as Figure 3 The magnification form between 20mm and 50mm on the horizontal axis. Table 3-5 shows the parameters and fitting correlation coefficient R of the ExpDec1 model when the size changes. 2 .
[0111] Table 3 Fitting parameters of different height sizes
[0112]
[0113]
[0114] Table 4 Fitting parameters of different length sizes
[0115]
[0116] Table 5 Fitting parameters for different width sizes
[0117]
[0118] This example demonstrates that by combining deep learning technology with finite element simulation, this patent successfully predicts the thermal stress distribution during selective laser melting of high-strength aluminum alloys. This provides a solid theoretical basis and effective prediction tools for optimizing process parameters, reducing defects, and improving the quality of SLM parts, which is of great significance to the development of additive manufacturing technology.
[0119] The above-described embodiments of the present application do not constitute a limitation on the scope of protection of the present application.
Claims
1. A deep learning-based method for predicting thermal stress in high-strength aluminum alloy selective laser melting, characterized in that: The method comprises: Step 1: Finite element model establishment and simulation: A heat transfer model and a thermomechanical coupling model were established. The SLM process was used as the simulation object, and a Gaussian model was used to define the laser heat source. The thermal stress distribution under different process parameters and sample sizes was simulated. The process parameters included laser power, scanning speed, and hatch spacing. Step 2: Data processing and deep learning model training; including data preprocessing, determining the neural network model architecture, generating adversarial networks, model configuration and training; Step 3: Model evaluation and optimization; Step 4: Thermal stress prediction and process optimization.
2. The method according to claim 1, characterized in that Step 1: Finite element model establishment and simulation, including: Step 11, simulation for different process parameters of the same size; Set sample size: fix the sample size to a cube model; Select multiple laser power values, including 100W, 150W, 200W, 250W, and 300W, to simulate the heating effect of laser on materials at different powers; Select different scanning speeds, including 500mm / s, 800mm / s, 1000mm / s, 1200mm / s, and 1500mm / s; analyze the effect of scanning speed on thermal stress; Different hatch spacings, including 0.1mm, 0.15mm, 0.2mm, 0.25mm, and 0.3mm, were set to study the effect of hatch spacing on thermal stress; Conduct multiple simulation experiments for each set of process parameter combinations and record thermal stress distribution data, including stress magnitude, distribution area, and stress concentration location, to provide data for subsequent data analysis and model training; Step 12: Simulate samples of different sizes: Cube models of various sizes were selected for simulation, including 3cm×3cm×3cm, 4cm×4cm×4cm, 6cm×6cm×6cm, and 8cm×8cm×8cm; Keeping the process parameters unchanged, thermal stress simulation is performed on samples of different sizes; the influence of size change on the magnitude and distribution of thermal stress is analyzed; and the thermal stress data of samples of different sizes are recorded for subsequent training and verification of deep learning models.
3. The method according to claim 1, characterized in that Step 2: Data processing and deep learning model training; Including data preprocessing, determining the neural network model architecture, generating adversarial network parts, model configuration and training; including: Step 21, data preprocessing; Step 22, determining the neural network model architecture; Step 23, generate the adversarial network part: the adversarial network includes the input layer, the fully connected layer and the reshape operation, the convolution inversion layer, the activation function, the output layer, the discriminator, and the output layer; Step 24: Model configuration and training.
4. The method according to claim 3, characterized in that Step 21, data preprocessing, includes: Data cleaning: Carefully check the thermal stress distribution data obtained from the finite element simulation to remove outliers and noise data; Data annotation: The cleaned data is annotated in detail according to the process parameters and sample size, and the laser power, scanning speed, hatch spacing and sample size corresponding to each data sample are clearly defined; Data partitioning: The data is divided into training set, validation set, and test set in a ratio of 7:2:
1. The training set is used for model training, the validation set is used for real-time evaluation and adjustment of the model during training, and the test set is used for the final evaluation of the model's performance and generalization ability to ensure that the model can accurately predict thermal stress distribution.
5. The method according to claim 3, characterized in that Step 22, determining the neural network model architecture; including: Convolutional neural network CNN includes: Input layer: The size of the input layer is determined according to the dimension of the thermal stress data. For two-dimensional thermal stress distribution data, the size of the input layer is set to [sample size × sample size × number of stress components]; Convolutional layer: Set up multiple convolutional layers, each layer contains a certain number of convolution kernels, and the size of the convolution kernel is selected according to the spatial characteristics of the data; Activation function: Add activation function after each convolution layer; Pooling layer: Add a pooling layer after the convolution layer and activation function; Fully connected layer: A fully connected layer is added after the convolutional layer, activation function, and pooling layer. The fully connected layer can synthesize and integrate the local features extracted previously, establish a global feature representation, and further improve the predictive ability of the model.
6. The method according to claim 3, characterized in that Step 23, generate the adversarial network part: the adversarial network includes the input layer, the fully connected layer and the reshape operation, the convolution inversion layer, the activation function, the output layer, the discriminator, and the output layer; include: Among them, input layer: the input of the generator is set to 100 dimensions; Fully connected layer and reshape operation: The input random vector is converted into a tensor form suitable for subsequent convolution inversion operation through the fully connected layer, and converted into a tensor of [initial size × initial size × number of channels]. The initial size is smaller, such as 4×4 or 8×8; Convolution Inversion Layer: Set up multiple convolution inversion layers, each layer contains a certain number of convolution kernels, and the size of the convolution kernel is selected according to the spatial characteristics of the generated data; Activation function: An activation function is added after each convolutional inversion layer to match the actual thermal stress data distribution; Output layer: The output layer of the generator generates simulated data with the same dimensions as the actual thermal stress data, which is used to train the discriminator and output as the prediction result; Discriminator: The discriminator consists of a convolutional layer, an activation function layer, a pooling layer, and a fully connected layer. Its input is the actual thermal stress data or the simulated data generated by the generator. The convolutional layer extracts local features, the pooling layer reduces the spatial dimension, and the fully connected layer integrates features. Output layer: The output layer of the discriminator contains one neuron, which outputs a probability value between 0 and 1, indicating the probability that the input data is actual heat stress data; During the training process, the discriminator continuously distinguishes between actual data and generated data, and conducts adversarial training with the generator, prompting the generator to generate more realistic simulated data.
7. The method according to claim 3, characterized in that Step 24, model configuration and training; including: Step 241, first configure the hyperparameters, including the learning rate, the number of network layers, and the number of neurons; Learning rate: The learning rate is initially set to 0.
001. During training, the learning rate scheduler is used to dynamically adjust the learning rate based on the model's convergence and loss changes. When the model's verification loss no longer decreases significantly within a certain number of epochs, the learning rate is reduced to 0.1 times to accelerate model convergence and improve training accuracy. For the CNN part, we started with 3-5 convolutional layers, with the number of convolution kernels in each layer ranging from 32-128. For the GAN generator part, we started with 3-4 convolutional inversion layers, and gradually reduced the number of convolution kernels from 64 to 32 to 16. The number of network layers and convolution kernels in the discriminator part is similar to that of the CNN part, and was adjusted according to the actual situation. Step 242, then select the loss function and configure the optimizer; The mean square error (MSE) was selected as the loss function of the deep learning model to measure the difference between the predicted thermal stress and the actual simulated thermal stress. In the training process of GAN, the binary cross entropy loss function was used to represent the adversarial loss. Use optimizer to adjust weights; Step 243: Perform model training: Data loading and preprocessing: Before training begins, the training set data is loaded into memory and necessary preprocessing is performed. Data normalization is performed to scale the thermal stress data to the range of [0, 1] or [-1, 1]. Data augmentation is performed to rotate, translate, and flip the thermal stress data to increase the diversity of the dataset. Forward propagation and loss calculation: The preprocessed data is input into the deep learning model and forward propagation calculation is performed to obtain the model's predicted thermal stress output. Then, based on the actual thermal stress data and the predicted thermal stress data, the loss function values are calculated, including the MSE loss and adversarial loss. Backpropagation and weight update: The backpropagation algorithm is used to calculate the gradient of the loss function with respect to the model parameters, and the Adam optimizer is used to update the model weight parameters based on the gradient information. After each weight update, the model loss value and performance indicators are recorded to monitor the model training process and performance changes. Verification and Adjustment: During the training process, the model is regularly verified using the validation set to evaluate its performance on unseen data. Based on the verification results, the model's hyperparameters, including the learning rate, batch size, and number of network layers, are adjusted to optimize the model's performance. At the same time, the model's loss curve and performance indicator curve are observed to determine whether the model is overfitting or underfitting, and appropriate measures are taken to address the problem, including adding regularization terms, adjusting the network structure, and expanding the dataset. Stopping conditions and model saving: Set the stopping conditions for model training; when the stopping conditions are met, stop model training and save the trained model parameters and related training information.
8. The method according to claim 1, characterized in that Step 3: Model evaluation and optimization; including: Step 31, test set evaluation: After the model training is completed, use the test set to conduct a comprehensive performance evaluation of the model; calculate the mean square error (MSE), mean absolute error (MAE), and coefficient of determination (R) of the model on the test set. 2 , evaluate the model's prediction accuracy and generalization ability for thermal stress distribution; at the same time, perform a visual analysis of some data in the test set, compare the thermal stress distribution predicted by the model with the actual simulated thermal stress distribution, and demonstrate the model's prediction effect and error; Step 32, Error Analysis and Optimization: Perform a detailed error analysis on the test results to identify data samples and regions with large model prediction errors; perform targeted optimization of the model based on the error analysis results; Step 33: Model verification and actual application comparison: In addition to evaluation on the test set, the model prediction results are compared and verified with the thermal stress data measured during the actual additive manufacturing process. Thermal stress test data of high-strength aluminum alloy SLM-formed parts in actual production are collected and compared with the thermal stress distribution predicted by the model. Based on the actual comparison results, the model is further optimized and improved.
9. The method according to claim 1, characterized in that Step 4, thermal stress prediction and process optimization, includes: Step 41, input new parameters and prediction: The new process parameters, including laser power, scanning speed, hatch spacing, and part size data, are input into the trained deep learning model. The model quickly outputs the corresponding thermal stress distribution prediction results. The prediction results include the magnitude of thermal stress, distribution area, and stress concentration location. Step 42, single-factor process parameter optimization: Single-factor adjustment based on the prediction results: Optimize and adjust a single process parameter based on the thermal stress distribution predicted by the model. Adjust one process parameter at a time, keeping the other parameters unchanged, and gradually find the optimal process parameter value that achieves uniform thermal stress distribution and reduces stress concentration effects. Step 43, multi-factor comprehensive optimization: Considering the interactions between process parameters, a multi-factor optimization method is used to simultaneously optimize multiple process parameters. The thermal stress distribution predicted by the deep learning model is used as the objective function, and the process parameters are used as variables to establish an optimization model. The optimization algorithm is used to search for the optimal process parameter combination that meets the thermal stress requirements. Step 44, process adjustment based on size factors: For components of different sizes, analyze the influence of size changes on thermal stress based on the model prediction results and formulate corresponding process adjustment strategies; Step 45, optimization effect evaluation and iteration: Apply the optimized process parameters in actual production, and evaluate the effect of process optimization by measuring the performance indicators of the formed parts, including hardness, tensile strength, fatigue life, and observing defects, including cracks and porosity; compare and analyze the actual measurement results with the model prediction results to verify the accuracy of the model; if a large deviation is found between the actual effect and the prediction result, further improve and optimize the model, and then re-optimize the process parameters and verify the actual production, forming an iterative optimization closed-loop process to continuously improve the quality and performance of the formed parts.
Citation Information
Cited By
SLM thermodynamic real-time prediction method based on tensor calculation and artificial intelligence
CN120850825A
A Real-Time Thermodynamic Prediction Method for SLM Based on Tensor Computation and Artificial Intelligence
CN120850825B
Intelligent correction method and system for heat treatment process parameter deviation and storage medium
CN120993867A