1 Introduction

The modelling of flexible bodies as parts of multibody systems is a common issue that is a point of interest of many researchers. Several suitable methods for describing the flexibility together with the large displacements and rotations of flexible bodies were developed [12] and in most cases they lead to nonlinear formulations of motion equations. Therefore it is appropriate to deal with the numerical methods to solve these equations in reasonable computational times and accuracy.

The iterative refinement of the solution in discrete time step may be performed by using the quasi-Newton method. The basic advantage of this method is its computational effectiveness in comparison to classical the Newton method, where in most cases the Jacobi matrix needs to be evaluated numerically by finite differences. The drawback of the quasi-Newton method is the lost of convergence in case of inappropriately large time steps. This paper is dedicated to the usage of the Newmark integration method together with the quasi-Newton method for the simulations of flexible bodies modelled by absolute nodal coordinate formulation.

2 Modelling of Flexible Bodies

Since multibody systems may consist of flexible bodies, it is important to have proper methods to describe their elastic and inertia properties. One of the most promising methods in last two decades is the absolute nodal coordinate formulation (ANCF) of finite elements, that was originated in 1996 by Shabana, see [11]. Compared with the classical formulation of finite elements, ANCF uses absolute positions of nodes and partial derivatives of these positions with respect to local element parameters as nodal coordinates. This can be also advantageous from the viewpoint of possible rigid-flexible bodies connections when the natural coordinates formulation for describing rigid bodies is used [7]. In this work, several ANCF beam elements are used for flexible bodies modelling. However, the ANCF approach has been successfully applied to various types of elements such as plates, shells [8] or solid bricks [9].

The first tested element implemented in the in-house software in MATLAB is so called original ANCF beam element [5]. This type of element has two nodes and each node has 12 degrees of freedom that correspond with four vectors - the global position vector of the node and three tangential vectors that are obtained as derivatives of the global position vector of the node with respect to beam coordinates x (axial beam coordinate), y and z (two cross-sectional coordinates). Derivation of the elastic forces of the element can be found in [10], specifically the elastic line approach was used in this work. The resultant nonlinear vector of elastic forces was obtained by using symbolic operations in MATLAB software.

The second implemented element is the ANCF thin cable element, in [5] denoted as lower order cable element. It has two nodes and each node has six degrees of freedom, from which three are the components of the node position vector and three are the components of the beam center-line tangent (slope) vector. The ANCF cable element uses axial strain and beam center-line curvature to define the elastic forces. This type of element is advantageous in terms of reducing the number of degrees of freedom, but the minor disadvantage is the inability to describe torsional flexibility. The closed form of nonlinear vector of elastic forces was not obtainable by symbolic operations in MATLAB, so the Gaussian quadrature was used to its numerical evaluation.

The last tested element is denoted as L2T2 and was developed in article [1]. This type of element is a planar version of the ANCF thin cable element, it has two nodes with four degrees of freedom in each node and it uses several assumptions that lead to the simplification of the nonlinear vector of elastic forces.

One of the major advantages of used ANCF beam elements is the formulation of mass matrix which is constant, so it is computed only once before the numerical simulation. The motion equations of one unconstrained flexible body described by ANCF elements can be written in the similar form for all three tested elements

$$\begin{aligned} \mathbf {M}\ddot{\mathbf {q}} + \mathbf {Q} = \mathbf {f}, \end{aligned}$$
(1)

where \(\mathbf {M}\) is the mass matrix, \(\mathbf {q}=\mathbf {q}(t)\) is the vector of all nodal coordinates, \(\mathbf {Q} = \mathbf {Q}(\mathbf {q})\) is the vector of elastic forces that is dependent on the nodal coordinates and \(\mathbf {f}=\mathbf {f}(\mathbf {q},\dot{\mathbf {q}},t)\) is the vector of external forces. Equation (1) can be extended by damping forces in the form of proportional damping. For this purpose, the vector of elastic forces can be written in the form \(\mathbf {Q} = \mathbf {K}(\mathbf {q})\mathbf {q}\), where \(\mathbf {K}(\mathbf {q})\) is the nonlinear stiffness matrix. In this work, the damping is not considered.

The common form of motion equations of a multibody system is

