Introduction

The inner wall corrosion is a severe problem for pipelines in power plants, leading to increased friction loss, wall thinning, and even failure (Ref 1, 2). One of the most effective methods to solve this problem consists of introducing a superhydrophobic polymer coating on the pipe’s inner wall.

In recent years, the low-pressure cold spray (LPCS) technique was successfully applied to fabricate superhydrophobic polymer coatings on flat metallic substrates (Ref 3,4,5,6). The resultant coatings showed excellent superhydrophobic properties and high deposition efficiency.

However, fabricating a coating on the inner wall of pipes via LPCS is challenging, especially for small-diameter pipes. Li et al. (Ref 7) developed a short elbow-shaped nozzle with a divergent section length of 40 mm to coat the pipe’s inner wall (diameter of 100 mm) by cold spray using metallic powder. The results showed that a dense copper coating was obtained even though the nozzle length was much shorter than conventional ones (> 100 mm) (Ref 7, 8). However, compared with metallic powders, a longer time is needed to heat polymer powders due to their low thermal conductivity and high specific heat (Ref 9, 10). As a result, the elbow-shaped nozzle developed by Li et al. (Ref 7) is unlikely to be able to heat the PFA particles to their goal temperature due to a divergent section being too short. To achieve sufficient particle temperature and enable spraying in a limited space, a spiral-shaped nozzle (with sufficient length to ensure particles are heated to enough temperature for deposition) was proposed to coat the inner wall of small-diameter pipes (Ref 11). However, the design of a spiral nozzle is a complex multi-input (i.e., several nozzle parameters) and multi-output (i.e., particle velocity and gas flux in the powder feeding tube) problem due to its relatively complicated geometry. The traditional optimization strategy using only computational fluid dynamics (CFD) simulations is time-consuming due to the high number of scenarios to investigate (Ref 7,8,9, 11,12,13). Therefore, neural network (NN) methods, based on global approximation through the nonlinear mapping between inputs and outputs (Ref 14), were combined with CFD simulations to design the spiral-shaped nozzle to reduce the computational cost. Sessarego et al. (Ref 15) combined the NN method and an aero-elastic vortex method to optimize a wind turbine blade. The results demonstrated that the NN is an effective method for wind turbine blade optimization. Elfarra et al. (Ref 16, 17) combined CFD with the NN to optimize the wind turbine rotor. The authors argued that introducing NN significantly reduces the computational cost compared with the traditional method of only CFD simulations.

In this study, a suitable NN for spiral nozzle design was investigated. Based on the trained NN, the influence of nozzle parameters on the particle velocity and gas flux in the powder feeding tube was studied. After obtaining the optimal spiral nozzle, cold spray experiments using Perfluoroalkoxy alkane (PFA) powder were conducted to confirm the feasibility of the spiral nozzle for PFA coating fabrication.

Methodology

Nozzle Parameters

As shown in Fig. 1, the spiral nozzle is composed of three parts: (1) the clamp section (length of 15 mm), (2) the bend transition section (radius of 15 mm), and (3) the spiral section (length of 150 mm). The design objective focuses on the spiral section described by three parameters: (1) the mean coil diameter (MCD), (2) the spring lift angle (SLA), and (3) the expansion ratio (ER). The corresponding dimension ranges, as shown in Table 1, were determined based on the practical dimension of the pipe (diameter around 70 mm). The spiral section is depicted by:

$$L\; = \;\pi Dn / \cos \theta$$
(1)

where L is the total length of the spiral section, equals 150 mm. D is the MCD. n is the number of turns of the spiral section. θ is the spring lift angle of the spiral section.

Fig. 1
figure 1

Boundary conditions of the spiral nozzle used in the CFD simulation

Table 1 The dimension ranges of the spiral section (constraint by the pipe diameter)

The ER is defined as:

$$ER = D_{2} /D_{1}$$
(2)

where D1 and D2 are the inlet and outlet diameters of the nozzle, respectively.

Neural Networks Simulation

Dataset Preparation

