24小时热门版块排行榜    

CyRhmU.jpeg
查看: 3900  |  回复: 6

fengguanfeng

木虫 (初入文坛)

[求助] lammps自带的例子中用 langevin热浴计算 liquid LJ热导率的问题,有些看不大懂。已有2人参与

# sample LAMMPS input script for thermal conductivity of liquid LJ
# thermostatting 2 regions via fix langevin

# settings

variable        x equal 10
variable        y equal 10
variable        z equal 20

variable        rho equal 0.6
variable        t equal 1.35
variable        rc equal 2.5
variable        tlo equal 1.0
variable        thi equal 1.70

#variable        rho equal 0.85
#variable        t equal 0.7
#variable        rc equal 3.0
#variable        tlo equal 0.3
#variable        thi equal 1.0

# setup problem

units                lj
atom_style        atomic

lattice                fcc ${rho}
region                box block 0 $x 0 $y 0 $z
create_box        1 box
create_atoms        1 box
mass                1 1.0

velocity        all create $t 87287

pair_style        lj/cut ${rc}
pair_coeff        1 1 1.0 1.0

neighbor        0.3 bin
neigh_modify        delay 0 every 1

# heat layers

region          hot block INF INF INF INF 0 1
region          cold block  INF INF INF INF 10 11
compute         Thot all temp/region hot
compute         Tcold all temp/region cold

# 1st equilibration run

fix             1 all nvt temp $t $t 0.5
thermo                100
run             1000

velocity        all scale $t

unfix                1

# 2nd equilibration run

fix                1 all nve
fix             hot all langevin ${thi} ${thi} 1.0 59804 tally yes      # 问题:为什么这里group_id 是all(all不应该是系统所有的原子吗)?是否是因为这里的id是hot的原因,这样跟前面region部分的id是一样的,所以这里的all其实指的就是边界加热浴的部分,并不是系统所有的原子。
fix             cold all langevin ${tlo} ${tlo} 1.0 287859 tally yes
fix_modify      hot temp Thot   #问题:修改之前的fix命令的参数,意思是什么???
fix_modify      cold temp Tcold

variable        tdiff equal c_Thot-c_Tcold
thermo_style    custom step temp c_Thot c_Tcold f_hot f_cold v_tdiff
thermo                1000
run             10000

# thermal conductivity calculation
# reset langevin thermostats to zero energy accumulation  # 问题:为什么重设??

compute                ke all ke/atom
variable        temp atom c_ke/1.5

fix             hot all langevin ${thi} ${thi} 1.0 59804 tally yes  # 问题:上面这条语句已经出现了,表示加郎之万热浴,这里为什么要再出现一次??
fix             cold all langevin ${tlo} ${tlo} 1.0 287859 tally yes
fix_modify      hot temp Thot
fix_modify      cold temp Tcold

fix             ave all ave/time 10 100 1000 v_tdiff ave running
thermo_style    custom step temp c_Thot c_Tcold f_hot f_cold v_tdiff f_ave

compute         layers all chunk/atom bin/1d z lower 0.05 units reduced
fix                2 all ave/chunk 10 100 1000 layers v_temp file profile.langevin

run             20000
回复此楼
never give up
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

brucefan

专家顾问 (著名写手)

【答案】应助回帖

★ ★
感谢参与,应助指数 +1
fengguanfeng: 金币+2, ★★★很有帮助 2016-08-03 16:17:50
我不怎么懂lammps,但根据我写程序的经验看来,你那个"为什么重设"的答案是,重设之前只是查看系统温度分布变化,检验是否达到稳定态,重设之后要输出热浴所带来的外界热流值,以方便后面计算热导率。不重设就会记录多余的热量。热导率等于热流密度除以温度梯度,所以热流密度要计算对才行。

[ 发自手机版 http://muchong.com/3g ]
2楼2016-08-01 17:59:29
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

brucefan

专家顾问 (著名写手)

【答案】应助回帖

你的其它问题都是lammps语法的问题,看看网上的手册应该就能搞明白。

[ 发自手机版 http://muchong.com/3g ]
3楼2016-08-01 18:01:14
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

fengguanfeng

木虫 (初入文坛)

引用回帖:
2楼: Originally posted by brucefan at 2016-08-01 17:59:29
我不怎么懂lammps,但根据我写程序的经验看来,你那个"为什么重设"的答案是,重设之前只是查看系统温度分布变化,检验是否达到稳定态,重设之后要输出热浴所带来的外界热流值,以方便后面计算热导率。不重 ...

有道理,谢谢您的回答!!
never give up
4楼2016-08-02 16:36:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

743873839

新虫 (初入文坛)

引用回帖:
4楼: Originally posted by fengguanfeng at 2016-08-02 16:36:09
有道理,谢谢您的回答!!...

lz你现在搞清楚那个group_ID的问题了吗

发自小木虫IOS客户端
5楼2021-01-04 17:40:15
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

luxujie3

金虫 (著名写手)

【答案】应助回帖

那句命令的意思应该是对hot区域内全部原子进行计算
6楼2021-01-16 11:34:47
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

摸索兔

新虫 (小有名气)

引用回帖:
5楼: Originally posted by 743873839 at 2021-01-04 17:40:15
lz你现在搞清楚那个group_ID的问题了吗
...

楼主现在清楚了吗

发自小木虫Android客户端
7楼2022-08-28 19:12:51
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 fengguanfeng 的主题更新
信息提示
请填处理意见