Skip to content

TrustySim

TrustySim is a simulator you can trust! Solids, cloth, rods, rigid bodies, fluids, you name it: just add it to the scene and it just works. Everything is fully coupled.

Our goal is that the user should be free from tuning low-level solver parameters to get the output they desire. We support frictional, interpenetration-free contact between any representation out-of-the-box. A range of material models are already supported, and many more will be added as the library expands. Both CPU and GPU backends are supported.

Fully coupled simulation with a T composed of tetrahedra, an r of jointed affine bodies, a u of an aluminium-foil shell, an s of elastic MPM particles, a t of hexahedra and a y of an embedded solid in its voxel grid, all squeezed together by elastic rods. See the code โ†’

Install

Try it

Make an environment and install trusty-sim and the polyscope viewer:

python -m venv .venv && source .venv/bin/activate
pip install trusty-sim polyscope

This is a pre-release. For uv, the GPU build, supported platforms and checking your build, see Install. Then run a cantilever beam sagging under gravity in your first simulation.

All examples โ†’

Modules

  • Solids

    Hex and tet meshes, linear and quadratic elements, hyperelastic and plastic materials.

  • Affine bodies

    Near-rigid bodies, joints, joint drives and muscles.

  • Embedded solids

    Voxelized solids whose surface follows a fine embedded mesh.

  • Shells

    Thin sheets and cloth with membrane and bending models.

  • Rods

    Elastic rods with twist, and muscles along them.

  • MPM

    Particle-based materials such as fluids and granular media.

  • Subspace bodies

    Reduced-order bodies built from a precomputed basis.

  • Contact

    IPC contact, planes and walls, friction, per-body exclusions.

  • Constraints

    Exact and compliant pins and moving targets, with loads and actuators.

Citing

If you use trusty-sim in your research, please cite it:

@software{trusty_sim,
  author  = {Trusty, Ty},
  title   = {trusty-sim},
  version = {0.1.0a13},
  year    = {2026},
  url     = {https://tytrusty.github.io/trusty-docs/}
}

trusty-sim is available under dual licensing.