Skip to content

feat(nexus-mpm): add Material Point Method solver with one-way coupling - #32

Merged
sebcrozet merged 7 commits into
mainfrom
mpm
Aug 15, 2026
Merged

feat(nexus-mpm): add Material Point Method solver with one-way coupling#32
sebcrozet merged 7 commits into
mainfrom
mpm

Conversation

@sebcrozet

@sebcrozet sebcrozet commented Aug 15, 2026

Copy link
Copy Markdown
Member

This PR adds support for the Material Point Method, which is a method for simulating non-rigid materials (elastic materials, granular materials, fluids, etc.) It currently supports:

  • Elasticity: corotated-linear and Neo-Hookean.
  • Plasticity: Drucker-Prager (sand), Snow.
  • Weakly compressible fluids (water).

It supports two types of boundary handling:

  1. Grid based: simple grid-based approach where particles will not tunnel through an object with a thickness larger than 1.5 the simulation cell-width.
  2. Compatible Particle In Cell (CPIC): a more expensive approach that supports thin plates (like open meshes) that can be used to cut elastic materials in multiple parts. It is currently limited to up to 16 colliders.

Both approach support friction/stick/slip interaction with particles. One-way coupling is supported, meaning that rigid-bodies (handled by the pre-existing rigid-body pipeline) can push particles, but particles cannot push rigid-bodies. So you can have rigid-objects moving around deformable objects, but you cannot have, e.g., a dynamic rigid object floating on water. Full two-ways coupling will be implemented in the future.

Unlike most open-source GPU MPM implementations out there, with Nexus:

  • Particles can be added/removed dynamically to the simulation.
  • We implemented a sparse grid data structure so that the boundaries of the domain that can be simulated remains open.

The new MPM solver is implemented in new crates nexus_mpm2d, nexus_mpm3d, nexus_mpm_shaders2d, nexus_mpm_shaders3d. But they should be controlled mainly through the unified multi-physics pipeline in the nexus2d and nexus3d crates. All the shaders are written in Rust, and compiled to SpirV using rust-gpu.

The viewer and examples have been updated. You can try them online there: https://nexus.dimforge.com/demos (scroll down on the demo list to find the MPM demos).

3D Centilever beam

An elastic beam fixed at one end (green rigid block with Stick boundary condition).
image

3D Water & Sand

Dynamically-added water poured on sand.

image

3D Sand on heightfield

A column of sand collapsing on a wavy heightfield.

image

3D Elastic balls

Five balls with different elasticity (more elastic on the left, more rigid on the right).

image

2D Sand columns

Columns of sand collapsing on their own weight, with various cohesion coefficient (stronger cohesions results in less collapse).

image

2D Dam break

A block of water flowing under its own weight, with disturbances induced by a cube placed on its path.

image

2D Hourglass

Sand flowing down an hourglass.

image

@sebcrozet sebcrozet changed the title feat: add Material Point Method solver with one-way coupling feat(nexus-mpm): add Material Point Method solver with one-way coupling Aug 15, 2026
@sebcrozet
sebcrozet merged commit 373579e into main Aug 15, 2026
5 checks passed
@sebcrozet
sebcrozet deleted the mpm branch August 16, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant