Contact force examples and library.
https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library
You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Please note that the Spatial Contact Force block has been added in R2019b. You should see if this block meets your needs before using this library.
This library contains contact force models and force laws for multibody modeling in Simscape Multibody. They cover 2-dimensional and 3-dimensional problems with or without friction. More than 45 example models are provided, including basic contact force examples (bouncing ball) and more complex applications such as a cam-follower mechanism, differential drive robot, and a robot arm with a gripper. Both linear and nonlinear force laws are included, and you can easily add your own custom force law to your multibody dynamics model.
Use the "Download" button above to get files compatible with the latest release of MATLAB.
You can also test this example in MATLAB Online.
For earlier MATLAB releases, use "Version History" tab above or these links:
- R2025b, R2025a, R2024b, R2024a, R2023b, R2023a, R2022b, R2022a, R2021b, R2021a, R2020b, R2020a, R2019b, R2019a, R2018b, R2018a, R2017b, R2017a, R2016b, R2016a, R2015b, R2015a
See how to use these forces to model a cam-follower mechanism:
Learn more about multibody simulation with Simscape Multibody by watching this webinar
Learn how to use Simscape with
- Self-paced tutorials, including multi-domain systems, 3D mechanical systems, circuits, motors, and battery packs.
- Searching posts for the keyword "physical modeling".
- Stories from users: https://www.mathworks.com/solutions/physical-modeling.html
Product Capabilities:
Cite As
Steve Miller (2026). Simscape Multibody Contact Forces Library (https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/26.1.5.3), GitHub. Retrieved .
General Information
MATLAB Release Compatibility
- Compatible with R2015a to R2026a
Platform Compatibility
- Windows
- macOS
- Linux
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.
