本帖最后由 我的爱只是你 于 2018-11-19 14:12 编辑
我采用键长建角可变的SPC水模型计算水的热导率,用fix ID group-ID ave/correlate Nevery Nrepeat Nfreq value命令计算热流相关函数,在其他条件不变的情况下,改变Nevery Nrepeat Nfreq的值,算出来的热导率就相差很多,找了很久的问题也没有发现到底是哪里出了问题,希望知道的朋友给指导一下,in文件也列于下面希望大家给看看是不是我哪里写错了,还有Nevery Nrepeat Nfreq三个值应该怎么取合适,谢谢各位!!!
# EMD simulations of fluid thermal conductivity
# Initialization
unitsmetal
variable T equal 300
variable V equal vol
variable dt equal 0.0001
variable p equal 1000 # correlation length
variable s equal 5 # sample interval
variable aa equal 10
variable d equal ${aa}*$p*$s # dump interval
# convert from LAMMPS real units to SI
variable kB equal 1.3806504e-23 # [J/K] Boltzmann
variable eV2J equal 1.602e-19
variable A2m equal 1.0e-10
variable ps2s equal 1.0e-12
variable convert equal ${eV2J}*${eV2J}/${ps2s}/${A2m}
dimension 3
newtonon
boundary p p p
atom_style full
neighbor 2.0 bin
neigh_modify check yes
latticefcc 1
#regionbox block -6 6 -6 6 -6 6 units lattice
read_data water.data
# LJ potential
kspace_style pppm 1e-4
pair_style lj/cut/coul/long 10.0
bond_style harmonic
angle_style harmonic
special_bonds lj 0.0 0.0 0.0 coul 0.0 0.0 0.0
################# set charge to each atom ########################
groupoo type 1
grouphh type 2
setgroup oo charge -0.8476
setgroup hh charge0.4238
################ set pair_coeff ###################
pair_coeff * * 0.0 0.0
pair_coeff110.00673753.166
bond_coeff 1 48.081 1.0
angle_coeff1 3.971 109.47
############### set the region and group ##########
groupwater union oo hh
############### initial setting ###################
#fixfixshake water shake 0.0001 5 0 b 1 a 1
velocity water create $T 1234 mom yes dist gaussian
fixMOM all momentum 100 linear 1 1 1
timestep ${dt}
fixNVT all nvt temp $T $T 0.004
thermo_style custom step temp etotal enthalpy vol
thermo_modify lost warn
thermo1000
run1000000
unfixNVT
fixNVE all nve
run1000000
reset_timestep 0
# ----------------- Flux calculation in NVT ------------------
computeKe all ke/atom
computePeall pe/atom
computeStress all stress/atom virial
computeFlux all heat/flux Ke Pe Stress
variable jx equal c_Flux[1]/vol
variable jy equal c_Flux[2]/vol
variable jz equal c_Flux[3]/vol
fixJJ all ave/correlate $s $p $d c_Flux[1] c_Flux[2] c_Flux[3] type auto file jjt.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}
thermo_style custom step temp v_jx v_jy v_jz v_k11 v_k22 v_k33
thermo$d
restart 200000 restart.*
run 1000000
variable k equal (v_k11v_k22v_k33)/3.0
variable ndens equal count(all)/vol
print "average conductivity: $k" # [w/mk] @ $T K, ${ndens} /A^3 |
|