Introduction

Cold spray is an innovative solid-state material deposition process, where high speed particles bonded with the substrate. Compared with thermal spray, the powder remains in the solid state during the entire process which can reduce oxidation and phase transition. Cold spray has been thus used for temperature sensitive (such as nanostructured and amorphous) and oxygen sensitive (such as aluminum, copper, titanium, zinc, etc.) materials (Pathak and Saha 2017). During the cold spray process, the particles are accelerated to the speeds between 300-1200 m/s by propellant gas and then impact on the substrate to form the plastic deformation and bonding connection. Cold spray was developed as a coating technology in the 1980s and then became one of the popular solid-state processes due to its distinctive features in repairing turbine and compressor blades (Yin et al. 2018). Along the way, many academic studies on cold spray have been reported which covering various aspects of the process and its applications (Papyrin et al. 2006; Vilardell et al. 2015; Assadi et al. 2016; Li et al. 2018; Raoelison et al. 2018; Jenkins et al. 2019). Generally, those studies can be divided into two categories: mathematical modeling of impact using numerical methods and experimental investigations.

As for the mathematical modeling, Finite element method (FEM) (Liu and Quek 2013) is one of the wide-used numerical methods for cold spray and the finite element method software ABAQUS Explicit has been used to simulate the particle deformation (Guetta et al. 2009; Kumar et al. 2009; Yu et al. 2012; Rahmati and Ghaei 2014), bonding features and associated mechanisms (Bae et al. 2009; Kumar et al. 2016; Viscusi et al. 2019; Rahmati and Jodoin 2020) in cold spray. These studies are based on Lagrangian formulation. A general feature of Lagrangian-based FEM simulations is that they can naturally track the interface between particle and substrate during the process of high speed impact, but it cannot reveal the realistic development of the deformation pattern due to the excessive mesh distortion. The Eulerian-based FEM does not have mesh distortion, so it offers a more realistic account of the geometrical deformation (Assadi et al. 2016). An Eulerian-based FEM software package named CTH, developed by Sandia National Laboratories, has thus been used to analyze the interfacing bonding in the cold spray process (Grujicic et al. 2003) and Sun et al. investigated hard/soft combinations of cold spraying by the Eulerian (Sun et al. 2020). Both Lagrangian and Eulerian FEMs are mesh-based methods. There have also been some attempts to simulate cold spray using mesh-free methods include smoothed particle hydrodynamics (SPH) (Liu and Liu 2003) and molecular dynamics (MD). SPH is a non-mesh-based numerical method that can avoid the problems associated with extreme mesh distortion. Studies of simulating cold spray using SPH include works by Manap et al. (2014), Li et al. (2010) and Gnanasekaran et al. (2019). However, the process of bonding and rebounding is still cannot be demonstrated by neither FEM nor SPH method because the bonding happens at atom scale during the cold spray process. Therefore, MD method is considered as an ideal tool to simulate the bonding of cold spray but there are few studies focused on this. The earlier research is relevant to the aerosol deposition which revealed that higher impact velocities led to a stronger interface (Daneshian and Assadi 2014; Goel et al. 2014). Recently, some scholars and researchers have made progress in simulating cold spray process by MD method (Rahmati et al. 2020). For instance, Yao et al. have simulated collision behavior between nano-scale TiO\(_{2}\) particles during cold spray (Yao et al. 2018) and Joshi et al. modeled the whole cold spray process in nanometer dimension (Joshi and James 2018). These studies investigated the bonding mechanism in cold spray process and understood the effect of critical parameters including impact velocity, angle and particle size.

