24小时热门版块排行榜    

查看: 1169  |  回复: 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个字符以上)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 080500,材料学硕302分求调剂学校 +4 初识可乐 2026-03-14 5/250 2026-03-14 21:08 by peike
[考研] 材料工程327求调剂 +3 xiaohe12w 2026-03-11 3/150 2026-03-14 20:20 by ms629
[考研] 中科大材料与化工319求调剂 +3 孟鑫材料 2026-03-14 3/150 2026-03-14 20:10 by ms629
[考研] 297求调剂 +4 学海漂泊 2026-03-13 4/200 2026-03-14 11:51 by 热情沙漠
[考研] 308求调剂 +5 是Lupa啊 2026-03-08 8/400 2026-03-14 04:25 by JourneyLucky
[考研] 一志愿浙江大学0856材料与化工求调剂 +4 yansheng@211 2026-03-09 5/250 2026-03-14 02:10 by JourneyLucky
[考研] 308求调剂 +4 是Lupa啊 2026-03-09 4/200 2026-03-14 02:06 by tranquil_ya
[考研] 306求调剂 +4 唐薏薏 2026-03-09 4/200 2026-03-14 01:19 by JourneyLucky
[考研] 307求调剂 +7 超级伊昂大王 2026-03-10 7/350 2026-03-14 00:49 by JourneyLucky
[考研] 一志愿华中农业大学071010,总分三百二,求调剂 +3 困困困困坤坤 2026-03-10 3/150 2026-03-14 00:35 by JourneyLucky
[考研] 308求调剂 +3 是Lupa啊 2026-03-10 3/150 2026-03-14 00:30 by JourneyLucky
[考研] 315求调剂 +9 小羊小羊_ 2026-03-11 10/500 2026-03-13 21:13 by SXNU李老师
[考研] 材料与化工085600调剂求老师收留 +9 jiaanl 2026-03-11 9/450 2026-03-13 20:22 by JourneyLucky
[考研] 材料工程调剂 +4 咪咪空空 2026-03-11 4/200 2026-03-13 19:57 by JourneyLucky
[考研] 274求调剂 +3 S.H1 2026-03-12 3/150 2026-03-13 15:15 by JourneyLucky
[考研] 0856化学工程280分求调剂 +4 shenzxsn 2026-03-11 4/200 2026-03-13 11:55 by ymwdoctor
[考研] 289求调剂 +3 李政莹 2026-03-12 3/150 2026-03-13 11:02 by 求调剂zz
[考研] 材料与化工一志愿南昌大学327求调剂推荐 +4 Ncdx123456 2026-03-13 4/200 2026-03-13 10:32 by houyaoxu
[考研] 化工学硕306求调剂 +9 42838695 2026-03-12 9/450 2026-03-13 10:16 by houyaoxu
[考研] 293求调剂,一志愿陕师大生物学 +3 ??????.?.??? 2026-03-09 3/150 2026-03-11 10:02 by 学员8dgXkO
信息提示
请填处理意见