Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Research Article

Advances in Mechanical Engineering


2019, Vol. 11(6) 1–15
Ó The Author(s) 2019
Cone complementarity approach for DOI: 10.1177/1687814019856748
journals.sagepub.com/home/ade
dynamic analysis of multiple
pendulums

Xinxin Yu , Oleg Dmitrochenko, Marko K Matikainen ,


Grzegorz Orzechowski and Aki Mikkola

Abstract
The multibody system dynamics approach allows describing equations of motion for a dynamic system in a straightfor-
ward manner. This approach can be applied to a wide variety of applications that consist of interconnected components
which may be rigid or deformable. Even though there are a number of applications in multibody dynamics, the contact
description within multibody dynamics still remains challenging. A user of the multibody approach may face the problem
of thousands or millions of contacts between particles and bodies. The objective of this article is to demonstrate a com-
putationally straightforward approach for a planar case with multiple contacts. To this end, this article introduces a planar
approach based on the cone complementarity problem and applies it to a practical problem of granular chains.

Keywords
Multibody dynamics, contact analysis, semi-implicit Euler method, Coulomb friction

Date received: 7 March 2018; accepted: 17 May 2019

Handling Editor: James Baldwin

Introduction collision dynamics can be simultaneously applied to


describing the behavior of granular chains. Individual
A multibody system consists of a number of bodies multiple pendulums have been studied in the literature
which can interact via constraints or forces. The forces solely as a physics problem5,6 with different practical
can be described conditionally if, for example, there is applications in the analysis of walking7–9 or bearings
physical contact between the bodies. Accordingly, a absorbing earthquake shocks.10
number of individual solid bodies in a bulk of granular Regardless of the applications, the problem of inter-
material1 can move freely until they establish contact acting pendulums is theoretically challenging and fasci-
with other bodies or solid walls during which the con- nating. Techniques of multibody dynamics can be
tact (collision) forces (impulses) alter the response of combined with the collision dynamics of colliding pairs
the bodies. to obtain the mutual interactions of pendulums in time.
Granular chains2 are shown to be proper models for Obviously, the time integrals of interactions are depen-
polymers driven far from equilibrium.3 In the applica- dent on a number of geometric and physical
tion of granular chains, it is important to obtain an
accurate multiple impact models with a numerical
method. Models which are governed by Newton’s and Mechanical Engineering, LUT University, Lappeenranta, Finland
Poisson’s restitution law are widely used in describing
Corresponding author:
the contact laws. Coulomb’s unilateral contact law with Xinxin Yu, Mechanical Engineering, LUT University, Yliopistonkatu 34,
dry friction can be used to model the interaction 53850 Lappeenranta, Finland.
between multiple particles.4 Multibody dynamics and Email: xinxin.yu@lut.fi