According to Reference Joshi and James (2018), it is evident that the quality of deposition is associated with impact velocity, angle and particle size, where the quality can be measured by the height and the flattening ratio of the bonded particle. It can be found that different impact velocities, angles and particle sizes result in different flattening ratios and heights, so how to construct the objective function by the flattening ratio and the height is the key point for this optimization process. It is well-known that the MD method usually requires huge memory to store result files for a large-scale model because millions of atoms need to be tracked and recorded during the simulation process. Therefore, it is more difficult to apply the optimization algorithms to MD since the iterative procedure requires numerous sample data files that need to be saved. Considering the rapid development of deep convolutional neural network (DCNN) and its superiority in solving image recognition and classification problems during engineering and manufacturing processes (Lin et al. 2019; Badmos et al. 2019; Tabernik et al. 2020; Kwon et al. 2020), A DCNN aided optimization (DCNNAO) method is proposed to improve the quality of deposition by extracting the value of objective function from the MD contours directly in this study. It means that only several hundred kilobytes are needed to store a contour instead of spending several hundred gigabytes for an MD result file, so the DCNNAO method will largely reduce the memory requirement and the computational time of the optimization. To complete this strategy, Python scripts are written to generate required snapshots from result files automatically and the semantic image segmentation method based on DCNN is used to separate the deposition from the substrate. Moreover, three popular optimization methods are employed to obtain the optimal solution which include efficient global optimization (EGO), particle swarm optimization (PSO) and differential evolution (DE) algorithms. Furthermore, a boosted decision trees (BDTs) model is built to accelerate the optimization process.

The rest of this paper is organized as follows. The theory of the proposed method is introduced in the section “Methods”. The result is shown in the section “Results and discussions” and the discussions should be given too. At the last, the conclusion is summarized in the section “Conclusion”.

Methods

Framework of DCNNAO method

The DCNNAO method is suggested to improve the quality of deposition during the cold spray process. The key point is how to construct the objective function for the optimization and how to calculate the flattening ratio and the height from the MD result file. Figure 1 is the framework of the DCNNAO method. The DCNNAO method contains two loops: the classic optimization loop and the BDTs assisted optimization loop. The classic optimization loop is a general process of most optimization methods. Firstly, calculate the value of the objective function, then update the design variables, then calculate the new value of the objective function, then repeat this cycle until satisfying the stopping criterion. MD and image processing technique are used to calculate the value of the objective function in this loop. Considering the huge memory requirement for MD result files, the DCNNAO can reduce the memory requirement and improve the efficiency of the optimization process because only MD contours are used to calculate the objective function without MD result files. In the second loop, BDTs aided optimization loop, a meta model of the objective function needs to be built by BDTs first. Once the model has been constructed, the value can be evaluated from the model instead of forward calculation. It can extremely improve the efficiency of classic optimization. Compared with the classic optimization loop, the only difference is the value of objective function should be obtained from BDTs model directly.

Fig. 1
figure 1

Framework of the DCNNAO method

MD simulation for cold spray

Basic theories of MD

In the MD simulation, the system is described by the position and momentum of each atom or molecule in the simulation box. The dynamics of atoms obey Newton’s law which can be described as the following equation:

$$\begin{aligned}&\dot{x}_i = v_i,\nonumber \\&m_i \dot{v}_i = -\triangledown _{x_i}V, \end{aligned}$$
(1)

where \(m_i\) and \(v_i\) are the mass and velocity of atom i respectively, \(x_i\) means the position of atom i and \(V(x_1,x_2,x_3,\ldots ,x_n)\) denotes the inter-atomic potential. A typical example of the inter-atomic potential is the Embedded Atom Method (EAM) in which an atom should be regarded as the embedded component of a lattice (Daw and Baskes 1983). Specially, the EAM potential can be written as

$$\begin{aligned} U= & {} \sum _i F_i\left( \rho _i \right) + \frac{1}{2}\sum _i \sum _{j\ne i} \phi _{ij}\left( r_{ij}\right) , \end{aligned}$$
(2)
$$\begin{aligned} \rho _i= & {} \sum _{j\ne i} \rho _j \left( r_{ij}\right) , \end{aligned}$$
(3)

