# Rigid body remap of velocities

As the documentation (fix deform command — LAMMPS documentation) explicitly states that bodies with a rigid fix do not have their velocities remapped while using a deform fix (even with the “remap v” argument stated), is there anyway to otherwise enforce this? As in, is there a separate command that can be used to change particle velocities in a way to match what a velocity remap would do?
As for context, I would like to also have a langevin fix and use rigid/nve/small, and would do simple shear with a gradient in the y direction.

The documentation does state that one can “include a background fluid and thermostat the fluid via fix nvt/sllod” instead, but I don’t see how that would remap the rigid bodies within the fluid as they cross periodic boundaries.

Not without some significant C++ programming. The reason for this is that the velocities for atoms forming a rigid body are reconstructed from the center of mass velocities, angular velocities around the center of mass and the rigid body geometry in every step, so whatever you can do in fix deform will be overwritten. It is rather complicated though because the very nature of the rigidity conflicts with the remapping.

Fix nvt/sllod operates on atoms, not rigid bodies. This suggestion is assuming that you have few “large” rigid bodies suspended in an atomic fluid and then the velocity/temperature profile will only be induced on the atomic subsystem. Keep in mind that with rigid bodies not deforming during fix deform but only their center of mass being displaced, there is an unavoidable built-in inconsistency in both positions and velocities of the rigid bodies compared to atomic/flexible systems.

Ok, thanks for the reply, and it did seem that any code modification route would be tough. I did have another thought though - could addforce save me here? If I add a force every timestep that is a function of atom y position, so that the added force is the same as would be given by a langevin style drag force in simple shear, then the same timestep a rigid body comes though the bottom the applied addforce would be new remapped max y (and vice versa for a body wrapping around through the top).

Such a force would (also) induce a rotation. Is that want you want?

I believe so - I’m interested in the “non-Brownian” motion of elongated, rigid particles under flow. A single particle would be expected to rotate (as described by Jeffery orbits), and either way the effect will be diminished by the presence of many neighboring particles in a concentrated setup.

For any future readers who are interested in similar simulations; addforce was not a satisfactory solution. What does work to shear rigid, linear particles composed of finite size sub-particles is to use atom_type hybrid angle sphere (where sphere can be replaced by a different finite size type), as this allows you to create bonds and angles between atoms, which you can arbitrarily make as strong/stiff as you’d like (i.e. you can set the angles all to 180). The sub-particles that make up your linear particle do have their velocities remapped, and fix deform works as desired.

1 Like