Creative Commons CC BY: This article is distributed under the terms of the Creative Commons Attribution 4.0 License
(http://www.creativecommons.org/licenses/by/4.0/) which permits any use, reproduction and distribution of the work without
further permission provided the original work is attributed as specified on the SAGE and Open Access pages (https://us.sagepub.com/en-us/nam/
open-access-at-sage).
2 Advances in Mechanical Engineering

parameters in the system under investigation. If one Therefore, the selection has to be done with care keep-
wants to simulate the granular with many contacts suc- ing in mind that the system does not lead to unneces-
cessfully, small time steps which can achieve numerical sary high eigenfrequencies.
stability may be needed. Therefore, these issues moti- In the two-dimensional Coulomb case, this article
vate researchers to investigate the innovative time inte- introduces an optimization-based method of the cone
gration method to deal with the multiple contacts. In complementarity problem (CCP) for the simulation of
this field, Pang11 has investigated in-depth time integra- interacting multiple pendulums. This method is used
tion methods for calculating multiple frictional contacts for the simulation of non-smooth rigid multibody
with local compliance. dynamics with collision, contact, and friction, solving a
Using unilateral constraints, complementarity for- convex quadratic program based on a fixed time step.22
mulas can compute contact impulses to avoid penetra- Tasora et al. have chosen to use the interior
tion between rigid bodies. Simulations of multiple point method with a CCP, which turned out to be
contacts can be performed with linear complementarity more accurate than the Gauss-Jacobi.21 M Anitescu
problem (LCP) and nonlinear complementarity prob- and colleagues23,24 have proposed a time integration
lem (NCP) methods. When solving the time integration formulation method and a fixed-point iteration algo-
problem, LCP can unify linear and quadratic program- rithm to solve a large CCP with low calculation which
mer solvers.12 The methods of Gauss–Seidel and Jacobi can handle large-scale contacts and large granular flow
are widely used to solve LCP. For the numerical solu- problems. Alessandro Tasora et al. have found that the
tion of a large-scale symmetric positive-definite LCP, fixed-point iteration algorithm displays linear complex-
Kocvara and Zowe13 have proposed an algorithm. Yao ity when solving a large CCP. In other words, the simu-
et al.14 have established a linear complementary model lation time could increase linearly when the number of
to describe the non-holonomic system with friction by bodies increases in the model.21 The complementarity
LCP. However, while the friction is nonzero or minor, condition to build a Coulomb dry friction model com-
the time integration interpretation will be lost, which bined with a non-penetration condition in a spatial case
makes the LCP solver imprecise.15 Therefore, a more is introduced in Negrut et al.18
complex NCP which can be seen as an extension of
This article provides an important opportunity to
LCP was proposed. DE Stewart and Trinkle16 have
advance the understanding of multibody contact in
proposed an implicit time-stepping method for simulat-
planar cases. The differential complementarity
ing rigid body contact with Coulomb friction and
approach is utilized to analyze the contact dynamics
inelastic impacts. The method is based on the NCP,
of the two flexible quadruple pendulums. Comparing
which calculates the generalized position at the end of
with the three-dimensional (3D) Coulomb friction
each time step. In this article, a semi-implicit time-step-
model,18,23,24 the explicit two-dimensional (2D)
ping method is utilized with the complementarity prin-
expressions in this article are much simpler. The
ciple to calculate the generalized position at the end of
changes of kinetic energy and potential energy have
the time step. Tasora and Anitescu17 have implemented
been explained by comparing the introduced
C++ into the NCP solver to solve multiple unilateral
approach with penalty method.
contacts with friction with more than 100,000 colliding
rigid bodies, which shows remarkable performance This article reviews and analyzes basic methods
compared with other algorithms. However, when deal- and formulations used in contact dynamics with the
ing with a large number of contacts and polyhedral CCP. The overall structure of the study is as follows.
approximation in friction, LCP and NCP solvers Section ‘‘Methods and formulations’’ begins by laying
remain limited.18 out the theoretical methods and formulations of the
An alternative approach for solving contact prob- research, including the friction model, motion, and
lems is the so-called penalty method (i.e. continuous CCP. The application of multibody contacts is stud-
method contact force model19 or complaint contact ied through the contact description of multiple pen-
force model),20 which can be used to analyze contact dulums in section ‘‘Dynamic simulation of multiple
forces as a continuous function of indentation and pendulum interactions.’’ The contact dynamics is
compliance of the contact surface.21 This method typi- separated into three parts: contact with the
cally needs small time step in the time integration ground, contact with each other, and the rope inex-
scheme because of the stability limitations.16 It is also tensibility constraint with the explanation of force
noteworthy that choosing parameters requires little transformation matrices and gap functions. Section
effort, because the selection of parameters depends on ‘‘Performance investigation’’ displays the numerical
the contact case. Moreover, the selection of parameters’ results of contacts two pendulum. The paper gives
value may lead to high stiffness of the ordinary differ- some conclusions of the method for solving the CCP
ential equation (ODE), which can make time differen- and a short discussion of the future direction of the
tiation slower due to small time step requirements. study in the final section.
Yu et al. 3

Methods and formulations Modern collision detection algorithms can be uti-


lized to define the contact points of the bodies with
This article uses a complementarity approach to express
arbitrary shapes. Different methods of contact detec-
the Coulomb friction model. The approach employs a
tion for several shape descriptors in a 2D and 3D case
non-penetration condition, and it is based on a set of
are proposed in Hogue,25 such as polygons, ellipses,
differential equations and algebraic inequalities, which
and discrete function representations. It is important to
characterize the dynamics of multibody systems with
note that the description of contact points for bodies
friction and contact. The resulting problem is expressed
with arbitrary shapes is often a challenging task. For
in the form of a CCP.
example, there may be multiple contact points or the
shape of the body may be concave, making it impossi-
System state ble to define the gap function between contact points.
In this study, circular bodies are considered for the
In the planar multibody case, the position of a particle
of a body with respect to the global coordinate system sake of simplicity, whose gap function description is
can be described with the help of a body reference coor- shown in Figure 1. Accordingly, the non-penetration
dinate system. Therefore, a set of generalized coordi- constraint becomes Fi ø 0.
nates for a multibody system can be written as
h iT Coulomb friction model
q = RT1 u1  RTnb unb ð1Þ
The frictional contact model used in this article is based
on the Coulomb dry friction model. For a contact event
where R describes the translation of a body reference
i, when the contact is active between bodies, that is
coordinate system with respect to the global coordinate
Fi = 0, normal contact force f2(i) and tangential force
system and u is the rotation angle of the body reference
f1(i) may exist at the contact point. Both normal contact
system and nb is the number of bodies. Accordingly,
forces and tangential contact forces can be described by
generalized velocities can be written as
set-valued force laws. It is for this reason that for any
h iT contact event i, the friction force can assume any value
T T
q_ = R_ 1 v1    R_ nb vnb ð2Þ between 0 and mf2(i) . Therefore, the contact forces fol-
low two conditions
where R_ describes the velocity of a body reference coordi-
nate system with respect to the global coordinate system f2 . 0
ðiÞ
ð4aÞ
and v is the angular velocity of the body reference system.
ð iÞ ð iÞ
f1 ł mf2 ð4bÞ
Non-penetration contact constraints As for the normal contact force, if there is no contact
If two rigid bodies come into contact, they should not (Fi .0) at the contact point, the normal contact force
penetrate. This means that any two bodies that are must be zero (f2(i) = 0). On the other hand, if contact
closer than a prescribed distance are considered to pro- exists (Fi = 0), the normal contact force (f2(i) .0) exists
duce an active contact event. Accordingly, it is assumed as well.
that gap function Fi exists and can be used to describe The frictional force at the contact point changes
the non-penetration constraint as follows instantaneously from sticking to sliding. If the contact
model is sliding26,27—that is, the relative tangential
Fi . 0 if two bodies share no point velocity vT at the contact point is not zero—the fric-
Fi = 0 if two bodies share one point ð3Þ tional contact force and normal contact force fulfill the
Fi \0 if two bodies are in penetration relationship f1(i) = mf2(i) . While the stick happens at the
contact point, relative tangential velocity vT is zero; the
where i represents the ith contact. friction model follows f1(i) \mf2(i) . As soon as the

Figure 1. Gap function descriptions between two circular bodies.


4 Advances in Mechanical Engineering

normal contact force f2(i) happens at the contact point, the body of high index B, and vector t i is tangential
which is f2(i) ø 0, the contact forces can be expressed as with respect to the contact point.
a Coulomb friction law. If the contact is active, then Fi = 0. So, at the con-
For a contact event i, when assuming ni to be the tact point, the force acting on body A at point P is as
normal vector at the contact point which points toward follows
the exterior of the body, ti is the tangential vectors at  
the contact point. Accordingly, ni , ti are unit orthogo- ^ i, t
g
Fi, A = t i g ^i, n = ½ t i
^i, t + ni g ni  ^i
= Ai g ð6Þ
nal vectors. The reaction force on the contact point can ^ i, n
g
be expressed by means of multipliers g ^i, n ø 0, whereas
^i, u and g
g ^i, w can have an arbitrary value. where Ai = ½ ti ni  is the orthogonal rotation matrix
consisting of unit orthogonal tangential and normal
Here, f1(i) = ti g
^i, t , f2(i) = ni g
^i, n . So, for each contact
vectors at the ith contact point. The reaction force is
i, both situations can be displayed by two equalities and
imposed on the system by means of multipliers
one complementarity condition28
^i, n and g
g ^i, t ; that is, the normal component of the force
^i, n ø 0, Fi ø 0
g ð5aÞ is f2 = ni g^i, n and the tangential component of the force
is f1 = t i g
^i, t . Here
^i, n = 0
Fi g ð5bÞ  
^
g
^ i = i, t
g
m^gi, n  g
^i, t ø 0, jvT j ø 0 ð5cÞ ^ i, n
g
 
jvT j m^g i, n  g
^ i, t = 0 ð5dÞ is the multiplier vector and is not known at time (t).
The position of the contact point P on body A can
be written as
Notation problem setup
rPA = RA + AAsi, A ð7Þ
In each configuration at time (t), the collection of NK
contacts is denoted by A(q(t), Fi ). Here, NK describes where si, A is the position vector of contact point P with
the total contact frequency of the bodies. As shown in respect to the body reference coordinate system of body
Figure 2, it can be assumed that two bodies of index A A. AA is the orientation matrix of body A and can be
and B are in contact in nb bodies. So, for contact event written as
i, a collision detection process produces the point of
 
contact P, a signed distance function Fi , and a set of cosuA sinuA
two orthonormal vectors ni and t i at the contact plane. AA = ð8Þ
sinuA cosuA
The vector ni is normal with respect to the contact
point, which leads from the body of lower index A to The virtual displacement of the contact point is

Figure 2. Illustration of rigid body A and B in contact. An arbitrary contact point is located via local constant vectors si, A and si, B .
A set of two orthonormal vectors ni and t i is generated at the contact point.
Yu et al. 5

drPA = dðRA + AAsi, A Þ = dRA + A, uA si, A duA ð9Þ D = ½ D1    DN K  ð16Þ

where the vector duA is the virtual rotation associated Finally, note that
with body A, and A, uA is the derivative of AA with 2 3T
respect to uA . 03 3 2
Here, A, uA si, A =  AA~si, A , where ; is the tilde oper- 6 .. 7 2 _T 3
6 . 7 R1
6 7 6
ator, which can be explained as follows 6 7 6v 7
6 0 7 6 17
6 3 3 2 7 6 . 7
 y T  y T 6 7 6 . 7
si, A = sxi, A si, A ~si, A = si, A sxi, A ð10Þ 6 + A 7 6 . 7
7 6 T7
i
6
6 +e
6 
s A T
A
i, A A i 7 6 R
7 _ 7 7
So, the virtual displacement can be rewritten as 6 7 6 6 A 7
6 03 3 2 7 6 vA 7 7
6 7 6
drPA = dRA  AA~si, A duA 6 .. 7 6 . 7
ð11Þ DTi q_ = 6 . 7 6 .. 7 7
6 7 6
6 7 6 _T 7
The virtual work associated with the contact force 6 03 3 2 7 6 RB 7 7
6 7 6
Fi, A can now be expressed as 6 Ai 7 6v 7 ð17Þ
6 7 6 B7
6 e 7 6 . 7
 T  T 6 s i, B AB Ai 7 6 . 7
T
dWi, A = drPA Fi, A = dRA  AA~si, A duA 6 7 6 . 7
6 7 6 T 7
6 0 332 7 4 R_ 7 5
Ai g ^ i + duTA~si, A ATA Ai g
^ i = dRTA Ai g ^i ð12Þ 6 . 7 nb
6 .. 7
4 5 v nb
Correspondingly, the virtual work for body B is 03 3 2
T _
 T = Ai RA + ATi AAe s i, A vA  ATi R_ B  ATi ABe
s i, B vB
dWi, B = drPB ðFi, A Þ  
 T T _
= Ai RA + Au, Asi, A vA  R_ B  Au, Bsi, B vB
= dRB  AB~si, B duB ðAi g
^ iÞ ð13Þ  
T vi, t
= Ai ðr_ i, A  r_ i, B Þ =
vi, n
Then, the virtual work that the presence of the fric-
where
tional contact force Fi, A imparts is
 
vi, t
dWi = dWi, A + dWi, B = dRTA Ai g ^ i + duTA~si, A ATA Ai g
^i
 vi, n
T T~ T T T~ T
dRB Ai g
^ i  duBsi, B AB Ai g
^ i = dRA + duAsi, A AA
represents the relative velocity at the contact point
dRTB  duTB~si, B ATB ÞAi g
^ i = dqT Di g
^i ð14Þ
between two bodies; that is, vi, t is the tangential rela-
where tive velocity and vi, n is the normal relative velocity. The
matrix Di can also convert the general velocity to con-
2 3
03 3 2 tact velocity.
6 7
..
6 7.
6 7
6 03 3 2 7
6
6
7
7
Equations of motion
2 3 6 + Ai 7
dR1 6 e T 7 Assume that there are NK potential contacts, so
6 + s i, A AA Ai 7
6 du1 7 6 03 3 2 7 that the contact constraints are enforced by
6 7 6 7
6 .. 7 6 .. 7 non-penetration constraints Fi ø 0, i = 1, 2, . . . , p.
dq = 6 . 7Di = 6 . 7 ð15Þ
6 7 6 7 Here, superscript i is the number of contact
4 dRnb 5 6 0 7
6 332 7 event. Therefore, the equations of motion take the
dunb 6 A 7
6 i 7 form
6 e

s A T
A 7
6 i, B B i 7
6 0 7
6 332 7 M€q = Fðq, q,
_ tÞ + D^
g ð18Þ
6 .. 7
4 . 5
03 3 2 where mass matrix M = diagfM1 , . . . , MA ,
MB , . . . , Mnb g, where Mi = diagfmi , mi , Ji g and
Therefore, the frictional contact force associated Ji = mi ri2 =2. F(q, q,
_ t) is the generalized applied force,
with the presence of NK contact events is Di g^ i , which and D^ g is the frictional contact force associated with
means that Di is the contact transformation matrix the presence of NK contact events. Here, a matrix g ^ is
associated with contact A(q(t), Fi ), which can convert built to contain all of the contact force as in
the general force to contact force equation (19)
6 Advances in Mechanical Engineering

 T   " ð l + 1Þ #
^= g
g ^1 ^2
g  ^ NK
g ð19Þ 0 v
di = 1 ðlÞ + i,ðl t+ 1Þ = di, 0 + DðlÞ, T q_ ðl + 1Þ ð25Þ
F
Dt i vi, n
Discretized equations of motion Then, equation (22) can be submitted into equation
18
Using a semi-implicit Euler numerical scheme at time (25) as
step t(l + 1) = t(l) + Dt, the equations of motion can be

expressed as follows di = di, 0 + DðlÞ, T q_ ðlÞ + M1 f ðlÞ + M1 D ðlÞ g ðl + 1Þ


generalized positions
zfflfflfflffl}|fflfflfflffl{
step size
z}|{ = di, 0 + DðlÞ, T q_ ðlÞ + M1 f ðlÞ + DðlÞ, T M1 D ðlÞ g ðl + 1Þ
qðl + 1Þ =q ðlÞ
+ Dt q_ ðl + 1Þ ð20aÞ ð26Þ
0generalized speeds 1
zfflffl}|fflffl{ Here, di, 1 can be defined as
B C
M@ q_ ðl + 1Þ q_ ðlÞ A = f ðlÞ + D ðlÞ gðl + 1Þ
|{z} |fflfflfflfflfflfflffl{zfflfflfflfflfflfflffl}

applied impulse frictional contact impulse di, 1 = di, 0 + DðlÞ, T q_ ðlÞ + M1 f ðlÞ ð27Þ
ð20bÞ
8 Therefore, di can be rewritten as
< ø0

ðl + 1Þ
g i, n
i 2 A ðlÞ ðqðtÞ, Fi Þ : ðl + 1Þ ð20cÞ di = di, 1 + DðlÞ, T M1 D ðlÞ gðl + 1Þ ð28Þ
: mi g i, n  g ði,l t+ 1Þ ø 0
Below, the vector p will be used as a union of all of
Fi ø 0 ð20dÞ the particular vectors di, 1 .
g (l + 1) and
where f(l) = DtF(q(l) , q_ (l) , t(l) ), g (l + 1) = Dt^ 2 3
(l) (l) (l) (l)
D = D(q , t ), q_ is the general known velocity and d1, 1
6 7
q_ (l + 1) is the unknown velocity with time step Dt. In p = 4 ... 5 ð29Þ
equation (20c), A(l) (q(t), Fi ) is the set of active contact dNK , 1
events produced by the collision detection step carried
out at t(l) in the configuration q(l) . According to equa- Analogously, also matrix N can be introduced
tion (4), the Coulomb friction model used in this article
is presented in equation (20c). N = DT M1 D ð30Þ
An approximation of the signed gap function at
t(l + 1) is utilized to reflect the complementarity Quadratic optimization problem
ðl + 1Þ ðlÞ ðl + 1Þ The CCP represents the first-order optimality condi-
9i 2 A ðlÞ ðqðtÞ, Fi Þ : Fi ’ Fi + Dtni, n ð21Þ
tions11 for the convex quadratic optimization problem
with conic constraints
Reformulation as a CCP
1
Using the force balance condition in equation gðl + 1Þ = min g T Ng + pT g
g 2 ð31Þ
(19b), the velocity within time step q_ (l + 1) can be
subject to g k 2 Ck
calculated as
where g is the contact impulse when the bodies collide,
q_ ðl + 1Þ = q_ ðlÞ + M1 f ðlÞ + M1 D ðlÞ g ðl + 1Þ ð22Þ g (l + 1) is the unknown contact impulse at the next time
Next, di can be defined as step Dt, and Ck is from the Coulomb friction model
equation (4).
" # With time integration, the new contact impulse
ð l + 1Þ
vi, t
di = ðlÞ ð l + 1Þ ð23Þ g (l + 1) will be computed using equation (31).
1
Dt Fi + vi, n Meanwhile, the new velocity q_ (l + 1) can be obtained via
equation (22). The new position qðl + 1Þ will finally be
At the initial time, the velocity at the contact is all
calculated through equation (20a).
zero, so the initial term of di is
 
0 Dynamic simulation of multiple
di, 0 = 1 ðlÞ ð24Þ
F
Dt i pendulum interactions
According to equation (17), the matrix D can con- In this section, the contact description explained above
vert the general velocity to contact velocity, and di can is applied to study multiple pendulums. Multiple bodies
also be presented as may come into contact with each other in three possible
Yu et al. 7

2 3
situations: (1) the bodies hit the ground; (2) the bodies
collide with each other; (3) adjacent bodies are 6 Gð1Þ 7
6D 03 3 2    03 3 2 7
restricted by a rope. Constraints and contact scenarios 6 7
6 03 3 2 DGð2Þ    03 3 2 7
used are explained in the following sections of the
G 6
D =6 . .. .. .. 7 ð35Þ
7
paper. 6 .. . . . 7
6 Gð n Þ 7
4 03 3 2 03 3 2    D b 5
|fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl}
nb times
Case of bodies hitting the ground
The gap function FG(i) is the distance between the
The first type of multibody contact is between bodies
contact point and the ground; that is, the number of
and the ground, as shown in Figure 3.
gap functions is the number of bodies nb
Each contact point results in two orthogonal forces
G G
f1 (i) and f2 (i) and one torque T G(i) . The torque can be cal-
F G ði Þ = y i  r i ð36Þ
culated as
" # where yi is the distance between the center of the body
G
G ði Þ G G f ði Þ and the ground, and ri is the radius of the body i.
T = r i f 1 ði Þ + 0f2 ðiÞ = ½ ri 0  1GðiÞ ð32Þ
f2

