Investment casting process can produce complex shapes, high surface finishGood, high dimensional and shape accuracy castings are widely used in high value-added industries.value in the production of various alloy castings.Foundry CAE technology has undergone sevenAfter more than ten years of development, it has been increasingly perfected.Through numerical simulation,The accuracy of casting product quality prediction can reach 95%, which is highly effective for practical production.The production guidance and program improvement of the engine are of great significance.The stainless steel fitting structure is complex and the service process requires air tightness.Requirements for defects such as shrinkage porosity, stress, and deformation in this pair of partsIt is very strict.The traditional investment casting process parameter optimization usually adoptsThe “experience trial and error method” is a method of searching for optimal solutions in the face of a large range of variables and multiple processes.The optimization efficiency is low.Particle Swarm Optimization (PSO),PSO) has been widely used in neural networks due to its rapid convergence and ease of implementation.The training of the network.The Back Propagation algorithm (BP)BP) has strong nonlinear mapping ability, and can connect any closed interval.The continuation function can be approximated by a three-layer BP neural networkA mapping from multiple inputs to multiple outputs.Genetic algorithms (GeneticAlgorithm, GA) has excellent performance in nonlinear and multi-objective optimization problems.Good solving ability, widely used in combinatorial optimization problems [8].PSO-BP combined with GA combines the advantages of three algorithms, and can buildEstablish a more accurate mapping relationship model and achieve the goal of optimization.This study aims to investigate the feasibility of using a certain imported engine stainless steel component throughPSO-BP combined with GA optimizes the investment casting process parameters.Firstly, according toThe orthogonal test of process parameter design is calculated by PROCAST software.Finally, according to the calculation results, a BP neural network is established and optimized.Finally, combined with the global optimization ability of GA, we find outImprove the ideal process parameter combination to reduce casting defects.

**1 Numerical simulation of the casting process of stainless steel castings**

The research object is a conical-shaped casting with a main body made of316 stainless steel, weighing approximately 3.46kg. The maximum outline dimension is 118mm, height of 130mm, main wall thickness of 8mm, and tapered cylinderThe side hole is opened on the side, and the thinnest wall thickness is only 3mm, which is relatively complex in structure.Based on the requirements of investment casting, we used SOLIDWORKS software toCreate 3D models of castings and casting systems required for numerical simulation.Import the model into PROCAST software for mesh division, castingSet the manufacturing process parameters and boundary conditions.Surface grid division unitThere are 182214 units, and the number of cells in the body mesh is 1663165.The completed mesh casting model is shown in Figure 1.

Numerical simulation of the mold shell set based on the actual production conditions of the factoryThe thickness is 6 mm, the material is mullite refractory, and the interface exchangeThe thermal coefficient is set to 500W/(m2·K), and the pouring conditions are variable.The cooling method is air cooling.Figure 2 shows the actual production of stainless steel products in the factory.Compare the distribution and simulation of cutting defects in product parts, and castings from macroThere is no obvious shrinkage or porosity defects observed on the observation, and the simulation model is set up throughIt was found that there were shrinkage porosity and shrinkage holes inside the irregular joint part of the part.Through the actual production of castings by wire cutting, the abnormal joint parts of the product were found.Defects such as shrinkage porosity and shrinkage cavity are indeed present, which can demonstrate the reliability of the simulation in this study.The original pouring condition process parameter combination of the research object is pouringTemperature 1600℃, shell baking temperature 1150℃, pouring speed 2kgThrough numerical simulation, it was found that the shrinkage porosity and shrinkage cavity of the casting in the original processThe accumulated volume is 0.37cc, and the equivalent stress is 295.92MPa.

1.1 Orthogonal experimental design

The actual process of investment casting is very complex, with many uncertainties.Factors will affect the forming quality of castings.This article introduces the original workBased on the art, the key research is on the pouring temperature, the mold shell baking temperature, and the pouringNote: Three process parameters of speed on the casting of 316 stainless steel engine componentsThe influence of quality indicators.Simulation using orthogonal experimental design methodThe experiment design is based on 3 factors and 5 levels, using an orthogonal tableArrange the level test combinations of various factors。

1.2 Simulation test results and analysis

In the investment casting process, shrinkage porosity, stress deformation, and cracking areDefects such as cracks have a significant impact on the subsequent processing and product quality of castings.This article focuses on the volume and casting defects of shrinkage porosity in castings.The equivalent stress is the main quality indicator for research, as shown in the tableThe simulation calculation was conducted in the order of the tests arranged in theThe test results.

Calculate and compare the polarities of each factorThe influence of each factor on the two evaluation indicators is shown in the table.Wherein, K1~K4 are the evaluation indexes corresponding to different levels of each factor.Sum of the volume of shrinkage pores, k1-k4 correspond to different levels of each factorThe sum of the equivalent stress values of the evaluation indicators, R1, is the test factor on the reduction ofThe evaluation index range of shrinkage porosity is R2, which is the range of equivalent stress evaluation index of each factor in the test.From the analysis of the range in the table, it can be seen that the factors affecting the shrinkage porosity of the casting areThe primary and secondary factors affecting the size of shrinkage cavity are pouring speed> pouring temperatureThe preheating temperature of the mold shell affects the magnitude of the equivalent stress of the casting, among other factors.The relationship between the main and secondary factors is pouring temperature>pouring speed>mold shell preheating temperature.The influence of various factors on porosity, shrinkage cavity, and equivalent stress was analyzed by variance analysis.The results of soundness and range analysis are consistent, in which each factor has a significant impact on porosity and shrinkage.The indicators all showed significant differences, indicating the existence of a main effect.For equivalentStress index, casting temperature and casting speed all showed significant differences, whileThe mold shell preheating temperature did not show significant differences.Therefore, the investment casting processThe relationship between parameters and casting defects is complex.

**2 The creation and optimization of a 2-BP neural network prediction modelTo change**

Neural network is a multilayer error backpropagation feedforwardNeural network, with simple structure and good operability, has gainedIt has a wide range of applications and is suitable for investment casting process parameters.research on the complex relationship between casting defects.However, the BP neural networkSensitive to parameters such as initial weights and thresholds, network structureAfter determining the parameters, randomly selecting weights and other parameters to train the model can easily lead to a deadlock.is not optimal, resulting in large network prediction errors.PSO algorithm is used to adjustOptimization, which changes the random initialization of network parameters in traditional network modelsSex determines the parameters such as weight and threshold during network initialization,It can improve learning efficiency and prediction accuracy.This study focused on the process parameters of investment casting, including pouring temperature, mold shellRoasting temperature and pouring speed are taken as the input of the network, with quality indicatorsThe shrinkage porosity defects and the equivalent stress of the casting are the outputs of the network, namely BPThe neural network has 3 nodes in the input layer and 2 nodes in the output layer.Set the number of hidden layer nodes to 7.Select Levenberg as the training method-Marquardt algorithm has the fastest convergence rate and the smallest mean square errorThe training times of BP neural network is 1000, and the learning rate is 0.1,The training accuracy is 0.0001.Randomly select 5 sets of orthogonal test results asFor the BP neural network test samples, 20 groups are used as training samplesPerform grid training.Neural network training is a process of constantly correcting the weights and thresholds.The network output error becomes smaller and smaller through training.This article assumes thatThe BP neural network has 35 weights and 9 thresholds.The optimized neural network has strong adaptability and good generalization ability.ParticleThe parameter settings for optimizing the BP neural network using the swarm algorithm are as follows: maximumThe number of iterations is 100, the number of particles in the population is 50, and the length of the particleFor 44, the learning factor is 1.5, the inertia weight is 0.8, and the position value isThe range is [-0.7, 0.7], and the speed range is [-10, 10].The BP neural network prediction error is used as the fitness value of the particle swarm algorithm, whichThe iterative evolution curve is shown in the figure.

