Rigid body simulation of complex mechanical systems

Click For Summary
SUMMARY

This discussion focuses on the challenges of simulating complex mechanical systems using rigid body physics libraries, specifically Project Chrono and Bullet Physics. Key issues identified include unreliable collision detection for complex shapes, instability in joints under realistic conditions, and difficulties with constraint solvers in handling ill-conditioned matrices. The user seeks recommendations for robust libraries, potential brute-force methods, and insights into whether these limitations are inherent to rigid body models or if alternative approaches like Finite Element Analysis (FEA) are necessary.

PREREQUISITES
  • Understanding of rigid body dynamics and physics simulation principles.
  • Familiarity with libraries such as Project Chrono and Bullet Physics.
  • Knowledge of collision detection algorithms and convex decomposition techniques.
  • Experience with constraint solvers and their mathematical foundations.
NEXT STEPS
  • Research advanced rigid body simulation libraries like PhysX and MuJoCo.
  • Explore brute-force collision detection methods and their implementation.
  • Investigate Finite Element Analysis (FEA) tools for mechanical simulations.
  • Learn about multibody simulation software such as ADAMS and Simpack.
USEFUL FOR

Mechanical engineers, robotics developers, and simulation specialists looking to enhance their understanding of rigid body dynamics and improve the reliability of complex mechanical simulations.

Delta Kilo
Messages
329
Reaction score
22
TL;DR
I'd like to simulate a complex mechanical automaton with lots of gears, cams, levers and springs.
I tried a couple of rigid body mechanics libraries and they all have limitations.
Just wondering what is the state of the art in the field and what other people are doing.
Greetings,

I'd like to simulate a complex mechanical automaton with lots of gears, cams, levers and springs. Most of the parts are going to be 3D printed except for some metal springs, rods and bearings. I want to make sure everything fits together and works as expected. Here is just a small part of the mechanism I want to simulate:
cams.png
I looked at some of the libraries for rigid body physics simulation, Project Chrono and Bullet physics in particular. I can get them to work, sort of, but I cannot seem to get reliable results. As soon as the system becomes complex enough, everything just falls apart. The problems are:
* Collisions are only supported between simple convex shapes. Complex shapes, like gears, have to be manually broken up into convex primitives.
* Collisions between small objects (like gear teeth) are unreliable and sometimes can be missed entirely.
* Joints (such as fixed joint, revolution joint) are not rigid enough, they seem to flex and bend in directions they are not meant to. A chain of levers connected with revolution joints constrained to rotate in XY plane, just falls apart under its own weight when I specify realistic sizes, densities and gravity.

I spent some time looking into the matters, reading the literature and the source code and as far as I understand there are 2 fundamental issues:
* Collision detection needs to generate "penetration vector" which is the shortest vector to move objects apart. This vector is well defined only for simple cases, like sphere-sphere, sphere -plane etc. There is an algorithm to compute it for convex hulls but it is not perfect (penetrating vector computed from object A to object B is different to the one from B to A). As a result, when two objects collide, the direction of the resulting force may vary quite a lot depending on the fine details of the mesh. General case of concave objects is treated by splitting them up using convex decomposition. Convex decomposition applied to a simple concave object (like a cylinder with a hole in it) tend to produce a mess of small slivers which make subsequent collision detection very difficult.
* Constraint solver has to deal with with large ill-conditioned matrices, especially when there are multiple constraints in the design which are aligned in the same direction. When the system is constructed some first order approximations have to be made. Also the system depends on the set of contact points which can change a lot from one time step to another, as is case of two flat faces in contact. This causes stability issues and makes simulation behavior very sensitive to time step selection.

So my questions are:

What is the state of the art in rigid body simulation? Are there any libraries (preferably open source) that can do what I need out of the box?
Are there any offerings from big players with this kind of functionality that I can try for free just to see how it works?
Is there a slow but reliable brute-force method to solve it? Are there any tricks to make the simulation work reliably? Or is it just too hard?
Or are the issues inherent in the limitations or rigid body model and I need to go all the way and model all bodies with FEA?
Or am I missing something obvious here?

Regards,
DK

PS: I'm not sure whether this post belong to Physics, Math, Software or Engineering. Moderators are welcome to move it to the most appropriate forum.
 
Engineering news on Phys.org
Apart from ADAMS there's also Simpack from Dassault Systemes. It features many advanced capabilities including for example flexible bodies. It can even work with Abaqus and other software during co-simulation.
 
Comsol doesn't conserve the energy watch out to test all kinds all elements and values in it firts.... ITS A MUST TO DO...
 

Similar threads

Replies
17
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 12 ·
Replies
12
Views
3K
Replies
17
Views
9K
  • · Replies 4 ·
Replies
4
Views
4K