The NN was used to approximate the functions representing the relationship between the nozzle parameters (i.e., MCD, SLA, and ER) and its performance (i.e., particle velocity and gas flux in the powder feeding tube). Table 2 shows 20 sample datasets generated by MATLAB 2016b software using the Latin hypercube sampling method. These datasets were uniformly distributed in the Cartesian space (see Fig. 2), which served as the input parameters to build the NN. Frank and Todeschini (Ref 18) suggested that the reasonable number of datasets should be five times larger than the number of variables. In this study, the number of datasets was approximately seven times the number of parameters (i.e., 20/3≈7), indicating a significant dataset to construct a suitable network.

Table 2 Normalized parameter values for the input of the NN
Fig. 2
figure 2

Dataset distribution

CFD Simulation

The CFD models were constructed based on the sample datasets in Table 2. The CFD simulations were conducted using the commercial software ANSYS Fluent 2020R2 to calculate the particle velocity and gas flux in the powder feeding tube. The computational domain and boundary conditions of the CFD models are shown in Fig. 1. As demonstrated by Sulen and collaborators (Ref 6, 19, 20), suitable spray conditions for PFA coating by cold spray were determined at (0.5 MPa, 673 K) while using a straight nozzle. Therefore, the gas inlet was set as a ‘pressure-inlet’ with a pressure of 0.5 MPa and a static temperature of 673 K. Additionally, the powder feeder is working under atmospheric conditions (0.101325 MPa, 300 K). Hence, the powder inlet was set as a ‘pressure-inlet’ with atmospheric conditions. The boundary of the free jet region was designated as a ‘pressure-outlet’ with atmospheric conditions. Other surfaces were set as adiabatic and no-slip walls, with near-wall regions governed by standard wall function. The powder used was PFA (see Table 3), which was uniformly distributed at the inlet surface of the powder feeding tube, with around 1300 particles being injected in the nozzle. The particles were fed orthogonally to the powder inlet surface with an initial velocity and temperature of 0 m/s and 300 K, respectively. Note that the particle cannot be fed into the nozzle from the powder feeding tube if the gas pressure in the nozzle is higher than the atmospheric pressure. This situation may occur when changing the dimensions of the nozzle. Therefore, in the case of calculating the particle velocities (when impacting on the substrate) used for training the neural networks, the particles were fed from the “assumed powder inlet” (see Fig. 1) rather than the powder feeding tube. Note that the particles were fed from the powder feeding tube when calculating the particle velocity (when impacting the substrate) of the optimal spiral nozzle. The carrier gas was compressible air, governed by the ideal-gas law. The standard k-ε model was applied to calculate the gas flow behavior (Ref 21, 22). To compare the particle temperature between the optimal spiral and straight nozzles, the straight nozzle was simulated under the same boundary conditions and setting as the spiral nozzle. The dimensions of the straight nozzle can be found in our previous study (Ref 23).

Table 3 Physical properties of PFA (Ref 20, 24, 25)

As shown in Fig. 3, the model was meshed with around 1.5 million polyhedral-shaped elements. The inflation layer near the wall is composed of five layers of prism elements with an increment ratio of 1.1. The grid independence test indicated that the calculation results show no difference when the grid number is over 1.5 million elements. Also, an advantage of polyhedral meshes compared to tetrahedral or hybrid meshes is the lower overall cell count, almost 3-5 times lower. As a result, convergence toward a solution will typically be quicker because the polyhedral mesh contains fewer cells than the tetrahedral mesh, potentially saving some computing costs (Ref 21).

Fig. 3
figure 3

Mesh of the computational domain

Neural Network Model

Two types of neural networks were tested: the feed-forward neural network and the radial basis function network. As shown in Fig. 4(a), the feed-forward neural network typically includes an input layer, hidden layer, and output layer, corresponding to the feedforwardnet in MATLAB 2016b software. The input layer contains three input parameters (i.e., MCD, SLA, and ER), which determine the dimensions of the spiral nozzle. It should be mentioned that the other parameters, such as gas pressure and temperature, were not considered input parameters, as the design purpose is to obtain the optimal nozzle design in the spray conditions (0.5 MPa, 673 K), which corresponds to a suitable condition for achieving PFA coatings (Ref 19, 20). During the training of the neural network, the effects of different hyperparameters were tested, including training algorithms, number of neurons/hidden layers, and activation functions. Specifically, all the algorithms available in MATLAB 2016b (i.e., traingd, traingdm, traingdx, trainrp, traincgf, traincgp, traincgb, trainscg, trainbfg, trainoss, trainlm, and trainbr) were tested to confirm the most suitable training function. The influence of the number of neurons (from 1 to 16) and hidden layers (from 1 to 5) on the NN performances were evaluated. In addition, different activation functions, such as sigmoid, tansig, hardlim, purelin, and radbas, were investigated. Each algorithm has adopted the L2 regularization technique except for the trainbr algorithm, which uses adaptive regularization to optimize generalization.

Fig. 4
figure 4

Schematic of neural networks: (a) feedforwardnet model, and (b) newrbe model available in MATLAB 2016b

Figure 4(b) shows the newrbe model in MATLAB 2016b software, the commonly used radial basis function network. This model creates a two-layer network with zero error on training vectors. The first layer has neurons composed of a radial basis transfer function, which calculates its weighted and net input. The neurons in the second layer include an identity transfer function, which calculates the weighted input from the first layer and its net input. The number of neurons is the same as the number of input vectors, i.e., 20. Besides, the newrbe model has an additional input parameter, spread, which controls the smoothness of the function approximation by adjusting the bias value. The effect of spread values on the fitting result was evaluated.

Algorithms of the feedforwardnet Model

All the algorithms available in MATLAB 2016b use the gradient of the performance function to determine how to adjust the weights to minimize the performance function. The gradient is calculated by the backpropagation technique, which involves conducting computations backward through the network. Specifically, the traingd, traingdm, traingdx, and trainrp adjust the weights in the steepest descent direction during calculation. The traincgf, traincgp, traincgb, and trainscg adjust the weights in the conjugate direction. The trainbfg, and trainoss are quasi-Newton methods. The trainlm and trainbr are based on the Levenberg–Marquardt algorithm.

Traingd is the gradient descent backpropagation algorithm (Ref 26). The weights and biases are updated in the direction of the negative gradient of the performance function. Backpropagation is used to calculate derivatives of the performance perf concerning the weight and bias variables X. Each variable is adjusted according to gradient descent (Ref 26):

$$d\varvec{X}\; = \;\varvec{lr} \times d{\mathbf{perf}}/d\varvec{X}$$
(3)

where lr is the learning rate.

Traingdm is the gradient descent with momentum backpropagation algorithm (Ref 26), providing faster convergence than traingd. Each variable is adjusted according to the gradient descent with momentum:

$$d\varvec{X}\; = \;mc\; \times \;d\varvec{X}_{{{\text{prev}}}} \; + \;\varvec{lr}\; \times \;\left( {1 - mc} \right)\; \times \;d{\mathbf{perf}}/d\varvec{X}$$
(4)

where Xprev is the previous change to the weight or bias. mc represents the momentum constant that defines the amount of momentum. Momentum allows a network to respond to the local gradient and recent trends in the error surface. Acting like a low-pass filter, momentum allows the network to ignore small features in the error surface (Ref 26).

Traingdx is the gradient descent with momentum and adaptive learning rate backpropagation algorithm (Ref 26). This algorithm combines adaptive learning rate with momentum training. The adaptive learning rate could improve performance by adjusting the learning rate during the training process. Each variable is adjusted according to the gradient descent with momentum:

$$d\varvec{X}\; = \;mc\; \times \;d\varvec{X}_{{{\text{prev}}}} \; + \;\varvec{lr}\; \times \;mc\; \times \;d{\text{pref}}/d\varvec{X}$$
(5)

Trainrp is a resilient backpropagation algorithm. This algorithm can optimize the transfer function calculation process during training (Ref 26). Each variable is adjusted as:

$$d\varvec{X}\; = \;{\text{delta}}\varvec{X}.\; \times \;{\text{ sign}}\left( \varvec{gX} \right)$$
(6)

where the elements of deltaX are all initialized to delta θ (the initial weight change), and gX is the gradient.

Traincgf is the conjugate gradient backpropagation with Fletcher-Reeves updates algorithm (Ref 26). The first search direction of this algorithm is the negative gradient direction of performance. In succeeding iterations, the search direction is computed from the new gradient and the previous search direction, according to:

$$d\varvec{X} \, \; = \, \; -\varvec{gX} \, \; + \; \, d\varvec{X}\_{\mathbf{old }}\; \times \;{\text{ Z}}$$
(7)

