1 Introduction

This work is concerned with dynamics of multibody mechanical systems subject to motion constraints. Such constraints arise frequently in modeling the dynamics of a plethora of engineering systems and need a special treatment [1,2,3]. In particular, the class of systems examined involves nonholonomic bilateral constraints. That is, nonintegrable equality constraints on their generalized velocities. In contrast to integrable (or holonomic) constraints, which limit both the velocities and the positions of a system, nonholonomic constraints impose restrictions on the velocity level only, without limiting the possible positions on their configuration space. In classical applications, such constraints arise in the presence of rolling or sliding motions. They lead to quite interesting dynamics, not exhibited by holonomic systems and represent a central subject of Nonholonomic Mechanics [4, 5].

The main emphasis of this work is placed on developing and presenting the essential steps of a new systematic methodology, leading to a robust, accurate and efficient numerical integration of the equations of motion of mechanical systems involving nonholonomic constraints. Classical numerical methodologies, treating the equations of motion as a coupled system of differential–algebraic equations (DAEs), lead to severe difficulties and inaccuracies, related to response stability issues [6]. Specifically, small errors in the initial values as well as errors developed through numerical integration are amplified and lead to an erroneous response as time goes on, independently on the accuracy level imposed on the calculations. Most of the times, increasing these accuracy levels helps in just extending the acceptable accuracy of the solution for a little longer time duration but this is not sufficient to prevent an eventual drift from the real solution. This prompted the initiation of many research efforts, focusing toward eliminating or reducing these undesirable consequences. Besides consideration of dissipative time integration schemes [1, 3], this included efforts to properly scale the governing equations and constraints or to perform appropriate velocity projections [7,8,9].

In this work, the effort to eliminate the stability problems arising during integration of the equations of motion of constrained systems starts from their theoretical foundation and continues with the development and application of suitable numerical methodologies. More specifically, the essential reason for achieving an accurate and reliable numerical solution is the utilization of an appropriate set of equations, derived by a consistent application of Newton’s law of motion [10]. Their derivation is based on classical concepts and tools of Analytical Dynamics and leads directly to a set of second-order ordinary differential equations (ODEs) in both the generalized constraints and the Lagrange multipliers, associated with the motion constraints [11]. This eliminates the well-known pathologies associated with the classical DAE formulations. Moreover, the robustness of the new numerical scheme is reinforced by first putting these equations in a suitable weak form and then treating the generalized coordinates, velocities and momenta as independent quantities, leading to a convenient three-field weak formulation [12]. This follows earlier mixed multi-field methods in computational mechanics, based on the de Veubeke–Washizu variational principle [13, 14]. Finally, the process is completed by developing and applying a suitable temporal discretization scheme.

A similar path was followed in a recent work of the authors [15]. In that work, the emphasis was placed on mechanical systems with holonomic constraints. Instead, the present work focuses on systems involving nonholonomic constraints. This leads to some important deviations in both the analytical formulation and the numerical scheme developed, which are noticed and explained in detail in Sects. 24. In addition, the set of unknowns arising in each time step of the present treatment includes both the generalized velocities and the time derivatives of the Lagrange multipliers. In contrast, the method applied in [15] was based on an augmented Lagrangian approach and treated the generalized velocities and the time derivatives of the Lagrange multipliers at different solution levels. Finally, all the numerical examples investigated in that work involved holonomic constraints, while the examples examined in this study involve nonholonomic constraints.

An outline of the present work is as follows. First, the set of equations of motion employed is presented briefly in Sect. 2, giving emphasis on explaining and modeling the effect of the nonholonomic constraints. Then, the essential details needed for putting these equations in a suitable three-field weak form are included in Sect. 3. This provides a solid foundation for developing an accurate and efficient methodology for the temporal discretization of the equations of motion, which is done in Sect. 4. Next, a selected set of numerical results is included in Sect. 5 for three typical mechanical examples. For the first two of them, analytical solutions are available, while the third example is a benchmark problem. In this way, direct comparison of the numerical results provides strong evidence and demonstrates the advantages of the new method, over classical DAE formulations. Finally, a synopsis of the study, together with possible future extensions, is presented in Sect. 6.

2 Equations of motion

The equations of motion employed for the class of systems examined in this work have been obtained and presented in a previous publication of the authors [11]. In this section, a brief summary of the essential steps performed and the main results derived in that work are presented in order to set up the notation and enhance the completeness of this study. Specifically, by adopting the classical viewpoint of Analytical Dynamics, the motion is described by a set of generalized coordinates \(q = (q^{1} \ldots q^{n} )\), representing motion of a fictitious point \(p\) on a manifold \(M\), as a function of time \(t\) [16,17,18]. Moreover, the tangent vector \(\underline {v}\) to the motion curve at point \(p\), known as generalized velocity, belongs to an \(n\)-dimensional vector space \(T_{p} M\) [4]. Therefore, if \({\mathfrak{B}}_{e} = \{ \begin{array}{*{20}c} {\underline {e}_{\,1} } & \ldots & {\underline {e}_{\,n} \} } \\ \end{array}\) is a basis of \(T_{p} M\), vector \(\underline {v}\) can be put in the compact form \(\underline {v} = v^{i} \underline {e}_{\;i}\) by using the summation convention on repeated indices [18]. Also, the elements of the corresponding cotangent (or dual) space \(T_{p}^{ * } M\), known as covectors, represent generalized momenta [17]. The relation between a vector \(\underline {u}\) and the corresponding covector \(\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{u}^{ * }\) is established through the duality pairing

$$ \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{u}^{ * } (\underline {w} ) \equiv \langle \underline {u} ,\underline {w} \rangle ,\quad \forall \underline {w} \in T_{p}^{{}} M, $$
(1)

where \(\langle \cdot , \cdot \rangle\) is the inner product on \(T_{p} M\) [19]. Then, a dual basis \({\mathfrak{B}}_{e}^{*} = \{ \begin{array}{*{20}c} {\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{e}^{1} } & \ldots & {\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{e}^{n} \} } \\ \end{array}\) to \({\mathfrak{B}}_{e}\) can be created for \(T_{p}^{ * } M\), through the condition \(\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{e}^{i} (\underline {e}_{{j}} ) = \delta_{j}^{i}\), where \(\delta_{j}^{i}\) is a Kronecker’s delta. In dynamics, the inner product is expressed in terms of the components \(g_{ij}\) of the metric tensor at point \(p\), which are determined through consideration of the kinetic energy of the system.

When there are no motion constraints, a minimal and independent set of generalized coordinates can be selected. In general, the geometry of the corresponding configuration manifold \(M\) is non-Euclidean. For this reason, the exact solution path is determined by application of Newton’s second law in the form

$$ \nabla_{{\underline {v} }} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{p}_{M}^{*} = \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{f}_{M}^{ * } , $$
(2)

The term in the right-hand side is a covariant derivative along a path on \(M\), with tangent vector \(\underline {v}\) [10]. It is expressed in the component form

$$ \nabla_{{\underline {v} }} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{p}_{M}^{*} (t) = (\dot{p}_{i} - \Lambda_{ji}^{k} p_{k} v^{j} )\,\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{e}^{i} , $$
(3)

with \(i,j,k = 1, \ldots ,n\), where the quantities \(\Lambda_{ji}^{k}\) are known as affinities. They are components of the affine connection \(\nabla\) and dictate the transition from a tangent space to any neighboring tangent space of manifold \(M\) [19]. Moreover, covectors \({\underset\thicksim{p}}_{M}^{*} = p_{I} \,{\underset\thicksim{e}}^{I}\) and \(\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{f}_{M}^{*} = f_{I} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{e}^{I}\) represent the generalized momenta and the applied forces, respectively [10]. In fact, direct application of Eq. (1) leads to

$$ p_{i} = g_{ij} v^{j} . $$
(4)

Then, by introducing the classical matrix notation.

\(\underline {q} = (\begin{array}{*{20}c} {q^{1} } & \cdots & {q^{n} )^{T} } \\ \end{array}\), \(M = [g_{ij} ]\) and \(\underline {f} = (\begin{array}{*{20}c} {f_{1} } & \cdots & {f_{n} )^{T} } \\ \end{array}\), Equation (2) can be cast in the convenient form

$$ (M(\underline {q} )\dot{\underline {q} }\dot{)} + \underline {h} (\underline {q} ,\dot{\underline {q} }) = \underline {f} (\underline {q} ,\dot{\underline {q} },t), $$
(5)

where vector \(\underline {h} (\underline {q} ,\underline {\dot{q}} )\) includes the inertia terms related to the affinities \(\Lambda_{ij}^{k}\).

The picture changes drastically when the system is subjected to motion constraints. In particular, the class of mechanical systems examined is assumed to be subject to a set of \(k\) scleronomic nonholonomic and linearly independent constraints, with general form

$$ \dot{\psi }^{R} \equiv a_{i}^{R} (q)v^{i} = 0\;{\text{or }}\underline {\dot{\psi }} (q,\underline {v} ) \equiv A(q)\underline {v} = \underline {0} , $$
(6)

