Tensile
In [ ]:
Copied!
%reload_ext lammpscn.lammps
%reload_ext lammpscn.lammps
In [ ]:
Copied!
%%lmp_script
# ref: https://doi.org/10.1080/08927022.2017.1313418
# setup problem
units real
atom_style atomic
boundary p p p
dimension 3
boundary p p p
lattice fcc 5.3919 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
region box prism 0 5 0 5 0 5 0 0 0
create_box 1 box
create_atoms 1 box
mass 1 1.0
# system contains only atoms
pair_style lj/cut 12.00000
pair_coeff 1 1 0.238067 3.405
# use LB combination rules
pair_modify mix arithmetic
pair_modify shift no
pair_modify tail yes
# cutoff list width, in Ang. (from rc_lj)
neighbor 1.200000 bin
# list update, check every timestep after 5 steps
neigh_modify every 1 delay 5 check yes
# groups definition
group Argon.dat type 1
# compute thermo info 'a la Newton' to compare
# with td.out values (same units)
variable natoms equal atoms
variable t
# variable nt_eb equal ebond/v_natoms*4.184
# variable nt_epl equal eangle/v_natoms*4.184
# variable nt_etor equal (edihed+eimp)/v_natoms*4.184
# variable nt_LJ equal (evdwl-etail)/v_natoms*4.184
# variable nt_ES equal (ecoul+elong)/v_natoms*4.184
# variable nt_Ep equal pe/v_natoms*4.184
# variable nt_E equal etotal/v_natoms*4.184
# variable nt_Pat equal press*1.01325
# variable nt_rho equal density*1000.
# variable nt_V equal vol
# variable nt_T equal temp
variable initstep equal step
variable nstep equal 1000
variable perthermo equal 100
variable pertraj equal 100000
variable perpdb equal v_nstep+1
# nstep must be a multiple of nevery
variable nevery equal 10
variable nrepeat equal v_nstep/v_nevery
variable nfreq equal v_nstep+v_initstep
variable finalstep equal v_initstep+v_nstep
# print thermo info variable values
thermo ${perthermo}
timestep 1.0
# NVE run
#fix 1 all nve
#run ${nstep}
# NPT triclinic
fix 1 all npt temp 60.00 60.00 100 tri 0.986923 0.986923 1000.0 tchain 10 pchain 10 mtk yes tloop 4 ploop 4
run ${nstep}
%%lmp_script
# ref: https://doi.org/10.1080/08927022.2017.1313418
# setup problem
units real
atom_style atomic
boundary p p p
dimension 3
boundary p p p
lattice fcc 5.3919 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
region box prism 0 5 0 5 0 5 0 0 0
create_box 1 box
create_atoms 1 box
mass 1 1.0
# system contains only atoms
pair_style lj/cut 12.00000
pair_coeff 1 1 0.238067 3.405
# use LB combination rules
pair_modify mix arithmetic
pair_modify shift no
pair_modify tail yes
# cutoff list width, in Ang. (from rc_lj)
neighbor 1.200000 bin
# list update, check every timestep after 5 steps
neigh_modify every 1 delay 5 check yes
# groups definition
group Argon.dat type 1
# compute thermo info 'a la Newton' to compare
# with td.out values (same units)
variable natoms equal atoms
variable t
# variable nt_eb equal ebond/v_natoms*4.184
# variable nt_epl equal eangle/v_natoms*4.184
# variable nt_etor equal (edihed+eimp)/v_natoms*4.184
# variable nt_LJ equal (evdwl-etail)/v_natoms*4.184
# variable nt_ES equal (ecoul+elong)/v_natoms*4.184
# variable nt_Ep equal pe/v_natoms*4.184
# variable nt_E equal etotal/v_natoms*4.184
# variable nt_Pat equal press*1.01325
# variable nt_rho equal density*1000.
# variable nt_V equal vol
# variable nt_T equal temp
variable initstep equal step
variable nstep equal 1000
variable perthermo equal 100
variable pertraj equal 100000
variable perpdb equal v_nstep+1
# nstep must be a multiple of nevery
variable nevery equal 10
variable nrepeat equal v_nstep/v_nevery
variable nfreq equal v_nstep+v_initstep
variable finalstep equal v_initstep+v_nstep
# print thermo info variable values
thermo ${perthermo}
timestep 1.0
# NVE run
#fix 1 all nve
#run ${nstep}
# NPT triclinic
fix 1 all npt temp 60.00 60.00 100 tri 0.986923 0.986923 1000.0 tchain 10 pchain 10 mtk yes tloop 4 ploop 4
run ${nstep}
In [ ]:
Copied!
%%lmp_script
print "Deformation X-direction"
variable tmp equal "lx"
variable L0 equal ${tmp}
variable strain equal "(lx - v_L0)/v_L0"
variable p1 equal "v_strain"
fix 1 all npt temp ${tkrun} ${tkrun} 100 y 0 0 100 z 0 0 100
fix 2 all deform 1 x erate ${def_rate} units box remap v
fix def1 all print ${sdt} "${p1} ${p2} ${p3} ${p4} ${p5} ${p6} ${p7} ${p8} ${p9} ${p10} ${p11} ${p12} ${p13} ${tk}" file cdefx_${tkrun}K.txt screen no title "#Strain -Pxx [MPa] -Pyy [MPa] -Pzz [MPa] -Pyz [MPa] -Pxz [MPa] -Pxy [MPa] lxx [A] lyy [A] lzz [A] ayz [A] axz [A] axy [A] T [K] ; "
dump mydump all atom ${sdtdp} cdefx_${tkrun}K.lammpstrj
reset_timestep 0
run 400000
write_data cdefx_${tkrun}K.data
%%lmp_script
print "Deformation X-direction"
variable tmp equal "lx"
variable L0 equal ${tmp}
variable strain equal "(lx - v_L0)/v_L0"
variable p1 equal "v_strain"
fix 1 all npt temp ${tkrun} ${tkrun} 100 y 0 0 100 z 0 0 100
fix 2 all deform 1 x erate ${def_rate} units box remap v
fix def1 all print ${sdt} "${p1} ${p2} ${p3} ${p4} ${p5} ${p6} ${p7} ${p8} ${p9} ${p10} ${p11} ${p12} ${p13} ${tk}" file cdefx_${tkrun}K.txt screen no title "#Strain -Pxx [MPa] -Pyy [MPa] -Pzz [MPa] -Pyz [MPa] -Pxz [MPa] -Pxy [MPa] lxx [A] lyy [A] lzz [A] ayz [A] axz [A] axy [A] T [K] ; "
dump mydump all atom ${sdtdp} cdefx_${tkrun}K.lammpstrj
reset_timestep 0
run 400000
write_data cdefx_${tkrun}K.data
最后更新:
November 14, 2023
Authors: