Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fem] Allow additional quadrature points for external force integration #22419

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

xuchenhan-tri
Copy link
Contributor

@xuchenhan-tri xuchenhan-tri commented Jan 7, 2025

Closes #21496


This change is Reviewable

Copy link
Contributor

@chen-tianjian chen-tianjian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 unresolved discussion, needs platform reviewer assigned, needs at least two assigned reviewers, commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @xuchenhan-tri)


examples/multibody/deformable/deformable_torus.cc line 212 at r1 (raw file):

  if (use_suction) {
    auto suction_force = std::make_unique<PointSourceForceField>(
        plant, plant.GetBodyByName("cup_body"), Vector3d(0, 0, -0.065), 0.01);

Can we make this falloff_distance even smaller in this example, e.g. 3mm is a realistic value, without changing the mesh resolution?

Copy link
Contributor

@chen-tianjian chen-tianjian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 2 unresolved discussions, needs platform reviewer assigned, needs at least two assigned reviewers, commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @xuchenhan-tri)


examples/multibody/deformable/deformable_torus.cc line 193 at r1 (raw file):

  /* Subdivide the element for suction force integration; otherwise, the mesh is
   too coarse for the support of the suction force field (1cm radius). */
  deformable_config.set_element_subdivision(2);

Can we achieve the same thing by adding more quadrature points, without changing the mesh resolution? Just as a demo to show the capability of the new feature.

Copy link
Contributor

@chen-tianjian chen-tianjian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 unresolved discussion, needs platform reviewer assigned, needs at least two assigned reviewers, commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @xuchenhan-tri)


examples/multibody/deformable/deformable_torus.cc line 193 at r1 (raw file):

Previously, chen-tianjian (Tianjian Chen) wrote…

Can we achieve the same thing by adding more quadrature points, without changing the mesh resolution? Just as a demo to show the capability of the new feature.

Sorry maybe I misunderstood. I thought the subdivision is equivalent to having a finer mesh which slows down everything, but that is not true, right?

Copy link
Contributor Author

@xuchenhan-tri xuchenhan-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 unresolved discussion, needs platform reviewer assigned, needs at least two assigned reviewers, commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @xuchenhan-tri)


examples/multibody/deformable/deformable_torus.cc line 193 at r1 (raw file):

Previously, chen-tianjian (Tianjian Chen) wrote…

Sorry maybe I misunderstood. I thought the subdivision is equivalent to having a finer mesh which slows down everything, but that is not true, right?

Yes, we are only sampling more quadrature points to integrate the external forces. It definitely adds computation overhead, but it should slow the sim down nearly as much as actually subdividing the mesh. Perhaps this needs a better name?


examples/multibody/deformable/deformable_torus.cc line 212 at r1 (raw file):

Previously, chen-tianjian (Tianjian Chen) wrote…

Can we make this falloff_distance even smaller in this example, e.g. 3mm is a realistic value, without changing the mesh resolution?

You could definitely play with the parameters in this demo. However, keep a few things in mind.

  1. The PointSourceForceField is likely not a good model for suction force; it's only a toy model for testing the external force field. In particular, when the manipuland goes "into" the suction cup (due to the suction force and compliant contact), the point source force will push the manipuland out, which is probably not what you want.
  2. The external forces are integrate explicitly, as the force field becomes closer to a singularity, it may becomes a source of instability.
  3. Keep in mind that we are taking rather large timesteps here. If the gripper moves 10mm in a timestep, would it still make sense to have such a small fall-off distance? I don't know the answer but something worth thinking about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase the number of quadrature points used to sample external forces in FEM deformable simulation
2 participants