where \(A = [a_{i}^{R} (q)]\) is a known \(k \times n\) matrix. The manipulation of these constraints is quite critical for the derivation of the equations of motion. Essentially, they provide the tools to decompose the original configuration manifold \(M\) locally into an (\(n - k\))-dimensional manifold \(M_{A}\), described by an appropriate set of \(n - k\) minimal coordinates, plus \(k\) one-dimensional manifolds \(M_{R}\), one for each constraint. This is achieved by using Eq. (6) for defining a suitable set of linear operators, acting between the tangent and dual spaces of these manifolds. First, these operators help in selecting the geometric properties (i.e., metric and connection) of manifolds \(M_{A}\) and \(M_{R}\), so that Newton’s law of motion is transferred from \(M\) to \(M_{A}\) and to \(M_{R}\) (for \(R = 1, \ldots ,k\)) in an invariant form, similar to that expressed by Eq. (2) [10]. In addition, they help in splitting each element of the cotangent space \(T_{p}^{ * } M\) in a unique manner. More specifically, the elements of the special class of Newton covectors on \(M\), defined by

$$ \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{M}^{*} \equiv \nabla_{{\underline {v} }} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{p}_{M}^{*} - \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{f}_{M}^{ * } , $$
(7)

are expressed in the form

$$ \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{M}^{ * } = \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{S}^{ * } + \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{T}^{ * } , $$
(8)

with

$$ \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{S}^{ * } = E_{TD} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{A}^{ * } \;\;{\text{and}}\;\;\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{T}^{ * } = \sum\nolimits_{R = 1}^{k} {T_{RD} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{R}^{ * } } $$
(9)

The quantities \(E_{TD}\) and \(T_{RD}\) are specific linear operators defined by the constraints completely (for example, \(T_{RD} \equiv a_{i}^{R} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{e}^{i} \otimes \underline {e}_{\;R}\)). They transfer the corresponding Newton covectors \({\underset\thicksim{h}}_{A}^{ * }\) from \(M_{A}\) and \({\underset\thicksim{h}}_{R}^{ * }\) from each of the \(M_{R}\), respectively, back to \(M\). Covectors \({\underset\thicksim{h}}_{A}^{ * }\) and \({\underset\thicksim{h}}_{R}^{ * }\) are defined on \(M_{A}\) and \(M_{R}\) in accordance to Eq. (7).

Due to the presence of the motion constraints, the original set of coordinates \(q = (q^{1} \ldots \;q^{n} )\) becomes redundant. Consequently, condition (2) is no longer true and is replaced by

$$ \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{A}^{ * } = \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{0} , $$
(10)

instead. Then, by taking Eqs. (9) and (10) into account, Eq. (8) becomes

$$ \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{M}^{ * } = \sum\nolimits_{R = 1}^{k} {T_{RD} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{R}^{ * } } . $$
(11)

Next, substitution of Eqs. (3) and (4) in Eq. (7) yields

$$ \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{M}^{*} = h_{i} {\kern 1pt} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{e}^{i} , $$
(12)

with components

$$ h_{i} = (g_{ij} v^{j} )^\cdot - \Lambda_{\ell i}^{m} g_{{mj}} v^{j} v^{\ell } - f_{i} . $$
(13)

Likewise, each Newton covector \({\underset\thicksim{h}}_{R}^{*}\) on the constraint manifolds \(M_{R}\) (for \(R = 1, \ldots ,k\)) takes the form

$$ \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{R}^{*} = h_{R} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{e}^{R} , $$
(14)

with components

$$ h_{R} = (\overline{m}_{RR} \dot{\lambda }^{R})^ \cdot + \overline{c}_{RR} \dot{\lambda }^{R} - \overline{f}_{R}.$$
(15)

In the last two equations and in the sequel, the convention on repeated indices does not apply to index \(R\). Moreover, during the solution process, the terms

$$ \overline{m}_{RR} = c_{R}^{i} g_{ij} c_{R}^{j} \;\;{\text{and }}\;\;\overline{f}_{R} = c_{R}^{i} f_{i} (q,\underline {v} ,t) $$
(16)

are determined through a projection along special directions \(\underline {c}_{{R}}\) on \(T_{p} M\), for each of the constraints. In particular, the components of the \(n\)-vector \(\underline {c}_{{R}}\) are chosen so that

$$ a_{i}^{R} c_{R}^{i} = 1. $$
(17)

Finally, each coefficient \(\overline{c}_{RR}\) is selected so that the corresponding term in Eq. (15) represents a corrective force applied on the figurative point, when a velocity violation tends to develop along direction \(\underline {c}_{{R}}\). For instance, if the applied forces depend on the generalized velocity \(\underline {v}\), a convenient choice is

$$ \overline{c}_{RR} = - c_{R}^{i} \frac{{\partial f_{i} }}{{\partial v^{j} }}c_{R}^{j} . $$
(18)

Next, by combining Eqs. (11)-(15), it easily turns out that

$$ h_{i} = \sum\nolimits_{R = 1}^{k} {a_{i}^{R} h_{R} } , $$
(19)

or

$$ (g_{ij} v^{j} )^ \cdot - \Lambda_{{\ell i}}^{m} g_{{mj}} v^{j} v^{\ell } - f_{i} = \sum\nolimits_{R = 1}^{k} {a_{i}^{R} \left[ {(\overline{m}_{RR} \dot{\lambda }^{R} )^ \cdot + \overline{c}_{RR} \dot{\lambda }^{R} - \overline{f}_{R} } \right]} , $$
(20)

for \(i = 1, \ldots ,n\). Therefore, after enhancing the notation introduced by Eq. (5) with

$$ \underline {\lambda } = (\begin{array}{*{20}c} {\lambda^{1} } & \cdots & {\lambda^{k} )^{T} } \\ \end{array} ,\;\overline{M} = diag(\begin{array}{*{20}c} {\overline{m}_{11} } & \cdots & {\overline{m}_{kk} } \\ \end{array} ),\overline{C} = diag(\begin{array}{*{20}c} {\overline{c}_{11} } & \cdots & {\overline{c}_{kk} } \\ \end{array} ) $$
(21)

and the array \(\underline {\overline{f}}\), as determined by Eqs. (16)-(18), Eq. (20) can be cast in a convenient matrix form

$$ (M(\underline {q} ) \dot{\underline {q} })^ \cdot + \underline {h} (\underline {q} ,\dot{\underline {q} }) = \underline {f} (\underline {q} ,\dot{\underline {q} },t) + A^{T} (\underline {q} )[(\overline{M}\dot{\underline {\lambda } })^ \cdot + \overline{C}\dot{\underline {\lambda } } - \overline{\underline {f} }]. $$
(22)

Equation (20), or equivalently Eq. (22), corresponds to a set of \(n\) second-order ODEs, involving the \(n + k\) unknowns \(q^{i}\) and \(\lambda^{R}\). A complete mathematical formulation is obtained by including the \(k\) equations of the constraints. Originally, these are expressed by Eq. (6) but can eventually be put in the second-order ODE form

$$ (\overline{m}_{RR} \dot{\psi }^{R} )^ \cdot + \overline{c}_{RR} \dot{\psi }^{R} = 0, $$
(23)

through appropriate mappings from \(M\) to \(M_{R}\), forcing \(\dot{\psi }^{R}\) to become zero, for \(R = 1, \ldots ,k\). In contrast to cases involving holonomic constraints, there is neither a \(\psi^{R}\) term in Eq. (23) nor a \(\underline {\lambda }\) term in Eq. (22).

Complete details on the formulation presented in this section as well as an extensive comparison with previous formulations can be found in the original publication [11]. In brief, the present theoretical approach brings significant advantages when compared to other approaches applied so far in the field of Multibody Dynamics. These advantages are related to the physically consistent and correct elimination of the singularities associated with the usual sets of high-index DAEs of motion [1,2,3]. More specifically, by treating the motion constraints as an integral part of the overall process of deriving the equations of motion led to a set of dynamic Lagrange multipliers, expressed by Eq. (15). In this way, each constraint introduces effective inertia terms in Eqs. (22) and (23). Consequently, both of these equations appear now in a pure second-order ODE form, from the onset and in a natural way. In addition, the extra terms appearing in these equations are evaluated in a systematic and analytical manner through exact application of Newton’s second law on configuration manifolds possessing general geometric properties. As a result, there is no need for an ad hoc selection of their values for numerical stabilization or for scaling the constraints and the equations of motion. Some extra advantages are also realized during the development of the numerical integration process, which is started by first putting the equations of motion in a suitable multi-field weak form and is then integrated by performing an appropriate temporal discretization, as explained in Sects. 3 and 4, respectively. All these advantages are further supported and illuminated by the numerical results presented in Sect. 5.

3 Three-field weak form of the equations of motion

Starting from Eq. (11), it is straightforward to show that

$$ \int_{{t_{1} }}^{{t_{2} }} {(\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{M}^{*} - \sum\nolimits_{R = 1}^{k} {T_{RD} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{h}_{R}^{ * } } )(\underline {w} )dt} = 0,\quad \forall \underline {w} \in T_{p} M, $$
(24)

for arbitrary time instances \(t_{1}\) and \(t_{2}\). Then, by performing lengthy manipulations, including a usual operation involving integration by parts (see ref. [12] for details), the above relation leads eventually to the following weak form of the equations of motion

$$ \begin{aligned} & \left. {\left[ {(p_{i} - \sum\nolimits_{R = 1}^{k} {a_{{i}}^{R} \overline{m}_{RR} \dot{\lambda }^{R} } )w^{i} } \right]} \right|_{{t_{1} }}^{{t_{2} }} - \int_{{t_{1} }}^{{t_{2} }} {\left\{ {p_{i} } \right.[\delta v^{i} + (\Lambda_{{jk}}^{i} - \tau_{{jk}}^{i} - \sigma_{{jk}}^{i} )v^{k} w^{j} ] + f_{i} w^{i} } \\ & \; + \sum\nolimits_{R = 1}^{k} {\left[ - \right.\overline{m}_{RR} \dot{\lambda }^{R} \{ \tfrac{{Da_{i}^{R} }}{{Dt}}w^{i} + a_{{i}}^{R} [\delta v^{i} + (\Lambda_{{jk}}^{i} - \tau_{{jk}}^{i} - \sigma_{{jk}}^{i} )v^{k} w^{j} ]\} + a_{{i}}^{R} (\overline{c}_{RR} \dot{\lambda }^{R} - \overline{f}_{R} )\left. {\left. {w^{i} } \right]} \right\}} dt = 0. \\ \end{aligned} $$
(25)

The quantities \(w^{i}\) and \(\delta v^{i}\) represent variations. They are evaluated by taking into account that the variation of any scalar function \(f(q)\) on manifold \(M\) is defined as the derivative of \(f\) along an arbitrary vector \(\underline {w}\) of \(T_{p} M\), according to the rule

$$ \delta f \equiv \underline {w} (f) = \frac{\partial f}{{\partial q^{i} }}w^{i} . $$
(26)

Therefore, for each holonomic coordinate this yields \(w^{i} = \delta q^{i}\) , while a little more involved relation is obtained in case of anholonomic coordinates [12, 19]. In this way, the variation of the velocity components is defined by \(\delta v^{i} = \underline {w} (v^{i} )\). Moreover, the total time derivative \({{Da_{i}^{R} } \mathord{\left/ {\vphantom {{Da_{i}^{R} } {Dt}}} \right. \kern-\nulldelimiterspace} {Dt}}\), appearing in the second line of Eq. (25), is determined by

$$ \tfrac{{Da_{i}^{R} }}{{Dt}} = (a_{{i,j}}^{R} - \Lambda_{{ji}}^{\ell } a_{\ell }^{R} )v^{j} , $$
(27)

with partial derivatives

$$ a_{{i,j}}^{R} \equiv {{\partial a_{{i}}^{R} } \mathord{\left/ {\vphantom {{\partial a_{{i}}^{R} } {\partial q^{j} }}} \right. \kern-\nulldelimiterspace} {\partial q^{j} }}. $$

Finally, the terms \(\tau_{{jk}}^{i}\) represent components of the torsion of the connection selected on manifold \(M\) , while the quantities \(\sigma_{{jk}}^{i}\) are arbitrary constants, with \(\sigma_{kj}^{i} = - \sigma_{{jk}}^{i}\) [12].

A similar treatment of each constraint equation, expressed by Eq. (23), leads first to

$$ \int_{{t_{1} }}^{{t_{2} }} {[(\overline{m}_{RR} \dot{\psi }^{R} )^ \cdot + \overline{c}_{RR} \dot{\psi }^{R} ]\,\delta \lambda^{R} dt} = 0,\quad \forall \delta \lambda^{R} ,\quad R = 1, \ldots ,k, $$
(28)

which, after integration by parts, becomes

$$ (\overline{m}_{RR} \dot{\psi }^{R} \left. {\delta \lambda^{R} )} \right|_{{t_{1} }}^{{t_{2} }} - \int_{{t_{1} }}^{{t_{2} }} {(\overline{m}_{RR} \dot{\psi }^{R} \delta \dot{\lambda }^{R} - \overline{c}_{RR} \dot{\psi }^{R} \delta \lambda^{R} )d t} = 0. $$
(29)

Next, in order to exploit more advantages of the weak formulation, the position, velocity and momentum variables are considered as independent quantities [13, 20, 21]. For this, a new velocity field \(\underline {\upsilon }\) is introduced on manifold \(M\), which is forced to become identical to the true velocity field \(\underline {v} = {{d\underline {q} } \mathord{\left/ {\vphantom {{d\underline {q} } {dt}}} \right. \kern-\nulldelimiterspace} {dt}}\) in an average rather than in a pointwise sense through the relations

$$ \int_{{t_{1} }}^{{t_{2} }} {\delta \pi_{i} (\upsilon^{i} - v^{i} )\,dt} = 0,i = 1, \ldots ,n, $$
(30)

where \(\delta \pi_{i}\) are arbitrary constants. Likewise, a new quantity \(\mu^{R}\) is introduced for each constraint, which is forced to become identical to \(\dot{\lambda }^{R} = {{d\lambda^{R} } \mathord{\left/ {\vphantom {{d\lambda^{R} } {dt}}} \right. \kern-\nulldelimiterspace} {dt}}\), by imposing the conditions

$$ \int_{{t_{1} }}^{{t_{2} }} {\delta \sigma_{R} (\mu^{R} - \dot{\lambda }^{R} )\,dt} = 0,\,R = 1, \ldots ,k, $$
(31)

where \(\delta \sigma_{R}\) are arbitrary constants. In addition, these last sets of equations are enhanced by an accompanying set of conditions, consisting of

$$ \int_{{t_{1} }}^{{t_{2} }} {\pi_{i} \left(\delta \upsilon^{i} - \delta v^{i} \right)\,dt} = 0 $$
(32)

and

$$ \int_{{t_{1} }}^{{t_{2} }} {\sigma_{R} ({\delta \mu^{R} - \delta \dot{\lambda }^{R} } )\,dt} = 0, $$
(33)

where \(\pi_{i}\) and \(\sigma_{R}\) are appropriate Lagrange multipliers, leading to independent variations \(\delta \upsilon^{i}\), \(\delta v^{i}\) and \(\delta \mu^{R}\), \(\delta \dot{\lambda }^{R}\), respectively. Therefore, by augmenting Eq. (25) with Eq. (32) and performing another round of manipulations, it can be shown (see [12] for details) that this leads to the following variational equation

$$ \begin{aligned} & [(p_{i} - \sum\nolimits_{R = 1}^{k} {a_{{i}}^{R} \overline{m}_{RR} \mu^{R} } )\left. {w^{i} ]} \right|_{{t_{1} }}^{{t_{2} }} + \int_{{t_{1} }}^{{t_{2} }} {[(\pi_{i} + \sum\nolimits_{R = 1}^{k} {a_{{ i}}^{R} \overline{m}_{RR} \mu^{R} } - p_{i} )\delta \upsilon^{i} - \pi_{i} \delta v^{i} ]d t} \\ & - \int_{{t_{1} }}^{{t_{2} }} \left\{ (\Lambda_{ij}^{\ell } - \tau_{ij}^{\ell } - \sigma_{ij}^{\ell } )\,\upsilon^{j} (p _{\ell } - \sum\nolimits_{R = 1}^{k} a_{{ \ell }}^{R} \overline{m}_{RR} \mu^{R} ) + f_{i} + \sum\nolimits_{R = 1}^{k} [ - \dot{a}_{{ i}}^{R} \overline{m}_{RR} \mu^{R} + a_{{ i}}^{R} (\overline{c}_{RR} \mu^{R} - \overline{f}_{R} ) ] \right\} \,w^{i} d t = 0 \end{aligned} $$
(34)

A similar combination of Eqs. (29) and (33) yields

$$ (\overline{m}_{RR} \dot{\psi }^{R} \left. {\delta \lambda^{R} )} \right|_{{t_{1} }}^{{t_{2} }} + \int_{{t_{1} }}^{{t_{2} }} {\left[ {(\sigma_{R} - \overline{m}_{RR} \dot{\psi }^{R} )\delta \mu^{R} + \overline{c}_{RR} \dot{\psi }^{R} \delta \lambda^{R} - \sigma_{R} \delta \dot{\lambda }^{R} } \right]\,dt} = 0,R = 1, \ldots ,k, $$
(35)

with

$$ \dot{a}_{i}^{R} = ( {a_{{ i,j}}^{R} - a_{\ell }^{R} \Lambda_{{j i}}^{\ell } } )\;\upsilon^{j} . $$
(36)

By construction, the variations \(w^{i}\) (representing \(\delta q^{i}\) or \(\delta \vartheta^{i}\) for a true coordinate \(q^{i}\) or a pseudo-coordinate \(\vartheta^{i}\), respectively), \(\delta \lambda^{R}\), \(\delta \upsilon^{i}\), \(\delta \mu^{R}\), \(\delta \pi_{i}\) and \(\delta \sigma_{R}\) are independent for all \(i = 1, \ldots ,n\) and \(R = 1, \ldots ,k\). Consequently, Eqs. (20)-(25) can be employed to construct a dynamically equivalent set of first-order ODEs. This was done in an earlier work, leading to the classical Hamilton’s canonical equations [12]. Here, the weak form expressed by these equations is used, instead, as a foundation for performing an appropriate temporal discretization of the equations of motion, as explained in the following section.

