计算化学公社

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

[Lammps] 求助ERROR: Fix in variable not computed at compatible time 问题

[复制链接 Copy URL]

19

帖子

0

威望

248

eV
积分
267

Level 3 能力者

各位老师好,
最近用lammps做传热分析,碰到了这个问题ERROR: Fix in variable not computed at compatible time (src/variable.cpp:4048)
我看到网上说是时间步设置不正确,可是我的fix和thermo都是用的$d, lammps的案例也是这个结构,应该对得上吧。也试了不同的时间设置,都不好用。
这里我把时间设置和出错的几步设置贴出来


units       real
variable    T equal 293
variable    V equal vol
variable    dt equal 0.1
variable    p equal 200     # correlation length
variable    s equal 10      # sample interval
variable    d equal $p*$s   # dump interval

# convert from LAMMPS real units to SI

variable    kB equal 1.3806504e-23    # [J/K] Boltzmann
variable    kCal2J equal 4186.0/6.02214e23
variable    A2m equal 1.0e-10
variable    fs2s equal 1.0e-15
variable    convert equal ${kCal2J}*${kCal2J}/${fs2s}/${A2m}

*************************


compute      myKE all ke/atom
compute      myPE all pe/atom
compute      myStress all stress/atom NULL virial
compute      flux all heat/flux myKE myPE myStress
variable     Jx equal c_flux[1]/vol
variable     Jy equal c_flux[2]/vol
variable     Jz equal c_flux[3]/vol
fix          JJ all ave/correlate $s $p $d &
             c_flux[1] c_flux[2] c_flux[3] type full file J0Jt.dat ave running
variable     scale equal ${convert}/${kB}/$T/$T/$V*$s*${dt}
variable     k11 equal trap(f_JJ[3])*${scale}
variable     k22 equal trap(f_JJ[4])*${scale}
variable     k33 equal trap(f_JJ[5])*${scale}


variable     k12 equal trap(f_JJ[6])*${scale}
variable     k13 equal trap(f_JJ[7])*${scale}
variable     k23 equal trap(f_JJ[8])*${scale}

dump 2 all xyz 2000 LCP.xyz
thermo          $d
thermo_style custom step temp v_Jx v_Jy v_Jz v_k11 v_k22 v_k33 v_k12 v_k13 v_k23

run          100000
variable     k equal (v_k11+v_k22+v_k33)/3.0
variable     ndens equal count(all)/vol
print        "average conductivity: $k[W/mK] @ $T K, ${ndens} /A\^3"
write_data          LZ. data




确实不知道该怎么办了,想请各位老师帮我支支招,不胜感谢!

1

帖子

0

威望

9

eV
积分
10

Level 1 能力者

2#
发表于 Post on 2023-12-28 14:23:06 | 只看该作者 Only view this author
你好,请问你这个问题解决了吗?我现在也有这个问题,能不能讨论一下

本版积分规则 Credits rule

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

GMT+8, 2026-2-23 15:19 , Processed in 0.267024 second(s), 26 queries , Gzip On.

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