Figure 3 Iteration diagram of particle swarm optimization BP neural networkThe prediction error of the particle swarm algorithm tends to stabilize after the 50th generationThe initial weight and threshold of the network are determined by optimizing the particle swarm algorithm.The optimized BP neural network can predict the output more accuratelyAfter optimization by particle swarm algorithm, the BP neural network isPrediction of shrinkage porosity and equivalent stress using a chemical BP neural networkThe error comparison is shown in the figure, where the vertical coordinate is the prediction error, and the horizontalThe coordinates are 5 randomly selected test samples.

The points shown in Figure (a) and (b) are respectively the output of the BP neural networkThe shrinkage and porosity of the test samples for network prediction are compared with the prediction error and equalThe error of the effect force, the broken line is the prediction error after PSO optimization,The absolute value of the prediction error of the test samples of PSO-BP can be observed to beLower than the BP neural network, indicating optimization by particle swarm algorithmThe prediction error of the BP neural network is relatively small, so PSO optimization is adoptedThe post-BP neural network serves as a bridge between the input and output of investment casting.Nonlinear mapping model.

**3 Optimization of investment casting process parameters**

3.1 Optimizing processes and modelsThe optimization of investment casting process parameters is carried out using GA,GA has strong global search capabilities, and GA’s genetic variation is moreIt is beneficial to the realization of the ideal process parameter combination.For investment casting,It is said that defects such as shrinkage porosity and shrinkage cavity are the main reasons for high scrap rate and subsequent correction.The key factor of this is that stress deformation will also increase the probability of scraps.For the quality indicators of castings, the smaller the shrinkage porosity and equivalent stress valuesThe better.The mathematical model of the optimization problem in this article is simplified as shown in the formula.

There are 2 optimization objectives for investment casting,The optimal solution to the optimization problem of casting process parameters is obtained by using variable weight coefficients.By assigning a weight coefficient to each sub-objective function, we can transform it intoSingle objective optimization.The weight represents the reliability of each period of data and itsThe importance of the impact on the prediction results.A reasonable integrityEvaluation needs to integrate various indicators, but due to the evaluation objectivesDue to different emphasis, it is necessary to weight each indicator.Considering that the factor causing waste during production and processing in the factory is shrinkage cavity,porosity, surface scarring, correction cracking, etc. Among them, shrinkage porosity is the main causeThe main reason for the high waste rate is the combination of actual demand andThe subsequent correction and elimination steps for shrinkage porosity and shrinkage cavity are relatively cumbersome,1.f.The weight ofCoefficient≥2.f.The weight coefficient of .The weight is set in the BP neural network pre-training stage.Before the measurement results are normalized, the shrinkage porosity and equivalent stress are eliminated.The influence of the same dimension.The BP neural network optimized by PSO algorithm will be used as the fusionThe mapping model between the casting process parameters and quality indicators of mold castingtype, combined with genetic algorithms, to find the optimal solution within the given process parametersOptimize the process parameters combination to improve the quality of investment casting.Optimize the flowAs shown in the figure, first optimize the BP neural network through the PSO algorithm.The initial weights and threshold values of the network are set;then the optimized BP neural network is used toNetwork search for the optimal combination of process parameters.

Among them, GA adopts real number encoding, and the initial population is generated by computerRandomly generated within the parameter range corresponding to the variable, the number of individuals in the population50, using monarchy scheme for selection crossover operation, gene crossoverThe probability of variation is 0.8, the probability of variation is 0.2, and the maximum genetic number is100 generations. When taking different weight coefficients for the fitness function, the optimizedThe results are shown in Table 4. As the weight coefficient changes, the pouring process parametersThe changes mainly focus on the pouring temperature and the preheating temperature of the mold shellThe temperature fluctuates within a lower temperature range compared to the test sample, and the mold shellThe roasting temperature is within a relatively high temperature range compared to the test sample, while pouringThe injection speed is basically 1 kg · s-About 1.