where Z can be computed in several different ways. For the Fletcher–Reeves variation of the conjugate gradient, it is computed according to (Ref 26, 27):

$${\text{Z }} = {\text{ normnew}}\_{\text{sqr}}/{\text{norm}}\_{\text{sqr}}$$
(8)

where norm_sqr is the norm square of the previous gradient and normnew_sqr is the norm square of the current gradient.

Traincgp is the conjugate gradient backpropagation with Polak–Ribière updates algorithm (Ref 26). For the Polak–Ribière variation of the conjugate gradient, it is computed according to (Ref 26, 27):

$$Z\; = \;\left( {\left( {\varvec{gX}\; - \;\varvec{gX}\_{\text{old}}} \right)^{\prime } \; \times \;\varvec{gX}} \right) / {\text{norm}}\_{\text{sqr}}$$
(9)

where gX_old is the gradient on the previous iteration.

Traincgb is the conjugate gradient backpropagation with Powell–Beale restarts algorithm (Ref 26). For all conjugate gradient algorithms, the search direction is periodically reset to the negative of the gradient. The Traincgb algorithm reset the research direction when there is very little orthogonality left between the current gradient and the previous gradient (Ref 28, 29):

$$\left| {\varvec{g}_{{{\text{k}} - 1}}^{{\text{T}}} \varvec{g}_{{\text{k}}} } \right| \ge 0.2\left\| {\varvec{g}_{{\text{k}}} } \right\|^{2}$$
(10)

where gk is the current gradient.

Trainscg is the scaled conjugate gradient backpropagation algorithm (Ref 26). This algorithm could avoid the time-consuming line search at each iteration (Ref 30). The basic idea is to combine the model-trust region approach (used in the Levenberg–Marquardt algorithm) with the conjugate gradient approach.

Trainbfg is the BFGS quasi-Newton backpropagation algorithm (Ref 26), one of the most successful Quasi-Newton methods. The first search direction is the negative of the gradient of performance. In succeeding iterations, the search direction is computed according to:

$${\text{d}}\varvec{X} = - \varvec{H}\backslash \varvec{gX}$$
(11)

where H is an approximate Hessian matrix.

Trainoss is the one-step secant backpropagation algorithm (Ref 26). Compared with the Trainbfg algorithm, the Trainoss algorithm could reduce the storage and computation because it does not store the complete Hessian matrix during calculation. The first search direction is the negative of the gradient of performance. In succeeding iterations, the search direction is computed from the new gradient and the previous steps and gradients according to:

$$d\varvec{X} \, \; = \; - \varvec{gX}\; \, + \; \, A_{{\text{c}}} \; \times \; \, \varvec{X}\_{\mathbf{step }}\; + \; \, B_{{\text{c}}} \; \times \; \, d\varvec{gX}$$
(12)

where X_step is the weight change on the previous iteration, and dgX is the change in the gradient from the last iteration. Ac and Bc are scalars, functions of weight difference, gradient, and difference of gradients (Ref 31).

Trainlm is the Levenberg–Marquardt backpropagation algorithm (Ref 27, 32). Backpropagation is used to calculate the Jacobian jX of performance perf concerning the weight and bias variables X. Each variable is adjusted according to the Levenberg–Marquardt algorithm:

$$\varvec{jj} = \varvec{jX} \times \varvec{jX}$$
(13)
$$\varvec{je} = \varvec{jX} \times \varvec{E}$$
(14)
$$d\varvec{X} \, = \, - \left( {\varvec{jj} \, + \, \varvec{I} \, \times \, mu} \right)\backslash \varvec{je}$$
(15)

where E is the matrix of all errors, I is the identity matrix, and mu is the adaptive value.

Trainbr is the Bayesian regularization algorithm (Ref 33). Same as Trainlm, this algorithm modifies the bias and weight values following Levenberg–Marquardt optimization (see Eq 13-15) (Ref 34). However, for the Trainbr algorithm, the Bayesian regularization occurs within the Levenberg–Marquardt algorithm, minimizing a linear combination of squared errors and weights. It also modifies the linear combination to give the final network good generalization qualities.

Activation Functions

The sigmoid activation function applies the sigmoid function to the input data. This function can squash the input data into the range of [0,1]:

$$\left( x \right)\; = \;1/\left( {1\; + \;e^{ - x} } \right)$$
(16)

The tansig activation function is the hyperbolic tangent sigmoid transfer function. This function can squash the input data into the range of [− 1, 1]:

$$\left( x \right)\; = \;\sinh \left( x \right) / \cosh \left( x \right)$$
(17)

The hardlim activation function is the hard-limit transfer function. This function squashed the input data into 0 or 1:

$$f\left( x \right) = \left\{ {\begin{array}{*{20}c} {1, x \ge 0} \\ {0, x < 0} \\ \end{array} } \right.$$
(18)

The purelin activation function is the linear transfer function:

$$f\left( x \right) = x$$
(19)

The radbas activation function is the radial basis function:

$$f\left( x \right) = e^{{ - x^{2} }}$$
(20)

Cross-Validation

Cross-validation was conducted to assess the performance of NNs by comparing the error between the results of the training functions and predicted datasets. The error was evaluated by the mean squared error (MSE):

$${\text{MSE}} = \frac{1}{{n^{\prime } }}\mathop \sum \limits_{{{\text{i}} = 1}}^{{n^{\prime } }} e_{{\text{i}}}^{2}$$
(21)

where ei is the difference between CFD value and NN value for each dataset. n' is the number of samples, which equals 20.

The leave-one-out cross-validation (LOOCV) (Ref 26) was used to verify whether the NN has the propensity to overfit the training dataset. Specifically, the model was trained by 19 samples, and the left sample was used to validate the model. This procedure was carried out 20 times to ensure each dataset was used to validate the model once. Then, the performance of the spiral nozzle was evaluated by the average MSE value of the 20 cross-validations.

Design Goal

After developing the neural network, the optimal spiral nozzle was obtained by inputting the design goal. It should be mentioned that whether deposition can be achieved or not is mainly dependent on the particle velocity and temperature. Based on this, some equations were proposed to predict the critical velocity of the metal particles. However, for polymer powders (e.g., PFA), the deposition mechanisms were still unclear. A quantitative relation between particle velocity and temperature has not yet been proposed. Therefore, the particle velocity was taken as a reference when determining the optimal nozzle. Specifically, the design goal was the maximum particle velocity on the premise that the gas flux of the powder feeding tube is higher than 1.75 × 10−4 kg/s.

Cold Spray Experiment

After optimization, the designed spiral nozzle was manufactured, and cold spray experiments were carried out using the commercial LPCS equipment Dymet423 (Obninsk Center for Powder Spraying, Russia). The spray pressure and temperature were set at 0.5 MPa and 673 K, respectively. The stand-off distance, traverse speed, and pitch were set at 10 mm, 20 mm/s, and 3 mm, respectively. The powder used was PFA powder with an average size of 23 μm, as shown in Fig. 5 (Ref 5, 6). During the experiment, the 304 stainless steel plate substrate was used to simulate the pipe’s inner wall. In the actual process of coating the pipe’s inner wall, the spray nozzle was kept orthogonal to the inner wall and moved along the axial direction of the pipe. Therefore, the plate can be used as a substrate to simulate the inner wall of the pipe during the experimental validation. Specifically, the substrate surface was orthogonal to the tangential direction of the nozzle outlet. Meanwhile, the spiral nozzle moved along the axial direction of the spiral, and the same stand-off distance was kept when fabricating the PFA coating. These settings were close to the actual process of coating the pipe’s inner wall. It should be mentioned that a titanium bond coat was prepared on the substrate by cold spray to ensure a high deposition efficiency of PFA (Ref 20). The spray conditions of titanium were (gas pressure = 0.5 MPa, gas temperature = 773 K, stand-off distance = 10 mm, traverse speed = 10 mm/s, pitch = 3 mm).

Fig. 5
figure 5

Morphology of the PFA powder

Results and Discussion

Effect of NN Models

Table 4 shows the MSE values of the feedforwardnet model combined with the trainlm algorithm (the default training function in MATLAB 2016b) and the newrbe model with different spread values. The feedforwardnet model is found to be superior to newrbe model as it exhibits a much smaller MSE value for both, particle velocity and gas flux. The reason is that the newrbe model cannot define a proper network for this problem because the number of neurons (sample datasets) is not large enough. As a result, the newrbe model cannot return an acceptable value (Ref 26).

Table 4 MSE value of different NN models assessed by LOOCV. Bold values highlighted the smallest error obtained for the particle velocity and gas flux in the powder feeding tube for the different investigated NN models

Effect of Hyperparameters in the Neural Networks

Since it is difficult to predict, which hyperparameters will perform best for a given problem, several hyperparameters, including algorithms, number of neurons/hidden layers, and activation functions, for the feedforwardnet model from MATLAB 2016b were tested.

Table 5 summarizes the MSE values of different algorithms. During training, the other hyperparameters were kept constant, i.e., ten neurons, one hidden layer, and sigmoid activation function, L2 regularization (except for trainbr algorithm). The trainbr algorithm shows the lowest error for predicting the particle velocity, while the trainlm algorithm is for the gas flux. It should be mentioned that both trainbr and trainlm are based on the Levenberg–Marquardt backpropagation algorithms. For particle velocity prediction, the trainlm and trainbr algorithms have lower MSE values than the other algorithms, indicating that the Levenberg–Marquardt algorithm is suitable for particle velocity prediction. However, unlike the trainlm algorithm, which uses the L2 regularization, the trainbr introduces Bayesian regularization within the Levenberg–Marquardt algorithm (Ref 35). Compared with the trainlm algorithm, the trainbr showed a much higher MSE value for gas flux prediction, suggesting poor accuracy in grasping the irregular gas flux in the powder feeding tube. Therefore, the L2 regularization is better than the Bayesian regularization in predicting the gas flux when using the Levenberg–Marquardt algorithm.

Table 5 MSE value for different algorithms assessed by LOOCV with the number of neurons/hidden layers equal 10 and 1, respectively. Bold values highlighted the smallest error obtained for the particle velocity and gas flux in the powder feeding tube for the different investigated algorithms of the feedforwardnet NN

Table 6 shows the MSE values obtained from different numbers of neurons assessed by LOOCV. The other hyperparameters were set as one hidden layer, sigmoid activation function, and trainbr/trainlm algorithm for particle velocity/gas flux training, respectively. Significant fluctuations of MSE values were observed with the increasing number of neurons for both particle velocity and gas flux predictions. However, the MSE values irregularly change with the number of neurons increasing. It can be seen that when the number of neurons equals 14 and 4, the MSE has the minimum values for the particle velocity or gas flux prediction, respectively, which indicates the most suitable number of neurons for particle velocity/gas flux prediction.

Table 6 MSE values for different numbers of neurons assessed by LOOCV with the help of 1 hidden layer and sigmoid activation function. Bold values highlighted the smallest error obtained for the particle velocity (trainbr algorithm) and gas flux in the powder feeding tube (trainlm algorithm) for different number of neurons. The algorithm selected for the particle velocity and gas flux corresponds to the one allowing the minimal MSE for each variable (see Table 5)

Table 7 shows the MSE values achieved from different numbers of hidden layers assessed by LOOCV. The other hyperparameters were set as (sigmoid activation function, trainbr with14 neurons for particle velocity, trainlm with 4 neurons for gas flux prediction). The results indicated that the MSE value significantly increased when the number of hidden layers was more than one. As a result, one hidden layer was considered the most suitable setting for training the neural networks for particle velocity and gas flux prediction. Table 8 shows that the MSE values do not change with the activation function, indicating that the activation function does not influence the particle velocity/gas flux prediction.

Table 7 MSE values for different numbers of hidden layers assessed by LOOCV with the help of sigmoid activation function, and 14 and 4 neurons for particle velocity and gas flux training, respectively. Bold values highlighted the smallest error obtained for the particle velocity and gas flux in the powder feeding tube for different number of hidden layers. The algorithm and number of neurons selected for the particle velocity and gas flux corresponds to the one allowing the minimal MSE for each variable (see Tables 5 and 6)
Table 8 MSE values for different activation functions assessed by LOOCV

Effect of Geometric Parameters (SLA, MCD, ER)

The effect of the nozzle parameters on the particle velocity and gas flux in the powder feeding tube was analyzed based on the optimal NN model: feedforwardnet combined with trainbr algorithm for particle velocity prediction, and feedforwardnet combined with trainlm algorithm for gas flux prediction. Figure 6(a) shows the effect of MCD and SLA on the particle velocity when ER was kept constant at 0.74. Unlike a straight nozzle, the spiral nozzle exhibits a curvature, allowing centrifugal force to arise when the gas flows through the curved part. Under a small curvature, the streamline is severely distorted, increasing resistance loss. Besides, the centrifugal force leads to uneven gas flow field distribution along the cross-section of the nozzle. The Dean number D (Ref 36) is often used to characterize the effect of the curvature on the gas flow:

$$D_{{\text{e}}} \; = \;{\text{Re}}\sqrt {D/2R_{{\text{c}}} }$$
(22)

where Re is the Reynolds number. D is the diameter of the nozzle. Rc is the radius of the curvature. As indicated in (Eq 22), Rc increases with SLA and MCD, leading to the De (or the centrifugal force) decrease. The resistance loss decreases with De decrease, therefore, the gas velocity increases. Figure 7(a) shows the particle velocity corresponding to different MCD and ER with the SLA kept at 1. The same as Fig. 6, the particle velocity increases with the MCD. In addition, the particle velocity significantly increases with ER until around 0.6. After that, the influence of ER on the particle velocity is negligible. This trend is in agreement with Jodoin et al. (Ref 37), who suggested that an upper limit value of ER exists in the design of cold spray nozzles. With the increase in ER, the gas flow in the cold spray nozzle shifts from underexpanded flow to overexpanded flow. The corresponding gas velocity distribution inside the nozzle varied, resulting in the particle velocity increasing first and then decreasing. The optimal ER is assumed to be located in a slightly overexpanded flow (Ref 38).

Fig. 6
figure 6

Effect of MCD and SLA on the (a) particle velocity and (b) gas flux in the powder feeding tube. ER is kept constant at 0.74 (normalized value). The corresponding settings were (14 neurons, 1 hidden layer, sigmoid activation function, trainbr algorithm for particle velocity training) and (4 neurons, 1 hidden layer, sigmoid activation function, trainlm algorithm for gas flux training)

Fig. 7
figure 7

Effect of MCD and ER on the (a) particle velocity and (b) gas flux in the powder feeding tube. SLA is kept constant at 1 (normalized value). The corresponding settings were (14 neurons, 1 hidden layer, sigmoid activation function, trainbr algorithm for particle velocity training) and (4 neurons, 1 hidden layer, sigmoid activation function, trainlm algorithm for gas flux training)

Figure 6(b) shows that SLA and MCD have little influence on the gas flux in the powder feeding tube. In comparison, as shown in Fig. 7(b), ER significantly affects the gas flux. Specifically, the gas flux significantly increases with ER to some extent and then slightly changes. Note that a negative gas flux is obtained for very small ER, indicating that the particles cannot enter the mainstream of the nozzle. When ER is very small, the corresponding gas pressure at the region where the powder feeding tube joints with the nozzle is higher than the atmospheric pressure. It results that the cold spray gas is difficult to discharge from the nozzle outlet. Then, a part of the cold spray gas would exit from the powder feeding tube.

Design Results

The optimal spiral nozzle was obtained, as shown in Table 9, based on the design goal of the maximum particle velocity on the premise of the gas flux of the powder feeding tube being higher than 1.75 × 10−4 kg/s. The corresponding particle velocity and gas flux achieved by NN and CFD are summarized in Table 10. It can be seen that these two methods achieved a very close result concerning particle velocity. In contrast, the gas flux shows a relatively larger difference, ascribing to the sharp reduction of gas flux when the ER is small. The NN has difficulty precisely grasping this irregularity due to the relatively few datasets. However, in this study, particle velocity is the main factor determining the performance of the spiral nozzle. The gas flux is the second factor because it ensures the gas (or particles) can enter the powder feeding tube from the ambient environment by the Venturi effect. Thus, obtaining a high-accuracy network for predicting the gas flux is unnecessary; only the overall grasp of the trend is enough.

Table 9 Optimal spiral nozzle geometry obtained from the neural network
Table 10 NN predicted and CFD results of particle velocity and gas flux for the optimal spiral nozzle

Performance of the Optimal Spiral Nozzle

Figure 8 shows the average particle velocity and temperature (when impacting on the substrate) as a function of the particle diameter obtained from the CFD simulations under the spray conditions (0.5 MPa, 673 K). The particle velocity increases first and then decreases with the diameter varying from 3 to 53 μm. Two competing factors exist for particle acceleration during spraying. The first one is the particle size (or inertia). Smaller particles are easier to accelerate to a high velocity due to their small inertia. The second factor is the high-density gas region near the substrate surface generated by the high-velocity impingement on the substrate (bow shock in front of the substrate). This region has a high density and low velocity, leading to the particle decelerating when passing through it, especially for small particles. Li et al. (Ref 7) reported that the high-density region remarkably influenced copper particles’ velocity near the substrate during cold spraying when their diameter was smaller than 5 μm. For PFA, when the particle diameter is smaller than 23 μm, the particle has a small inertia, making it easy to accelerate, but also to be decelerated by the high-density region near the substrate. Even though the particle acceleration decreases with the diameter (or inertia) increase, the deceleration caused by the high-density region becomes weak at the same time. As a result, the particle velocity increases with a diameter from 3 to 23 μm. When the particle diameter is larger than 33 μm, the particle has a large inertia, making it difficult to be accelerated by the gas but not influenced by the high-density region. As a result, the particle velocity decreases with the particle diameter increasing from 33 to 53 μm.

Fig. 8
figure 8

CFD simulation results for the spray conditions (0.5 MPa, 673 K): (a) Particle velocity obtained from the optimal spiral nozzle, and (b) particle temperature obtained from the optimal spiral nozzle and straight nozzle

Figure 8(b) compares the particle temperature obtained from the straight nozzle and optimal spiral nozzle under the spray conditions of (0.5 MPa, 673 K). It is well known that the mechanical properties of the polymers would significantly decrease when their temperature is higher than their glass transition temperature. The recent studies related to the cold spray of polymers indicate that polymers could deposit more easily when their temperature was higher than their glass transition temperature (Ref 39,40,41). The CFD simulation results, shown in Fig. 8(b), illustrate that the PFA particles’ temperature is mainly between the glass transition temperature and melting temperature, which is in accordance with recent publications (Ref 39,40,41). Meanwhile, these results also imply that the particles do not melt during spraying. Moreover, the particle temperature obtained from the spiral nozzle is relatively higher than that from the straight nozzle. Therefore, PFA particles could achieve sufficient temperature to deposit.

According to the nozzle optimization calculation, the spiral-shape was manufactured and cold spray experiments were carried out. Figure 9 demonstrates that the optimal spiral nozzle could fabricate the PFA coating under the spray conditions (0.5 MPa, 673 K). The cross sectional image indicates that the coating thickness was around 250 μm.

Fig. 9
figure 9

Cold sprayed PFA coating on stainless steel substrate (with the help of a titanium bond coat) using the optimal spiral nozzle under the spray conditions (0.5 MPa, 673 K) (Ref 20). (a) Nozzle used for spray manufactured according to the optimization design calculation. (b) Macroscopic image of the coating surface. The gray region corresponds to the titanium bond coat, whereas the white region is the PFA coating. (c) Cross-sectional image of the PFA coating. The white arrows delimitate the PFA coating

Conclusions

In this study, a spiral nozzle was designed via an optimization method combining CFD simulations and NN model. This method, effective for the design process, possesses the advantage of dealing with multi-input and multi-output problems and solving different objectives simultaneously.

Based on the optimized NN model, an approximation of the particle velocity and gas flux as a function of MCD, SLA, and ER was obtained. According to the design goal, the optimal spiral nozzle shape was obtained for MCD = 60 mm, SLA = 40°, and ER = 1.89.

The parametric analysis suggested that the particle velocity increases with the MCD and SLA. Nevertheless, the particle velocity increases first and then decreases gradually with ER increasing, indicating that an optimal ER exists, i.e., 1.89. In comparison, the gas flux is almost not influenced by MCD and SLA but is strongly correlated with ER. Specifically, the gas flux significantly increases with ER to some extent and then tends to stabilize.

The subsequent analysis of the optimal spiral nozzle indicated that the optimal particle size for acceleration is around 23 to 33 μm. Meanwhile, the CS experiment under the spray conditions (0.5 MPa, 673 K) demonstrated that the optimal spiral nozzle could be used for PFA coating fabrication of pipe’s inner walls.