Unilateral contact
In contact mechanics, the term unilateral contact, also called unilateral constraint, denotes a mechanical constraint which prevents penetration between two rigid/flexible bodies. Constraints of this kind are omnipresent in non-smooth multibody dynamics applications, such as granular flows, legged robot, vehicle dynamics, particle damping, imperfect joints, or rocket landings. In these applications, the unilateral constraints result in impacts happening, therefore requiring suitable methods to deal with such constraints. Modelling of the unilateral constraints. There are mainly two kinds of methods to model the unilateral constraints. The first kind is based on smooth contact dynamics, including methods using  Hertz's models, penalty methods, and some regularization force models, while the second kind is based on the non-smooth contact dynamics, which models the system with unilateral contacts as variational inequalities. Smooth contact dynamics. In this method, normal forces generated by the unilateral constraints are modelled according to the local material properties of bodies. In particular, contact force models are derived from continuum mechanics, and expressed as functions of the gap and the impact velocity of bodies. As an example, an illustration of the classic Hertz contact model is shown in the figure on the right. In such model , the contact is explained by the local deformation of bodies. More contact models can be found in some review scientific works or in the article dedicated to contact mechanics. Non-smooth contact dynamics. In non-smooth method, unilateral interactions between bodies are fundamentally modelled by the Signorini condition for non-penetration, and impact laws are used to define the impact process. The Signorini condition can be expressed as the complementarity problem: formula_1, where formula_2 denotes the distance between two bodies and formula_3 denotes the contact force generated by the unilateral constraints, as shown in the figure below. Moreover, in terms  of the concept of proximal point of convex theory, the Signorini condition can be equivalently expressed as: formula_4, where formula_5 denotes an auxiliary parameter, and formula_6 represents the proximal point in the set formula_7 to the variable formula_8, defined as: formula_9. Both the expressions above represent the dynamic behaviour of unilateral constraints: on the one hand, when the normal distance formula_10 is above zero, the contact is open, which means that there is no contact force between bodies, formula_11; on the other hand, when the normal distance formula_10 is equal to zero, the contact is closed, resulting in formula_13. When  implementing non-smooth theory based methods, the velocity Signorini condition or the acceleration Signorini condition are actually employed in most cases. The velocity Signorini condition is expressed as: formula_14, where formula_15 denotes the relative normal velocity after impact. The velocity Signorini condition should be understood together with the previous conditions formula_16. The acceleration Signorini condition is considered under closed contact (formula_17), as: formula_18, where the overdots denote the second-order derivative with respect to time. When using this method for unilateral constraints between two rigid bodies, the Signorini condition alone is not enough to model the impact process, so impact  laws, which give the information about the states before and after the impact, are also required. For example, when the Newton restitution law is employed, a coefficient of restitution will be defined as: formula_19, where formula_20denotes the relative normal velocity before impact. Frictional unilateral constraints. For frictional unilateral constraints, the normal contact forces are modelled by one of the methods above, while the friction forces are commonly described by means of Coulomb's friction law. Coulomb's friction law can be expressed as follows: when the tangential velocity formula_21 is not equal to zero, namely when the two bodies are  sliding, the friction force formula_22 is proportional to the normal contact force formula_23; when instead the tangential velocity formula_21 is equal to zero, namely when the two bodies are relatively steady, the friction force formula_22 is no more than the maximum of the static friction force. This relationship can be summarised using the maximum dissipation principle, as formula_26 where formula_27 represents the friction cone, and formula_28 denotes the kinematic friction coefficient. Similarly to the normal contact force, the formulation above can be equivalently expressed in terms of the notion of proximal point as: formula_29, where formula_5 denotes an auxiliary parameter . Solution techniques. If the unilateral constraints are modelled by the continuum mechanics based contact models, the contact forces can be computed directly through an explicit mathematical formula, that depends on the contact model of choice. If instead the non-smooth theory based method is employed, there are two main formulations for the solution of the Signorini conditions: the nonlinear/linear complementarity problem (N/LCP) formulation and the augmented Lagrangian formulation. With respect to the solution of contact models, the non-smooth method is more tedious, but less costly from the computational viewpoint. A more detailed comparison of solution methods using  contact models and non-smooth theory was carried out by Pazouki et al. N/LCP formulations. Following this approach, the solution of dynamics equations with unilateral constraints is transformed into the solution of N/LCPs. In particular, for frictionless unilateral constraints or unilateral constraints with planar friction, the problem is transformed into LCPs, while for frictional unilateral constraints, the problem is transformed into NCPs. To solve LCPs, the pivoting algorithm, originating from the algorithm of Lemek and Dantzig, is the most popular method. Unfortunately, however, numerical experiments show that the pivoting algorithm may fail when handling systems with a large  number of unilateral contacts, even using the best optimizations. For NCPs, using a polyhedral approximation can transform the NCPs into a set of LCPs, which can then be solved by the LCP solver. Other approaches beyond these methods, such NCP-functions or cone complementarity problems (CCP) based methods are also employed to solve NCPs. Augmented Lagrangian formulation. Different from the N/LCP formulations, the augmented Lagrangian formulation uses the proximal functions described above, formula_31. Together with dynamics equations, this formulation is solved by means of root-finding algorithms. A comparative study between LCP formulations and the augmented Lagrangian formulation was  carried out by Mashayekhi et al. Further reading. Open-source software. Open-source codes and non-commercial packages using the non-smooth based method: