## 2 Methodology  
The dataset used in this study is derived from 3D CFD simulations of the masked cold spray process [13], where nickel powder serves as the injection feedstock. Due to the inherent flow and geometric symmetries of the process, a quarter-symmetric model was employed, as illustrated in Figure 1. As shown in Figure 1 and discussed in the introduction, our previous study conducted 48 simulations, systematically varying mask types, substrate SODs, mask SODs, and nozzle inlet conditions to assess their impact on particle spatial, velocity, and temperature distributions at the substrate [13]. Figure 1 also presents a representative CFD-simulated map of particle impact velocity on the substrate under medium-pressure inlet conditions [13]. The overall methodology consists of three key components: sampling, the first model, and the second model. The entire workflow is illustrated in Figure 2. Initially, the sampling phase selects representative data points that serve as the foundation for subsequent analysis. Next, the first model employs a KNN-based KDE prediction method (KNN and KDE stand for K-nearest neighbors and kernel density estimation, respectively) in conjunction with a projection algorithm to predict the spatial distribution of particles on the substrate. The input parameters for the first model include mask properties, substrate SODs, mask SODs, nozzle inlet conditions, and particle size distribution (ranging from 17 \(\upmu\)m to 77 \(\upmu\)m with a mean diameter of 48 \(\upmu\)m--commonly used in cold spray processes--and modeled in CFD simulations using a Rosin-Rammler distribution). A summary of the input features for the first ML model is provided below. \[ \begin{split}& Inputs_{1}=\text{[particle diameter, mask properties (wire diameter, opening size, open area), mask SOD, substrate SOD, inlet condition ( inlet pressure and inlet temperature)]}\\ \end{split}  \tag{1}\]The outputs are the spatial positions of particles on the substrate, represented by the \(y\)- and \(z\)-coordinates. In other words, the \(y\)- and \(z\)-coordinates indicate the horizontal and vertical positions of the particles on the substrate surface (see Figure 1). \[Outputs_{1}=\{y\text{-positions of particles, }z\text{-positions of particles}\} \tag{2}\]  
Specifically, this model employs the KNN-KDE approach to generate preliminary predictions while incorporating physical priors to identify invalid cases (such as points  
Figure 1: Overview of the CFD simulations performed for a masked cold spray process under various operating conditions [13]. It illustrates the nozzle geometry, four different masks, and a sample CFD result depicting particle normal velocity upon impact on the substrate. These CFD data serve as the training dataset for the ML models. Figure 2: Workflow of the ML model training and development process. within the dead zone--regions behind the wires where particle deposition is almost zero (e.g., around point (1,1) in the sample CFD result shown in Figure 1)) and under-estimated regions. Subsequently, weight assignment and local reallocation strategies are applied to remap these invalid predictions to physically plausible locations. Finally, the second model predicts the particle velocity and temperature distributions upon impact on a substrate. The input parameters for the second ML model include mask properties, substrate SODs, mask SODs, nozzle inlet conditions, particle size distribution, and the spatial positions of particles on the substrate (the prediction of the first model (\(y\)- and \(z\)-coordinates)). A summary of the input features for the second ML model is provided below. \[ \begin{split}&\text{{Inputs}}_{2}=\text{[$y$-positions of particles, $z$-positions of particles, particle diameter, mask}\\ &\text{{properties (wire diameter, opening size, open area), mask SOD, substrate SOD,}}\\ &\text{{inlet condition (inlet pressure and inlet temperature)}}\text{]}\end{split}  \tag{3}\]  
The outputs are the velocity and temperature of each particle upon impact on the substrate.