## 2 Bidirectional FSI Numerical Model  
### Dynamic Modeling  
#### 2.1.1 Multi-Body Model  
The drill string composed of multi-sectional drill pipes can be regarded as a flexible multi-body system. The system is first discretized using the finite element method, and topological relationships are established to define inter-element connections. The discretized system is represented by simplified point-line relationships between nodes and elements. Dedicated local coordinate systems are established at the centroids of each flexible and rigid body, while the global coordinate system is positioned at the bottom hole center. The generalized coordinate set of the system is given by Equation (1) [45].  
\[\mathbf{q}=\begin{bmatrix}\mathbf{q}_{r}\\ \mathbf{q}_{c}\end{bmatrix} \tag{1}\]  
where \(\mathbf{q}_{r}\) represents the rigid body degrees of freedom, and \(\mathbf{q}_{c}\) denotes the flexible body degrees of freedom.  
During analysis, forward and backward recursions are employed to solve kinematics and dynamics, respectively. The forward recursion initiates from the load-application end of the drill string borehole, serving as the base body. This process encompasses velocity, acceleration propagation for rigid bodies, and deformation superposition for flexible bodies. The recursion of rigid-body velocity and acceleration are formulated in Equation (2) and Equation (3) [46], while flexible-body elastic deformation displacements are computed via Equation (4) [47].  
\[v_{i} =\mathbf{v}_{i-1}+\mathbf{j}_{i}^{\text{joint}}\tilde{\mathbf{q} }_{i}+\beta_{i} \tag{2}\] \[a_{i} =a_{i-1}+\mathbf{j}_{i}^{\text{joint}}\tilde{\mathbf{q}}_{i}+ \gamma_{i} \tag{3}\]\[\dot{\mathbf{u}}_{i}=\mathbf{N}_{i}\dot{\mathbf{q}}_{e,i} \tag{4}\]  
Here, \(\mathbf{J}_{i}^{\text{joint}}\) denotes the Jacobian matrix, \(\gamma_{i}\) represents the Coriolis and centrifugal terms, and \(\mathbf{N}_{i}\) corresponds to the shape function matrix.  
During backward recursion, the resultant force of each body and the force transmitted to the parent body are individually formulated as shown in Equations (5) and (6) [46; 47].  
\[\mathbf{f}_{i}=\mathbf{M}_{i}\mathbf{a}_{i}^{\text{total}}+\mathbf{C}_{i} \mathbf{v}_{i}^{\text{total}}+\mathbf{K}_{i}\mathbf{u}_{i}-\mathbf{f}_{\text{ ext},i} \tag{5}\]  
\[\mathbf{f}_{i-1}=\mathbf{f}_{i}+\mathbf{j}_{i}^{\text{joint},T}\boldsymbol{ \tau}_{i} \tag{6}\]  
where \(\mathbf{f}_{\text{ext},i}\) denotes the external force, and \(\boldsymbol{\tau}_{i}\) represents the driving force.  
The dynamic equation of the system can be expressed as shown in Equation (7) [48; 49].  
\[\left\{\begin{array}{l}\mathbf{M}(\mathbf{q})\mathbf{\tilde{q}}+\mathbf{C}( \mathbf{q},\dot{\mathbf{q}})+\mathbf{K}\mathbf{q}=\mathbf{Q}_{ext}+\mathbf{Q} _{c}\\ \mathbf{\Phi}(\mathbf{q},t)=0\end{array}\right. \tag{7}\]  
where \(\mathbf{M}\) denotes the mass matrix, and \(\mathbf{\Phi}\) represents the constraint equations.  
To ensure that the connection constraints between all bodies in a multi-body system are strictly satisfied during its motion, the Lagrange multiplier method is employed to address the constraints, with the augmented equations formulated as shown in Equation (8) [50].  
\[\begin{bmatrix}\mathbf{M}&\mathbf{\Phi}_{\text{q}}^{T}\\ \mathbf{\Phi}_{\text{q}}&0\end{bmatrix}\begin{bmatrix}\mathbf{\tilde{q}}\\ \lambda\end{bmatrix}=\begin{bmatrix}\mathbf{Q}\\ -\mathbf{\Phi}_{t}-\mathbf{\Phi}_{\text{q}}\dot{\mathbf{q}}\end{bmatrix} \tag{8}\]  
Here, \(\mathbf{\Phi}_{\text{q}}\) denotes the Jacobian matrix associated with the constraint equations.  
Furthermore, the recursive resolution of drill string dynamics is accomplished through iterative updates of generalized coordinates and velocities.