## 4 Contact Force Calculation
### Transformation Matrix \(\mathbf{Q}\)  
For the block it was said that only its vertices are assumed to contact with the beam. An arbitrary vertex \(d\) is considered as shown in Figure 6, where the block at some arbitrary position and with some rotational velocity \(\phi_{k}\) is depicted. We denote the angle between the \(x\) axis (of the global reference frame) as \(\lambda_{d}\) and the velocity vector of point \(d\) caused only by the block's rotational velocity \(\phi_{k}\), as shown in Figure 6, while the block's half diagonal is \(s\). The velocity of some vertex \(d\) is given as  
\[ \begin{bmatrix}v_{d,x}^{k}(t)\\ v_{d,y}^{k}(t)\end{bmatrix} = \begin{bmatrix}1&0&s\cos\lambda_{d}(t)\\ 0&1&s\sin\lambda_{d}(t)\end{bmatrix}\begin{bmatrix}\dot{X}_{k}(t)\\ \dot{Y}_{k}(t)\\ \dot{\phi}_{k}(t)\end{bmatrix} , \tag{45}\]  
or in compact form  
\[\mathbf{v}_{k,d}=\mathbf{S}\mathbf{\dot{q}}_{k}. \tag{46}\]  
In order to be able to evaluate \(\lambda_{d}\) at any instant, we first evaluate it at some reference position, here taken to be at \(\varphi_{k}=0\) and for \(\phi_{k}>0\). Under these conditions, \(\lambda_{d}\) for each vertex is shown in Figure 6b. Now, \(\lambda_{d}\) for any vertex \(d\in\{1,2,3,4\}\) can be evaluated at each instant in time as  
\[\lambda_{d}(t)=\lambda_{0d}+\varphi_{k}(t), \tag{47}\]  
and the vertex velocity given in (4 To express the vertex velocity in a local reference frame \((\vec{\mu},\vec{t})\), we will use the transformation matrix that expresses vectors from the global reference frame to the local frame:  
\[\mathbf{T}= \begin{bmatrix}\cos\psi&\sin\psi\\ -\sin\psi&\cos\psi\end{bmatrix} , \tag{48}\]  
where \(\psi\) is the angle between the local and global reference frame as shown in Figure 5. The inverse transformation, i.e., from local to the global reference frame, is given by the inverse of \(\mathbf{T}\), which equals its transpose because \(\mathbf{T}\) is orthogonal. Now, the velocity of vertex \(d\) in local coordinates is  
\[V_{k,d}=\mathbf{T}\mathbf{v}_{k,d}=\mathbf{T}\mathbf{\hat{s}}\mathbf{\hat{q}}_{k}=\mathbf{ Q}_{k,d}\mathbf{\hat{q}}_{k}, \tag{49}\]  
where  
\[\mathbf{Q}_{k,d}= \begin{bmatrix}\cos\psi&\sin\psi&s\cos(\lambda_{d}(t)-\psi) \\ -\sin\psi&\cos\psi&s\sin(\lambda_{d}(t)-\psi)\end{bmatrix} , \tag{50}\]  
\[V_{k,d}= \begin{bmatrix}V_{d,n}^{k}(t)\\ V_{d,t}^{k}(t)\end{bmatrix} . \tag{51}\]  
The normal and tangential components in the local frame are, respectively, denoted as \(V_{d,n}^{k}\) and \(V_{d,t}^{k}\). The velocity of an arbitrary point \(b\) on some finite element \(a\) of the beam is given as  
\[ \begin{bmatrix}v_{b,x}^{e}(t)\\ v_{b,y}^{e}(t)\end{bmatrix} = \begin{bmatrix}N_{u1}&0&0&N_{u2}&0&0\\ 0&N_{v1}&N_{v2}&0&N_{v3}&N_{v4}\end{bmatrix} , \tag{52}\]  
where \(\hat{\rho}_{i}^{a}(t)\) (\(i=1,\dots,6\)) are the velocities of nodal displacements of the finite element. In a compact form, we write (52) as  
\[\mathbf{v}_{e,b}=\mathbf{N}\mathbf{\hat{q}}_{e}. \tag{53}\]  
Expressing this velocity in a local frame, we obtain  
\[\mathbf{V}_{e,b}=\mathbf{T}\mathbf{v}_{e,b}=\mathbf{T}\mathbf{N}\mathbf{\hat{q}}_{e}^{a}= \mathbf{Q}_{e}\mathbf{\hat{q}}_{e}^{a}\,, \tag{54}\]  
Figure 6: (a) Arbitrary position of the block with some rotational velocity \(\phi_{k}\); (b) angles of the velocity vectors at the block vertices caused only by block rotation at the reference configuration \(\phi_{k}=0\). where \(\mathbf{Q}_{e}\) and \(V_{e,b}\) are given as  
\[\mathbf{Q}_{e}= \begin{bmatrix}\cos\psi N_{u1}&\sin\psi N_{v1}&\sin\psi N_{v2}& \cos\psi N_{u2}&\sin\psi N_{v3}&\sin\psi N_{v4}\\ -\sin\psi N_{u1}&\cos\psi N_{v1}&\cos\psi N_{v2}&-\sin\psi N_{u2}&\cos\psi N_{v3 }&\cos\psi N_{v4}\end{bmatrix} , \tag{55}\]  
\[V_{e,b}= \begin{bmatrix}V_{b,n}^{e}(t)\\ V_{b,t}^{e}(t)\end{bmatrix} . \tag{56}\]  
\(V_{b,n}^{e}\) and \(V_{b,t}^{e}\) denote the normal and tangential components of the velocity of point \(b\), respectively.