Hi,
We have been looking into Project Chrono as an alternative physics engine to what we currently use for heavy vehicle simulations. I can't share the code but I can try and give as much detail as possible.
We have been able to reproduce some tests and vehicle models giving similar results for some performance tests.
However the issue now is being able to run simulations quickly. With our current physics engine it runs fairly quick due to an adaptive timestepper. However in Project Chrono, i have tried to use HHT or implement our own based off solver error to change the timestep. So far the only solver that is able to solve fairly quickly is the default PSOR or BB, but the outputs of BB we found we're quite noisy e.g. for acceleration of a body.
We do use VSG but we have decoupled it so that we run the simulation first and record body positions/rotations at each time step and then play it back after the simulation has finished.
This is for heavy vehicle combinations so we use ChWheeledVehicle and ChWheeledTrailer. For a single wheeled vehicle e.g. just a truck, the real time factor is about ~0.4-0.6 at a fixed timestep of 1e-3 and max iterations of 200. 1e-3 seemed to be the most stable timestep, however we feel that during steady state parts of the simulation (e.g. no turning just driving in straight line) it should be able to go up to a higher timestep. We set the error threshold to 1e-3 as well however it never reaches that (even if increasing iterations to 2000 for example).
Some stats if this helps, this is an equilibrium test where the vehicle is just loaded in with suspension preloads calculated beforehand and we are looking at the axle loads.
- Active bodies: 17
- Active shafts: 11
- Active links: 45
- Num states: 113
- Num constraints: 125
Real time factor ~0.4-0.6
Timestep: 1e-3
Run on an Intel i5-13600k
For a single (6x4) wheeled vehicle with 1 ChToebarLeafspringAxle, 2 ChLeafspringAxle with a ChShaftsDriveline4WD. Using the ChAutomaticTransmissionSimpleMap and ChEngineSimpleMap. ChRotaryArm steering system.
We have also implemented our own tire model which is ChForceElementTire that just uses a lookup table of real world test data from the longitudinal slip and slip angle to provide force/moments.
We use the SMC system, however we disabled collisions as we don't need them at the moment. We don't use deformable terrains just OpenCRG/Rigid/Flat terrains.
Our vehicles due to the nature use stiff suspensions/tyres and are carrying
heavy masses with a full vehicle combination could be up to/around 100t and most tests are driving following a path. While we understand more trailers will definitely up the simulation cost, we were just looking at optimising in general.
Is there anyway to increase the speed / lower the error or a better solver/timestepper combo? One thing I did find that we use is the ChToebarLeafspringAxle, which when connected to the draglink steering system is a source of high error, as when we remove the error lowers significantly. Or is there some modelling error perhaps? We use most of Project Chrono's base classes but extend it to fit our needs.
Thanks for your time and please feel free to ask for any clarification and I will try my best to give whatever info I am able to.