新手上路

- 积分
- 13
- 极客币
- 37
- 主题
- 6
- 帖子
- 15
- 注册时间
- 2018-11-5
- 在线时间
- 1 小时
- 性别
- 保密
|
沙发

楼主 |
发表于 2018-11-19 16:38:51
|
只看该作者
改了一下code,直接用fcc的lattice建模,在fix npt平衡后采用fix nve加载,并用thermo_style里输出的pressure除以volume作为应力,现在能够成功地输出比较合理的应力应变曲线了。
boundary p p p
units metal
atom_style atomic
neighbor 2.0 bin
neigh_modify delay 1 check yes
# create geometry
lattice fcc 3.615
region box block 0 30 0 3 0 3
create_box 1 box
create_atoms 1 box
mass 1 63.546
# LJ potentials
pair_style eam
pair_coeff * * Cu_u3.eam
# define groups
region 1 block INF 1 INF INF INF INF
group left region 1
region 2 block29 INF INF INF INF INF
group right region 2
group boundary union left right
group mobile subtract all left
# initial velocities
velocity left set 0.0 0.0 0.0
compute p all pressure thermo_temp
variable pressx equal c_p[1]
variable pressy equal c_p[2]
variable pressz equal c_p[3]
thermo_style custom step temp etotal ke pe lx ly lz press pxx pyy pzz
dump 1 all atom 1000 dump.tensionr2
minimize 1.0e-6 1.0e-6 1000 1000
fix 1 left setforce 0.0 NULL NULL
fix 2 all npt temp 1.0 1.0 1.0 aniso 0.0 0.0 10.0 drag 1.0
thermo 1000
timestep 0.002
run 10000
unfix 2
fix3all nve
fix4all temp/rescale 100 1.0 1.0 5 1.0
fix5all deform 1000 x erate 0.002 units box
compute s all stress/atom
compute strea all reduce sum c_s[1]
variable stressa equal c_strea/vol
compute streb all reduce sum c_s[2]
variable stressb equal c_streb/vol
compute strec all reduce sum c_s[3]
variable stressc equal c_strec/vol
thermo_style custom step temp etotal vol lx ly lz press v_stressav_stressb v_stressc
run 300000 |
|