Therefore, the external force and torque can be cal- Case of bodies colliding with each other
culated as As shown in Figure 4, when bodies collide with each
S
2 3 2 3" other, two contact forces appear the normal force f2 (ij)
G # S(ij) S(ij)
and the tangential force f1 . The normal force f2 is
fx ðiÞ 1 0 G ði Þ
6 G ði Þ 7 4 f
4 fy 5 = 0 1 5 1GðiÞ ð33Þ directed along the line between two body centers.
GðiÞ r 0 f2 The force acting on body i at point P is
T i

ðijÞ ðijÞ
Here, the matrix DG(i) is FSðijÞ = t ij g
^1 + nij g ^ ij
^2 = Aij g ð37Þ
2 3
1 0 The distance of the center mass of two contact bod-
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
D G ði Þ = 4 0 15 ð34Þ ies can be written as L = (xi  xj )2 + (yi  yj )2 . For
ri 0
this situation, the orthogonal matrix Aij is composed
Each body can potentially make contact with the with the normal vector nij and the tangential vector t ij .
ground. Therefore, matrix DG
i takes the following form The normal vector nij is the unit vector which

Figure 3. Case of body hitting the ground. The gap function FG(i) is the distance between the contact point and the ground. Two
G G
orthogonal forces f1 (i) , f2 (i) are produced at the contact point. The gap function and the normal contact force follow the
G
complementarity condition FG(i) f2 (i) = 0.
8 Advances in Mechanical Engineering

Figure 4. Case of bodies colliding with each other. The gap Figure 5. Case of rope inextensibility constraint. The gap
function FS(ij) is the distance between the contact point of the function FL(ij) is the distance of the fully extended rope. The
L
S S
bodies. Two orthogonal forces f1 (ij) and f2 (ij) are produced at the normal force f2 (ij) is produced along the rope. The gap function
contact point. The gap function and the normal contact force and the normal contact force follow the complementarity
L
S
follow the complementarity condition F S(ij) f2 (ij) = 0. condition FL(ij) f2 (ij) = 0.

is directed from the body j toward body i. Thus, it is 2 3


calculated as 6 7
6 Sð12Þ 7
" xi xj # 6D DSð13Þ    03 3 2 7
6 Sð21Þ 7
L 6D 03 3 2    03 3 2 7
nij = yi yj 6 Sð31Þ 7
6 03 3 2 D  03 3 2 7
L S 6
D =6 . .. .. .. 7 ð40Þ
7
The tangential vector t ij is orthogonal to nij , so it 6 .. . . . 7
6 Sðn 1Þn 7
should be calculated as 6 03 3 2 03 3 2    D b b 7
6 S 7
6 03 3 2 03 3 2    D nb ðnb 1Þ 7
" yi yj # 4|fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl} 5
nb ðnb 1Þ
L times
t ij = xi + xj
2

