24小时热门版块排行榜    

查看: 9392  |  回复: 0
【悬赏金币】回答本帖问题,作者Augus537将赠送您 20 个金币

Augus537

新虫 (初入文坛)

[求助] lammps设置应力拉伸的时候,应变却一直是负数?

如题所示,我在用lammps进行y轴单轴加卸载的时候,明明施加的是拉伸力(4GPa),但是应变却一直负向增大到了-0.05是什么原因?
# 读取结构+势函数+能量最小化
clear
boundary       p p p
units          metal
atom_style     atomic
dimension      3
timestep       0.002
read_data      NiTi_100K.data
pair_style     meam
pair_coeff     * * library.meam Ni Ti NiTi.meam Ni Ti

neighbor           2.0 bin  
neigh_modify   every 10 delay 0 check yes

# ------------ 能量最小化 ---------------
fix             relax all box/relax iso 0.0 vmax 0.001
min_style cg
minimize        1e-25 1e-25 10000 10000
unfix           relax

# 弛豫过程
fix            1 all npt temp 100 100 0.2 iso 0.0 0.0 2.0 drag 2.0
thermo         1000
run            40000
unfix          1

# 设置加卸载应力
compute            atompe all pe/atom
compute            atomke all ke/atom
compute        atomcentro all centro/atom bcc      
compute               cna all cna/atom 3.64

#加卸载过程应变
variable        tmp equal "ly"
variable        L0 equal ${tmp}   
print           "Initial Length, L0: ${L0}"
variable        p1 equal "(ly-v_L0)/v_L0"
variable        p2 equal "-pxx/10000"
variable        p3 equal "-pyy/10000"
variable        p4 equal "-pzz/10000"
variable        pe equal "pe"
variable        temp equal "temp"

#输出
reset_timestep  0
fix                    stress all ave/time 1 100 200 v_p3 file Stress5de9cf.txt
fix                    strain all ave/time 1 100 200 v_p1 file Strain5de9cf.txt
fix             def1 all print 200 "${p1}     ${p3}      ${p2}      ${p4}" file NiTi_def1.txt screen no

# Display thermo
thermo                 500
thermo_style        custom step v_p1 temp lx ly lz vol density ke pe etotal enthalpy epair press v_p2 v_p3 v_p4

#----------------------------Loading-----------------------------------
variable        s_xx equal -3.0
print           "set on command line s_xx=${s_xx}"   #x-force on rigid body

variable         stmp equal ${s_xx}*10000
fix                      load all npt temp 100 100 0.2 y 0.0 ${stmp} 2.0 x 0.0 0.0 2.0 z 0.0 0.0 2.0 nreset 10
dump             1 all custom 500 dump_loading_110K.lammpstrj id type x y z fx fy fz c_atompe c_atomke
write_data             loading_110K.data

run              40000
unfix            load
undump           1
#----------------------------Unloading-----------------------------------
print            "stress at the end of loading, p3: ${p3}"
print            "unloading"
fix                      unload all npt temp 100 100 0.2 y ${stmp} 0.0 2.0 x 0.0 0.0 2.0 z 0.0 0.0 2.0 nreset 10
dump             2 all custom 500 dump_unloading_110K.lammpstrj id type x y z fx fy fz c_atompe c_atomke
write_data       unloading_110K.data

run              40000
unfix            unload
undump           2

unfix            def1
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 Augus537 的主题更新
不应助 确定回帖应助 (注意:应助才可能被奖励,但不允许灌水,必须填写15个字符以上)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 2026国自然函评费到账 +11 羊腰板 2026-08-21 11/550 2026-08-22 22:03 by lsbin3733
[论文投稿] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +3 2JOx3r2CYEgw 2026-08-22 3/150 2026-08-22 22:03 by OEbVnUOu01ol
[硕博家园] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +3 2JOx3r2CYEgw 2026-08-22 5/250 2026-08-22 21:54 by OEbVnUOu01ol
[考博] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +3 2JOx3r2CYEgw 2026-08-21 7/350 2026-08-22 21:39 by OEbVnUOu01ol
[基金申请] 范进中举一文的中心思想 +3 zjuhero 2026-08-22 4/200 2026-08-22 20:02 by mycsru
[基金申请] 只有每年这种时候来逛逛小木虫 +24 yaoyewhu2008 2026-08-20 26/1300 2026-08-22 17:43 by kammury
[基金申请] filecode,4个jtjc了 +13 ziyangfang 2026-08-19 16/800 2026-08-22 17:08 by WH3796
[教师之家] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +4 2JOx3r2CYEgw 2026-08-21 4/200 2026-08-22 16:52 by sunzitan
[基金申请] 时间戳今天,20号变了 +5 archvillain 2026-08-20 5/250 2026-08-22 06:12 by hui_daxiao
[基金申请] 放榜前的不淡定 40+4 snowwithsea 2026-08-19 14/700 2026-08-21 23:51 by cratir
[基金申请] 建议基金发布提前给出明确的时间点 +10 kulium 2026-08-21 13/650 2026-08-21 21:58 by alongwaytogo
[基金申请] 看来今天不会放榜了? +8 chengyan1220 2026-08-21 11/550 2026-08-21 17:52 by dcqxinyang
[基金申请] 让我中一个面上吧! +11 大萍1987 2026-08-20 13/650 2026-08-21 14:48 by 20120902066
[基金申请] 我面上完蛋了 +7 且听虎啸 2026-08-20 8/400 2026-08-21 12:31 by 酷酷墨镜
[基金申请] 应该是下周三26日公布了吧? +4 哈哈蛤? 2026-08-21 4/200 2026-08-21 10:58 by Vivilian
[基金申请] 今天放榜没戏了吧 +9 yuleib84 2026-08-19 11/550 2026-08-21 10:06 by gltch
[基金申请] 今天系统多次维护,明天很可能放榜! +10 zju2000 2026-08-16 11/550 2026-08-20 20:02 by cl479861084
[基金申请] 时间戳变了,能看出什么问题? +18 基诺咪客 2026-08-17 23/1150 2026-08-20 17:19 by Godzela
[基金申请] 朋友圈看到的 +6 wangzilk 2026-08-18 8/400 2026-08-19 10:55 by Haru815
[基金申请] 今天维护系统维护 祝所有人 高中 +8 gjjjzhong 2026-08-18 9/450 2026-08-18 13:01 by 家与远方
信息提示
请填处理意见