[lammps-users] Applying constant force

Dear Iman,

I did a simple experiment to illustrate what happens if you use fix
setforce and fix aveforce. (see attachments for the lammps data file which
test.dat and input file which is in.test.) In the experiment i have ten
atoms bonded together to form a chain. Each bond is defined by a fene bond
and each atom has an LJ pair potential. Atom 1 is fixed and atom 10 is
moving and is applied an external force of 10 KT/sigma along the +z
direction. If i used fix set force on the tenth atom, the chain will just
extend and the fene bonds just break (which should not happen and the
simulation croaks) and If i use fix aveforce on the tenth atom, the
simulation runs fine and is similar to an experiment in pulling polymers
using optical tweezers.

I dump the forces on the tenth atom using the dump custom command and I
noticed that if I use fix setforce, the force on atom ten on the z
direction is always 10 KT/sigma(That is why it fails because it disregards
the atoms existing force and the force calculated by the integrator).
However, the force on the tenth atom changes when I use the fix aveforce
command. My take on this is that it gets the actual force on atom 10 and
then add the external force. So if you have many atoms on the fix(say N),
and this atoms has an average existing force of fave, then each atom would
have a new force of (fave + fs) where fs is the specified force in the
fix. Hence the external force applied would be N*fs. (or fs per atom)

Paul and Steve, Kindly confirm if my conclusion is correct.

Jan-Michael

Dear Jan,

I do appreciate your help. I have another question!
In the LAMMPS manual, for "fix aveforce" it's been mentioned that "The

existing force is averaged for the group of atoms, component by
component.

The actual force on each atom is then set to the average value plus the

component specified in this command. This means each atom in the group
receives the same force." Suppose that the external force is applied in
z

direction. This sentence means that the actual total force on the group

of

atom is not N*fz, where N is the number of atoms in that group and fz is

the

force applied to each atom. I think this sentence means that the total

force

appled is equal to N*fz+N*average force, where average force is

determined

by averaging the existing force for that group of atoms. If this is the

true, the total external force is N*fz+N*averafe force. What is your
idea?

All the best,
Iman.

Hi Iman,
Try using "fix aveforce" at the moving end and use "fix setforce 0.0

0.0

0.0" at the constant end . This is the link to the doc files for fix

aveforce:

http://lammps.sandia.gov/doc/fix_aveforce.html
Jan-Michael
> Dear all,
>
> I am going to apply a constant force to one end of a carbon nanotube
while
> the other end is constant. I have used command "fix setforce", but

the

> results does not make any sense. While I expect after some time to
have a
> constant extension (with some fluctuations), the extension is
increasing
> until the carbon nanotube rupturs. I am using MD, and the "pairstyle"
is
> "Airebo". What is your idea?
>
> All the best,
> Iman.
> -------------------------------------------------------------------------

This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge

> Build the coolest Linux based applications with Moblin SDK & win

great

> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the

world

in.test (837 Bytes)

test.dat (1.42 KB)

if I use fix setforce, the force on atom ten on the z
direction is always 10 KT/sigma(That is why it fails because it disregards
the atoms existing force and the force calculated by the integrator).

This is correct (it's what the command is supposed to do) and is
probably why it is not a good choice for your desired effect.
You should either use fix addforce or fix aveforce.

Steve