L
The gap function FS(ij) expresses the distance between
Accordingly, matrix Aij takes the form the two contact bodies, and the number of such func-
" # tions is also nc
yi yj xi xj
L L
Aij = ½ t ij nij  = xi + xj yi yj
ð38Þ
L L FSðijÞ = L  ri  rj ð41Þ
From equation (15), it can be concluded that where ri and rj are the radii of the body i and body j,
    respectively.
+Aij Aij
DSðijÞ = DSðjiÞ = ð39Þ
+ri t Tij Aij rj t Tij Aij

Considering that each body can potentially collide


Rope inextensibility constraint
with all others, the number of contacts is The adjacent bodies are connected pair-wise by a rope.
nc = nb (nb  1)=2. That is why the full Jacobian matrix Therefore, the adjacent bodies are restricted by the rope
for this case is inextensibility constraint, as shown in Figure 5. The
Yu et al. 9

L
normal force f2 (ij) is directed along the line between the Solving the CCP
two adjacent bodies, which is also the direction of the The overall solution scheme can be expressed with
rope.
Algorithm 1.
The force acting on body i at the contact point is

ðijÞ
Algorithm 1
FLðijÞ = nij g ^ ij
^2 = Aij g ð42Þ
1. For i = 1, 2, . . . n, the generalized position qðlÞ and
where Aij = ½nij  is the unit vector of the direction of the generalized velocity q_ ðlÞ of the system are known at the
rope. current time step as Eq.(1) and Eq. (2) show.
The normal vector nij is the unit vector which is 2. For i = 1, 2, . . . n, compute mass matrix M.
3. Use Eq. (35), (40), (45), and (47) to obtain the D matrix
oriented from body j to body i and it should be calcu- and Eq. (36), (41) and (46) to obtain gap function F.
lated as 4. Use Eq. (48) and (27) to calculate di, 0 and di, 1 .
" xi xj # 5. Use Eq. (30) and (29) to calculate matrix N and p, where
f ðlÞ is the applied impulse. In this situation, only the gravity
L
nij = yi yj force should be considered. So, f ðlÞ = ½ 0m1 g0    0
L mn g0T Dt.
6. Use the quadratic programming method to calculate the
Thus, matrix Aij is unknown force impulse gðl + 1Þ , where matrix A and b can
be obtained through Eq. (53) and (54) below.
" xi xj #
  7. Use Eq. (22) to update the speed q_ ðl + 1Þ and Eq. (20a) to
Aij = nij = L
ð43Þ update the position qðl + 1Þ .
yi yj
L Increment tðl + 1Þ = tðlÞ + Dt, and repeat from step 3 until
t . tend .
It can be deduced that
   
LðijÞ +Aij LðjiÞ Aij
D = D = ð44Þ
0 0
According to equation (23), inserting the gap func-
The number of contacts of this kind in one branch is tion which can be calculated in equation (36), (41), and
equal to nb =2, so the total number is nb . DL(01) and (46), one can obtain di, 0
DL(nb =2(nb =2 + 1)) represent the constraints between the top
body and the ceiling. The general form of the Jacobian 2di, 0 = 3
matrix for this type of constraint is as follows 6
6
7
7
S S L L
6 0 Dt 1
FG 1    Dt 1
FG 1 1
n 0 Dt F12    Dt Fðn1Þn 0 Dt F12    Dt Fðn1Þn 7
1 1
4|fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl
ffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl} 5
DL =
2 3
2nb times
2
nb ðnb 1Þ
times
nb times
2

6 DLð01Þ DLð12Þ   
6 03 3 1 03 3 1 03 3 1  03 3 1 7 7 ð48Þ
60 L
03 3 1 7
6 3 3 1 D ð21Þ    03 3 1 03 3 1 03 3 1  7
6 . .. .. .. .. .. .. .. 7
6 .. 7
6
6
. .
L nb
.
nb
. . . . 7
7
This article employs the Coulomb friction model.
6 03 3 1 03 3 1    D ðð 2 1Þ 2 Þ 0 0    0 7
6
6 L nb nb
3 3 1 3 3 1 3 3 1 7
7
When bodies hit the ground or collide with each other,
0
6 331 0    D ð 2ð2
1ÞÞ
0 0    0 7
6
331
6 03 3 1 03 3 1   
331
L nb nb
ð ð + 1 ÞÞ
L nb
ð ð
331
+ 1 Þð nb
+ 2 ÞÞ
331
7
7
there are two contact forces, f1 and f2 . Consequently,
6 0 3 3 1 D 2 2 D 2 2    0 3 3 1 7
6
6 03 3 1 03 3 1    0 0 D
L
ð ð n
2
b +2
Þð n
2
b +1
ÞÞ    0
7
7
according to equation (4)
6 . 3 3 1 3 3 1 3 3 1 7
6 . .
. . . .
. .
. .
. . . .
. 7
6 . . . . . . . . 7
6 Lððn 1Þn Þ 7
6 03 3 1 03 3 1   
6 0 3 3 1 0 3 3 1 0 3 3 1    D b b 7  f2 ł 0
Lðn ðn 1ÞÞ 7 ð49Þ
4 03 3 1 03 3 1    03 3 1 03 3 1 03 3 1  D b b 5
|fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl} f1  mf2 ł 0
nb times

ð45Þ    
0 1 0
AðiÞ = , bðiÞ = ð50Þ
The gap function is computed as follows 1 m 0

FLðijÞ = Lmax  L ð46Þ When adjacent bodies are loaded with the rope inex-
tensibility constraint, only one contact force f2 exists, so
Then, put all D matrices together from equations according to Coulomb’s law
(35), (40), and (45)
   f2 ł 0 ð51Þ
D = DG D S
D L ð47Þ
Að jÞ = ½1, bð jÞ = ½0 ð52Þ
10 Advances in Mechanical Engineering

Figure 7. Numerical stability of the CCP approach. Y


Figure 6. Displacements of X and Y directions for one particle coordinate of one particle contact with different time steps
with frictional contact. The coefficient of restitution is 0. Some from Dt = 0:1 s to Dt = 0:00125 s.
points at x = ½ 0:5 1 1:5 2 2:34  have been measured
from the figure of the study by M Anitescu.23
proposed in Kleinert et al.22 in the first example. The
second example investigates the simulation of multiple
Combining the A matrix and b matrix yields
pendulum contact with CCP solvers.
2 3
6 0 1    0 0 0    0 7
6 1 m    0 0 0  0 7 Comparison between the CCP method and the
6 7
6. .. .. .. .. .. .. .. 7 optimization-based method
6 .. . . . . . . . 7
6 7
60 0 0 0 1 0    0 7 The dynamic example studies one particle fall on the
A= 6
60 0
7 ð53Þ
6 0 1 m 0    0 7 7 horizontal ground. The initial position of the particle
60 0 0 0 0 1    0 7 follows x = 0m, y = 3m, and the initial velocity is
6 7
6 .. .. .. .. .. .. .. .. 7 x_ = 3m=s, y_ = 0m=s. The particle is affected by gravity
6. . . . . . . . 7
4 5 force, whose acceleration is g = 9:8N=kg, and the fric-
0 0 0 0 0 0    1
|fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl} tion coefficient is m = 0:3. The mass of the particle is
np times
1 kg and the time step Dt = 0:001 s.
 T Figure 6 presents the displacements of the x and y
b ¼ 0 0  0 0 ð54Þ directions for one particle with frictional contact. Some
|fflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflffl}
np times points at x = ½ 0:5 1 1:5 2 2:34  have been sepa-
rately measured from the figure of the study by M.
where np is the potential contact number Anitescu and added to Figure 6. Good agreement can
be observed between the proposed optimization method
nb ðnb  1Þ in Anitescu23 and CCP. As the figure displays, the parti-
np = 2nb + 2  + nb = n2b + 2nb ð55Þ
2 cle stops on the ground after the contact. The coeffi-
cient of restitution is 0, which agrees with Stewart and
Trinkle.16
Performance investigation To show how the value of the time step affects the
The numerical method proposed in this article can be precision of the solution, Figure 7 shows numerical
utilized to simulate granular pendulum contact. This solutions of the Y coordinate of one particle contact
problem occurs in plenty of engineering applications; with an initial condition of x = 0 m, y = 3 m,
for example, a tree harvester truck can be assumed and x_ = 3 m=s, y_ = 0 m=s. The simulation has been calcu-
simplified into a chain structure concept, which can be lated with different time steps from Dt = 0:1 s to
divided into several arbitrary bodies.28 Dt = 0:00125 s. Here, the Y coordinates converge with
In this section, two types of examples have been dis- the decrease of the value of Dt. Figure 8 gives an error
cussed. The CCP method developed in this article has estimate of the numerical results of Y coordinates at
been compared with one optimization-based method each time step from Figure 7. The solution for
Yu et al. 11

Comparison between the CCP method and


