Skip to content

Per-particle stress tensor and contact force export in MPM simulation #8792

@KIMHYUNKYU333

Description

@KIMHYUNKYU333

Concisely describe the proposed feature
A clear and concise description of what you want. For example,

I would like to add an Apple Metal backend to the compiler so that my Macbook GPU can be utilized.

Describe the solution you'd like (if any)
A clear and concise description of what you want to achieve and implement.

Additional comments
Add any other context or screenshots about the feature request here.

Summary

Taichi's MPM implementation is excellent for simulating deformable materials, but currently lacks a convenient way to extract per-particle stress tensors and contact forces during simulation for downstream use (e.g., dataset generation, policy training).

What's missing

  • Stress tensor readout: Stress is computed inside the P2G kernel but not stored as a persistent field. Extracting Cauchy stress or von Mises requires re-deriving from deformation gradient F in user code, which is fragile across different constitutive models.
  • Contact force isolation: When soft bodies interact with rigid objects, there's no built-in way to separate contact reaction forces from internal elastic forces per particle or per surface vertex.

Use case

Generating labeled synthetic data for robotic manipulation of deformable objects. Per-step stress and contact force ground truth are needed for training manipulation policies and sim-to-real transfer.

Proposed API (sketch)

stress = mpm_model.get_stress(kind="cauchy")   # (n_particles, 3, 3)
von_mises = mpm_model.get_von_mises()          # (n_particles,)
contact_f = mpm_model.get_contact_forces()     # (n_surface, 3)

Potential benefits

  • Enables large-scale synthetic data generation for contact-rich tasks without custom solver patches
  • Opens up deformable manipulation benchmarking (grasp quality, damage prediction)
  • Strengthens Taichi's position as an end-to-end simulation platform for robotics research

Happy to discuss or contribute if there's interest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestSuggest an idea on this project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions