Basics¶
We introduce basic notions here. Let us have a look at Fig. 3.
There are four bodies in the figure. Placement of each point of every body is determined by a configuration \(\mathbf{q}_{i}\). Velocity of each point of every body is determined by a velocity \(\mathbf{u}_{i}\). Let \(\mathbf{q}\) and \(\mathbf{u}\) collect configurations and velocities of all bodies. If the time history of velocity is known, the configuration time history can be computed as
The velocity is determined by integrating Newton’s law
where \(\mathbf{M}\) is an inertia operator (assumed constant here), \(\mathbf{f}\) is an out of balance force, \(\mathbf{H}\) is a linear operator, and \(\mathbf{R}\) collects some point forces \(\mathbf{R}_{\alpha}\). While integrating the motion of bodies, we keep track of a number of local coordinate systems (local frames). There are four of them in the above figure. Each local frame is related to a pair of points, usually belonging to two distinct bodies. An observer embedded at a local frame calculates the local relative velocity \(\mathbf{U}_{\alpha}\) of one of the points, viewed from the perspective of the other point. Let \(\mathbf{U}\) collect all local velocities. Then, we can find a linear transformation \(\mathbf{H}\), such that
In our case local frames correspond to constraints. We influence the local relative velocities by applying local forces \(\mathbf{R}_{\alpha}\). This can be collectively described by an implicit relation
Hence, in order to integrate equations (1) and (2), at every instant of time we need to solve the implicit relation (4). Here is an example of a numerical approximation of such procedure
where \(h\) is a discrete time step. As the time step h does not appear by \(\mathbf{M}^{-1}\mathbf{H}^{T}\mathbf{R}\), \(\mathbf{R}\) should now be interpreted as an impulse (an integral of reactions over \(\left[t,t+h\right]\)). At a start we have
The out of balance force
incorporates both internal and external forces. The symmetric and positive-definite inertia operator
is computed once. The linear operator
is computed at every time step. The number of rows of \(\mathbf{H}\) depends on the number of constraints, while its rank is related to their linear independence. We then compute
and
which is symmetric and semi-positive definite. The linear transformation
maps constraint reactions \(\mathbf{R}\) into local relative velocities \(\mathbf{U}=\mathbf{H}\mathbf{u}^{t+h}\) at time \(t+h\). Relation (84) will be here referred to as the local dynamics. Finally
where \(\mathbf{C}\) is a nonlinear and usually nonsmooth operator. A basic Contact Dynamics algorithm can be summarised as follows:
Perform first half–step \(\mathbf{q}^{t+\frac{h}{2}}=\mathbf{q}^{t}+\frac{h}{2}\mathbf{u}^{t}\).
Update existing constraints and detect new contact points.
Compute \(\mathbf{W}\), \(\mathbf{B}\).
Solve \(\mathbf{C}\left(\mathbf{R}\right)=\mathbf{0}\).
Update velocity \(\mathbf{u}^{t+h}=\mathbf{u}^{t}+\mathbf{M}^{-1}h\mathbf{f}^{t+\frac{h}{2}}+\mathbf{M}^{-1}\mathbf{H}^{T}\mathbf{R}\).
Perform second half–step \(\mathbf{q}^{t+h}=\mathbf{q}^{t+\frac{h}{2}}+\frac{h}{2}\mathbf{u}^{t+h}\).
It should be emphasized that the above presentation exemplifies only a particular instance among many available variants of Contact Dynamics.