## 4 Development and Validation of CFD/RBD Coupled Solvers  
### Reference Frame  
The solution of RBD/CFD coupling simulation needs to consider aircraft motion and control surface deflection motion, which involves four coordinate systems. The definition methods and functions of each coordinate system are as follows. It should be pointed out that the subsequent RBD/CFD/CSD co-simulation also involves these four types of reference frames:  
1. The inertial frame: The origin of the inertial reference frame is fixed on the ground. The \(x\)-axis is pointed horizontally, the \(y\)-axis is vertical and points upward, while the \(z\)-axis is perpendicular to the x-y plane and conforms to the right-hand spiral rule. The coordinates under the reference frame are represented by subscript I. The coordinates of the center of mass \((x_{cm,l},y_{cm,l},z_{cm,l})\) and the Euler angle of the aircraft body relative to the inertial reference frame \((\varphi_{l},\theta_{l},\psi_{l})\) can be calculated by the flight dynamics equation.  
2. Fluid calculation reference frame (CFD frame): The origin is located in the center of the fluid calculation domain, the \(x\)-axis points afterward horizontally, the \(y\)-axis is vertical and points upwards, and the \(z\)-axis is perpendicular to the z-y plane and conforms to the right-hand spiral rule. The coordinates under the reference frame are represented by the subscript C. This reference frame is mainly used by CFD solvers to solve fluid dynamics equations and is also the reference frame based on controlling the position and shape of dynamic mesh to simulate the motion of aircraft. By manipulating the position of the node of dynamic mesh in this reference frame, the motion of aircraft in the real flow field is simulated to calculate the unsteady aerodynamic force. During the CFD/RBD co-simulation, the motion of the aircraft in the fluid reference frame is based on the position of the center of mass of the aircraft and the attitude angle calculated by the flight dynamics equation under the inertial reference frame, where the displacement in y and z directions and the attitude angle is completely consistent with the resolutions of the dynamics equations in the inertial reference frame, while the displacement in x direction remains 0, which can be expressed by the formulas:  
\[\begin{array}{c}x_{cm,C}=0,y_{cm,C}=y_{cm,l},z_{cm,C}=z_{cm,l}\\ \varphi_{C}=\varphi_{l},\theta_{C}=\theta_{l},\psi_{C}=\psi_{l},\end{array} \tag{22}\]  
Therefore, the motion of the aircraft in the reference frame of the fluid computing domain is similar to the motion of the shrunken aircraft model in the wind tunnel during the wind-blowing experiment.  
3. The body reference frame: the origin is located at the center of mass of the aircraft, and the x and z axes are located on the plane of symmetry of the fuselage, where the x-axis points to the nose of the aircraft, the z-axis is down, and the y-axis points to the right side of the wing and satisfies the right-hand rule. The coordinates in this frame are represented by subscript B. In this simulation, the body frame not only acts as a dynamic reference frame in the inertial frame to solve the flight dynamics equation but also assists in updating the dynamic mesh of CFD at every time step, the implementation methods of which are shown in the content in the following section.  
4. The local reference frame of the elevator is determined under the body frame, and the origin is located in the geometric center of the elevator rotating shaft in the aircraft body frame. The direction of axis x-y-z of the local reference frame is completely consistent with the body frame. The main function of the local reference system is to provide the elevator with an independent degree of freedom to deflect around the rotation shaft so as to meet the needs of aircraft control surface deflection during co-simulation. The working method of the local reference system is shown in the following section.