penalty method
To compare the CCP method with the penalty method,
a simple case of two pendulums with two balls illu-
strated in Figure 9 has been analyzed. Aim of this sim-
ple contact problem is to clarify importance of the
contact parameters of the penalty method in dynamic
response after contact. The parameters for the problem
are given in Figure 9. The gravity is g = 9:8 kg=m3 , and
the coefficient of friction is m = 0:3. The time step is
Dt = 0:0001 s and the total time is 3 s.
The penalty method is based on dissipative contact
force models, combining a linear spring with a linear
damper. The contact force can be calculated as

_
FN = Kd3=2 + Ddd ð56Þ
Figure 8. Errors for numerical results of Y coordinates
associated with Figure 7. The solution of Dt = 0:00125 s is used where K is the stiffness coefficient and D is the damping
as a converged value.
coefficient. Indentation d is the distance between the
contact points of the two balls. In equation (55), d_ is
the relative normal velocity between two contact points.
The contact parameters of the penalty method have
been chosen so that it gives agreement for vertical posi-
tion solved with the CCP approach. For the penalty
method, contact stiffness coefficient K = 3:6e5 N=m3=2
and damping coefficient D = 1:45e5 N s=m2 .
The difference of vertical position Y between the
contact approaches is shown in Figure 10. An explicit
Runge–Kutta method of order 4 has been used as
numerical time integrator scheme for solving penalty
method. In case of the CCP approach, the semi-implicit
Figure 9. Initial position of the two pendulum system with two
Euler has been used. The time step is Dt = 0:0001 s is
rigid balls. used for both time integration methods. For this simple
case, the computation time for CCP is around six times
Dt = 0:00125 s has been used as a converged value. For slower than for the penalty method. However, when
different values of Dt, the error measures used are simulating tens of thousands of contact problems, a
error = jy(Dt)  y(exact)j. The smaller the time step is, complementarity method seems to be a better
the closer the error converge to zero. choice.21,24 Furthermore, the CCP approach does not
produce stability problems due to unnecessary high

Figure 10. Y coordinates and the error of the pendulum ball from CCP approach and penalty method.
12 Advances in Mechanical Engineering

Figure 14. Energies and the number of contact of the whole


system. The total number of the contact is 63 during an 8 s
Figure 11. Energies of two-pendulum contact with CCP simulation.
approach.

eigenfrequencies which maybe be problematic in the


case of the penalty method.
Potential and kinetic energy associated with the CCP
approach and penalty method have been shown sepa-
rately in Figures 11 and 12. As the two figures illustrate,
the coefficient of restitution is 0. A change in the sum of
kinetic and potential energy exists after inelastic con-
tact. The material damping of the contact bodies is
assumed to be the reason which causes energy loss.19 In
Figure 11, the energy changes instantly because of the
nonlinear behavior of the CCP approach. However, in
Figure 12, the energy changes continuously with the
penalty method.

Analysis of multiple pendulums


As shown in Figure 13, two pendulums of 20 bodies
are fixed in the ceiling. The whole system is affected by
Figure 12. Two-pendulum contact with penalty method. the gravity force whose acceleration is g = 9:8 kg=m3 ,
Contact stiffness coefficient K = 3:6e5 N=m3=2 , damping and the coefficient of friction is m = 0:3. The time step
coefficient D = 1:45e5 N s=m2 . is Dt = 0:001 s and the total time is 8 s.
Figure 14 displays the energies of the two pendulums
when they fall down with zero initial velocity. The fig-
ure also shows the number of contacts during the pro-
cess of two-pendulum contact. The sum of kinetic
energy and potential energy decreases when the contact
occurs between two pendulums. The change in the sum
of kinetic and potential energy exists after each inelastic
contact because the coefficient of the restitution is effec-
tively zero with the cone complementarity approach.
Figure 15 shows the frames of the two pendulums
from t = 1 s to t = 1:3 s. The contact bodies have been
marked in the figure. In this example, neighbor bodies
are falling down with gravity force and restricted by the
Figure 13. Initial position of the two pendulum system with
rope inextensibility constraint.
multiple rigid balls.
Yu et al. 13

Figure 15. Frames of the simulation of two pendulums with inelastic collisions at t = ½ 1:804 1:121 1:142 1:185 1:230 1:306  s.

Figure 16. Normal contact impulse happened on body 10 during 8 s. Contact bodies and neighbor bodies at
t = ½ 1:804 1:099 3:298 3:489 4:074 4:122  s have been shown in the frames.

Contact impulse g = g ^ Dt, which is the product of In Figure 16, the contact impulse between body
^ and time step Dt is calculated from
contact force g 10 and body 20 at t = 1:084 s is much greater than
equation (31) at each time step. Figure 16 shows the the contact impulses with other bodies. The
normal contact impulses g ^ n Dt on body 10 and the contact at t = 1:084 s is the first contact in the sys-
frames of the simulation at corresponding times. tem. The generalized velocities of body 10 and body
Frames of the simulation at corresponding time have 20 are greater than the rest of bodies before
been shown in Figure 16. contact.
14 Advances in Mechanical Engineering

explained by comparing the introduced approach with


penalty method.
In the future, this work can be combined with the
implicit time-stepping method and elastic contacts
which could be utilized in a virtual interactive environ-
ment for training, clinical therapies, military purposes,
and video games.

Acknowledgement
The authors would like to thank the Academy of Finland
(application no. 299033 for the funding of Academy Research
Fellows) for supporting Marko K. Matikainen.

Declaration of conflicting interests


The author(s) declared no potential conflicts of interest with
respect to the research, authorship, and/or publication of this
Figure 17. Inertial force of body 10. article.

Funding
The author(s) received no financial support for the research,
Figure 17 shows the inertial force of body 10. The
authorship, and/or publication of this article.
inertial force increases significantly when the contact
takes place at the first contact when t = 1:084 s during
the simulation. The inertial force is calculated as ORCID iDs
follows Xinxin Yu https://orcid.org/0000-0002-7740-9643
Marko K Matikainen https://orcid.org/0000-0003-3683-
Finertial = m R
€x €y
R ð57Þ 0199

where R€ = (R_ ðl + 1Þ  R_ ðlÞ )Dt.


