Simscape Multibody Contact Forces Library

Contact force examples and library.
29.3K Downloads
Updated 24 Dec 2025
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.
Use the links below to get files compatible with earlier releases of MATLAB.
See how to use these forces to model a cam-follower mechanism:
Learn more about multibody simulation with Simscape Multibody by watching this webinar
Try these free, hands-on tutorials to learn how to use Simscape:
To learn more about modeling and simulation with Simscape, please visit:
Product Capabilities:

Cite As

Steve Miller (2026). Simscape Multibody Contact Forces Library (https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/25.2.5.3), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2025b
Compatible with R2015a to R2025b
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
25.2.5.3

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/25.2.5.3

25.1.5.3

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/25.1.5.3

24.2.5.3

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/24.2.5.3

24.2.5.2

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/24.2.5.2

24.1.5.3

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/24.1.5.3

24.1.5.2

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/24.1.5.2

23.2.5.3

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/23.2.5.3

23.2.5.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/23.2.5.1

23.1.5.3

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/23.1.5.3

23.1.5.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/23.1.5.1
See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/23.1.5.1

22.2.5.3

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/22.2.5.3

22.2.5.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/22.2.5.1

22.1.5.3

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/22.1.5.3

22.1.5.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/22.1.5.1

22.1.5.0

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/22.1.5.0

21.2.5.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/21.2.5.1

21.2.5.0

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/21.2.5.0

21.1.5.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/21.1.5.1

21.1.5.0

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/21.1.5.0

20.2.5.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/20.2.5.1

20.2.5.0

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/20.2.5.0

20.1.5.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/20.1.5.1
See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/20.1.5.1

19.2.5.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/19.2.5.1

19.2.5.0

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/19.2.5.0

19.1.4.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/19.1.4.1

18.2.4.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/18.2.4.1

18.1.4.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/18.1.4.1

17.2.4.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/17.2.4.1

17.1.4.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/17.1.4.1

16.2.4.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/16.2.4.1

16.1.4.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/16.1.4.1

15.2.4.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/15.2.4.1

15.1.4.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Multibody-Contact-Forces-Library/releases/tag/15.1.4.1

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.