Velocity Command

Dear Lammps Users,

I am using Lammps to perform compression test on a copper sample. What I do is to select a few top layers of atoms of the sample, make them become rigid (fix setforce 0 0 0), then give them a velocity of 0.2 Angstrom/picosecond along z direction to compress for 200picoseconds. I think the sample should be compressed by 40 Angstroms along z direction, but actually it’s only compressed by a few Angstroms(around 1 Angstrom). Could you help me find out the reason? Below is my code. Thanks!

units metal
boundary p p s
atom_style atomic

read_data sample.txt

lattice fcc 3.615

pair_style eam/alloy
pair_coeff * * Cu_mishin1.eam.alloy Cu

neighbor 2.0 bin
neigh_modify delay 5

region uppermobile block -10 10 -10 10 2 4
region lowerfix block -10 10 -10 10 -12 -10.75
group uppermobile region uppermobile
group lowerfix region lowerfix
group mobile subtract all lowerfix

equilibrate

compute centro all centro/atom fcc
compute mobile_temp mobile temp
velocity mobile create 0.01 1235654 temp mobile_temp

fix 1 all nve
fix 2 lowerfix setforce 0.0 0.0 0.0
fix 3 all temp/rescale 10 0.01 0.01 0.1 1.0

thermo 500
thermo_style custom step temp lx ly lz press pxx pyy pzz
thermo_modify temp mobile_temp
thermo_modify lost warn norm yes

run 50000

compression

velocity uppermobile set 0 0 -0.2 units box
fix 4 uppermobile setforce 0.0 0.0 0.0

reset_timestep 0
thermo 100
thermo_style custom step temp lx ly lz
thermo_modify temp mobile_temp
dump 1 all custom 10000 load1.* x y z c_centro

run 200000

Have you verified that the velocity of those atoms stays
constant over time? If so, they should continue to
move with constant velocity. You can verify this simply by dumping the
velocities and coordinates to a file.

Steve

Dear Lammps Users,
I am using Lammps to perform compression test on a copper sample. What I do
is to select a few top layers of atoms of the sample, make them become rigid
(fix setforce 0 0 0), then give them a velocity of 0.2 Angstrom/picosecond
along z direction to compress for 200picoseconds. I think the sample should
be compressed by 40 Angstroms along z direction, but actually it's only
compressed by a few Angstroms(around 1 Angstrom). Could you help me find out
the reason? Below is my code. Thanks!
units metal
boundary p p s
atom_style atomic
read_data sample.txt
lattice fcc 3.615
pair_style eam/alloy
pair_coeff * * Cu_mishin1.eam.alloy Cu
neighbor 2.0 bin
neigh_modify delay 5
region uppermobile block -10 10 -10 10 2 4
region lowerfix block -10 10 -10 10 -12 -10.75
group uppermobile region uppermobile
group lowerfix region lowerfix
group mobile subtract all lowerfix
# equilibrate
compute centro all centro/atom fcc
compute mobile_temp mobile temp
velocity mobile create 0.01 1235654 temp mobile_temp
fix 1 all nve
fix 2 lowerfix setforce 0.0 0.0 0.0
fix 3 all temp/rescale 10 0.01 0.01 0.1 1.0

here is the problem. you are rescaling
the velocities for group all.

axel.

1 Like