计算化学公社

 找回密码 Forget password
 注册 Register
Views: 1181|回复 Reply: 1
打印 Print 上一主题 Last thread 下一主题 Next thread

[Lammps] 求助:拉伸时如何消除内应力

[复制链接 Copy URL]

81

帖子

0

威望

477

eV
积分
558

Level 4 (黑子)

跳转到指定楼层 Go to specific reply
楼主
本帖最后由 sj12138 于 2024-1-10 16:52 编辑

各位老师好,我发现我拉伸之后的应力应变曲线不是从0开始的,查阅了一些资料,说要在npt弛豫时将拉伸方向的压力设为0,修改后还是不行,下面附上我的in文件,请教各位应该怎么解决?


#minimize
min_style       sd
minimize        1.0e-20 1.0e-20 100000 100000         
fix   mom  all  momentum 10 linear 1 1 1 angular   
fix       1    all    box/relax   iso 0.0
velocity        all  create  270 $R mom yes rot yes dist gaussian
velocity        all  scale   270
run 0
unfix   1
fix     shake         all     shake     0.0001   20   0   b   1   a   1

#NVT
thermo_style custom time atoms step temp press vol lx ly lz enthalpy pe ke etotal density pxx pyy pzz pxy pxz pyz
thermo       ${thermo}
fix         NVT   all  nvt  temp 270 270 100
dump         1   all  xyz  ${thermo}  nvt_${name}.xyz
dump_modify  1   element   O  H  C  
fix  vt all print 200 "${istep} ${T0} ${V}" screen no file nvt_${name}.dat
run          ${runnvt}
unfix           NVT
unfix            vt
undump           1
reset_timestep   0


#npt弛豫
fix        NPT   all  npt  temp 270 270 100 x 98 98 1000 y 98 98 1000 z 0 0 1000
thermo_style custom time atoms step temp press vol lx ly lz enthalpy pe ke etotal density pxx pyy pzz pxy pxz pyz
thermo       ${thermo}
dump         1   all  xyz  ${thermo}  npt_${name}.xyz
dump_modify  1   element   O  H  C  
fix  pt all print 200  "${istep} ${etol} ${han} ${T0} ${V} ${PE} ${P0}" screen no file npt_${name}.dat
run          ${runmd}
undump           1
unfix           pt
unfix           NPT
reset_timestep   0

#stress-strain
variable   tmpx   equal   "lx"
variable   tmpy   equal   "ly"
variable   tmpz   equal   "lz"

variable    Lx0   equal   ${tmpx}
variable    Ly0   equal   ${tmpy}
variable    Lz0   equal   ${tmpz}

variable    strainx   equal   "(lx - v_Lx0)/v_Lx0"
variable    strainy   equal   "(ly - v_Ly0)/v_Ly0"
variable    strainz   equal   "(lz - v_Lz0)/v_Lz0"

variable    stressx   equal   "-pxx/10000"
variable    stressy   equal   "-pyy/10000"
variable    stressz   equal   "-pzz/10000"


#z向拉伸
fix    2    all    npt  temp 270 270 100 x 98 98 1000 y 98 98 1000
fix    3    all    deform  100  z  erate  0.00000001  remap  x  units  box
thermo_style custom time atoms step temp press vol lx ly lz density pxx pyy pzz pxy pxz pyz
thermo       ${thermo}
dump         1   all    xyz  ${thermo}  tension_${name}.xyz
dump_modify  1   element   O  H  C  


#保存应力应变数据
fix  def3  all  print  100  "${strainx} ${stressx} ${strainy} ${stressy} ${strainz} ${stressz}" screen no file stress-strain_${name}.dat

run             ${runten}


4

帖子

0

威望

41

eV
积分
45

Level 2 能力者

2#
发表于 Post on 2024-9-9 20:42:06 | 只看该作者 Only view this author
请问解决了吗

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2026-2-19 21:32 , Processed in 0.175526 second(s), 26 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list