Hello, everyone. when simulateing tensile process, the boundary atoms don’t move in the later stage. What did I do wrong? I used the speed stretching method, and set the boundary atoms at a constant speed, which did not move in the later stage of stretching.
The script is the following.
#model
units metal
dimension 3
timestep 0.001
atom_modify map yes
read_data L4_L5_xyza.data
change_box all boundary fs p p
minimize-------------------------------
thermo 500
thermo_style custom step temp lx ly lz
thermo_modify lost ignore
dump 1 all custom 500 mini.fiber id type x y z vx vy vz fx fy fz
min_style cg
minimize 1e-12 1e-15 5000 5000
undump 1
reset_timestep 0
initialize temperature
reset_atom_ids sort yes
velocity move_group create 300 10000
fix boundary_group
fix 1 boundary_group setforce 0.0 0.0 0.0
relax in npt system
thermo 100
fix 2 all npt temp 300 298 (1000*v_timestep) y 1 1 (1000v_timestep) z 1 1 $(1000v_timestep)
thermo_modify lost ignore
dump 1 all atom 100 fiber_relax.1ammpstrj
run 5000
cancel fix, dump; clear timestep
unfix 2
undump 1
reset_timestep 0
define boundary of fix_group and move_group
variable length_0 equal bound(move_group,xmax)-bound(move_group,xmin)
variable length_start equal bound(move_group,xmin)
variable length_stop equal bound(move_group,xmax)
#set velocity in x direction
reset_atom_ids sort yes
velocity operate_group set ${tensile_rate} 0 0 sum yes units box
velocity fix_group set 0 0 0 units box
set temperature in tensile process
fix 2 all nvt temp 298 298 $(1000*v_timestep)
compute press
compute temp1 all temp
compute stress all pressure temp1
variable stressx equal -c_stress[1]/10000
variable stressy equal -c_stress[2]/10000
variable stressz equal -c_stress[3]/10000
compute stress of each atom
compute sigma_atom all stress/atom NULL
compute vol_atom all voronoi/atom
variable stressx_atom atom c_sigma_atom[1]/c_vol_atom[1]/10000
variable stressy_atom atom c_sigma_atom[2]/c_vol_atom[1]/10000
variable stressz_atom atom c_sigma_atom[3]/c_vol_atom[1]/10000
compute stress of move_group
compute 2 move_group reduce sum c_sigma_atom[1] c_sigma_atom[2] c_sigma_atom[3] c_vol_atom[1]
variable stres_x equal c_2[1]/c_2[4]/10000
variable stres_y equal c_2[2]/c_2[4]/10000
variable stres_z equal c_2[3]/c_2[4]/10000
print to file
thermo {num_step} thermo_style custom step temp v_stressx v_stressy v_stressz v_length_start v_length_stop v_stres_x v_stres_y v_stres_z c_2[1] c_2[2] c_2[3] c_2[4] thermo_modify lost ignore variable strain equal (v_length_stop-v_length_start)/{length_0}-1 # compute strain in x direct
#-------------------------save stress and strain to file---------------------------
fix stress_strain all print 800 “{stressx} {strain} {stres_x} {strain}” file stress_strain.dat screen no
dump 1 all custom ${num_step} fiber_tension.lammpstrj id type x y z vx vy vz v_stressx_atom v_stressy_atom v_stressz_atom c_vol_atom[1]
run 200000