9.6.7.1. Best Practices for Contact in Rigid Body Analyses

The following guidelines are considered best practices for optimizing performance with contact when simulating complex models with large numbers of contact elements, long duration, or high speed.

Time Integration Type
  • Use the Moreau-Jean time stepping method when non-smooth and for:

    • Models with large number of contact elements

    • Models with many locks/stops

  • Use a small Initial Time Step.

  • Use a small Max Time Step.

  • Use output controls to limit the number of steps saved.

Mesh
  • Use low order triangle element shape.

  • Use mapped mesh when possible.

  • Make sure the mesh is capturing the fine details of your model.

Contact Pairs

Contact can be defined on surfaces or on entire bodies.

  • When defining contact on a surface, one surface/surface pair is defined per surface. If your contact has less than a dozen surfaces on each side, surface to surface contact should be used. When dealing with a larger number of surfaces, use body to body contact. For example, when modeling contact between the teeth of two gears, body to body contact is best.

  • When using body to body contact, mesh-based contact is the only option.

  • Setting the coefficient of restitution to 0 introduces some dissipation into the model and adds robustness.

Pinball

Pinball radius is automatically calculated based on the size of the contact surface pairs. Most of the time, this value is correct. In cases where the pinball radius is very small, increasing it slightly should correct the issue (don't go over 10 times the default value). The actual value of the pinball radius can be found in the solver log file:

Forced Frictional Sliding – Body1 to Body2 is open. Contact radius = 7.828508e-004

Special Cases

When a gap is small and surface exact geometry matters, you should use geometry-based contact. In cases like this, Moreau-Jean time-stepping can still be used.

Redundancies

The rigid body solver solves for forces between bodies. When the model is redundant, these forces are harder to determine. The solver has multiple algorithms that are used in sequence to determine forces between bodies. At time 0, the solver often has no information about forces, so adding an initial step to bring all the parts of the model into proper touching configuration can help. When applicable, use the 2-D option (only generates a few contact points per pair).

When redundancies can't be avoided, you can attempt to force convergence by inserting the ContactUseRobustPSOR(itermax) command in a snippet with itermax being a large number (5000 - 10000 is typical). This will increase solution time, and you should carefully review the joint and contact forces.

Monitoring Contact

The contact log file shows the status of contacts in the simulation. In the following example, one pair goes from separated to touching at time 0.151928:

Region: Solid - Solid - Separated...
Number Of Points 7

Region: Solid - Solid - Separated...
Number Of Points 7

Region: Solid - Solid - Separated...
Number Of Points 7
________________________

Region: Solid - Solid - ...
Shock 1 time prediction is = 0.151928 alpha 0.638561
________________________

Region: Solid - Solid - Touching...
Number Of Points 7

Checking the contact log file can help you troubleshoot contact in your model.

  • Shocks are not reported for Moreau-Jean time-stepping, but the status does change.

  • Look for contact status Penetrated if the solution fails at time = 0. You can configure joints to avoid this initial penetration.

  • Check the number of points for a given contact pair. Avoid large and small numbers. If necessary, change the mesh density.

Monitoring the Solver

The solver output monitors the solver progress. It lists the status of contacts and stops.

Contact "Frictionless - Solid To Solid" not active (0 points received)
_____________________________________________________________
Contact "Frictionless - Solid To Solid" not active (0 points received)
_____________________________________________________________
Current Time: 0.12 Current time step 0.05
Frictionless - Solid To Solid is open.
_____________________________________________________________
Contact "Frictionless - Solid To Solid" not active (0 points received)
_____________________________________________________________
Contact "Frictionless - Solid To Solid" Received 7 contact points
Stopped Frictionless - Solid To Solid at 0.151928

Time 0.1519 Solving Shock 1

Stopped Frictionless - Solid To Solid at 0.151928
Time 0.151928 Processing Event "Contact"
Frictionless - Solid To Solid is open.
_____________________________________________________________
Contact "Frictionless - Solid To Solid" not active (7 points received)

The solver log file will also report redundancies. When detected, the solver will mention LCP errors:

*** Error:
w[4]=1.097266e-005 > threshold2=7.859939e-007, z[4]=6.639837e-001, > threshold=8.865630e-009
0 C_BlockMatrix::Block::CheckLCPSolution(), C_BlockMatrix.cpp line 2174

Murty by Factorization algorithm failed
Trying PSOR
PSOR algorithm reached maximum number of iterations: 680
Initial residual 4.455025e+000 Last 3 residual values are 2.194531e-005 2.194531e-005 2.194531e-005
PSOR algorithm failed
Trying Lemke

threshold is the force in the contact that the solver needs to reach for convergence. The value depends on global forces in the model.

A model with touching contact with no forces is always difficult for the solver. Adding small forces to stabilize the solution usually helps with convergence. In many cases, gravity is sufficient.

Friction

Frictionless and Forced frictional contact are the only supported contact types for Moreau-Jean time-stepping.