This example simulates a ball bouncing on a hard surface.
When you run the Solver Profiler on this model, the model simulates in
2898
steps and that it triggers 67
zero
crossing events. To highlight the zero crossing events on the step size plot, click the
Zero Crossing tab and select the block that is causing the
event.
The result indicates that when the ball drops on the hard surface, it bounces 67 times before coming to a stop. The solver resets after each bounce, increasing the computational load. Having many resets improves accuracy at the cost of computation load. Therefore, it is important to know this tradeoff when modeling.
If this modeling construct belonged to a larger model, the Solver Profiler would help
you locate it. You could then modify the model to improve solver performance. For
example, you can decide to reduce the accuracy of the contact dynamic by increasing the
damping factor, which would reduce the number of bounce events. Increasing the damping
from 100 to 500 makes the ball bounce only 13
times, allowing the
simulation to complete in only 669
steps.