References
The numerical simulations presented have been per-
formed with MATLAB. These simulations show the 1. Jaeger HM, Nagel SR and Behringer RP. Granular
convergence of the introduced algorithm and formula- solids, liquids, and gases. Rev Modern Phys 1996; 68:
tions in the case of multiple unilateral contacts. 1259–1273.
2. Hastings MB, Daya ZA, Ben-Naim E, et al. Entropic
tightening of vibrated chains. Phys Rev E 2002; 66:
Conclusion 025102.
3. Belmonte A, Shelley MJ, Eldakar ST, et al. Dynamic
The method studied in this article can solve non-smooth patterns and self-knotting of a driven hanging chain.
rigid multibody frictional contacts. This article aims for Phys Rev Lett 2001; 87: 114301.
a solution to a planar system with thousands of dyna- 4. Fortin J, Millet O and de Saxcé G. Numerical simulation
mical contacts and presents a novel method for solving of granular materials by an improved discrete element
the CCP that appears in the time integration approach. method. Int J Numer Meth Eng 2005; 62: 639–663.
The introduced method is able to simulate colliding 5. Braun M. On some properties of the multiple pendulum.
rigid bodies on a large scale. In addition, this article Arch Appl Mech 2003; 72: 899–910.
6. Nigmatullin RR, Osokin SI, Awrejcewicz J, et al. The
proposed and analyzed a method to analyze the contact
fluctuation spectroscopy based on the scaling properties
dynamics of two pendulums. The Coulomb friction
of beta-distribution: analysis of triple pendulum data.
model utilized in this article is simplified into two equa- Mech Syst Sig Process 2015; 52–53: 278–292.
tions, which is simpler than Coulomb friction model for 7. Plaut RH and Virgin LN. Pendulum models of ponytail
the 3D case.18 The coefficient of restitution after con- motion during walking and running. J Sound Vib 2013;
tact is 0, which agrees with the conclusion made in 332: 3768–3780.
Stewart and Trinkle.16 It is also the reason why CCP is 8. Humphrey LR and Hemami H. A computational human
widely used in contact applications of powder compo- model for exploring the role of the feet in balance. J Bio-
sites, granular flows.18 The energy change has been mech 2010; 43: 3199–3206.
Yu et al. 15

9. Segers V, Aerts P, Lenoir M, et al. Dynamics of the body complementarity problem. J Comput Nonlin Dyn 2017;
centre of mass during actual acceleration across transi- 13: 014503.
tion speed. J Exp Biol 2007; 210: 578–585. 19. Lankarani HM and Nikravesh PE. Continuous contact
10. Dao ND, Ryan KL, Sato E, et al. Predicting the dis- force models for impact analysis in multibody systems.
placement of triple pendulumTM bearings in a full- Nolin Dyn 1994; 5: 193–207.
scale shaking experiment using a three-dimensional 20. Machado M, Moreira P, Flores P, et al. Complaint con-
element. Earthquake Eng Struct Dyn 2013; 42: tact force models in multibody dynamics: evolution of the
1677–1695. Herz contact theory. Mech Mach Theor 2012; 53: 99–121.
11. Pang JS and Trinkle JC. Complementarity formulations 21. Tasora A, Negrut D and Anitescu M. Large-scale paral-
and existence of solutions of dynamic multi-rigid-body lel multi-body dynamics with frictional contact on the
contact problems with coulomb friction. Mathematical graphical processing unit. Proc IMechE, Part K: J Multi-
Programming 1996; 73: 199–226. Body Dynamics 2008; 222: 315–326.
12. Jones CN and Morrari M. Multiparametric linear 22. Kleinert J, Simeon B and Dreßler K. Nonsmooth contact
complementarity problems. In: Proceedings of the 45th dynamics for the large-scale simulation of granular mate-
IEEE conference on decision and control, San Diego, rial. J Comput Appl Math 2017; 316: 345–357.
CA, 13–15 December 2000, pp.5687–5692. New York: 23. Anitescu M. Optimization-based simulation of non-
IEEE. smooth rigid multibody dynamics. Math Prog 2006; 105:
13. Kocvara M and Zowe J. An iterative two-step algorithm 113–143.
for linear complementarity problems. Numerische Mathe- 24. Anitescu M and Tasora A. An iterative approach for
matik 1994; 68: 95–106. cone complementarity problems for nonsmooth
14. Yao W-L, Chen B, Liu C-S, et al. Dynamics of multi- dynamics. Comput Optim Appl 2010; 47: 207–235.
rigid-body systems under non-smooth constraints and lin- 25. Hogue C. Shape representation and contact detection for
ear complementary problems. Int J Comput Math 2008; discrete element simulations of arbitrary geometries. Eng
85: 889–898. Comput 1998; 15: 374–390.
15. Anitescu M and Hart GC. A fixed-point iteration 26. Stronge WJ, James R and Ravan B. Oblique impact with
approach for multibody dynamics with contact and small friction and tangential compliance. Philos Trans Math
friction. Math Prog 2004; 101: 3–32. Phys Eng Sci 2001; 359: 2447–2465.
16. Stewart DE and Trinkle JC. An implicit time-stepping 27. Moreau JJ. Unilateral contact and dry friction in finite
scheme for rigid body. Int J Numer Meth Eng 1996; 39: freedom dynamics. In: Moreau JJ and Panagiotopoulos
2673–2691. PD (eds) Nonsmooth mechanics and applications (CISM
17. Tasora A and Anitescu M. A fast NCP solver for large Course and Lectures), Vol. 302. Vienna: Springer, 1988,
rigid-body problems with contacts, friction, and joints. pp.1–82.
In: Multibody dynamics, Vol. 12. Dordrecht: Springer, 28. Pfeiffer F and Glocker F. Multibody dynamics with
2009, pp.45–55. unilateral contacts. Hoboken, NJ: John Wiley & Sons,
18. Negrut D, Serban R and Tasora A. Posing multibody 1996.
dynamics with friction and contact as a differential

You might also like