4 Temporal discretization of the equations of motion

First, the presence of the motion constraints causes a non-flatness of the configuration space of the class of systems examined. This, in turn, makes advantageous the utilization of a special type of curves in performing the temporal discretization. In this work, these curves are selected to be the autoparallels, corresponding to the “straightest” curves on the configuration space [19, 22]. Moreover, following earlier approaches [15, 23], all the variations in Eqs. (30)-(35) are assumed to remain constant within each time interval [\(t_{m} ,t_{m + 1}\)], while the corresponding variables vary linearly in time. Then, it can be shown that these conditions convert Eqs. (30) and (31) into relations with the following general form

$$ \underline {q}_{m + 1} = \underline {q}_{m} + \underline {g} (\underline {\upsilon }_{{m + 1}} ,\underline {\upsilon }_{{m}} )\,\Delta t $$
(37)

and

$$\lambda _{m + 1}^R = \lambda _m^R + \frac{1}{2}( {\mu _{m + 1}^R + \mu _m^R} )\Delta t,R = 1, \ldots ,k,$$
(38)

where \(\Delta t = t_{m + 1} - t_{m}\) is the time step. In particular, the function \(\underline {g} (\underline {\upsilon }_{{m + 1}} ,\underline {\upsilon }_{{m}} )\) in Eq. (37) is determined in terms of the components of the connection selected. For instance, in the special case of a Euclidean configuration space [23], where \(\Lambda_{ij}^{k} = 0\), it turns out that

$$ \underline {g} (\underline {\upsilon }_{{m + 1}} ,\underline {\upsilon }_{{m}} ) = \tfrac{1}{2}(\underline {\upsilon }_{{m + 1}} + \underline {\upsilon }_{{m}} ). $$

Equations (37) and (38) represent update formulas for the generalized coordinates and the Lagrange multipliers, respectively. In addition, collecting the terms in Eqs. (34) and (35) multiplied by \(\delta \upsilon^{i}\) and \(\delta \mu^{R}\) yields

$$ \int_{{t_{1} }}^{{t_{2} }} {(\pi_{i} - p_{i} + \sum\nolimits_{R = 1}^{k} {a_{{i}}^{R} \overline{m}_{RR} \mu^{R} } )\delta \upsilon^{i} \,dt} = 0 $$
(39)

and

$$ \int_{{t_{1} }}^{{t_{2} }} {(\sigma_{R} - \overline{m}_{RR} \dot{\psi }^{R} )\delta \mu^{R} dt} = 0, $$
(40)

respectively. These equations can be used in order to update the values of the generalized momenta \(\pi_{i}\) and \(\sigma_{R}\), respectively, when necessary. Finally, collecting the remaining terms of Eqs. (34) and (35), multiplied by the variations \(w^{i}\) and \(\delta \lambda^{R}\), yields

$$ \begin{aligned} & ( {p_{i} - \sum\nolimits_{R = 1}^{k} {a_{{ i}}^{R} \overline{m}_{RR} \mu^{R} } } ) {w^{i} } |_{{t_{1} }}^{{t_{2} }} - \int_{{t_{1} }}^{{t_{2} }} {( {p_{\ell } - \sum\nolimits_{R = 1}^{k} {a_{\ell }^{R} \overline{m}_{RR} \mu^{R} } } )( {\Lambda_{ij}^{\ell } - \tau_{ij}^{\ell } - \sigma_{ij}^{\ell } } )\,\upsilon^{j} + f_{i} } \\ & \; + \sum\nolimits_{R = 1}^{k} {[ {a_{{ i}}^{R} (\overline{c}_{RR} \mu^{R} - \overline{f}_{R} ) - \dot{a}_{{ i}}^{R} \overline{m}_{RR} \mu^{R} } ]} w^{i} dt = 0 \\ \end{aligned} $$
(41)

and

$$ (\overline{m}_{RR} \dot{\psi }^{R} \left. {\delta \lambda^{R} )} \right|_{{t_{m} }}^{{t_{m + 1} }} + \int_{{t_{m} }}^{{t_{m + 1} }} {\overline{c}_{RR} \dot{\psi }^{R} \delta \lambda^{R} dt} = 0,\;R = 1, \ldots ,k, $$
(42)

respectively.

In the sequel, a summary is provided for the essential information needed in understanding the basic features of the new numerical scheme. As a result of the three-field formulation performed in this work, the set of unknowns of the resulting mathematical problem is enhanced and includes the generalized coordinates \(q^{i}\) and \(\lambda^{R}\) (i.e., the Lagrange multipliers are also considered as generalized coordinates from hereon), together with the corresponding generalized velocities \(\upsilon^{i}\) and \(\mu^{R}\) as well as with the generalized momenta \(\pi_{i}\) and \(\sigma_{R}\). In total, these quantities give rise to a set of \(3(n + k)\) unknowns. Their determination is accomplished by employing the system of Eqs. (30), (31) and (39)-(42). Here, this is achieved by developing and applying an implicit numerical scheme in order to carry out the required temporal discretization. As usual, the outcome of this process is a system of nonlinear algebraic equations, whose solution provides the values of the unknown quantities at the end \(t_{m + 1}\) of the time step considered in terms of their known values at earlier time steps. In fact, this set of equations is solved by applying a block-type iterative technique within each time step, as explained next.

First, it is assumed that the values of all the unknowns, but the components of the weak velocity vectors, defined by \(\underline {\upsilon } = (\begin{array}{*{20}c} {\upsilon^{1} } & \cdots & {\upsilon^{n} )^{T} } \\ \end{array}\) and \(\underline {\mu } = (\begin{array}{*{20}c} {\mu^{1} } & \cdots & {\mu^{k} )^{T} } \\ \end{array}\), are fixed. Then, an involved set of \(n + k\) nonlinear algebraic equations is obtained through application of Eqs. (41) and (42), which can be put in the general form

$$ \underline {\eta } (\underline {\upsilon }_{{m + 1}} ,\underline {\mu }_{m + 1} ;\underline {\upsilon }_{{m}} ,\underline {\mu }_{m} ,\underline {q}_{m} ,\underline {\lambda }_{{m}} ,\underline {\pi }_{m} ,\underline {\sigma }_{m} ) = \underline {0} . $$
(43)

In the last expression, \(\underline {\upsilon }_{{m + 1}}\), \(\underline {\mu }_{m + 1}\) and \(\underline {\upsilon }_{{m}}\), \(\underline {\mu }_{m}\) represent the values of \(\underline {\upsilon }\), \(\underline {\mu }\) at times \(t_{m + 1}\) and \(t_{m}\), respectively. Moreover, a similar meaning is also given to the vector quantities, \(\underline {q} = (\begin{array}{*{20}c} {q^{1} } & \cdots & {q^{n} )^{T} } \\ \end{array}\), \(\underline {\lambda } = (\begin{array}{*{20}c} {\lambda^{1} } & \cdots & {\lambda^{k} )^{T} } \\ \end{array}\), \(\underline {\pi } = (\begin{array}{*{20}c} {\pi_{1} } & \cdots & {\pi_{n} )^{T} } \\ \end{array}\) and \(\underline {\sigma } = (\begin{array}{*{20}c} {\sigma_{1} } & \cdots & {\sigma_{k} )^{T} } \\ \end{array}\). Following common practice, Eq. (43) is then solved by applying a Newton–Raphson approach, with respect to the unknown

$$ \underline {x} \equiv (\begin{array}{*{20}c} {\underline {\upsilon }^{T} } & {\underline {\mu }^{T} } \\ \end{array} )^{T} . $$
(44)

To achieve this, given an estimate \(\underline {x}_{{m + 1}}^{\ell }\), a corrected value \(\underline {x}_{{m + 1}}^{\ell + 1}\) is obtained, according to

$$ \underline {x}_{{m + 1}}^{\ell + 1} = \underline {x}_{{m + 1}}^{\ell } + \Delta \underline {x}^{\ell } , $$
(45)

where the correction \(\Delta \underline {x}^{\ell }\) is determined by solving the linearized problem

$$ J_{{m + 1}}^{\ell } \Delta \underline {x}^{\ell } = - {\underline {\mathcal{R}} }_{{m + 1}}^{\ell } , $$
(46)

resulting by substituting Eq. (45) into Eq. (43), with Jacobian matrix

$$ J_{{m + 1}}^{\ell } = \frac{{\partial \underline {\eta } }}{{\partial \underline {x} }}( {\underline {\upsilon }_{{m + 1}}^{\ell } ,\underline {\mu }_{{m + 1}}^{\ell } ;\underline {\upsilon }_{{ m}} ,\underline {\mu }_{m} ,\underline {q}_{m} ,\underline {\lambda }_{{m}} ,\underline {\pi }_{m} ,\underline {\sigma }_{m} } ) $$
(47)

and residual vector

$$ \underline {\mathcal{R} }_{{m + 1}}^{\ell } = \underline {\eta } ( {\underline {\upsilon }_{{m + 1}}^{\ell } ,\underline {\mu }_{{m + 1}}^{\ell } ;\underline {\upsilon }_{{m}} ,\underline {\mu }_{m} ,\underline {q}_{m} ,\underline {\lambda }_{{m}} ,\underline {\pi }_{m} ,\underline {\sigma }_{m} } ). $$
(48)