$$\begin{aligned} \left\{ \begin{array}{rrl} \mathbf {M}\ddot{\mathbf {q}} + \varvec{\Phi }^T_{,\mathbf {q}}\varvec{\lambda } &{}=&{} \mathbf {g},\\ \varvec{\Phi } &{}=&{}\mathbf {0},\\ \end{array} \right. \end{aligned}$$
(2)

where \(\mathbf {q}\) now contains all degrees of freedom of all bodies and \(\mathbf {M}\) is the corresponding mass matrix, \(\varvec{\Phi }=\varvec{\Phi }(\mathbf {q},\ t)\) represents holonomic constraints, \(\varvec{\Phi }_{,\mathbf {q}}\) is the Jacobi matrix of the constraints and \(\varvec{\lambda }\) is the vector of Lagrange multipliers. In case of use of the ANCF approach for describing a flexible body, the right side of the first equation in (2) is of the form

$$\begin{aligned} \mathbf {g}(\mathbf {q},\ \dot{\mathbf {q}},\ t) = \mathbf {f}(\mathbf {q},\ \dot{\mathbf {q}},\ t) - \mathbf {Q}(\mathbf {q}). \end{aligned}$$
(3)

3 Numerical Solution of Equations of Motion

There are several publications dedicated to implicit numerical methods suitable for the solution of Index 3 differential-algebraic equations (DAE I3) of multibody systems described by Eq. (2) such as [3, 6]. For example, paper [6] applies the Hilbert-Hughes-Taylor (HHT) method on the flexible bodies described by ANCF approach, but the resultant algebraic equations for the solution corrections are not further discussed in detail. In this paper, the Newmark integration method is used to obtain the algebraic equations for the solution corrections and these equations are solved by quasi-Newton method.

3.1 Newmark Integration Method for DAE I3

Based on [3], the Newmark formulas are used in the form

$$\begin{aligned} \begin{array}{rl} \mathbf {q}_{n+1} &{} = \mathbf {q}_{n} + h\dot{\mathbf {q}}_{n} + \frac{h^2}{2}\left[ (1-2\beta )\ddot{\mathbf {q}}_{n}+2\beta \ddot{\mathbf {q}}_{n+1}\right] ,\\ \dot{\mathbf {q}}_{n+1} &{} = \dot{\mathbf {q}}_{n} + h\left[ (1-\gamma )\ddot{\mathbf {q}}_{n} + \gamma \ddot{\mathbf {q}}_{n+1}\right] , \end{array} \end{aligned}$$
(4)

where h is the time step, \(\gamma = \frac{1}{2} + \alpha \), \(\beta = \frac{1}{4}\left( \gamma + \frac{1}{2}\right) ^2\) and \(\alpha \) is the parameter of numerical damping. The equations of motion with the constraint equations (2) are formerly adjusted in order to define residuum vector \(\mathbf {r}_{res}\) as

$$\begin{aligned} \begin{array}{r@{}l} \mathbf {r}_{res}\left( \mathbf {q},\ \dot{\mathbf {q}},\ \ddot{\mathbf {q}},\ \varvec{\lambda }\right) = \mathbf {M}\ddot{\mathbf {q}} + \varvec{\Phi }^T_{,\mathbf {q}}\varvec{\lambda } - \mathbf {g} \left( \mathbf {q},\ \dot{\mathbf {q}},\ t\right) &{} = \mathbf {0},\\ \varvec{\Phi }(\mathbf {q},\ t) &{} =\mathbf {0}.\\ \end{array} \end{aligned}$$
(5)

Equation (5) can be expressed in discrete time step \(n+1\) and after the substitution of the Newmark formulas (4) inversion, see [3], into (5), following equations are obtained

$$\begin{aligned} \begin{array}{rl} \mathbf {r}_{res}\left( \mathbf {q}_{n+1},\ \varvec{\lambda }_{n+1}\right) &{} = \mathbf {0},\\ \varvec{\Phi }(\mathbf {q}_{n+1}) &{} =\mathbf {0}.\\ \end{array} \end{aligned}$$
(6)

After the linearisation of (6) using Taylor expansion, following equations are obtained

$$\begin{aligned} \begin{array}{rl} \mathbf {r}_{res}\left( \mathbf {q}^{k+1}_{n+1},\ \varvec{\lambda }^{k+1}_{n+1}\right) &{} = \mathbf {0} \approx \mathbf {r}_{res}\left( \mathbf {q}^{k}_{n+1},\ \varvec{\lambda }^{k}_{n+1}\right) + \mathbf {S}_t\left( \mathbf {q}^{k}_{n+1},\ \varvec{\lambda }^{k}_{n+1}\right) \varDelta \mathbf {q}^{k} + \varvec{\Phi }_{,\mathbf {q}}^T\varDelta \varvec{\lambda }^{k}, \\ \varvec{\Phi }(\mathbf {q}^{k+1}_{n+1}) &{} = \mathbf {0} \approx \varvec{\Phi }(\mathbf {q}^{k}_{n+1}) + \varvec{\Phi }_{,\mathbf {q}}\varDelta \mathbf {q}^{k}, \end{array} \end{aligned}$$
(7)

where \(\mathbf {S}_t\) is the Jacobi matrix of the residuum vector and has a form

$$\begin{aligned} \mathbf {S}_{t} = \frac{\partial \mathbf {r}_{res}}{\partial \mathbf {q}} = \frac{1}{\beta h^2}\mathbf {M} + \frac{\partial }{\partial \mathbf {q}}\left( \varvec{\Phi }^T_{,\mathbf {q}}\varvec{\lambda }\right) - \frac{\partial \mathbf {g}}{\partial \mathbf {q}} - \frac{\gamma }{\beta h}\frac{\partial \mathbf {g}}{\partial \dot{\mathbf {q}}} . \end{aligned}$$
(8)

Now the expression (7) can be rewritten in the matrix form

$$\begin{aligned} \left[ \begin{array}{cc} \mathbf {S}_t &{} \varvec{\Phi }_{,\mathbf {q}}^T\\ \varvec{\Phi }_{,\mathbf {q}} &{} \mathbf {0} \\ \end{array} \right] \cdot \left[ \begin{array}{c} \varDelta \mathbf {q}^{k}\\ \varDelta \varvec{\lambda }^{k}\\ \end{array} \right] = - \left[ \begin{array}{c} \mathbf {r}_{res}\left( \mathbf {q}^{k}_{n+1},\ \varvec{\lambda }^{k}_{n+1}\right) \\ \varvec{\Phi }(\mathbf {q}^{k}_{n+1})\\ \end{array} \right] . \end{aligned}$$
(9)

Expression (9) represents the system of algebraic equations for the corrections of positions \(\varDelta \mathbf {q}\) and corrections of Lagrange multipliers \(\varDelta \varvec{\lambda }\) that are then used for the solution correction as follows

$$\begin{aligned} \ddot{\mathbf {q}}_{n+1}^{k+1}&= \ddot{\mathbf {q}}_{n+1}^{k} + \varDelta \ddot{\mathbf {q}}^{k} = \ddot{\mathbf {q}}_{n+1}^{k} + \frac{1}{\beta h^2}\varDelta \mathbf {q}^{k}, \nonumber \\ \dot{\mathbf {q}}_{n+1}^{k+1}&= \dot{\mathbf {q}}_{n+1}^{k} + \varDelta \dot{\mathbf {q}}^{k} = \dot{\mathbf {q}}_{n+1}^{k} +\frac{\gamma }{\beta h}\varDelta \mathbf {q}^{k},\nonumber \\ \mathbf {q}_{n+1}^{k+1}&= \mathbf {q}_{n+1}^{k} + \varDelta \mathbf {q}^{k},\nonumber \\ \varvec{\lambda }_{n+1}^{k+1}&= \varvec{\lambda }_{n+1}^{k} + \varDelta \varvec{\lambda }^{k}. \end{aligned}$$
(10)

The iterative process (10) is started with the prediction of the acceleration vector.

Equation (9) can be rewritten to the simple compact form

$$\begin{aligned} \mathbf {J}^r (\mathbf {x}^k)\varDelta \mathbf {x}^k = -\tilde{\mathbf {r}}(\mathbf {x}^k), \end{aligned}$$
(11)

where \(\mathbf {J}^r\) is the iteration matrix, which may differ in each iteration k. The analytical expression of the iteration matrix is nearly impossible for the most of nonlinear problems, e.g. in case of a thin cable element, where the beam centerline curvature is used for the derivation of bending elastic forces, is the analytical expression very complicated. Therefore, the iteration matrix is often approximated by using numerical finite differences. Since this operation is very time consuming, it is not recommended to update the iteration matrix within every iteration [6]. In this paper, the application of the quasi-Newton method for direct construction and updating of the approximation of the iteration matrix inversion is used in order to reduce computational time needed for reaching the force equilibrium state at time step n.

3.2 Quasi-Newton Method

The quasi-Newton method is based on the approximation of iteration matrix \(\mathbf {J}^r\) by a matrix \(\mathbf {G}\) [4]. For each iteration k, the matrix \(\mathbf {G}\) is computed based on the previously evaluated quantities, so the form of this matrix in iteration \(k+1\) is

$$\begin{aligned} \mathbf {G}^{k+1} = \mathbf {G}^{k} + \varDelta \mathbf {G}^{k}, \end{aligned}$$
(12)

where \(\varDelta \mathbf {G}^{k}\) is the increment of the approximation matrix and several quasi-Newtonian methods are distinguished based on its form, such as Davidon’s, Broyden’s, DPF or BFGS method. The derivation of the increment \(\varDelta \mathbf {G}^{k}\) is based on the secant equation, for more information see [2]. The algorithm of quasi-Newton method starts with the first approximation matrix \(\mathbf {G}^0\), that can be determined by using numerical finite difference method for \(\mathbf {J}^r (\mathbf {x}^0)\) at the very start of the simulation. For \(k = 0, 1, 2, \dots \), following algorithm is then applied:

  1. 1.

    Calculation of increments \(\varDelta \mathbf {x}^k\) from equation \(\mathbf {G}^k \varDelta \mathbf {x}^k = -\tilde{\mathbf {r}}(\mathbf {x}^k)\).

  2. 2.

    Evaluation of the solution in step \(k+1\) as \(\mathbf {x}^{k+1} = \mathbf {x}^{k} + \varDelta \mathbf {x}^{k}\).

  3. 3.

    Determination of the difference between two consecutive residual vectors as \(\mathbf {y}^{k} = \tilde{\mathbf {r}}(\mathbf {x}^{k+1})-\tilde{\mathbf {r}}(\mathbf {x}^k)\).

  4. 4.

    Calculation of \(\varDelta \mathbf {G}^{k}\) based on the chosen quasi-Newtonian method and the use of Eq. (12).

One of the benefits of the quasi-Newton method is that after few mathematical operations the approximation of the iteration matrix \(\mathbf {J}^r\) inversion can be directly written in the closed form. With the denotion \(\mathbf {H}^{k} = \left( \mathbf {G}^{k}\right) ^{-1}\), the vector of increments can be easily evaluated as \(\varDelta \mathbf {x}^{k} = - \mathbf {H}^{k}\tilde{\mathbf {r}}(\mathbf {x}^k)\). Then updated matrix \(\mathbf {H}^{k+1}\) can be evaluated based on the selected quasi-Newtonian method. The list of the most used methods follows [4]:

  • Broyden’s method

    $$\begin{aligned} \mathbf {H}^{k+1} = \mathbf {H}^{k} + \frac{ \left( \varDelta \mathbf {x}^{k} - \mathbf {H}^{k} \mathbf {y}^{k}\right) \left( \varDelta \mathbf {x}^{k}\right) ^{T}\mathbf {H}^{k}}{\left( \varDelta \mathbf {x}^{k}\right) ^{T}\mathbf {H}^{k}\mathbf {y}^{k}}, \end{aligned}$$
    (13)
  • Davidon’s method

    $$\begin{aligned} \mathbf {H}^{k+1} = \mathbf {H}^{k} + \frac{ \left( \varDelta \mathbf {x}^{k} - \mathbf {H}^{k}\mathbf {y}^{k}\right) \left( \varDelta \mathbf {x}^{k} - \mathbf {H}^{k}\mathbf {y}^{k}\right) ^T}{\left( \varDelta \mathbf {x}^{k} - \mathbf {H}^{k}\mathbf {y}^{k}\right) ^T \mathbf {y}^{k}}, \end{aligned}$$
    (14)
  • Davidon-Powell-Fletcher (DPF) method

    $$\begin{aligned} \mathbf {H}^{k+1} = \mathbf {H}^{k} +\frac{\varDelta \mathbf {x}^{k}\left( \varDelta \mathbf {x}^{k}\right) ^{T}}{\left( \varDelta \mathbf {x}^{k}\right) ^{T}\mathbf {y}^{k}} - \frac{\mathbf {H}^{k}\mathbf {y}^{k}\left( \mathbf {y}^{k}\right) ^{T} \mathbf {H}^{k}}{\left( \mathbf {y}^{k}\right) ^{T} \mathbf {H}^{k}\mathbf {y}^{k}}, \end{aligned}$$
    (15)
  • Broyden-Fletcher-Goldfard-Shanno (BFGS) method

    $$\begin{aligned} \mathbf {H}^{k+1} = \left( \mathbf {I} - \frac{ \varDelta \mathbf {x}^{k}\left( \mathbf {y}^{k}\right) ^{T}}{\left( \mathbf {y}^{k}\right) ^{T}\varDelta \mathbf {x}^{k}} \right) \mathbf {H}^{k} \left( \mathbf {I} - \frac{\mathbf {y}^{k}\left( \varDelta \mathbf {x}^{k}\right) ^{T} }{\left( \mathbf {y}^{k}\right) ^{T}\varDelta \mathbf {x}^{k}} \right) + \frac{\varDelta \mathbf {x}^{k}\left( \varDelta \mathbf {x}^{k}\right) ^{T} }{\left( \mathbf {y}^{k}\right) ^{T}\varDelta \mathbf {x}^{k}}. \end{aligned}$$
    (16)

4 Numerical Simulations

The common benchmark problem of a flexible pendulum was used to compare proposed numerical method with the functions of ode family methods from MATLAB software. The pendulum of the 2 m length has a square cross section with the edge of 0.01 m, material density is 4000 kg\(\cdot \)m\(^{-3}\) and the Young’s modulus is 10\(^8\) Pa. The rotation joint to the base frame is represented by the constraints applied to the end node. For the pendulum model, the original ANCF beam elements (Thick), ANCF thin cable elements (Thin) and planar L2T2 elements were used. Ten elements were used to describe the pendulum. The relative and absolute error of ode functions were left with implicit values (\(RelTol = 10^{-3}\), \(AbsTol = 10^{-6}\)) and the solution of each time step using Newmark method is considered as converged if \(\vert \mathbf {r}_{res}\vert < 10^{-6}\) and \(\vert \varvec{\Phi } \vert < 10^{-6}\). Numerical damping parameter \(\alpha \) was set to zero in order to compare the results with the trapezoidal rule of the ode23t. The time step of Newmark method was set to \(h = 0.0005\) s. The snapshots of the pendulum motion in chosen discrete times are shown in Fig. 1. In Table 1, the resultant computation times for the simulation of two seconds of the pendulum movement are summarized for various ANCF elements and numerical methods. Only three fastest MATLAB functions are shown. From the results it is apparent, that the Thick element is the slowest especially with the use of ode functions. This may be caused by the implementation of the Thick elements, because their elastic forces are derived in closed form during preprocessing by using symbolic operations of MATLAB. The evaluation with the use of Gaussian quadrature would be faster. The Newmark method with the quasi-Newton method was faster for all element types, especially Davidon’s method is significantly faster than classical ode functions.

Fig. 1.
figure 1

Snapshots of the pendulum motion in discrete time steps.

Table 1. Computation times in [s] of the pendulum motion simulation (2 s) for various ANCF elements and numerical integration methods.

In Fig. 2, the differences in vertical position of the flexible pendulum tip that were obtained by using various numerical methods are shown. It is apparent, that the difference between the Davidon’s method and ode23t is in the same order of magnitude \(10^{-5}\) as the difference between ode23t and ode23. The difference between the quasi-Newtonian methods is even smaller - order of magnitude \(10^{-8}\).

Fig. 2.
figure 2

Differences in vertical position of flexible pendulum tip for various numerical methods.

5 Conclusions

In this paper, the numerical method that is based on the Newmark integration scheme coupled with the quasi-Newton method was described as a suitable method for the dynamical simulations of flexible multibody systems modelled using ANCF approach. The numerical tests were performed on the benchmark problem of the flexible pendulum and the results are in a good compliance with the ode family methods of MATLAB software. The main advantage of the described approach is the direct solution of DAE I3 equations without the need of stabilization techniques and the faster computation times in comparison with MATLAB time integration functions. In case of reasonably small time steps, the quasi-Newton method converged in few steps to the solution. Currently, the proposed methods are being tested on the mechanical system of a rotating cylinder with a wrapped cable modelled by ANCF and the resultant friction and normal contact forces are in a very good compliance with the analytical equations. In future work, the quasi-Newton method will be implemented together with HHT integration method.