where \(F_i\) means the embedding energy depended on the electron cloud density \(\rho _i\) around the atom i. The electron density \(\rho _i\) is associated with all the atoms in the system which can be calculated by Equation (3). The symbol \(\phi _{ij}\) denotes the pairwise potential, which depends on the relative distance \(r_{ij}\) between atom i and its neighbor atom j. Generally, most empirical potentials can be written as

$$\begin{aligned} V=\sum _i V_i (u_1,u_2,u_3,\ldots ,u_n), \end{aligned}$$
(4)

where V is a function of the energy of each atom (\(V_i\)), which depends on \(u_i\), the displacement of atom i from its reference position \(R_i\) (\(u_i=x_i-R_i\)). Usually, atoms do not interact directly beyond the cut-off radius \(r_{cut}\), which implies that

$$\begin{aligned} \triangledown _{x_i}V_i = 0, if r_{ij}>r_{cut}. \end{aligned}$$
(5)

Therefore, the inter-atomic force \(f_i\) on the atom i can be witten as

$$\begin{aligned} f_i=-\triangledown _{u_i}V = \sum _{j \ne i}f_{ij}. \end{aligned}$$
(6)

There are a series of motion equations needs to solving during the MD simulation, such as Equation (1). Thus, the Velocity-Verlet algorithm is employed as the time integration algorithm to solve the motion equations with a considerable accuracy. More details about the Velocity-Verlet algorithm can be found from the Reference Omelyan et al. (2002).

Definition of stress

The definition of stress for an atomic simulation is different from the continuum stress concept. A well-known definition of virial stress suggested by Swenson (1983) is used in this study. Atomic scale virial stresses are equivalent to the continuum Cauchy stresses (Subramaniyan and Sun 2008). The stress contains two parts, potential and kinetic energy parts, which is defined as

$$\begin{aligned} \sigma _{xy}=\frac{1}{V}\sum _i \left[ \frac{1}{2}\sum _{j = 1}^N \left( r_x^j - r_x^i \right) f_y^{ij}-m^i v_x^i v_y^i \right] , \end{aligned}$$
(7)

where \(m^i\) means the mass of atom i, the subscripts x and y denote the Cartesian components and V is the total volume of the system. The superscripts i and j are the atom identification number, which mean atom i and atom j. The symbols r, f and v indicate the relative position, inter-atomic force and velocity respectively. Specially, the symbol \(f_y^{ij}\) is the y direction force on atom i induced by atom j, \(v_x^i\), \(r_x^i\) are the velocities and relative position of atom i along the x direction. Other symbols are as similar as the above. To roughly calculate the local stress field of the system, the ’atomic stress \(\sigma _{xy}\)’ for each atom in the system is used to plot the stress contours. Here, the ’atomic stress \(\sigma _{xy}\)’ has the unit of stress\(\times \)volume. Then the ’Von Mises stress \(\bar{\sigma }\)’ can be calculated by

$$\begin{aligned} \bar{\sigma }=\frac{1}{\sqrt{2}}\sqrt{(\sigma _x-\sigma _y)^2+(\sigma _y-\sigma _z)^2+(\sigma _z-\sigma _x)^2+6 (\tau _{xy}^2+\tau _{yz}^2+\tau _{zx}^2)}, \end{aligned}$$
(8)

where \(\sigma _x, \sigma _y, \sigma _z\) are the normal stresses and \(\tau _{xy}, \tau _{yz}, \tau _{zx}\) are the tangential stresses.

MD model for cold spray

In this study, a classical molecular dynamics code, named Large-scale Atomic Molecular Massively Parallel Simulator (LAMMPS) (Plimpton 1995), is used to simulate the cold spray process and the atomic visualization of the MD simulation results is processed by an open source software termed Open Visualization Tool (OVITO) (Stukowski 2010). This study considers the impact between a nanoparticle and a metal substrate in three-dimension (3D). The schematic of the MD simulation model for the cold spray process is shown in Fig. 2, where the substrate should be considered to set a fixed boundary layer at the bottom and the nanoparticle should be set an initial velocity v. However, it should be pointed out that the MD simulation model is a nanoscale model while usually the particle size is micron-sized in cold spray. Thus, how to connect MD simulation results on nanoscale to the deformation process of micron-sized metallic particle is the essential work. In order to figure out the connection between different scales, the experimental result (Yu et al. 2012) is used to be compared with the MD result in this study, where the experimental result is implemented under the macro scale with a 20  mm particle while the MD simulation is under the nanoscale. The comparison is shown in Fig. 3, where the upper images are cross-sections of 20 mm Cu ball impacting on low carbon steel plate (Yu et al. 2012) and the lower images are MD simulation results of 20 ÅCu cluster impacting on steel substrate. It indicates that MD simulated deformation patterns are consistent with experimental observations although those results are calculated under the different scales. It means that the MD method can be used to predict the deformation process of micron-sized cold spray metallic particle.

Fig. 2
figure 2

Schematic of MD simulation model of cold spray

Fig. 3
figure 3

Comparison of simulated results by experiment and MD with velocities: a 350 m/s, b 600 m/s, c 750 m/s, d 1000 m/s and e 1450 m/s

For the optimization process, an MD model for cold spray should be defined as follows. The material of simulation is copper (Cu), so both of the nanoparticle and substrate consist of Cu atoms. Face-centered cubic (FCC) lattice structure is used. Moreover, the schematic of the MD simulation model for the cold spray process is shown in Fig. 2, where the size of the substrate is 240Å\(\times \) 240 Å\(\times \) 50Å and the radius of nanoparticle is range from 10 to 20Å. The constant parameter of FCC lattice structure is 3.61Å. More details about the parameters of MD simulation are listed in Table 1.

Table 1 Some inputs of the ELM

Deep convolutional neural network aided optimization

The DCNNAO method is suggested to improve the quality of deposition by constructing a specified objective function which associates with the flattening ratio \(\mu \) and the height h of deposition. The flattening ratio \(\mu \) was defined as a ratio of the maximum diameter of deposition (particle after impact) to original diameter of the particle before impact in the Reference Joshi and James (2018). However, it is difficult to define a diameter when the particle impacts to the substrate with an angle, because usually the deposition is irregular. Therefore, a generalized flattening ratio \(\mu \) is defined as the ratio of the area (\(S_m\)) of the deposition (particle after impact) to the area of the particle cross section (\(S_i\)) before impact in this study. Specially, the flattening ratio \(\mu \) and the height h are used to measure the quality of deposition during the cold spray process. Consider an example for cold spray as shown in Fig. 2, where the radius of the particle is 15Å, the velocity is 6Å/ps, the impact angle is \(0^{\circ }\). Then Fig. 4 shows the snapshots of the MD results before and after impact on top view, where the contour plot is according to the Z-coordinate range from 0 to 10Å.

Fig. 4
figure 4

The snapshots of MD computational results on top view

Optimization formulation

As shown in Fig. 4, once the snapshots of the MD computational results are obtained, then \(S_i\) and \(S_m\) can be obtained from Fig. 4a, b respectively. Then, the flattening ratio \(\mu \) can be calculated by

$$\begin{aligned} \mu =S_m/S_i. \end{aligned}$$
(9)

In order to improve the quality of deposition, the height of should also be included into the objective function. The height of deposition is defined as shown in Fig. 5 which can be calculated from MD result files directly. Then the objective function can be defined by the flattening ratio and the height as follows.

Fig. 5
figure 5

Snapshot of cross-section of MD simulation result

Minimize:

$$\begin{aligned} c(v,r,\theta )=\frac{1}{\alpha h+(1-\alpha ) \mu }, \end{aligned}$$
(10)

Subject to:

$$\begin{aligned} \dot{x}_i = v_i, \end{aligned}$$
(11)
$$\begin{aligned} m_i \dot{v}_i = -\triangledown _{x_i}V, \end{aligned}$$
(12)
$$\begin{aligned} h = f(v,t,\theta ), \end{aligned}$$
(13)
$$\begin{aligned} \mu = S_m/S_i, \end{aligned}$$
(14)
$$\begin{aligned} S_i=f(v,r,\theta ), \end{aligned}$$
(15)
$$\begin{aligned} S_m=f(v,r,\theta ), \end{aligned}$$
(16)

Design space:

$$\begin{aligned}&300 m/s \leqslant v \leqslant 1200 m/s,\nonumber \\&10\AA \leqslant r \leqslant 20\AA ,\nonumber \\&0^{\circ } \leqslant \theta \leqslant 30^{\circ }, \end{aligned}$$
(17)

where \(c(v,r,\theta )\) is the objective function and \(\mu \) means flattening ration mentioned above. The symbol h is the height of deposition. Symbols \(v, r, \theta \) denote the velocity, radius, impact angle of particles. Moreover, the cold spray process is simulated by MD, so the objective function also obeys to the Newton’s law for MD as shown in Eqs. (11) and (12). It should be noted that the design variables (\(v,r,\theta \)) are restricted to appropriate intervals in accordance with the practical applications as shown in Eq. (17). Moreover, the symbol \(\alpha \) is defined as a weight between the flattening ratio and the height or the efficiency and quality of cold spray. For the efficiency, the weight \(\alpha \) should be decreased to enlarge the effect of flattening ratio, then the maximum area of deposition can be obtained but it usually comes with craters when \(\alpha \) is too small. For quality, the weight \(\alpha \) should be increased to obtain the smooth shape of deposition and reduce the craters, but the efficiency of cold spray should be decreased with the increment of \(\alpha \). Therefore, the value of \(\alpha \) should be determined by the trade-off between efficiency and quality. In this study, \(\alpha =0.5\) is used for the optimization process.

Image processing technique

As mentioned above, the image processing technique is used to separate the cluster or deposition from Fig. 4, but how to generate the snapshots automatically is the first step needs to be completed. In this study, the open source software OVITO is used as the post-processing tool. OVITO is a scientific visualization and analysis software for atomic and particle simulation data. Specially, OVITO has a powerful Python-based scripting interface which can process and generate various snapshots automatically. Therefore, a Python script is used to process and generate a series of snapshots such as Fig. 4. The script can invoke program actions like a human user does in the graphical interface and it can run from the command line without any user interaction, so the snapshots can be generated automatically.

Once the snapshots are generated, the next step is how to extract the deposition (particle after impact) from the snapshots. Thus, the DCNN based semantic image segmentation is implemented. Semantic segmentation with the goal to link labels to every pixel in an image is one of the fundamental topics in computer vision (Long et al. 2015; Girshick et al. 2014) and DCNNs show striking performance in high level vision tasks including image classification and object detection recently. In this study, an improved DCNN based semantic segmentation method, DeepLabv3+ (Chen et al. 2018), was implemented to recognize and label the deposition parts from MD contours, which was shown in Fig. 6. In this work, spatial pyramid pooling module captures rich contextual information by pooling features at different resolution and encoder-decoder structure obtains sharp object boundaries (Chen et al. 2018).

Fig. 6
figure 6

An illustration of DCNN based semantic image segmentation

For this optimization process, 3000 images (1800,600, and 600 for the training, validation, and test sets respectively) are used to train the DeepLabv3+ network. The training progress is shown in Fig. 7.The comparison between predicted and labeled images is also given in Fig. 8 to show the accuracy of DeepLabv3+ network, where labeled images are pre-processing images for network training and predicted images are those images predicted and labeled by DeepLabv3+ network. It can be found that the DeepLabv3+ network can exact the cluster and the deposition from the substrate precisely. Figure 9 shows the result predicted by DeepLabv3+ network corresponding to Fig. 4.

Fig. 7
figure 7

The training progress of DeepLabv3+

Fig. 8
figure 8