The resulting system of equations involves only \(n + k\) of the original unknowns. Each problem, as expressed by Eq. (46), is solved by employing a direct linear solver. The computations are stopped when the set of weak velocities \(\underline {x}_{{m + 1}}\) and the constraint equations are satisfied up to a prespecified accuracy or the iterations exceed a critical number. In the latter case, the time step \(\Delta t\) is reduced and the process is restarted. Next, the values of the generalized coordinates \(\underline {q}_{m + 1}\) and \(\underline {\lambda }_{{m + 1}}\) are determined through a direct update, based on Eqs. (37) and (38), respectively. The iteration process is completed when the residual in the right-hand side of Eq. (46) becomes also sufficiently small. Otherwise, the process is repeated after decreasing the time step. Finally, the new values of the momentum variables \(\underline {\pi }_{m + 1}\) and \(\underline {\sigma }_{m + 1}\) can also be obtained after the iterations are finished by using the subsystem of equations resulting from application of Eqs. (39) and (40), respectively.

For better clarity, the numerical implementation of the algorithm employed for solving the discretized set of equations of motion, given by Eqs. (41) and (42), is presented next. Here, the analysis is restricted to systems possessing rigid bodies only. In this case, through the choices \(\sigma_{ij}^{\ell } = 0\) and \(\tau_{ij}^{\ell } = \Lambda_{ij}^{\ell }\), with the affinities as determined in [10, 22], Eq. (41) is replaced by

$$ (p_{i} - \sum\nolimits_{R = 1}^{k} {a_{{i}}^{R} \,\overline{m}_{RR} \mu^{R} } )\left. {w^{i} } \right|_{{t_{1} }}^{{t_{2} }} - \int_{{t_{1} }}^{{t_{2} }} {\{ f_{i} + \sum\nolimits_{R = 1}^{k} {[a_{{i}}^{R} (\overline{c}_{RR} \mu^{R} - \overline{f}_{R} ) - \dot{a}_{{i}}^{R} \,\overline{m}_{RR} \mu^{R} ]} \} w^{i} dt} = 0. $$
(49)

This equation can be written in a convenient matrix form

$$ [{\mathcal{A}}(\underline {p} - A^{T} \overline{M}\left. {\underline {\mu } )]} \right|_{{t_{m} }}^{{t_{m + 1} }} - \int_{{t_{m} }}^{{t_{m + 1} }} {\mathcal{A}{\underline {\fancyscript{f}} }dt} = \underline {0} , $$
(50)

with

$$ \underline {\fancyscript{f}} \equiv {{\underline f }} + A^{T} (\overline{C}{\underline {\mu } } - {\overline{\underline f }}) - B^{T} \overline{M}{\underline {\mu } }\;{{\text{and} }}\;\;B \equiv \left[ {\dot{a}_{{i}}^{R} } \right], $$
(51)

where the terms \(\dot{a}_{{i}}^{R}\) are defined by Eq. (36). Moreover, the action of operator \({\mathcal{A}}\) is equivalent to the identity or the corresponding rotation matrix of a rigid body when it applies to its translational or rotational degrees of freedom, respectively. In a similar manner, Eq. (42) is also put in a matrix form

$$ [\overline{M}\,\left. {\underline {\dot{\psi }} ]} \right|_{{t_{m} }}^{{t_{m + 1} }} + \int_{{t_{m} }}^{{t_{m + 1} }} {{\underline {\fancyscript{h}} }\,dt} = \underline {0} , $$
(52)

with

$$ {\underline {\fancyscript{h}} } \equiv \overline{C}\,\underline {\dot{\psi }} . $$
(53)

Therefore, application of the classical trapezoidal rule to Eqs. (50) and (52) leads eventually to

$$ [\mathcal{A}(\underline {p} - A^{T} \overline{M}\left. {{\underline {\mu } })]} \right|_{{t_{m} }}^{{t_{m + 1} }} - \tfrac{1}{2}\Delta t\,({\mathcal{A}}_{m} {\underline {\fancyscript{f}} }_{m} + {\mathcal{A}}_{m + 1} {\underline {\fancyscript{f}} }_{m + 1} ) = \underline {0} , $$
(54)

and

$$ [\overline{M}\,\left. {\underline {\dot{\psi }} ]} \right|_{{t_{m} }}^{{t_{m + 1} }} + \tfrac{1}{2}\Delta t({\underline {\fancyscript{h}} }_{\,m + 1} + {\underline {\fancyscript{h}} }_{\,m} ) = \underline {0} , $$
(55)

respectively. Equations (54) and (55) comprise a set of nonlinear algebraic equations, having the structure of Eq. (43). Then, the residual covector of the last set of equations, defined by Eq. (48), takes the form

$${\underset\thicksim{R} }_{\,T} = (\begin{array}{*{20}c} {{\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{R} }_{v} }\,\,\, & \quad {{\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{R} }_{\mu } } \\ \end{array} ), $$
(56)

where \(\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}}_{v}\) and \(\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}}_{\mu }\) is the numerical residual of Eq. (54) and (55), respectively. Then, the square of the norm of the total residual is evaluated in the form

$$ ||\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}} _{T} ||^{2} = \begin{array}{*{20}c} \left( {\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}} _{v}^{T} } \quad {\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}} _{\mu }^{T} }\right) \\ \end{array} \left[ {\begin{array}{*{20}{c}} {{M^{ - 1}}}&0 \\ 0&{{{\bar M}^{ - 1}}} \end{array}} \right]\left( {\begin{array}{*{20}c} {\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}} _{{v}} } \\ {\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}} _{{\mu }} } \\ \end{array} } \right) = \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}} _{v}^{T} M^{{ - 1}} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}} _{v} + \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}} _{\mu }^{T} \bar{M}^{{ - 1}} \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}} _{\mu } $$
(57)

Likewise, the square of the norm of the residual of the equation constraints, given by Eq. (6), is obtained by

$$ ||{\underline {\mathcal{R}} }_{C}^{T} ||^{2} = \underline {\dot{\psi }}^{T} \overline{M}\;\underline {\dot{\psi }} . $$
(58)

For a given tolerance level, the calculations are assumed to have converged when both \(||{\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}} }_{T} ||\) and \(||{\underline {\mathcal{R}} }_{\,C} ||\) are smaller than the selected tolerance value.

5 Numerical results

In this section, a set of characteristic results is presented for three challenging mechanical examples. Special emphasis is placed on highlighting the advantages of the integration scheme developed. For this, the attention is focused on comparing numerical results with analytical results as well as with similar results arising by employing standard DAE solvers for two classical nonholonomic systems. Finally, comparison with results for a benchmark problem involving nonholonomic constraints is also performed.

Specifically, the numerical solutions captured by the method presented in this work (indicated by the label NM-ODE) are compared with existing analytical solutions [5] and results of a well-known benchmark problem [24, 25]. Moreover, the results are compared with similar results, obtained by using two state-of-the-art commercial codes [26, 27]. More specifically, these codes set up the equations of motion as a system of high-index DAEs and solve them numerically, by employing classical integration schemes, based on backward differentiation formulas. In particular, the GSTIFF and DASPK method were selected in solving the equations of motion by ADAMS and Motion Solve. Finally, results obtained by applying the new method after setting

$$ h_{R} = \lambda^{R}\; \;{\text{with}}\;\;\overline{m}_{RR} = 0,\; \overline{c}_{RR} = 1\;\;{\text{and }}\;\;\overline{f}_{R} = 0, $$
(59)

in Eq. (20), for \(R = 1, \ldots ,k\), are also included. In this way, the set of equations employed is reduced to the following system of equations of motion

$$ (M(\underline {q} ) \dot{\underline {q} })^ \cdot + \underline {h} (\underline {q} ,\dot{\underline {q} }) = \underline {f} (\underline {q} ,\dot{\underline {q} },t) + A^{T} (\underline {q} )\underline {\lambda } , $$
(60)

which is identical to that employed by multibody dynamics DAE formulations [28,29,30]. Moreover, the value

$$ \overline{m}_{RR} = 1 $$
(61)

is also selected in Eq. (23). In the sequel, this modified set of equations is referred to as MM-DAE.

5.1 Sphere rolling inside a cylinder

In the first example, motion of a sphere of unit mass and radius \(a\), rolling on the rough inside wall of a fixed vertical cylinder with radius \(b\), is investigated. The sphere and the cylinder, together with a fixed coordinate system \(Oxyz\) and a rotating coordinate system \(Ox_{1} y_{1} z_{1}\), are shown in Fig. 1. Moreover, the action of gravity is along the negative \(Oz\) axis. Then, if \(\{ \begin{array}{*{20}c} {\underline {e}_{\;x} } & {\underline {e}_{\;y} } & {\underline {e}_{\;z} } \\ \end{array} \}\) and \(\{ \begin{array}{*{20}c} {\underline {e}_{\;1} } & {\underline {e}_{\;2} } & {\underline {e}_{\;3} } \\ \end{array} \}\) are appropriate orthonormal bases for the coordinate frames \(Oxyz\) and \(Ox_{1} y_{1} z_{1}\), respectively, it easily turns out that

