# question about setforce command vs move linear

Hello everyone,

I am new in LAMMPS and I have a question hopefully someone can help me.

I am trying to model a scratch (a rigid body moving on a plate).

I can get the model running by vertically moving the rigid body using move linear command as:

fix 5 hi-fixed move linear 0.0 -0.005 0.0 units box

But in order to calculate the coefficient of friction I need to apply normal load, therefore, I tried to use setforce as:

fix 5 hi-fixed addforce 0.0 3120000.0 0.0

even though I increased the amount of force to a really high value but the group doesnt move at all.

I would appreciate if anyone can tell me what am I doing wrong?

Thanks,
Alex

Hello everyone,

I am new in LAMMPS and I have a question hopefully someone can help me.

I am trying to model a scratch (a rigid body moving on a plate).

I can get the model running by vertically moving the rigid body using move
linear command as:

fix 5 hi-fixed move linear 0.0 -0.005 0.0 units box

But in order to calculate the coefficient of friction I need to apply normal
load, therefore, I tried to use setforce as:

fix 5 hi-fixed addforce 0.0 3120000.0 0.0

even though I increased the amount of force to a really high value but the
group doesnt move at all.

I would appreciate if anyone can tell me what am I doing wrong?

fix move includes time integration of the particles in the group, fix
addforce does not. you may need to add a fix nve for those atoms.

axel.

It’s working.

Thank you so much.

Alex

Hi again,

So the previous problem was solved but now I’m facing a new problem. I’m trying to model scratch in LAMMPS. In this model, I have a vertically moving pin on a horizontal moving plate. The pin moves down by force, and there is no restriction in the x direction to stop the pin from moving in that direction. On the other side the plate moves in the x direction. Therefore, as soon as the pin touches the plates it moves with that and doesnt scratch the plate.

Can you please tell me how can I restrict my pin from movement in x direction?

Hi again,

So the previous problem was solved but now I'm facing a new problem. I'm
trying to model scratch in LAMMPS. In this model, I have a vertically
moving pin on a horizontal moving plate. The pin moves down by force, and
there is no restriction in the x direction to stop the pin from moving in
that direction. On the other side the plate moves in the x direction.
Therefore, as soon as the pin touches the plates it moves with that and
doesnt scratch the plate.

Can you please tell me how can I restrict my pin from movement in x
direction?

​for example:​

​a) you can tether the pin in space with fix spring/self​
or b) you can immobilize the pin in x direction, by setting the vx
component of its constituent atoms to zero and use fix setforce to do the
same for the x component of the forces.

​axel.​

It worked well. Thank you so much.