## 4 Development and Validation of CFD/RBD Coupled Solvers
### CFD/RBD Co-Simulation Procedure  
This paper involves simulating the dynamic process of stimulating the short-period mode of aircraft by the deflection of the elevator, which requires that the aircraft body can realize the six-degree-of-freedom movement and the aircraft control surface can realize the deflection movement around the rotation axis according to the control instructions in the CFD environment. Therefore, the boundary of the whole fluid calculation domain can be divided into three parts: the far field and the inner boundaries named fuselage and elevator, the latter two of which formed the aircraft aerodynamic model. The inner boundaries of the flow field are the moving boundaries by the motion of which the behavior of the aircraft body and elevator in the actual flow field is simulated. The essence of the moving boundary is the update of the node coordinates of the mesh on the moving boundary of the fuselage and elevator (respectively, \(x_{fC},y_{fC},z_{fC}\) and \(x_{e,C},y_{e,C},z_{e,C}\)) at each time step. In the RBD/CFD simulation calculation, the updating of coordinates of dynamic mesh is driven by the aircraft centroid position and attitude angle calculated by the flight dynamics calculation program in the RBD module. After the dynamic mesh is updated, the next round of CFD aerodynamic calculation and flight dynamics calculation is carried out. Through the above method, data coupling between the modules of CFD and RBD is generated, and the co-simulation of the two modules is realized. The procedure flow is as shown in Figure 8: firstly, the aerodynamic computational mesh of RBD/CFD co-simulation in the initial state (time step = 0) is generated. The AOA and the elevator deflection angle of the aircraft aerodynamic model can refer to the results of the trim calculation carried out by AVL software under the same working conditions as the time domain co-simulation. The incoming flow direction is set to the x-axis of the reference frame in the computational fluid domain, so the initial pitch attitude angle of the aircraft should be equal to the trim AOA under the computational fluid reference frame. In addition, the position of the centroid of the aircraft should be made to coincide with the origin of the CFD frame and deflect the elevator dynamic boundary to the trim opening. Second, node coordinates of the dynamic mesh of the fuselage and elevator relative to the body frame \(x_{f,B},y_{f,B},z_{f,B}\) and \(x_{e,B},y_{e,B},z_{e,B}\) were generated. The access of node coordinates of the fuselage and elevator relative to the CFD frame can be achieved by the UDF program first, and then the coordinates are transformed into \(x_{f,B},y_{f,B},z_{f,B}\) and \(x_{e,B},y_{e,B},z_{e,B}\) and stored in.csv files. The data in the CSV file are used to initialize the subsequent time domain simulation. For the initialization of the program, the node coordinates of dynamic mesh on the fuselage and elevator relative to the body frame \(x_{f,B},y_{f,B},z_{f,B}\) and \(x_{e,B},y_{e,B},z_{e,B}\) are stored in the CFD solver as global variables. When the co-simulation goes to \(t\) time step, the pressure of each face element on the dynamic mesh of fuselage and elevator at \(t\) time step is obtained by CFD fluid solver, and the aerodynamic force and moment time step t can be obtained by summating the product of the pressure and area of every face element. Then, the aerodynamic force and moment are input into the RBD module. After the RBD module receives the aerodynamic force obtained by the CFD solver, combined with state variables of flight dynamic equations of \(t\) time step, the position coordinates \(x_{cm,I},y_{cm,I},z_{cm,I}\) and the attitude angles \(\varphi_{I},\theta_{I},\psi_{I}\) of aircraft on the \(t+1\) time step can be acquired by solving the flight dynamics equation in an inertial frame.