计算化学公社

标题: 求助ERROR: Fix in variable not computed at compatible time 问题 [打印本页]

作者
Author:
Poly_Maohua    时间: 2023-3-9 10:31
标题: 求助ERROR: Fix in variable not computed at compatible time 问题
各位老师好,
最近用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




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

作者
Author:
学术小垃圾    时间: 2023-12-28 14:23
你好,请问你这个问题解决了吗?我现在也有这个问题,能不能讨论一下




欢迎光临 计算化学公社 (http://bbs.keinsci.com/) Powered by Discuz! X3.3