## 3 Mathematical Modeling of the Inviscid Fluid System
### The Equations of Motion of the Rotor-Casing Rub System Immersed in an Inviscid Fluid  
To extract the features of the signal distributed in the time and frequency domains, an instantaneous energy spectrum distribution is performed. The five degrees of freedom (DoF) second-order differential equation regulating the mechanical system of a drilling rig in rubbing contact is established using the Euler-Lagrange formalism in an inviscid fluid and can be written as follows in matrix form:  
\[\begin{bmatrix}m_{\theta\theta}&m_{\phi\psi}&m_{\theta X}&m_{\theta Y}&m_{ \theta Z}\\ m_{\phi\theta}&m_{\psi\psi}&m_{\psi X}&m_{\psi Y}&0\\ m_{X0}&m_{X\psi}&M+m_{u}+M_{fl}&0&m_{XZ}\\ m_{Y0}&m_{Y\psi}&0&M+m_{u}+M_{fl}&m_{YZ}\\ m_{Z0}&0&m_{ZX}&m_{ZY}&m_{ZZ}\end{bmatrix}\begin{bmatrix}\dot{\theta}\\ \dot{\psi}\\ \dot{\chi}\\ \dot{Y}\\ \ddot{Z}\end{bmatrix}+\begin{bmatrix}0&0&0&0&0\\ 0&C_{\psi\psi}&0&0&0\\ 0&0&C_{XX}&0&0\\ 0&0&0&C_{YY}&0\\ 0&0&0&0&C_{ZZ}\end{bmatrix}\begin{bmatrix}\dot{\theta}\\ \dot{\psi}\\ \dot{\chi}\\ \dot{Y}\\ \dot{Z}\end{bmatrix} \tag{41}\]  
where \(\Delta P=P\pi^{2}/2L-F_{\psi}\pi^{3}/2L^{2}\). The external excitation forces associated with each degree of freedom are expressed as \(F_{\psi}\), the force vector induced by gravity, \(F_{\theta}\), the input force from the motor, and \(F_{\psi}\), the fluctuating axial force. \(\left\{Q_{n}\right\}\) represents the nonlinear part, which is shown to be a function of the system rotational speed, the torsional deformation angle, and the mass imbalance. The drill string-fluid interaction provides the coupling between the fluid forces and the imbalanced lateral and torsional coupled rotor. It can be noted that due to the formulation of the stresses, the axial, torsional, and lateral vibrations are coupled. The coupling mass matrix between all degrees of freedom and the expression containing the nonlinear terms and the possibility of periodic instability at very high shaft speeds is introduced in Equations (42)-(52) written in the form:  
\[m_{\theta\psi}=m_{\psi\theta}=m_{\psi\theta}=J_{D}+m_{u}e^{2} \tag{42}\]  
\[m_{\theta\theta}=J_{M}+J_{D}+m_{u}e^{2}\Big{(}1+\psi^{2}\Big{)} \tag{43}\]  
\[m_{\theta X}=m_{X\theta}=-m_{u}\big{[}\big{(}e_{x}-\psi e_{y}\big{)}\sin\theta+ \big{(}e_{x}\psi+e_{y}\big{)}\cos\theta\big{]} \tag{44}\]  
\[m_{\theta Y}=m_{Y\theta}=m_{u}\big{[}\big{(}e_{x}-\psi e_{y}\big{)}\cos\theta -\big{(}e_{x}\psi+e_{y}\big{)}\sin\theta\big{]} \tag{45}\]  
\[m_{\psi X}=m_{X\psi}=-m_{u}\big{[}e_{x}\sin\theta+e_{y}\cos\theta\big{]} \tag{46}\]  
\[m_{\psi Y}=m_{Y\psi}=m_{u}\big{[}e_{x}\cos\theta-e_{y}\sin\theta\big{]} \tag{47}\]  
\[m_{XX}=m_{YY}=m_{ZZ}=M+m_{u} \tag{48}\]  
\[K_{\psi\psi}=K_{T}-m_{u}e^{2}\dot{\theta}^{2} \tag{49}\]  
\[Q_{\theta}=2m_{u}e^{2}\psi\dot{\psi}\dot{\phi} \tag{50}\]  
\[Q_{X}=-2m_{u}\dot{\theta}\dot{\psi}\big{(}e_{x}\cos\theta-e_{y}\sin\theta \big{)}-m_{u}\dot{\theta}^{2}\big{[}\big{(}e_{x}-\psi e_{y}\big{)}\sin\theta +\big{(}e_{x}\psi+e_{y}\big{)}\cos\theta\big{]} \tag{51}\]  
\[Q_{Y}=-2m_{u}\dot{\theta}\dot{\psi}\big{(}e_{x}\sin\theta+e_{y}\cos\theta \big{)}-m_{u}\dot{\theta}^{2}\big{[}\big{(}e_{x}-\psi e_{y}\big{)}\sin\theta +\big{(}e_{x}\psi+e_{y}\big{)}\cos\theta\big{]} \tag{52}\]  
The governing equations are fully coupled nonlinear differential equations with time-varying coefficients. The time-varying coefficients are due to fluid-shaft excitation and axial coupling. Axial and transverse motions are coupled due to nonlinear elastic deflections, while the transverse motions in the \(X\) and \(Y\) directions are coupled due to hydrodynamic damping, shock impact, and frictional forces.