$$ \underline {e}_{\;1} = \underline {e}_{\;2} \times \underline {e}_{\;3} = \frac{{\underline {e}_{\;z} \times \underline {r} }}{{||\underline {e}_{\;z} \times \underline {r} ||}} \times \underline {e}_{\;z} \quad \Rightarrow \quad \underline {e}_{\;1} = \frac{1}{{||\underline {e}_{\;z} \times \underline {r} ||}}(I_{3} - E)\underline {r} , $$
(62)

where \(\underline {r} = \underline {r}_{OG}\) is the position vector of the center of mass \(G\) of the sphere, \(I_{3}\) is the \(3 \times 3\) identity matrix and

$$ E = \underline {e}_{\;z} \underline {e}_{\;z}^{T} . $$
Fig. 1
figure 1

A sphere rolling on a fixed vertical cylinder

In addition, if \(C\) is the contact point of the sphere with the cylinder, the condition of rolling without slipping of the sphere on the cylinder is expressed by

$$ \underline {v}_{C} = \underline {0} \quad \Rightarrow \quad \underline {v}_{G} + \underline {\omega } \times \underline {r}_{GC} = \underline {0} , $$
(63)

where \(\underline {\omega }\) is the angular velocity of the sphere and \(\underline {r}_{GC} = a\underline {e}_{1}\). Therefore, after relating the components of the angular velocity of the sphere in the \(Oxyz\) and a body frame (fixed in the sphere), through the corresponding rotation matrix \(R\), i.e.,

$$ \underline {\omega } = R\,\underline {\Omega } , $$

the rolling condition is put eventually in the form

$$ \underline {v}_{G} + \tilde{\omega }\,\underline {r}_{GC} = \underline {v}_{G} - \tilde{r}_{GC} (R\,\underline {\Omega } ) = \underline {0} . $$

As usual, \(\tilde{\omega }\) represents the \(3 \times 3\) antisymmetric matrix corresponding to the 3-vector \(\underline {\omega }\) [1]. Equivalently, after performing some straightforward operations, this leads to

$$\left[I_{3}-\frac{a}{||\underline{e}_{{z}} \times \underline{r}||}\{(\widetilde {{I_3} - E})\underline{r}\}R\right] \left(\begin{array}{c} \underline{v} _{{G}} \\ \underline{\Omega} \end{array} \right) = \underline{0} .$$
(64)

This condition belongs to the class of constraints expressed by Eq. (3) with

$$A=\left[I_{3}-\frac{a}{||\underline{e}_{{z}} \times \underline{r}||}\{(\widetilde {{I_3} - E})\underline{r}\}R\right] \quad and \quad \underline{v} =\left(\begin{array}{c} \underline{v} _{{G}} \\ \underline{\Omega} \end{array} \right).$$

An exact solution for this problem can be found in pp. 95–98 of ref. [5].

Next, a selected set of numerical results is presented in Fig. 2. These results were obtained for the parameter values \(a = 0.4\;{\text{m}}\), \(b = 1\;{\text{m}}\), \(z_{0} = 1.224\;{\text{m}}\), \(\omega_{z0} = \omega_{30} = - 5\;{\text{rad/s}}\) and a gravity acceleration \(g = 9.81\;{{\text{m}} \mathord{\left/ {\vphantom {{\text{m}} {{\text{s}}^{{2}} }}} \right. \kern-\nulldelimiterspace} {{\text{s}}^{{2}} }}\). Also, selecting the amplitude \(A = 1\;{\text{m}}\) and the phase \(\mathscr{E} = 0\) in the exact expression of \(\omega_{2}\), presented by Eq. (2.24) in [5], leads to the initial angular velocity values \(\omega_{20} = 0\) and \(\omega_{10} = - 20.265\;{\text{rad/s}}\).

Fig. 2
figure 2

Rolling sphere on a fixed vertical cylinder: a vertical displacement \(z\) of the sphere center for \(0 < t < 10\;\sec\), b displacement \(z\) for \(10\;\sec < t < 20\;\sec\), c displacement \(z\) for \(95\;\sec < t < 100\;\sec\), d mechanical energy for \(0 < t < 5\;\sec\), e norm \(||{\underline {\mathcal{R}} }_{\,C} ||\) of the residual of the constraint equations for \(0 < t < 5\;\sec\), f time step for \(0 < t < 5\;\sec\)

First, in Fig. 2a are presented results for the time history of the vertical displacement \(z\) of the sphere center. According to the analytical predictions, the sphere center executes a harmonic oscillation. This is obvious from the continuous curve in Fig. 2a, representing the exact solution. Also, identical results were obtained by the new numerical method (NM-ODE), represented by the full dots. However, the picture arising by employing the DAE solvers is quite different. First, only Motion Solve run and provided results for this example, while attempts to run it with ADAMS were not successful. In any case, the results obtained by Motion Solve, using the higher tolerance value, start deviating from the very beginning. In addition, decreasing the tolerance value causes a temporary improvement, which is quickly lost as time increases. This is verified by the results presented in Fig. 2b. Similar behavior is exhibited by the MM-DAE method, for two different tolerance values. In fact, such behavior is typical of all DAE formulations. Due to the missing terms in the equations of motion and the constraint equations, as presented by Eqs. (59) and (60), initial errors in the numerical values increase with time and explode eventually, independently on their initial magnitude and the tolerances imposed. On the other hand, including the extra terms, as presented in Sect. 2, the new method is capable of preserving numerical stability in the calculations. For instance, the results of Fig. 2c indicate this accurate and stable performance of the new method for a much later time interval. This provides a clear demonstration of the advantages associated with the new set of equations of motion employed and the numerical scheme developed in this work.

The gradual worsening in the quality of the solution obtained by the DAE solvers, as time goes on, can also be realized by looking at the mechanical energy of the system. Since there is no slipping event, the system examined is conservative. This means that its mechanical energy should be preserved. This is clearly the case for the results obtained by the new method, as illustrated in Fig. 2d. On the contrary, the results obtained by the DAE solvers exhibit a gradual and noticeable change in the mechanical energy. Similar behavior has also been observed and reported in other applications [8, 9, 15].

Finally, some more light is shed on the performance of the numerical methods employed by looking at the time variation of the norm \(||{\underline {\mathcal{R}} }_{\,C} ||\) of the residual of the constraint equations and the corresponding time steps. In all cases, an initial value of 0.01 s was selected for the time step. First, the results in Fig. 2e and f indicate that the new method converges to the correct solution by keeping the time step constant to the initial value of 0.01 s throughout the calculations, for a prespecified value of the tolerance \(||{\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{\mathcal{R}} }_{T} ||\). On the other hand, the results in Fig. 2e demonstrate that in order for all the DAE numerical schemes applied to converge to a solution, independently of how good or bad their ultimate accuracy is, the norm \(||{\underline {\mathcal{R}} }_{\,C} ||\) should be reduced to extremely small levels eventually. As a consequence, the corresponding time step must also be reduced dramatically (i.e., more than two orders of magnitude), as verified by the results included in Fig. 2f. This demonstrates the numerical efficiency of the new method.

5.2 The falling rolling disk on a horizontal plane

In the second example, dynamics of a circular rigid disk, rolling without sliding on a horizontal plane, is examined. The disk has a unit mass and its radius is \(a\). Moreover, the diametral and polar mass moments of inertia of the disk with respect to its center of mass \(G\) are known. The position of the disk is completely specified by five generalized coordinates, defined in Fig. 3. Namely, the coordinates \(x\) and \(y\) of the lowest point A of the disk, which is in contact with the horizontal plane, with respect to a frame \(Oxyz\), together with three orientation angles \(\theta\), \(\varphi\) and \(\psi\). The frame \(Oxyz\) is fixed on the ground, so that the gravity force is along the negative \(Oz\) axis, with gravity acceleration \(g\).

Fig. 3
figure 3

A falling rolling disk on a horizontal plane

If \(\left\{ {\begin{array}{*{20}c} {\underline {e}_{\;x} } & {\underline {e}_{\;y} } & {\underline {e}_{\;z} } \\ \end{array} } \right\}\) and \(\left\{ {\begin{array}{*{20}c} {\underline {e}_{\,\xi } } & {\underline {e}_{\,\eta } } & {\underline {e}_{\,\zeta } } \\ \end{array} } \right\}\) are orthonormal bases for the fixed coordinate frame \(Oxyz\) and the moving frame \(O\xi \eta \zeta\), shown in Fig. 3, respectively, it turns out that

$$ \underline {e}_{\eta } = \underline {e}_{\zeta } \times \underline {e}_{\xi } = \underline {e}_{\zeta } \times (\frac{{\underline {e}_{z} \times \underline {e}_{\zeta } }}{{||\underline {e}_{z} \times \underline {e}_{\zeta } ||}})\quad \Rightarrow \quad \underline {e}_{\eta } = \frac{{(I_{3} - RER^{T} )\underline {e}_{z} }}{{||(I_{3} - RER^{T} )\underline {e}_{z} ||}}, $$
(65)

where \(R\) is the rotation matrix between the fixed frame \(Oxyz\) and a frame fixed on the disk, while

