## 9 Drag Coefficient Prediction
### Compared to Using the Drag Coefficient as Output  
There are two ways to predict the drag coefficient of the bluff body section through the deep learning method. One is to directly predict the drag coefficient as the output; the other is to predict the pressure flow field and then pass it through the data to get the drag coefficient. The direct method still uses the three distance fields of \(I_{Dist}\), \(I_{X}\), and \(I_{Y}\) as the input of the model and the processed drag coefficient as the output. The CNN model consists of the convolutional layer, pooling layer, ReLU layer, and fully connected layer. The CNN model, with a model depth of 3 layers and an initial model width of 128, was selected by comparing the size of the MAE and the number of parameters, as shown in Figure 13.  
By directly predicting the drag coefficient through the CNN model, the overall average relative error of the test set reached 19.64%, the average relative error of the diamond reached 38.81%, and the average relative errors of the R = 0.2 regular hexagon and the R = 0.3 regular hexagon were less than 10%. The author believes there are two main reasons for the large error in the direct prediction of the drag coefficient through the CNN model. The first reason is that there are very obvious differences between the basic shapes, which makes it difficult to accurately associate the shape input with the drag coefficient in the deep learning model. Therefore, we can only fit relatively satisfactory results under different shapes, which leads to large errors in some shapes. The second reason is that it is too simplistic to directly use the drag coefficient data as the output and directly use the image as the output. When predicting a number such as a drag coefficient, it is difficult for a deep learning model to establish a certain connection between the input and output. The randomness is also large, which makes the model prediction less stable. In reference to the first reason, better deep learning model architecture can be selected by changing the structure of the model. However, the CNN model is the optimal solution for the direct prediction of the drag coefficient in this paper. Therefore, the output needs to be redesigned for the second reason. The drag coefficient can be obtained indirectly by predicting the pressure field of the steady-state flow field. The input of the model is still the three distance fields of \(I_{Dist}\), \(I_{X}\), and \(I_{Y}\), and the output is the stable pressure flow field. Due to the different input and output models, the UNet network is selected and the optimal model is determined, as shown in Figure 6.  
Figure 13: Determined CNN model. Considering that the drag coefficients of different shapes are quite different, the average relative error is used to comprehensively evaluate the prediction accuracy of different shapes, as shown in Table 6. At the same time, the comparison between the predicted drag coefficient and the CFD-calculated drag coefficient for each shape is shown in Figure 14.  
From the prediction results given in Table 6, it can be seen that the average relative errors of the drag coefficients of the R = 0.1 hexagon, R = 0.2 hexagon, and R = 0.4 hexagon and circle are less than 10%. A direct relationship is maintained between the accuracy of the wall pressure prediction and the prediction accuracy of the drag coefficient. The relative errors of the drag coefficients predicted by the R = 0.3 hexagon, rectangle, and diamond exceed 10% but do not exceed 20%. The average relative error is the largest for the diamond, reaching 15.42%. The average relative error for all shapes is 9.42%. It can be seen that the UNet model adopted by the indirect method has better performance than the CNN model that directly predicts the drag coefficient, and the average relative error of the drag coefficient is increased by 10.22%. It can be seen that the indirect method of predicting the drag coefficient strengthens the connection between the input and the output.