When the weight coefficients are set differently, the relative optimization efficiency of the original process is improvedAs shown in Table 5. When different weight coefficients are set, the genetic algorithm searches forOptimization of shrinkage defects and equivalent stresses in castingsFrom a macro perspective, it can be observed that optimization of shrinkage and porosity in casting defects can be achievedThe effect is enhanced with the increase of weight coefficient, indicating that the weight value is takenIt will affect the distribution of shrinkage defects and equivalent stress values. rootSelect the weight size based on the degree of importance attached to the actual optimization goals to obtainObtain ideal optimization results. The optimization effect of combining different weights and its applicationBased on the actual production situation of related stainless steel products, this article selects a weight coefficient combination with an optimization effect of 70.27% on shrinkage and porosity defects.

3.2 Simulation analysis of optimization process

The filling of molten metal in castings will affect the inclusion of slag and gas in the castingsSimulate with optimized process parameters, and the filling process is shown in Figure 6It can be seen that during the pouring process, as the molten metal enters,The metal liquid fills the mold in a stable sequence, enters the mold cavity through the runner, and the liquid levelSteady rise from bottom to top without splashing or turbulence, indicatingThe design of the pouring process system and the selection of pouring process parameters are reasonable.And during the pouring process, there was no significant change in the temperature at the edge of the castingTransformation can effectively achieve complete mold filling of castings, avoiding insufficient pouring and cold segregation.

Castings generally experience shrinkage porosity and porosity during the solidification processAccurately controlling the solidification process of castings is crucial for predicting defects.Figure 7 shows the changes of solid phase on the casting during the solidification process. CanThe first location where solid phase appears in the casting is at the edge of the casting, and as the casting progressesThe cooling of the casting, the sequential solidification of the casting, and the final appearance of solid phase in the pouring system,Beneficial for casting shrinkage, indicating the design of the pouring system and the pouring processThe selection of artistic parameters is reasonable.

3.3 Optimization Results and Comparative Validation

Simulation verification based on ideal optimized process parameter combinations,The comparison of verification results is shown in the figure. Among them, Figures a) and (b)Distribution and optimization of shrinkage and porosity defects corresponding to the original process planThe distribution map of shrinkage and porosity defects after comparison reveals the volume of shrinkage and porosityThere is a significant reduction, and there are shrinkage holes and loose spots at the edge of the productThe sunken position disappears. Calculate the optimized volume of shrinkage and porosity as0.11cc, compared to the original process parameter combination, the volume of shrinkage and porosity is reduced70.27% less. Figures 8 (c) and (d) show the equivalent values before and after optimizationStress distribution cloud map, calculate the optimized equivalent stress value of the casting as293.10MPa, reduced by 0.92% compared to the original process. This article is based onProcess parameter combination optimized by PSO-BP combined with GA algorithm for meltingThe optimization effect of shrinkage porosity and porosity defects generated during the mold casting process is relatively clearThe optimization effect on the equivalent stress of castings is general, and the overall effect on investment molds is not significantCasting defects have an optimization effect.

**4 Conclusion**

(1) Establishment of BP neural network based on PSO optimizationBasic process parameters of investment casting: pouring temperature, shell roasting temperatureThe relationship between pouring speed and predicted casting defects, shrinkage porosity and equivalent stressThe mapping model, combined with GA, can be used to find reasoning based on actual production needsThe desired combination of process parameters.(2) The verification of numerical simulation test results shows that when the process parametersSet pouring temperature of 1581 ℃, mold shell roasting temperature of 1159 ℃, pouringSpeed 1kg · s-At 1 hour, casting defects were found in 316 stainless steel engine partsThe volume of shrinkage and porosity decreased by 70.27%, and the equivalent stress value decreased0.92%. Overall optimization of casting defects, includingThe optimization of the occurrence of shrinkage and porosity defects in the parts is quite obvious.