• 回答数

    4

  • 浏览数

    1994

  • 收藏数

    0

作者:心神不宁的郎 发表于 2018-11-19 16:38:34
跳转到指定楼层
抱歉,打扰大家了!
我是一个新手,想模拟拉伸试验中输出的应力应变曲线,然后求取材料的弹性参数。参考了帖子http://www.mdbbs.org/viewthread. ... ;;extra=&page=1,想仿cyberspace的思路作出一张应力应变曲线。通过thermo_style输出的pressure却出现了有正有负的数值,不知道这是怎么回事。看fatcharm在http://www.mdbbs.org/thread-5601-1-1.html的帖子关于应力的讨论,想说thermo_style里输出的pressure应该是stess*volume的相反数。可是在一个方向进行拉伸的话,怎么会出现pxx, pyy, pzz三个方向的应力都是有正有负,有两种压力方向的结果呢?请大家帮忙指点迷津。非常感谢!
in文件如下:
# tensile testing
# http://www.mdbbs.org/viewthread.php?tid=29638
boundaryp p p         
units   metal         
atom_stylecharge        
read_data data.rdx
# potentials
pair_style  eam   
pair_coeff  * * Cu_u3.eam
   
neighbor 2.0 bin           
neigh_modify delay 1 check yes
  
# define computes
compute  myTemp all temp
compute  disp all displace/atom
compute  pot all pe/atom
compute  ke all ke/atom
compute  s all stress/atom virial
compute  s1 all stress/atom
compute  pressall pressure thermo_temp
   
thermo_style custom step temp etotal ke pe lx ly lz press pxx pyy pzz
dump 1 all custom 5000 dump.tensile id type x y z c_pot c_ke c_disp[3] c_s1[1] c_s1[2] c_s1[3] c_s1[4] c_s1[5] c_s1[6]
minimize 1.0e-5 0 1000 100000  
     
# initial velocities
velocity all create 100 887723 temp myTemp rot yes dist gaussian units box
fix 1 all npt temp 100 100 1.0 aniso 0.0 0.0 10.0 drag 1.0
thermo 1000                  
timestep  0.0005               
run200000
                  
unfix 1
fix1all nve
fix2all temp/berendsen 100 100 1.0
fix3all deform 1 z erate 0.0002 remap x units box
run  1000000
输出的pressure在log.lammps里,请见附件1
in文件里提到的data.RDX是LAMMPS的examples文件夹下的reax文件夹中的data文件,请见附件2

分享:
回复

使用道具

该用户从未签到

新手上路

Rank: 1

积分
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
回复

使用道具 举报

该用户从未签到

新手上路

Rank: 1

积分
20
极客币
39
主题
5
帖子
15
注册时间
2018-11-5
在线时间
1 小时
性别
保密
发表于 2018-11-19 16:38:59 | 显示全部楼层
请问楼主那个图是怎么得到的???
回复

使用道具 举报

该用户从未签到

新手上路

Rank: 1

积分
17
极客币
43
主题
6
帖子
23
注册时间
2018-11-5
在线时间
1 小时
性别
保密
发表于 2018-11-19 16:39:14 | 显示全部楼层
学习了同问如何作图
回复

使用道具 举报

该用户从未签到

新手上路

Rank: 1

积分
13
极客币
37
主题
6
帖子
15
注册时间
2018-11-5
在线时间
1 小时
性别
保密
 楼主| 发表于 2018-11-19 16:39:19 | 显示全部楼层
回复

使用道具 举报

高级模式 评论
您需要登录后才可以回帖 登录 | 立即注册 微信登录