# A Time Integration Method Based on Galerkin Weak Form for Nonlinear Structural Dynamics
## 2 Basic Principle
### Iterative Algorithm  
Equation (15) is a general step-by-step solution formula for the linear IVP of Equation (5) with time finite elements of degree \(m\), where \(m\) can be any positive integer, in theory. However, in practice, examples have shown that the formulae with \(m\) = 1,2,3, i.e., linear, quadratic, and cubic time elements, are more pragmatic and sufficiently effective, with no need that \(m\) to be much higher. Therefore, the detailed computation schemes of Equation (15) for \(m\) = 1,2,3 are given in this subsection, and then the entire iterative algorithm of the Galerkin time FEM is established for the solution of the nonlinear IVP in Equation (1). For the linear Lagrange time element, there are only two nodes in the single element in Figure 1, i.e., \(\overline{t}_{1}=t_{n}\) and \(\overline{t}_{2}=t_{n+1}\). In this case, Equation (14), the step-by-step solution formula of the linear IVP, can be expressed as:  
\[\left[ \begin{array}{c}\mathbf{K}_{11}\,\mathbf{K}_{12}\\ \mathbf{K}_{21}\,\mathbf{K}_{22}\end{array} \right]\left\{ \begin{array}{c} \mathbf{u}_{n}\\ \mathbf{u}_{n+1}\end{array} \right\}+\frac{2\mathbf{M}}{\Delta t}(\left\{ \begin{array}{c}0\\ \dot{\mathbf{u}}_{n+1}\end{array} \right\}-\left\{ \begin{array}{c}\dot{ \mathbf{u}}_{n}\\ 0\end{array} \right\})=\left\{ \begin{array}{c}\mathbf{P}_{1}\\ \mathbf{P}_{2}\end{array} \right\} \tag{22}\]  
where \(\mathbf{u}_{n}\) and \(\dot{\mathbf{u}}_{n}\) are the initial displacement and velocity at time \(t_{n}\), respectively. Furthermore, the final solution formula with the omitted iteration symbol \"\(k\)\" being added can be expressed as:\[\left[ \begin{array}{c}\mathbf{K}_{22}^{(k)}\,0\\ \mathbf{K}_{22}^{(k)}\,\frac{2\mathbf{M}}{M}\end{array} \right]\left\{ \begin{array} []{c}\mathbf{u}_{n+1}^{(k+1)}\\ \dot{\mathbf{u}}_{n+1}^{(k+1)}\end{array} \right\}=\left\{ \begin{array}{c} \mathbf{p}_{1}^{(k)}-\mathbf{K}_{1j}^{(k)}\mathbf{u}_{n}+2\mathbf{M}\dot{ \mathbf{u}}_{n}/\Delta t\\ \mathbf{p}_{2}^{(k)}-\mathbf{K}_{21}^{(k)}\mathbf{u}_{n}\end{array} \right\}. \tag{23}\]  
Similarly, for the quadratic and cubic Lagrange time elements, the solution formula from Equation (14) can be respectively transformed into:  
\[\left[ \begin{array}{c}\mathbf{K}_{12}^{(k)}\,\mathbf{K}_{13}^{(k)}\,0\\ \mathbf{K}_{22}^{(k)}\,\mathbf{K}_{23}^{(k)}\,0\\ \mathbf{K}_{32}^{(k)}\,\mathbf{K}_{33}^{(k)}\,\mathbf{M}\Delta t\end{array}  \right]\left\{ \begin{array}{c}\mathbf{d}_{2}^{(k+1)}\\ \mathbf{u}_{n+1}^{(k+1)}\end{array} \right\}=\left\{ \begin{array}{c}\mathbf{ p}_{1}^{(k)}-\mathbf{K}_{11}^{(k)}\mathbf{u}_{n}+2\mathbf{M}\dot{\mathbf{u}}_{n}/ \Delta t\\ \mathbf{p}_{2}^{(k)}-\mathbf{K}_{21}^{(k)}\mathbf{u}_{n}\\ \mathbf{p}_{3}^{(k)}-\mathbf{K}_{31}^{(k)}\mathbf{u}_{n}\end{array} \right\} \tag{24}\]  
and  
\[\left[ \begin{array}{c}\mathbf{K}_{12}^{(k)}\,\mathbf{K}_{13}^{(k)}\,0\\ \mathbf{K}_{22}^{(k)}\,\mathbf{K}_{23}^{(k)}\,\mathbf{K}_{24}^{(k)}\,0\\ \mathbf{K}_{32}^{(k)}\,\mathbf{K}_{33}^{(k)}\,\mathbf{K}_{34}^{(k)}\,0\\ \mathbf{K}_{42}^{(k)}\,\mathbf{K}_{43}^{(k)}\,\mathbf{K}_{44}^{(k)}\,2\mathbf{M }/\Delta t\end{array} \right]\left\{ \begin{array}{c}\mathbf{d}_{2}^{(k+1)}\\ \mathbf{d}_{2}^{(k+1)}\\ \mathbf{d}_{2}^{(k+1)}\end{array} \right\}=\left\{ \begin{array}{c}\mathbf{ P}_{1}^{(k)}-\mathbf{K}_{11}^{(k)}\mathbf{u}_{n}+2\mathbf{M}\dot{\mathbf{u}}_{n}/ \Delta t\\ \mathbf{p}_{2}^{(k)}-\mathbf{K}_{21}^{(k)}\mathbf{u}_{n}\\ \mathbf{p}_{3}^{(k)}-\mathbf{K}_{31}^{(k)}\mathbf{u}_{n}\end{array} \right\}. \tag{25}\]  
It is obvious that the coupled equations above need to be solved in each time step, i.e., the proposed algorithm is an implicit step-by-step time integration method. The iterative algorithm of this time integration method can be summarized into the following steps, as shown in Algorithm 1. ```
1. Determine the initial conditions \(\mathbf{u}_{0}\), \(\dot{\mathbf{u}}_{0}\) and \(\ddot{\mathbf{u}}_{0}\). 2. Select the final time \(t_{f}\), the length of time step \(\Delta t\), and the iterative error tolerance \(Tol_{\text{iter}}\)
3.