# Machine Learning Prediction of Airfoil Aerodynamic Performance Using Neural Network Ensembles
## 2 Methodology  
### General Structure  
The architecture developed in this study is designed to predict aerodynamic coefficients, specifically lift coefficients (\(C_{L}\)) and drag coefficients (\(C_{D}\)), by integrating geometric, scalar, and engineered input modalities through a hybrid deep learning framework. The model is structured as a multi-batch neural network; each subnetwork specializes in processing a distinct form of data input. For training the ML model, 91 NACA four-digit airfoils are used and generated in-house based on the NACA four-digit equation (detailed in Appendix A.1). For each airfoil, by running XFOIL (detailed in Appendix A.2), there are aerodynamic performance values corresponding to 10 Re numbers, ranging from 500,000 up to 5,000,000 in \(5\times 10^{5}\) steps,and 20 AoA, ranging from \(-5^{\circ}\) to \(14^{\circ}\). Summing up, for each of the 91 airfoils, there are 200 samples. In total, the algorithm runs 18,200 samples. Each training sample is a tuple:  
\[\left(x_{g},x_{s},x_{e};y\right)\in\ \mathbb{R}^{135\times 2}\times\mathbb{R}^{2} \times\mathbb{R}^{2}\times\mathbb{R}^{2} \tag{1}\]  
where \(x_{g}\) represents the geometry of the airfoil profile by 135 x-y points; \(x_{s}\) represents the scalar inputs formed with AoA (a) and a Reynolds number (Re); \(x_{e}\) represents the engineered features of the airfoil constructed by airfoil thickness (\(t_{max}\)), which is computed as the vertical distance between the highest and lowest y-coordinates across the airfoil, and camber, which is estimated as the mean of the maximum and minimum y-values; and y represents the targets--the lift (\(C_{L}\)) and drag (\(C_{D}\)) coefficients. Each training sample is processed simultaneously by three branches:  
* **Geometric branch**: A CNN for geometry (\(x_{g}\)). The airfoil contour, represented as a sequence of 135 (x,y) coordinate pairs, is processed in the geometric branch. This branch begins with Conv 1D #1, which represents a convolutional 1D layer with a kernel size of 3 and 32 filters, extracting local shape descriptors. The output shape of the Conv1D #1 layer is represented by 133 positions \(\times\) 32 filters. These features are then refined by Conv 1D #2, maintaining the same filter dimensions, resulting in 131 positions \(\times\) 32 filters. The output is then flattened into a 4192-value vector (\(z_{flat}\in\ \mathbb{R}^{4192}\)) and passed to a Dense layer with 64 neurons, which is a fully connected layer with seed-dependent weights and biases: \(W_{ij}^{(s)}\in\ \mathbb{R}^{4192\times 64}\), \(b_{i}^{(s)}\in\ \mathbb{R}^{64}\); this results in a final output of  
\[z=\text{ReLu}\left(\text{W}\cdot z_{flat}+b\right)\in\ \mathbb{R}^{64} \tag{2}\]  
where ReLU (Rectified Linear Unit) represents a non-linear activation function commonly used in machine learning models. * **Scalar Input Branch**: A DNN for scalar inputs (\(x_{s}\)). AoA and a Reynolds number are processed through Dense Scalar, a fully connected layer with 16 neurons. This component is meant to capture interactions between flight conditions and aerodynamic response. The output of the Scalar Input Branch, s, is represented by a set of 16 neurons with seed-dependent weights and biases: \(W_{ij}^{(s)}\in\ \mathbb{R}^{2\times 16}\), \(b_{i}^{(s)}\in\ \mathbb{R}^{16}\):  
\[s=\text{ReLu}\left(\text{W}\cdot x_{s}+b\right)\in\ \mathbb{R}^{16} \tag{3}\]  
* **Engineered Feature Branch**: A second DNN for engineered features (\(x_{e}\)). Engineered features such as maximum thickness and camber are processed by Dense Engineered, a 16-unit dense layer. This branch encodes the structural characteristics of the airfoil. The output, e, is similar to the Scalar Input Branch, consisting of 16 neurons with seed-dependent weights and biases of the following dimensions: \(W_{ij}^{(s)}\in\ \mathbb{R}^{2\times 16}\), \(b_{i}^{(s)}\in\ \mathbb{R}^{16}\).