# Cube under uniaxial tension. dimension 3 boundary s s s atom_style atomic units metal log ./log.lammps #geometry read_data ./cube2.dat #Potential pair_style eam/alloy pair_coeff * * ./potentials/AlCu.eam.alloy Al #groups region xright block 22.176 24.192 0 24.192 0 24.192 units box region xleft block 0 2.016 0 24.192 0 24.192 units box region xright_n block 20.16 22.176 2.016 22.176 2.016 22.176 units box region yfront_n block 2.016 22.176 20.16 22.176 2.016 22.176 units box region ztop_n block 2.016 22.176 2.016 22.176 20.16 22.176 units box region inner_box block 4.032 20.16 4.032 20.16 4.032 20.16 units box group xright_r region xright group xleft_r region xleft group xstress region xright_n group ystress region yfront_n group zstress region ztop_n group energy_atms region inner_box #computes required compute energy energy_atms pe/atom compute sumenergy energy_atms reduce sum c_energy compute stress_x xstress stress/atom pair compute stress_y ystress stress/atom pair compute stress_z zstress stress/atom pair compute sum_pressx xstress reduce sum c_stress_x[1] c_stress_x[2] c_stress_x[3] compute sum_pressy ystress reduce sum c_stress_y[1] c_stress_y[2] c_stress_y[3] compute sum_pressz zstress reduce sum c_stress_z[1] c_stress_z[2] c_stress_z[3] variable xlength equal bound(xstress,xmax)-bound(xstress,xmin) variable ylength equal bound(xstress,ymax)-bound(xstress,ymin) variable zlength equal bound(xstress,zmax)-bound(xstress,zmin) variable xlength1 equal bound(ystress,xmax)-bound(ystress,xmin) variable ylength1 equal bound(ystress,ymax)-bound(ystress,ymin) variable zlength1 equal bound(ystress,zmax)-bound(ystress,zmin) variable xlength2 equal bound(zstress,xmax)-bound(zstress,xmin) variable ylength2 equal bound(zstress,ymax)-bound(zstress,ymin) variable zlength2 equal bound(zstress,zmax)-bound(zstress,zmin) variable volumex equal ${xlength}*${ylength}*${zlength} variable volumey equal ${xlength1}*${ylength1}*${zlength1} variable volumez equal ${xlength2}*${ylength2}*${zlength2} variable press_x equal (c_sum_pressx[1])/(${volumex}) variable press_y equal (c_sum_pressy[2])/(${volumey}) variable press_z equal (c_sum_pressz[3])/(${volumez}) thermo_style custom step epair etotal press c_sumenergy v_press_x v_press_y v_press_z dump 1 all atom 2 ./dump_initial.void dump_modify 1 scale no #relax before load min_style cg minimize 1.0e-8 2000 2000 #fixes required fix 1 xright_r setforce 0 NULL NULL fix 2 xleft_r setforce 0 NULL NULL #tensile load minimisation loop variable i loop 100 label loop dump 2 all atom 100 ./file.$i dump_modify 2 scale no next i jump ./in.minimize.tensile