Hello everyone,
I am applying uniaxial deformation along the z-axis. I am doing one simulation with tensile deformation and another one with compressive deformation. I am outputting pzz, which is positive for compression and negative for tension. Until now, everything is normal. BUT when I output the stress per atom in my dump files, c_1[3] is negative for all atoms both for tensile and compressive deformation… I really don’t know why. I tried both with and without the keyword virial in the stress per atom computation but this doesn’t change the result. Would anyone have any idea? here’s my code
metal units, pressure in bar
units metal
atom_style atomic
read_restart ${file}
pair_style cedip
pair_coeff * * C
neighbor 1.0 bin
neigh_modify every 1 delay 5 check yes
Define output parameters
variable nrelax equal 10000
variable nthermo2 equal 10000
variable ndump equal 50000 # every 0.5% def
variable nrestart equal 500000 # every 5% def
Define MD parameters
variable temp equal ${temperature} # temperature of initial sample
variable timestep equal 0.001 # timestep, in ps because of metal unit
variable erate equal 0.0001 # strain rate
Setup simulation control
compute 1 all stress/atom NULL virial
compute 2 all pe
variable g equal c_2
variable k equal pzz
variable l equal lz
thermo_style custom step temp pe press pxx pyy pzz pxy pxz pyz lx ly lz
thermo_modify norm no # default parameter for metal units anyway. means we don’t normalize by the number of atoms
timestep ${timestep}
reset velocities to temp with random seed
velocity all create ${temp} 5 rot yes dist gaussian
relax for a short time before deformation
fix 1 all npt temp {temp} {temp} 0.1 aniso 0 0 0.1 drag 1.0
run ${nrelax}
#########################################
run mechanical deformation: rescaling method along the tensile/compressive load z
The erate style changes a dimension of the box at a “constant engineering strain rate”. L(t)=L0*(1+erate*t)
so here delta_L= 0.01% of L0 every picosecond
unfix 1
reset_timestep 0
thermo {nthermo2}
dump 1 all custom {ndump} {dens}_{step}.tens.*.dump id type x y z c_1[1] c_1[2] c_1[3] c_1[4] c_1[5] c_1[6]
fix 1 all temp/rescale 10 {temp} {temp} 5.0 0.1
fix 3 all nph x 0.0 0.0 100.0 y 0.0 0.0 100.0 drag 1.0
fix 4 all deform 1 z erate ${erate}
fix 6 all print ${nthermo2} "pe is $g and pzz is $k and lz is l" file {dens}_${step}_info_tens.txt
restart {nrestart} {dens}_${step}.tens.*.restart
run 6000000