This paper aims to address the casting defect problems such as shrinkage and porosity in the investment casting of engine stainless steel parts. A model combining particle swarm optimization neural network with genetic algorithm is adopted to optimize the process parameters. Through orthogonal test analysis and numerical simulation with PROCAST software, a nonlinear mapping relationship between the casting temperature, mold shell baking temperature, and pouring speed, and the shrinkage volume and equivalent stress of the casting is established by using the error backpropagation neural network. By optimizing the backpropagation neural network with the particle swarm algorithm and combining the global optimization ability of the genetic algorithm, the better process parameter combination of investment casting is obtained. The results show that when the pouring temperature is 1581°C, the mold shell baking temperature is 1159°C, and the pouring speed is 1 kg·s^(-1), the shrinkage volume and equivalent stress problems of the investment casting can be effectively improved.
1. Introduction
Investment casting is capable of creating castings with complex shapes, good surface finish, high dimensional and shape accuracy, and is widely used in the production of various alloy castings with high added value. With the development of casting CAE technology for more than 70 years, it has become increasingly perfect. The accuracy of predicting the quality of castings through numerical simulation can reach 95%, which is of great significance for actual production guidance and scheme improvement. The structure of the stainless steel parts of the engine is complex, and there are strict requirements for air tightness during the service process. Therefore, the requirements for defects such as shrinkage porosity, stress, and deformation of the parts are very strict. The traditional optimization of investment casting process parameters usually adopts the “empirical trial-and-error method”, which has low optimization efficiency when facing a large range and multiple process variables.
The particle swarm algorithm (PSO) has rapid convergence and is easy to implement, and is widely used in the training of neural networks. The error backpropagation algorithm (BP) has a strong nonlinear mapping ability, and any continuous function in a closed interval can be approximated by a three-layer BP neural network to complete the mapping from multiple inputs to multiple outputs. The genetic algorithm (GA) has a good solution ability for nonlinear and multi-objective optimization problems, and is widely used in combinatorial optimization problems. The combination of PSO-BP and GA integrates the advantages of the three algorithms, can establish a more accurate mapping relationship model, and achieve the purpose of target optimization.
In this study, the investment casting process parameters of a certain imported engine stainless steel part are optimized by combining PSO-BP and GA. Firstly, the orthogonal test is designed according to the process parameters, and the results are calculated with the help of PROCAST software. Then, the BP neural network is established and optimized based on the calculation results. Finally, combined with the global optimization ability of GA, the ideal process parameter combination to improve and reduce the casting defects is found in combination with the actual situation.
2. Numerical Simulation of Stainless Steel Casting Process
2.1 Object of Research
The object of this study is a conical frustum-shaped casting, made of 316 stainless steel, weighing about 3.46 kg. The maximum contour size is 118 mm, the height is 130 mm, the main wall thickness is 8 mm, and there is a side hole on the outside of the conical tube, with the thinnest wall thickness of only 3 mm, and the structure is relatively complex. According to the requirements of investment casting, a three-dimensional model of the casting and the gating system required for numerical simulation is established through SOLIDWORKS software. The model is imported into the PROCAST software for mesh division, setting of casting process parameters, and boundary conditions. There are 182,214 surface mesh division units and 1,663,165 volume mesh division units, and the casting model after mesh division is shown in Figure 1.
2.2 Simulation Settings
Combining the actual production conditions of the factory, the thickness of the mold shell set in the numerical simulation is 6 mm, the material is mullite refractory, the interface heat transfer coefficient is set to 500 W/(m^2·K), the pouring conditions are variables, and the cooling method is air cooling. Figure 2 shows the comparison between the actual production of stainless steel products in the factory and the simulation. There are no obvious shrinkage porosity defects observed macroscopically in the casting. Through setting the simulation, it is found that there are shrinkage porosity inside the parts at the special-shaped combination part. Through the actual production of the casting by wire cutting, it is found that there are indeed shrinkage porosity defects at the special-shaped combination part of the product, which can illustrate the reliability of this study’s simulation. The original pouring condition process parameter combination of the object of this study is a pouring temperature of 1600°C, a mold shell baking temperature of 1150°C, and a pouring speed of 2 kg/s. Through numerical simulation, it is found that the shrinkage porosity volume of the original process casting is 0.37 cc, and the equivalent stress size is 295.92 MPa.
2.3 Orthogonal Experiment Design
The actual process of investment casting is very complex, and many uncertain factors will affect the forming quality of the casting. In this paper, on the basis of the original process, the influence of three process parameters, namely, the pouring temperature, the mold shell baking temperature, and the pouring speed, on the casting quality indicators of 316 stainless steel engine parts is studied. The orthogonal test design method is used for the simulation test design, and three factors and five levels are designed. The orthogonal table is used to arrange the test combination of each factor level, as shown in Table 1.
[Here should be a table of orthogonal test factors and levels for investment casting process parameters]
2.4 Simulation Test Results and Analysis
In the investment casting process, the defects such as shrinkage porosity, stress deformation, cracking, etc. have important influences on the subsequent processing process and the quality of the finished product. In this paper, the volume of the shrinkage porosity of the casting itself and the equivalent stress of the casting are studied as the main quality indicators, and the simulation calculation is carried out in turn according to the tests arranged in Table 2, and the corresponding test results are obtained.
According to the data results in Table 2, the range R of each factor is calculated and compared. The influence degree of each factor on the two evaluation indicators is shown in Table 3, where K1~K4 is the sum of the evaluation indicator shrinkage porosity volume corresponding to different levels of each factor, k1~k4 is the sum of the evaluation indicator equivalent stress value corresponding to different levels of each factor, R1 is the range of the test factors for the evaluation indicator of shrinkage porosity, and R2 is the range of the test factors for the evaluation indicator of equivalent stress.
It can be seen from the range analysis in Table 3 that the primary and secondary relationship of each factor affecting the size of the shrinkage porosity of the casting is pouring speed > pouring temperature > mold shell preheating temperature, and the primary and secondary relationship of each factor affecting the equivalent stress of the casting is pouring temperature > pouring speed > mold shell preheating temperature. The influence of each factor on the shrinkage porosity and equivalent stress through variance analysis is consistent with the results of the range analysis. Among them, each factor shows significance for the shrinkage porosity index, indicating the existence of the main effect; for the equivalent stress index, both the casting temperature and the casting speed show significance, while the mold shell preheating temperature does not show significance. Therefore, the influence relationship between the investment casting process parameters and the casting defects is relatively complex.
3. Creation and Optimization of BP Neural Network Prediction Model
3.1 BP Neural Network
BP neural network is a multi-layer error backpropagation feedforward neural network, which has a simple structure and good operability, so that the neural network has been widely used. It is suitable for the study of the complex relationship between the process parameters of investment casting and the casting defects. However, the BP neural network is relatively sensitive to the initial weights and thresholds and other parameters. After the structure of the network is determined, randomly selecting the weights and other parameters to train the model is easy to fall into a local optimum, resulting in a large network prediction error. The PSO algorithm is used for adjustment and optimization, which changes the randomness of the initialization of the network parameters of the traditional network model, determines the weight and threshold parameters at the initialization of the network, and improves the learning efficiency and prediction accuracy.
In this study, the process parameters of investment casting, such as the pouring temperature, the mold shell baking temperature, and the pouring speed, are taken as the input of the network, and the quality indicators, such as the shrinkage porosity defect and the equivalent stress of the casting, are taken as the output of the network. That is, the BP neural network has 3 nodes in the input layer and 2 nodes in the output layer, and the number of hidden layer nodes is taken as 7. The training method selects the Levenberg-Marquardt algorithm, which has the fastest convergence speed and a relatively small mean square error. The training times of the BP neural network is 1000, the learning rate is 0.1, and the training accuracy is 0.0001. Five sets of orthogonal test results are randomly selected as the test samples of the BP neural network, and 20 sets are used as the training samples for the training of the grid.
3.2 Optimization of BP Neural Network with Particle Swarm Algorithm
The training of the neural network is a process of constantly correcting the weights and thresholds, so that the network output error becomes smaller and smaller through training. In this paper, 35 weights and 9 thresholds are set for the BP neural network. The neural network optimized by the particle swarm algorithm has strong adaptability and good generalization ability. The parameter settings for optimizing the BP neural network with the particle swarm algorithm are as follows: the maximum number of iterations is 100 generations, the number of population particles is 50, the particle length is 44, the learning factor is 1.5, the inertia weight is 0.8, the position value range is [-0.7, 0.7], and the speed value range is [-10, 10]. Taking the prediction error of the BP neural network as the fitness value of the particle swarm algorithm, its iterative evolution curve is shown in Figure 3.
The prediction error of the particle swarm algorithm tends to be stable after the 50th generation. Through the optimization of the particle swarm algorithm to determine the initial weights and thresholds of the network, the optimized BP neural network can predict the output more accurately. The prediction error comparison between the optimized BP neural network by the particle swarm algorithm and the unoptimized BP neural network for the shrinkage porosity and equivalent stress is shown in Figure 4, where the ordinate is the prediction error, and the abscissa is 5 randomly selected test samples.
It can be observed from Figure 4(a) and (b) that the points displayed are the comparison prediction errors of the shrinkage porosity of the test samples predicted by the BP neural network and the equivalent stress error, and the broken line is the prediction error after PSO optimization. It can be seen that the absolute value of the prediction error of the test samples of PSO-BP is lower than that of the BP neural network, indicating that the prediction error of the BP neural network optimized by the particle swarm algorithm is smaller. Therefore, the BP neural network optimized by PSO is used as the nonlinear mapping model between the input and output of investment casting.
4. Optimization of Investment Casting Process Parameters
4.1 Optimization Process and Model
The optimization of the investment casting process parameters is carried out using GA. GA has a strong global search ability, and the gene variation of GA is more conducive to the realization of the ideal process parameter combination. For investment casting, the defects such as shrinkage porosity are the key factors leading to a high reject rate and subsequent correction cost, and the stress deformation will also increase the probability of rejects. For the quality indicators of the casting, the smaller the values of the shrinkage porosity and the equivalent stress, the better. The simplified mathematical model of the optimization problem in this paper is shown in Equation (1).
Where net is the BP neural network optimized by the PSO algorithm, f1 is the shrinkage porosity corresponding to the output, f2 is the size of the equivalent stress value corresponding to the output, x1 is the input pouring temperature, x2 is the input mold shell baking temperature, and x3 is the pouring speed. The range of process parameters is as follows: x1 ∈ [1590, 1620], x2 ∈ [1140, 1160], x3 ∈ [1, 3].
The optimization goal of investment casting in this study is two. In order to obtain the optimal solution to the optimization problem of the investment casting process parameters, the weight coefficient transformation method is used to convert each sub-objective function into a single-objective optimization by 赋予 weight coefficients. The weight represents the reliability of each period of data and the importance of its impact on the prediction results. A reasonable overall evaluation needs to combine various indicators together, but due to the different emphasis of the evaluation goals, it is necessary to weight each indicator.
Considering the factors that cause rejects in the factory production process, such as shrinkage porosity, surface scarring, correction cracking, etc. Among them, the shrinkage porosity is the main reason for the high reject rate, and combined with the actual needs, and the subsequent correction and elimination steps of the shrinkage porosity are relatively cumbersome, the weight coefficient of f1 ≥ the weight coefficient of f2 is taken. The weight is set before the anti-normalization of the BP neural network prediction results to eliminate the influence of different dimensions of the shrinkage porosity and the equivalent stress.
The BP neural network optimized by the PSO algorithm is used as the mapping model between the casting process parameters and the quality indicators of investment casting, and combined with the genetic algorithm, the optimal process parameter combination is found within the given range of process parameters to improve the quality of investment casting. The optimization process is shown in Figure 5. Firstly, the initial weights and thresholds of the BP neural network are optimized by the PSO algorithm; then, the optimized BP neural network is used to find the optimal process parameter combination.
Among them, GA adopts real number coding, the initial population is randomly generated by the computer within the parameter range corresponding to the variable, the number of population individuals is 50, the selection and crossover operation is carried out using the monarch scheme, the probability of gene crossover is 0.8, the probability of mutation is 0.2, and the maximum number of genetic generations is 100. When the fitness function takes different weight coefficients, the optimization results are shown in Table 4. With the change of the weight coefficient, the change of the pouring process parameters is mainly concentrated in the pouring temperature and the mold shell preheating temperature. The pouring temperature fluctuates within a relatively low temperature range compared to the test samples, the mold shell baking temperature fluctuates within a relatively high temperature range compared to the test samples, and the pouring speed is basically around 1 kg·s^(-1).
When different GA weight coefficients are set, the optimization effect of the genetic algorithm on the casting shrinkage porosity defect and the equivalent stress is shown in Table 5. It can be seen macroscopically that the optimization effect on the casting defect of shrinkage porosity increases with the increase of the weight coefficient, indicating that the weight value will affect the distribution of the shrinkage porosity defect and the equivalent stress value. According to the importance of the actual optimization goal, the weight value is selected to obtain the ideal optimization effect. Combined with the optimization effect of different weights and the actual production situation of related stainless steel products, the weight coefficient combination with an optimization effect of up to 70.27% on the shrinkage porosity defect is selected in this paper.
4.2 Optimization Process Simulation Analysis
The filling of the molten metal of the casting will affect the slag entrapment and gas entrapment of the casting. The optimized process parameters are used for simulation, and the filling process is shown in Figure 6. It can be seen that during the pouring process, as the molten metal enters, the molten metal fills smoothly and orderly, enters the cavity through the runner, and the liquid level rises smoothly from bottom to top without splashing and turbulence, indicating that the design of the pouring process system and the selection of the pouring process parameters are reasonable. And during the pouring process, there is no obvious change in the temperature at the edge of the casting, which can effectively achieve the complete filling of the casting and avoid underfilling and cold shut.
Generally, there will be shrinkage porosity and shrinkage cavity defects in the solidification process of the casting, and it is very important to accurately control the solidification process of the casting for the prediction of defects. Figure 7 shows the change of the solid phase on the casting during the solidification process of the casting. It can be found that the first position where the solid phase appears on the casting is the edge of the casting. With the cooling of the casting, the casting solidifies sequentially, and the solid phase appears last in the gating system, which is beneficial to the feeding of the casting, indicating that the design of the gating system and the selection of the pouring process parameters are reasonable.
4.3 Optimization Results and Comparative Verification
Based on the ideal optimization process parameter combination for simulation verification, the verification results are shown in Figure 8. Among them, Figures 8(a) and (b) are the distribution of the shrinkage porosity defect corresponding to the original process scheme and the optimized shrinkage porosity defect distribution map, respectively. It can be seen that the volume of the shrinkage porosity has significantly reduced and the positions of the shrinkage porosity defects at the edge of the product disappear. The calculated shrinkage porosity volume after optimization is 0.11 cc. Compared with the original process parameter combination, the shrinkage porosity volume is reduced by 70.27%. Figures 8(c) and (d) are the equivalent stress distribution nephograms before and after optimization. The calculated equivalent stress value of the casting after optimization is 293.10 MPa, which is 0.92% lower than that of the original process. In this paper, the combination of PSO – BP and GA algorithms has an obvious optimization effect on the shrinkage porosity defects in the investment casting process, and has a general optimization effect on the equivalent stress of the casting. Overall, it has an optimization effect on the investment casting defects.
5. Conclusions
(1) Based on the BP neural network optimized by PSO, a mapping model between the basic process parameters of investment casting (pouring temperature, mold shell baking temperature, and pouring speed) and the predicted casting defects (shrinkage porosity and equivalent stress) is established. Combined with GA, the ideal process parameter combination can be found according to the actual production requirements.
(2) The results of numerical simulation tests show that when the process parameters are set to a pouring temperature of 1581°C, a mold shell baking temperature of 1159°C, and a pouring speed of 1 kg·s^(-1), the shrinkage porosity volume in the casting defects of 316 stainless steel engine parts is reduced by 70.27%, and the equivalent stress value is reduced by 0.92%. Overall, it has an optimization effect on the casting defects, and the optimization effect on the shrinkage porosity defects of the casting is more obvious.
In future research, we can further explore the application of this optimization method in other casting materials and complex casting structures, and continuously improve the optimization algorithm to obtain better casting quality and production efficiency. At the same time, more attention can be paid to the influence of other factors in the casting process on the quality of castings, so as to establish a more comprehensive and accurate casting process optimization model.
This research provides a new idea and method for the optimization of the investment casting process of engine stainless steel parts, which has important theoretical significance and practical value for improving the quality of castings and reducing production costs. It is expected that this method can be widely used in the field of casting production and promote the development of the casting industry.
