[lammps-users] nve and nve/noforce

Hello,

Is there a way to apply nve and nve/noforce along different axes within a common group of atoms?

Imagine two blocks of material sliding past each other. I’d like to apply a force in the z-direction of the top block to apply a normal load. This will require nve to achieve the proper motion of the block. Next I want to apply a constant velocity in the x-direction to slide the block. To do this I need to set the forces in x equal to zero so the block will move. The problem is that I also need to measure the force in the x-direction (i.e. a friction force due to the sliding). To do that I need nve/noforce so the force is calculated but not included in the dynamics. These requirements appear to be at odds.

Any ideas?

Dear Dave,
If I am not wrong, setforce option could do that. You can printout the value of the setforce fix. Steve could confirm this.

Best
Vikas

Yes, I use setforce (aveforce actually) to apply the normal force in the z-direction. The catch is that if you use a null for the force in x and apply a velocity in x, the system doesn’t move. Or if you zero the force and apply a velocity, the system moves, but the output force is zero. Catch22.

I’m looking at the source code to see how hard it would be to make a fix like “nve/noforce/xyz” where the user specifies the dimensions in which to include forces or not include forces. Looks easy as far as modifying the code. I just don’t know how to implement my own fix yet. My lack of C++ skill is a bit of a hindrance. Can’t be too hard though.

I'm not clear on your request, but I think Vikas is right. Just integrate
everything with NVE. And apply various constraints with other
fixes, like setforce. Also note there is a fix store/force, which can
be used to store (and later output) forces before constraints change
them.

Steve