Skip to content

Support rigid bodies in MPCD #2001

Open
@mzbush

Description

@mzbush

Description

Rigid bodies are currently incompatible with MPCD collision methods because:

  1. The collision method needs to read the velocities of constituent particles, but they are not currently set.
  2. The collision method updates the velocity of constituent particles in a way that is inconsistent with rigid motion.

We should add support for rigid bodies to the collision methods.

Proposed solution

  1. ForceComposite should set the velocity of constituent particles based on the linear and angular velocity of the rigid body when it sets their positions and orientations.

    • HOOMD's angular momentum quaternion can be used to compute the angular velocity in the body frame.

    • The body's angular velocity can be used to get constituent particle velocities in the body frame relative to the center-of-mass translation.

    • These velocities can then be rotated to the space frame and have the center-of-mass translational velocity added.

    • Question: should this always be done, or should it be opt in?

  2. The CollisionMethod should store the net change in space-frame linear and angular momentum for each rigid body as a result of collisions on constituent particles.

    • The changes can be computed by the base class taking the difference in velocity of constituent particles before/after collision or by recording the change during each collision. The first option is more generic, but the second option is probably faster because it has less read/write transactions.

    • In MPI simulations, we will need to reduce these contributions onto the rank that owns the central particle, then broadcast the result.

    • These changes will be used to update the velocity and angular momentum of the central particle for the body, then reset the constituent velocities.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmpcdMPCD component

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions