| 查看: 7499 | 回復(fù): 13 | ||||
zxzj05榮譽(yù)版主 (著名寫(xiě)手)
|
[交流]
【轉(zhuǎn)帖】熱導(dǎo)率計(jì)算的in文件 已有12人參與
|
|||
|
看到有不少人在找熱導(dǎo)率計(jì)算方面的in文件,我就貢獻(xiàn)三個(gè)in文件吧,僅供參考。 同時(shí),附件里貼出了我的計(jì)算結(jié)果。EMD的輸出結(jié)果(compute heat/flux command+compute tc command的計(jì)算結(jié)果)中, “ac.dat”(見(jiàn)附件中的"ac.wmf")是熱流自相關(guān)函數(shù)(我已經(jīng)修改了compute_tc.cpp,目前輸出的是normalized HCACF,但結(jié)果中給出的還是沒(méi)有歸一化的熱流自相關(guān)函數(shù),但形狀和歸一化的是一樣的,請(qǐng)注意!)隨m的變化,"tc.dat"(見(jiàn)附件中的"tc.wmf" 是熱導(dǎo)率隨m的變化(m的涵義請(qǐng)參看熱導(dǎo)率計(jì)算的Green Kubo離散化公式,見(jiàn)附件"Comparison of atomic-level simulation methods for computing thermal conductivity”中的(9)式),"tc_time.dat"(見(jiàn)附件中的"tc_time.wmf" 是熱導(dǎo)率隨時(shí)間的變化;NEMD的結(jié)果中,"temp.profile"(見(jiàn)附件中的"temp_distribution.wmf" 是z方向上的溫度分布,"thermal_conductivity.dat“(見(jiàn)附件中的"NEMD.wmf" 表示熱導(dǎo)率隨時(shí)間的變化,兩者都包含了fix heat command 和fix thermal/conductivity command的計(jì)算結(jié)果。1.用compute heat/flux command+compute tc command得到熱流自相關(guān)函數(shù)和熱導(dǎo)率(EMD方法) # MD simulation of Ar thermal conductivity # Initialization units lj dimension 3 newton on boundary p p p atom_style atomic neighbor 0.3 bin neigh_modify check yes lattice fcc 0.844 region box block -4 4 -4 4 -4 4 units lattice create_box 1 box create_atoms 1 box mass 1 1.0 velocity all create 0.71 458127641 mom yes rot yes dist gaussian units box # LJ potential ********************************************************* pair_style lj/cut 2.8 pair_coeff 1 1 1.0 1.0 # LJ parameters for Ar-Ar fix temp all temp/berendsen 0.71 0.71 0.000466 fix nve all nve thermo_style custom step temp etotal vol thermo_modify lost warn thermo 100 # Run timestep 0.000466 run 200000 reset_timestep 0 # -------------- Flux calculation in nve --------------- compute myKE all ke/atom compute myPE all pe/atom compute myStress all stress/atom virial variable factor_ac equal 1.0 variable factor_tc equal 1.3806504e-23*sqrt(1.67e-21/6.633e-26)/3.405e-10^2 compute jflux all heat/flux myKE myPE myStress compute tc all tc c_thermo_temp c_jflux v_factor_ac v_factor_tc iso first 10000 900000 100000 fix tc_out all ave/time 1 1 1 c_tc file tc_time.dat thermo_style custom step temp restart 100000 restart.* run 1000000 2. 用fix thermal/conductivity command得到溫度梯度,進(jìn)而得到熱導(dǎo)率(NEMD方法) # MD simulation of Ar thermal conductivity # Initialization units lj dimension 3 newton on boundary p p p atom_style atomic neighbor 0.3 bin neigh_modify check yes lattice fcc 0.844 region box block -4 4 -4 4 -4 4 units lattice create_box 1 box create_atoms 1 box region up1 block INF INF INF INF -0.5 -0.25 units lattice region up2 block INF INF INF INF 0.5 0.75 units lattice region up union 2 up1 up2 region down1 block INF INF INF INF -3.5 -3.25 units lattice region down2 block INF INF INF INF 3.5 3.75 units lattice region down union 2 down1 down2 mass 1 1.0 velocity all create 0.71 458127641 mom yes rot yes dist gaussian units box # Tersoff potential ********************************************************* pair_style lj/cut 2.8 pair_coeff 1 1 1.0 1.0 # LJ parameters for Ar-Ar fix temp all temp/berendsen 0.71 0.71 0.0466 fix nve all nve compute ke all ke/atom variable temp atom c_ke/(1.5*1.0) fix temp_profile all ave/spatial 1 100000 100000 z lower 0.25 v_temp file temp.profile units lattice compute up_temp all temp/region up compute down_temp all temp/region down variable delta_temp equal c_up_temp-c_down_temp fix delta_out all ave/time 1 100000 100000 v_delta_temp file delta_temp.dat thermo_style custom step temp etotal vol thermo_modify lost warn thermo 100 # Run timestep 0.000466 run 100001 unfix temp fix heat_swap all thermal/conductivity 10 z 32 fix e_exchange all ave/time 10 10000 100000 f_heat_swap file e_exchange.dat variable thermal_conductivity equal f_e_exchange/(0.000466*10.0*4.0*f_delta_out)*1.3806504e-23/3.405e-10/3.405e-10*sqrt(1.67e-21/6.633e-26)*6.0/8.0 # 以上variable命令需要特別注意,因?yàn)槲宜M的系統(tǒng),盒子邊長(zhǎng)Lx=Ly=Lz,熱導(dǎo)率計(jì)算公式經(jīng)過(guò)推導(dǎo)變成為e_exchange/(4.0*t*L*delta_T), # 為了不在in文件里給L賦值,我修改了fix_thermal_conductivity.cpp文件(見(jiàn)附件),將e_exchange修改成了 e_exchange += force->mvv2e * (all[0].value - all[1].value) / (domain->zprd); 同時(shí)在end_of_step() 里添加了一句 “ e_exchange = 0.0;“,詳見(jiàn)附件中的fix_thermal_conductivity.cpp,這樣所得的e_exchange曲線基本上是一條水平曲線,而不是用原來(lái)的fix thermal/conductivity command所得到的斜向上的曲線,請(qǐng)注意!! # 所以才出現(xiàn)以上variable的表達(dá)式。 # 請(qǐng)看明白后再做計(jì)算,免得算出錯(cuò)誤的結(jié)果。。 fix thermal_conductivity_out all ave/time 100000 1 100000 v_thermal_conductivity file thermal_conductivity.dat # Run run 10000000 3. 用fix heat command建立溫度梯度,進(jìn)而得到熱導(dǎo)率(NEMD方法) # MD simulation of Ar thermal conductivity # Initialization units lj dimension 3 newton on boundary p p p atom_style atomic neighbor 0.3 bin neigh_modify check yes lattice fcc 0.844 region box block -4 4 -4 4 -4 4 units lattice create_box 1 box create_atoms 1 box region up1 block INF INF INF INF -0.5 -0.25 units lattice region up2 block INF INF INF INF 0.5 0.75 units lattice region up union 2 up1 up2 region down1 block INF INF INF INF -3.5 -3.25 units lattice region down2 block INF INF INF INF 3.5 3.75 units lattice region down union 2 down1 down2 region hot block INF INF INF INF 0.0 0.25 units lattice group hot region hot region cold block INF INF INF INF -4.0 -3.75 units lattice group cold region cold mass 1 1.0 mass0 6.633e-26 epsilon0 1.67e-21 sigma0 3.405e-10 velocity all create 0.71 458127641 mom yes rot yes dist gaussian units box # Tersoff potential ********************************************************* pair_style lj/cut 2.8 pair_coeff 1 1 1.0 1.0 # LJ parameters for Ar-Ar fix temp all temp/berendsen 0.71 0.71 0.0466 fix nve all nve compute ke all ke/atom variable temp atom c_ke/(1.5*1.0) fix temp_profile all ave/spatial 1 100000 100000 z lower 0.25 v_temp file temp.profile units lattice compute up_temp all temp/region up compute down_temp all temp/region down variable delta_temp equal c_up_temp-c_down_temp fix delta_out all ave/time 1 100000 100000 v_delta_temp file delta_temp.dat thermo_style custom step temp etotal vol thermo_modify lost warn thermo 100 # Run timestep 0.000466 run 100001 unfix temp fix hot all heat 1 50 region hot fix cold all heat 1 -50 region cold variable thermal_conductivity equal 50.0*0.5*1.67e-21/3.405e-10/sqrt(6.633e-26/1.67e-21)/((4.0*8.0*8.0*8.0/0.844)^(1.0/3.0)*3.405e-10*2.0*f_delta_out*1.67e-21/1.3806504e-23)*6.0/8.0 fix thermal_conductivity_out all ave/time 100000 1 100000 v_thermal_conductivity file thermal_conductivity.dat # Run run 10000000 【轉(zhuǎn)自】http://www.mdbbs.org/thread-26451-1-1.html |
收藏 |

木蟲(chóng) (正式寫(xiě)手)
金蟲(chóng) (小有名氣)
榮譽(yù)版主 (著名寫(xiě)手)

木蟲(chóng) (正式寫(xiě)手)
新蟲(chóng) (小有名氣)

鐵蟲(chóng) (初入文壇)
新蟲(chóng) (小有名氣)

新蟲(chóng) (小有名氣)

金蟲(chóng) (正式寫(xiě)手)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 有沒(méi)有道鐵/土木的想調(diào)劑南林,給自己招師弟中~ +3 | TqlXswl 2026-03-16 | 7/350 |
|
|---|---|---|---|---|
|
[考研] 一志愿蘇州大學(xué)材料工程(085601)專(zhuān)碩有科研經(jīng)歷三項(xiàng)國(guó)獎(jiǎng)兩個(gè)實(shí)用型專(zhuān)利一項(xiàng)省級(jí)立項(xiàng) +6 | 大火山小火山 2026-03-16 | 8/400 |
|
|
[考研] 293求調(diào)劑 +6 | zjl的號(hào) 2026-03-16 | 11/550 |
|
|
[考研] 工科材料085601 279求調(diào)劑 +3 | 困于星晨 2026-03-17 | 3/150 |
|
|
[考研] 材料與化工專(zhuān)碩調(diào)劑 +5 | heming3743 2026-03-16 | 5/250 |
|
|
[考研] 0854可跨調(diào)劑,一作一項(xiàng)核心論文五項(xiàng)專(zhuān)利,省、國(guó)級(jí)證書(shū)40+數(shù)一英一287 +3 | 小李0854 2026-03-16 | 3/150 |
|
|
[考研] 267一志愿南京工業(yè)大學(xué)0817化工求調(diào)劑 +6 | SUICHILD 2026-03-12 | 6/300 |
|
|
[考研] 278求調(diào)劑 +3 | Yy7400 2026-03-13 | 3/150 |
|
|
[考研] 283求調(diào)劑 +3 | 聽(tīng)風(fēng)就是雨; 2026-03-16 | 3/150 |
|
|
[考研] 0703一志愿211 285分求調(diào)劑 +5 | ly3471z 2026-03-13 | 5/250 |
|
|
[考研] 308求調(diào)劑 +3 | 是Lupa啊 2026-03-16 | 3/150 |
|
|
[考研] 080500,材料學(xué)碩302分求調(diào)劑學(xué)校 +4 | 初識(shí)可樂(lè) 2026-03-14 | 5/250 |
|
|
[考研] 289求調(diào)劑 +4 | 這么名字咋樣 2026-03-14 | 6/300 |
|
|
[考研] 297一志愿上交085600求調(diào)劑 +5 | 指尖八千里 2026-03-14 | 5/250 |
|
|
[考研] 一志愿哈工大材料324分求調(diào)劑 +5 | 閆旭東 2026-03-14 | 5/250 |
|
|
[考研] 308 085701 四六級(jí)已過(guò)求調(diào)劑 +7 | 溫喬喬喬喬 2026-03-12 | 14/700 |
|
|
[考研] 279求調(diào)劑 +3 | 抓著星星的女孩 2026-03-10 | 3/150 |
|
|
[考研] 341求調(diào)劑 +3 | 番茄頭--- 2026-03-10 | 3/150 |
|
|
[考研] 301求調(diào)劑 +6 | Liyouyumairs 2026-03-11 | 6/300 |
|
|
[考研] 274求調(diào)劑 +3 | S.H1 2026-03-12 | 3/150 |
|