# Fast Prediction of Flow Field around Airfoils Based on Deep Convolutional Neural Network
## 2 Methods
### Numerical Method and Data Preparation
#### 2.3.2 Airfoil Representation  
The traditional parameterization techniques, such as basic profiles, geometric parameterized variables, were widely used in conventional aerodynamic surrogate models such as polynomial regression, Kriging and RBF (Radial Basis Function) regression network, nevertheless, it is not effective for CNN since convolutional operations on parametric vectors only move along one direction. The binary matrices to parameterize airfoils can work with CNN but they contain less information, i.e., 0 and 1, which cannot reflect the distance from the given point (especially the point near the airfoil) to the airfoil profile, leading the neural network model for point-to-point flow field prediction not being trained efficiently. To capture the details of the airfoil geometry and to classify grid points into a learnable format [36; 50], SDF is used in this work to obtain a grid sampling of the minimum distance to the airfoil surface, where a constant grid size of 208 \(\times\) 340 is adopted. SDF is widely used in applications of rendering, segmentation, and extracting structural information of different shapes. It offers a universal parameterization of various geometry shapes and works efficiently with neural networks. To speed up the generation of SDF parameters, the fast marching method [51] is adopted to enhance the boundary information of airfoil  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Data Sources**} & \multirow{2}{*}{\(C_{l}\)} & \multirow{2}{*}{\(C_{d}\)} & \multicolumn{2}{c}{**Relative Error**} \\ \cline{3-5}  & & & \(C_{l}\) & \(C_{d}\) \\ \hline Experiment & 1.0809 & 0.0117 & - & - \\ CFL3D & 1.0909 & 0.0123 & 0.93\% & 5.13\% \\ OpenFOAM-40 \(\times\) 40 & 1.1283 & 0.0129 & 4.39\% & 10.3\% \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of lift and drag coefficient from different data sources.  
Figure 6: (**a**) Surface pressure coefficient from different data sources vs. normalized chord length; (**b**) grid independence study.  
geometries for neural networks. As a result, the mathematical definition of SDF used in the paper is given as follows:  
\[S(i)=\left\{\begin{array}{ll}d(i,\partial\Omega)&i\
otin\Omega\\ 0&i\in\partial\Omega\\ -d(i,\partial\Omega)&i\in\Omega\end{array}\right. \tag{22}\]  
where \(\Omega\) is the close area covered by airfoil, \(\partial\Omega\) refers to its boundary, \(i\) stands for a given pixel point, and \(d(i,\partial\Omega)\) is computed as  
\[d(i,\partial\Omega)=\min_{I\in\partial\Omega}(|i-I|) \tag{23}\]  
since \(I\) could be any point on the boundary wall, \(d(i,\partial\Omega)\) by Equation (23) measures the shortest distance from point \(i\) to the airfoil boundary.  
Figure 7 shows the SDF representation of airfoil NACA8412 at AOA equals to \(1^{\circ}\). It could be seen that SDF takes negative values on points inside the airfoil, while it takes positive values on points outside the airfoil and increases in directions pointing outwards to the airfoil boundary. The value of SDF contains both local geometry details and auxiliary information of the global geometry structure, which promotes the training efficiency of the neural network.