$$ \underline {e}_{\zeta } = R\underline {e}_{2} \;\;{\text{and }}\;E = \underline {e}_{2} \underline {e}_{2}^{T} = \left( {\begin{array}{*{20}c} 0 \\ 1 \\ 0 \\ \end{array} } \right)(\begin{array}{*{20}c} 0 & 1 & 0 \\ \end{array} ) = \left[ {\begin{array}{*{20}c} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \\ \end{array} } \right]. $$

Then, if the disk center of mass is located at point \(G\)

$$ \underline {r}_{GA} = - a\underline {e}_{\eta } $$

and the condition of rolling of the disk without slipping on the ground is expressed by

$$ \underline {v}_A = \underline {0} \quad \Rightarrow \quad \underline {v}_G + \underline {\omega } \times \underline {r}_{GA} = \underline {0} , $$
(66)

where \(\underline {\omega }\) is the angular velocity of the disk. Therefore, after some manipulation, the rolling condition can eventually be written in the form

$$\left[ {\begin{array}{*{20}c} {I_{3} } { - \frac{a}{{||(I_{3} - RER^{T} )\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle-}$}}{e} _{z} ||}}\left\{ {\widetilde {({I_3} - RER^{T}} )\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle-}$}}{e} _{z} } \right\}} \\ \end{array} R} \right]\left( {\begin{array}{*{20}c} {\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle-}$}}{v} _{G} } \\ {\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle-}$}}{\Omega } } \\ \end{array} } \right) = \underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle-}$}}{0} $$
(67)

which belongs to the class of constraints expressed by Eq. (3).

In all the subsequent numerical examples, the disk radius was selected as \(a = 1\;m\), the diametral and polar mass moment of inertia of the disk with respect to its center \(G\) was 0.25 and \(0.5\;kg\,m^{2}\), respectively, while the gravity acceleration was chosen as \(g = 9.81\;{m \mathord{\left/ {\vphantom {m {s^{2} }}} \right. \kern-\nulldelimiterspace} {s^{2} }}\). Also, without a loss in generality, the initial values of the coordinates \(x\), \(y\), \(\varphi\) and \(\psi\) were selected to be zero. Finally, for compatibility in the notation with [5], the angular velocity \(\underline {\omega }\) of the disk is expressed in the moving frame \(O\xi \eta \zeta\) as

$$ \underline {\omega } = - \dot{\theta }\underline {e}_{\,\xi } + \dot{\varphi }(\cos \theta \underline {e}_{\,\eta } + \sin \theta \underline {e}_{\,\zeta } ) + \dot{\psi }\underline {e}_{\,\zeta } \equiv p\underline {e}_{\,\xi } + q\underline {e}_{\,\eta } + r\underline {e}_{\,\zeta } , $$
(68)

so that the components of the angular velocity in the moving frame are

$$ p = - \dot{\theta },\quad q = \dot{\varphi }\cos \theta ,\quad = \dot{\psi } + \dot{\varphi }\sin \theta . $$
(69)

A quite complete analysis of the dynamics of the disk under the action of gravity, together with an investigation of certain stability issues, is presented in pp. 55–60 of ref. [5]. In general, an arbitrary set of initial conditions leads to complex motions, with a variable angle \(\theta\). However, certain combinations of the system initial parameters lead to special motions. One such category of motions are the cyclic motions, which are characterized by constant \(\theta\), \(q\) and \(r\). Namely, for some special cases with \(\theta = \theta_{0} \ne 0\), the point of the disk in contact with the ground undergoes a circular orbit. Instead, when \(\theta_{0} = 0\), the disk can follow a uniform rectilinear rolling or a uniform spinning about a fixed vertical diameter [5].

First, in Fig. 4 are presented results obtained for \(\theta_{0} = 1^{{^\circ }}\), \(p_{0} = q_{0} = 0\) and three different initial values \(r_{0}\). For this set of initial conditions, the results presented indicate that complex motions arise, with time varying \(\theta\), \(p\), \(q\) and \(r\). In all cases examined, the results of the new method are found to be virtually indistinguishable from those obtained by the analytical solution, verifying the accuracy of the new method. Moreover, in terms of dynamics, the results demonstrate that as the absolute value of \(r_{0}\) increases, the magnitude of the variations of \(\theta\), \(p\), \(q\) and \(r\) decreases gradually. Eventually, trajectories and dynamics with \(\theta\), \(q\) and \(r\) approaching constant values are reached, for sufficiently large absolute value of \(r_{0}\), corresponding to cyclic motions.

Fig. 4
figure 4

Time histories for a rolling disk on a horizontal plane for \(\theta_{0} = 1^{o}\) and three different initial values \(r_{0}\): a inclination angle \(\theta\), b \(p\), c \(q\) and d \(r\)

The dynamics of the motions presented in Fig. 4 is illuminated in a better way by Fig. 5a, depicting the corresponding trajectories of the disk contact point on the horizontal plane. The orbits obtained exhibit a geometric complexity for a small absolute value of \(r_{0}\). This complexity is diminished gradually as the absolute value of \(r_{0}\) increases and the orbit tends to reach a clean circular shape. In addition, the results of Fig. 5b, obtained for the largest absolute value of \(r_{0}\), that is \(r_{0} = - 2.25\;{{{\text{rad}}} \mathord{\left/ {\vphantom {{{\text{rad}}} {\text{s}}}} \right. \kern-\nulldelimiterspace} {\text{s}}}\), with \(\theta_{0} = 0.5^{o}\), indicate that the radius of the circular trajectory increases as the value of \(\theta_{0}\) decreases. In this way, the motions examined reach another special type of motion, known as uniform rectilinear rolling, in the limit value \(\theta_{0} = 0\) [5].

Fig. 5
figure 5

Trajectories of the disk contact point on the horizontal plane: a \(\theta_{0} = 1^{o}\) and three different initial values \(r_{0}\), b \(\theta_{0} = 0.5^{o}\) or \(\theta_{0} = 1^{o}\) and \(r_{0} = - 2.25\;{{{\text{rad}}} \mathord{\left/ {\vphantom {{{\text{rad}}} {\text{s}}}} \right. \kern-\nulldelimiterspace} {\text{s}}}\)

Cyclic motions, with \(\theta\), \(q\) and \(r\) constant, can be captured from the start, through an appropriate choice of the initial conditions. For instance, the results presented in Fig. 6 were obtained for \(\theta_{0} = 20^{o}\), \(p_{0} = 0\) and \(q_{0} = 1\;{{{\text{rad}}} \mathord{\left/ {\vphantom {{{\text{rad}}} {\text{s}}}} \right. \kern-\nulldelimiterspace} {\text{s}}}\), while the value of \(r_{0}\) was selected by using Eq. (2.9) of [5]. Once again, the new method (NM-ODE) gives identical results with the analytical solution. In addition, the pathologies of the DAE methods appear in this case as well. More specifically, results obtained by the MM-DAE method for the time histories of the inclination angle \(\theta\) and angular velocity component \(r\) are first shown in Fig. 6a and b, respectively. These results demonstrate a gradual and monotonically increasing loss of accuracy in the computations, as time goes on. Furthermore, decreasing the tolerance value causes an improvement, which is only temporary. Similar behavior was also noticed for the other two angular velocity components \(p\) and \(q\). As a consequence of these computational errors, the trajectory of the disk contact point on the horizontal plane starts deviating from the circular orbit, as shown in Fig. 6c, for the higher tolerance value. The result for the lower tolerance value is not included since it leads to similar behavior and just complicates the figure. In any case, the results indicate a gradual decrease in the radius of the orbit. This is justified by looking at the corresponding time histories of the disk mechanical energy, which are included in Fig. 6d. Obviously, the new method predicts a constant energy state, which is correct, while omission of the extra terms in the governing equations and the constraint equations leads to a gradual loss of energy.

Fig. 6
figure 6

Comparison of cyclic motions obtained by the analytical method, the new numerical method and its DAE counterpart: a history of the inclination angle \(\theta\), b history of angular velocity component \(r\), c trajectory of the disk contact point on the horizontal plane and d mechanical energy of the disk

Finally, the study focused on motions with \(\theta = 0\), where the disk executes a uniform rectilinear rolling. In the first set of results, presented in Fig. 7, the initial values \(\theta_{0} = 0\), \(p_{0} = 0\) and \(q_{0} = 0\) were selected. At the same time, the initial value \(r_{0}\) was chosen based on results of a stability analysis. Specifically, a critical value \(r_{cr}\) was selected, based on Eq. (2.14) of [5]. For the chosen combination of parameters, this numerical value was \(r_{cr} = 1.808\;{{{\text{rad}}} \mathord{\left/ {\vphantom {{{\text{rad}}} {\text{s}}}} \right. \kern-\nulldelimiterspace} {\text{s}}}\). Results were also obtained for a higher value (\(r_{0} = 2r_{cr}\)) and a lower value (\(r_{0} = 0.9\,r_{cr}\)), corresponding to a supercritical and a subcritical case, respectively. For each of these cases, the trajectory of the disk contact point on the horizontal plane and the corresponding history of the inclination angle \(\theta\) are shown in Fig. 7. In all cases, the results of the new method were found to coincide with those obtained by the analytical solution, once again. Specifically, the trajectory of the disk contact point on the horizontal plane was a straight path, while the angle \(\theta\) remained zero for all times. In fact, this was possible even after selecting an arbitrarily large time step and tolerance value, since the specific motion (translation along a line plus rotation about a fixed axis) takes place along an autoparallel curve of the configuration space. However, the picture was quite different for the results obtained by using ADAMS. Namely, significant deviations were observed to occur, especially in the critical case and became even more pronounced in the subcritical case. Moreover, it is apparent that decreasing the tolerance level in the calculations does not prevent initial errors from increasing as time increases.