The comparison between predicted and labeled images

Fig. 9
figure 9

Separating the deposition from the snapshot before impact

BDTs assisted optimizations

It is well known that optimization is an iterative process and the MD program needs to be evoked again and again, so this is a time-consumed process. Thus, BDTs are used to accelerate the process by building a meta-model for the objective function. Boosted decision trees algorithm is one of the popular machine learning algorithms introduced as an improved algorithm of decision trees. The boosted decision trees algorithm was used as an alternative to artificial neural networks by Roe et al. in the last decade (Roe et al. 2005). In this study, BDTs are used to forecast the value of the objective function, so that the optimal solution can be found more efficiently than the classic optimization loop. Furthermore, in order to forecast the value of the objective function, a set of sample data should be used to construct BDTs, then BDTs model need to be trained,and finally the trained model can be used to forecast the value of objective function.

Results and discussions

Several popular optimization algorithms including KRG-EGO, PSO, DE are tested and some comparisons are made in this section, where the EGO is started with 20 sample points while PSO and DE is started with 20 particles. All the program is executed under the Linux system and the MD simulation is calculated by parallel LAMMPS with 24 MPI processors. The image processing is realized by Python script and the optimization algorithms are running in Matlab R2019a. In order to show the improvement of the DCNNAO results, several typical MD results were given to explain the difference between good and bad results which was shown in Fig. 10. Obviously, the medium one is the best result of them. The left one is the fair good one because the particle wasn’t combined with the substrate thoroughly. The right one is the bad result that should be avoided because the crater was formed.

Fig. 10
figure 10

Typical examples of good and bad MD results for cold spray (where c means the value of objective function)

Results of classic optimization methods

As shown in Fig. 1, the DCNNAO is used to improve the quality of deposition by finding the optimal design parameters and both classic and BDTs assisted optimization methods are included and compared in this study. For classic optimization methods, the convergence curves of the objective function in the optimization procedure are shown in Fig. 11. It can be found that all of these classic optimization methods can obtain an available solution and behaves great convergent tendency. Specially, EGO is a surrogate optimization method while other two are heuristic algorithms. Thus, the computational cost of EGO is much lower than other two methods. Moreover, it is obvious that the PSO method obtained a better solution than other two methods and converged faster than DE. In a word, the heuristic algorithms (PSO, DE) can obtain a better solution than surrogate optimization methods (EGO) in this problem, but the EGO method is much more efficient than other two methods. The optimal solution of the above three methods is listed in Table 2, where 1Å\(/ps=100m/s\). Comparisons of the MD simulation results after impacting between above three methods are shown in Fig. 12, where the contour plot is according to the Z-coordinate range from 0 to 10Å. Furthermore, the Von Mises stress contour for the optimal solution obtained by the PSO method is shown in Fig. 13. Compared with the result in Fig. 10, it is obvious that the DCNNAO obtains the good result and the minimum value of the objective function. Therefore, the input parameters with \(v=4.15\AA /ps, r=14\AA , \theta =18.65^{\circ }\) are suggested for cold spray process in this study.

Fig. 11
figure 11

Convergence curve of the objective function in the optimization procedure by different methods

Table 2 Optimal solution of the classic optimization methods
Fig. 12
figure 12

The comparison of the MD simulation results after impact between classic optimizations

Fig. 13
figure 13

The Von Mises stress contour plots for the optimal solution (PSO)

Results of BDTs assisted optimization methods

As mentioned above, BDTs are used to accelerate the process of optimization by building a meta-model for the objective function in this study. Thus, 1000 samples are obtained to train BDTs model. After that, another 1000 samples should be used to test the performance of the BDTs model. The regression of the trained model is shown in Fig. 14. Moreover, it is well-known that Kriging models are widely used to build meta-models for the simulator in Design and Analysis of Computer Experiments (DACE) (Santner et al. 2003). Therefore, a Kriging model was also built to be compared with the BDTs model. Sequentially, 1000 samples are used to test the performance of the Kriging model. The regression of the Kriging model is shown in Fig. 15 and the error plots of the BDTs and Kriging models are shown in Fig. 16. It can be found that the error of both the BDTs and Kriging models is under 4% and the BDTs model behaves better than the Kriging model by comparing with regression plots. Therefore, the performance of the BDTs model is acceptable in this study.

