## 4 Calculation and Verification of Dynamic Derivatives  
### Verification of Basic State  
Grid generation is the foundation of flow field calculation. In this case, a structured grid division was performed on the NACA 0012 airfoil, with a chord length of \(c=1\) m. To avoid boundary interference, the distance from the far-field boundary to the airfoil surface was set to 20 times the chord length, and the airfoil surface was set as a nonslip wall boundary. To improve computational accuracy, local refinement was carried out on the grid near the airfoil, with the height of the first layer grid being 0.0001c, meeting the requirements of \(y^{+}<1\). The grid division is shown in Figure 6. A fluent pressure-based solver was used to numerically solve two-dimensional incompressible N-S equations. Far field was set as the velocity entry boundary condition, with a corresponding Reynolds number of 1500. At this Reynolds number, the fluid viscosity is relatively high, and a laminar flow model was selected for simulation. Airfoil motion was specified by the User-Defined Function (UDF) file. The SIMPLEC algorithm was used to solve the pressure velocity coupling problem. The convection and viscosity terms in spatial discretization were solved using second-order upwind and second-order central schemes, respectively. The time term was solved using a second-order implicit two-step method. Each pitch period was time-advanced in N time steps, and 25 internal iterations were performed within each time step. To obtain a periodic stable solution, at least 50 pitch periods were calculated for each example. The pressure contour during the calculation process is shown in Figure 7.  
Figure 6: Grid division of NACA 0012.  
Figure 7: Pressure contour.  
After obtaining data using a fluent pressure-based solver, we predicted the aerodynamic force of the NACA 0012 airfoil under simple harmonic vibration using PSO-LSTM. Three sets of data, k = 0.05, 0.06, and 0.08 (equation of motion: \(\alpha=2^{\circ}+1^{\circ}*\sin(\omega t)\)), were used as training data, and k = 0.07 was used as testing data. The time series length N of the input angle of attack was taken as 10. Figure 8 and Table 1 show the predicted results of aerodynamic data using an intelligent model at k = 0.07, and compare them with the CFD calculation results. The results obtained by the two methods are basically consistent, with a relative error of no more than 2.2%. It can be concluded that the intelligent aerodynamic model constructed in this paper has high accuracy in predicting aerodynamic force.  
After obtaining the prediction results of unsteady aerodynamic force, the dynamic derivatives were calculated using the least-squares method. We compared this with the dynamic derivatives calculated using CFD and integration methods, as shown in Table 2. It can be concluded that the dynamic derivatives obtained through PSO-LSTM and CFD are basically consistent. Figure 9 shows the comparison of the timeliness between the dynamic derivatives prediction method proposed in this paper and the conventional CFD method. It can be concluded that the time consumption of the method for obtaining dynamic derivatives through an intelligent model is only 29/100 that of the CFD method.