Fig. 7
figure 7

Uniform rectilinear rolling motions of the disk (\(p_{0} = 0\)). Trajectory of the disk contact point on the horizontal plane and history of angle \(\theta\) for: a and b a supercritical case, with \(r_{0} = 2r_{cr}\), c and d the critical case (\(r_{0} = r_{cr}\)), e and f a subcritical case, with \(r_{0} = 0.9\,r_{cr}\)

Some important and rapid changes were observed to occur in the disk motion by imposing a small perturbation in the value of \(p_{0}\). For instance, in Fig. 8 is presented a similar set of results, obtained for the same set of parameters as in the previous example, but with \(p_{0} = - 0.1\;{{{\text{rad}}} \mathord{\left/ {\vphantom {{{\text{rad}}} {\text{s}}}} \right. \kern-\nulldelimiterspace} {\text{s}}}\), instead. In this case, the trajectory exhibits some noticeable deviations from a straight line. At the same time, the inclination angle \(\theta\) also takes nonzero values. These deviations are relatively small in the supercritical range but are amplified quickly with a reduction in the value of parameter \(r_{0}\), especially for values smaller than \(r_{cr}\), where the changes are quite rapid and the motion deviates quickly and significantly from the rectilinear motion. Once again, the results of the new method coincide with those obtained by utilizing the analytical solution, in all cases examined. In contrast, all the predictions of the DAE method employed are quite unreliable. Moreover, these predictions are subject to qualitatively similar errors with the case \(p_{0} = 0\).

Fig. 8
figure 8

Perturbed rectilinear rolling motions of the disk (\(p_{0} = - 0.1\;{{{\text{rad}}} \mathord{\left/ {\vphantom {{{\text{rad}}} {\text{s}}}} \right. \kern-\nulldelimiterspace} {\text{s}}}\)). Trajectory of the disk contact point on the horizontal plane and history of inclination angle \(\theta\) for: a and b a supercritical case, with \(r_{0} = 2\,r_{cr}\), c and d the critical case (\(r_{0} = r_{cr}\)) and e and f a subcritical case, with \(r_{0} = 0.9\,r_{cr}\)

5.3 The uncontrolled bicycle

In the final example, results of the new method are compared with results available for a benchmark problem [31]. More specifically, response of an uncontrolled bicycle problem presented first in [24] is investigated. The corresponding mechanical model consists of four rigid members (i.e., the rear and front frame assembly, together with the rear and front wheel), as shown in Fig. 9. All the parameters of this model are taken from [31].

Fig. 9
figure 9

The uncontrolled bicycle (taken from [31])

Assuming that both wheels roll on the ground without slipping, introduces nonholonomic constraints in the formulation. Eventually, the model examined possesses three degrees of freedom. Namely, the tilt or roll angle, the steering angle and the forward displacement of the bicycle. The bicycle is under gravity forcing, acting along the \(z\) axis. Also, at the starting position, the bicycle is in a vertical position and the steering is straight. Then, it is given an initial forward velocity, together with some roll velocity as a perturbation. According to a stability analysis of the reference position [24, 25], the subsequent motion of the bicycle is stable only when the forward speed lies within an interval of two critical values, say \(v_{c1}\) and \(v_{c2}\).

In particular, when the forward speed of the bicycle is smaller than \(v_{c1}\), the instability is static in nature [24, 25]. In accordance to the benchmark problem, selecting a forward speed of 4.0 m/s and a roll angle speed of 0.05 rad/s leads to Figs. 10a–c for the time histories of the forward velocity, the roll angle and the steer angle, respectively, over the first 20 s of the motion. Likewise, in Fig. 10d is shown the corresponding mechanical energy \(E_{m}\) of the system. In all cases, the benchmark results are represented by continuous curves, while the results of the new method are indicated by broken lines with full dots.

Fig. 10
figure 10

Time histories for the: a forward velocity, b roll angle, c steer angle and d mechanical energy of the bicycle, for an initial forward velocity lower than \(v_{c1}\) (subcritical range)

The virtual coincidence of the results illustrates the accuracy of the new method. Moreover, the corresponding percentage of variation of the mechanical energy \(E_{m}\) [31], defined by

$$ p_{E} = 100\,[\max (E_{m} ) - \min (E_{m} )]/E_{m0} , $$
(70)

was calculated to be \(5.5 \cdot 10^{ - 4}\), which is much better than the value of \(17.0 \cdot 10^{ - 4}\), obtained by the reported benchmark results.

Similarly, the results presented in Fig. 11 were obtained for an initial forward velocity value of the bicycle lying between the two critical values \(v_{c1}\) and \(v_{c2}\), leading to an asymptotically stable solution [24, 25]. More specifically, these results were obtained for a forward speed of 4.6 m/s and a roll angle speed of 0.50 rad/s. In addition, the corresponding percentage of variation of the mechanical energy was calculated to be \(5.2 \cdot 10^{ - 4}\), which is better than the value of \(9.5 \cdot 10^{ - 4}\) determined by the reported benchmark results. Once again, the results illustrate the numerical accuracy and stability properties of the new method.

Fig. 11
figure 11

Time histories for the: a forward velocity, b roll angle, c steer angle and d mechanical energy of the bicycle, for an initial forward velocity between \(v_{c1}\) and \(v_{c2}\) (stable range)

Finally, similar conclusions can be drawn by considering the set of results presented in Fig. 12. These results were obtained for an initial forward velocity value of the bicycle greater than \(v_{c2}\), leading to an oscillatory unstable solution [24, 25]. More specifically, these results were obtained for a forward speed of 8.0 m/s and a roll angle speed of 0.05 rad/s. In this case, the corresponding percentage of variation of the mechanical energy was calculated to be \(0.105 \cdot 10^{ - 4}\), which is about the same with the benchmark value of \(0.106 \cdot 10^{ - 4}\).

Fig. 12
figure 12

Time histories for the: a forward velocity, b roll angle, c steer angle and d mechanical energy of the bicycle, for an initial forward velocity larger than \(v_{c2}\) (supercritical range)

In closing this section, it is mentioned that results obtained by application of all the DAE methodologies applied in the earlier examples were quite different than the benchmark results, in all three cases examined for the bicycle example. Also, qualitatively similar results were obtained for other typical mechanical systems subject to nonholonomic constraints, arising from a sliding rather than a rolling action (e.g., knife-edge, Chaplygin’s sleigh [4, 5]).

6 Synopsis and extensions

The basic ingredients of a new method developed for the numerical integration of the equations of motion governing the behavior of multibody mechanical systems, involving nonholonomic motion constraints, were presented in the first part of this work. This method was founded on several new developments. Initially, an appropriate set of equations of motion was employed, consisting of a coupled and strongly nonlinear system of second-order ODEs for both the generalized coordinates and the Lagrange multipliers. These equations include suitable terms, causing an automatic stabilization and scaling of the governing equations and the equations of the constraints. These terms were obtained by a systematic and consistent application of Newton’s law of motion, avoiding ad hoc and incorrect selections of parameters. Then, these equations were put eventually in a three-field weak form, by treating the generalized coordinates, velocities and momenta as independent quantities. Finally, a suitable temporal discretization scheme was developed for the class of systems examined, based on this solid theoretical foundation.

The robustness, accuracy and efficiency of the new numerical method were demonstrated in the second part of this study by applying it to typical mechanical examples of nonholonomic mechanics. First, dynamics of the classical example of a sphere rolling inside a cylinder was examined. Then, dynamics of a falling rolling disk on a horizontal plane was investigated in detail. For both of these examples, analytical solutions are available. In all cases examined, the results of the new method were found to be virtually coincident with those obtained by the analytical solution, validating the excellent accuracy and stability properties as well as the numerical efficiency of the new method in the best possible way. Moreover, special emphasis was placed on comparing the results of the new method with those obtained by application of classical DAE approaches. This brought up and illustrated the classical instability problems arising when using such methods. Similar conclusions were also drawn by considering a well-known benchmark problem, referring to response and stability of an uncontrolled bicycle model. Once again, comparison of the numerical results verified the accuracy and stability properties of the new method.

The new method can easily be applied to more complex and challenging mechanical systems, possessing a large number of degrees of freedom [32]. In such cases, it is quite possible to run into cases involving the presence of redundant constraints and/or the appearance of singular configurations during the motion of the system. Then, in order to be able to accommodate such numerically difficult situations, the new method should first be extended to an augmented Lagrangian formulation. Finally, the present formulation can provide a solid basis to develop a numerical scheme for systems with unilateral constraints. In fact, it will be quite helpful in efforts to examine special situations arising in contact problems, where conditions of contact are fulfilled temporarily or change instantly [33,34,35]. In such cases, where the unilateral constraints can be treated as bilateral up to their violation, the constraints cannot be put in an integrable form and should therefore be treated as nonholonomic.