Fig. 14
figure 14

Regression of the BDTs model

Fig. 15
figure 15

Regression of the Kriging model

Fig. 16
figure 16

Error plots of the BDTs and Kriging models

As for results of BDTs assisted optimizations, the convergence curves of the objective function in the optimization procedure is shown in Fig. 17. It can be found that both of these methods are available. Moreover, it is obvious that the BDTs assisted DE method obtained a better solution than other two methods and converged fast. The optimal solution of the above three methods is listed in Table 3, where \(1\AA /ps=100m/s\). The comparison of the MD simulation results after impact between BDTs assisted optimizations are shown in Fig. 18, where the contour plot is according to the Z-coordinate range from \(0\AA \) to \(10\AA \). Moreover, the Von Mises stress contour for the optimal solution which obtained by BDTs assisted DE method is shown in Fig. 19. Compared with the result in Fig. 10, it can be found that results of BDTs assisted optimizations are between good and fair good. Considering the high efficiency of BDTs assisted optimization methods, these results could also be acceptable for the cold spray process. The detail analysis between efficiency and accuracy will be discussed in the section “Discussions about classic optimizations and BDTs assisted optimizations”.

Fig. 17
figure 17

Convergence curve of the objective function in the BDTs assisted optimization procedures

Table 3 Optimal solution of BDTs assisted optimization methods
Fig. 18
figure 18

The comparison of MD simulation results after impact between BDTs assisted optimizations

Fig. 19
figure 19

The Von Mises stress contour plots for the optimal solution (BDTs-DE)

Discussions about classic optimizations and BDTs assisted optimizations

From the above results, it can be found that the performance of BDTs assisted optimizations extremely depends on the accuracy of the BDTs model, so usually the classic optimizations can obtain a better solution than the BDTs assisted optimization methods, but the results of both two kinds of optimization methods are available. Moreover, the computational cost of all the optimization methods is listed as Table 4, where \(t_p\) means the computational time for just one sample point by MD simulation. Obviously, EGO is the most efficient method for this problem, but PSO and DE obtain a better solution than EGO. Furthermore, it can be found that the BDTs is not suitable for surrogate optimization (EGO) while it did reduce the computational cost of heuristic algorithms (PSO, DE). Besides, another superiority of the BDTs assisted optimization is the portability, it means once the BDTs model has been constructed it can be easily applied to any kind of optimization methods. Therefore, which kind of optimization methods should be utilized is determined by the trade-off between efficiency and accuracy.

Table 4 Computational cost of all the optimization methods

Conclusion

In this study, a deep convolutional neural network aided optimization (DCNNAO) method is proposed to improve the quality of deposition during the cold spray process. The main idea of DCNNAO method is to construct a close loop image optimization which can obtain the value of objective function from the MD contours directly. For cold spray process, a specific objective function is constructed to optimize the quality of the deposition which combined with the flattening ratio and the height of deposition. In order to obtain the flattening ratio from the snapshots directly, the DCNN based image processing technique is used to generate the required images automatically and calculate the flattening ratio. Moreover, several optimization methods including surrogate optimization (EGO) and heuristic algorithms (PSO, DE) are used to find the optimal solution and the results demonstrated that the PSO method got the best solution while the EGO is the most efficient method. Furthermore, the BDTs is used to accelerate the process of optimization by building a meta-model for objective function and the results shows that the BDTs did improve the efficiency of PSO and DE but it seems not suitable for EGO. In a word, every method has different superiority in efficiency or accuracy, the selection of them should be determined by the trade-off between efficiency and accuracy.