| 查看: 7500 | 回復(fù): 13 | ||||
zxzj05榮譽版主 (著名寫手)
|
[交流]
【轉(zhuǎn)帖】熱導率計算的in文件 已有12人參與
|
|||
|
看到有不少人在找熱導率計算方面的in文件,我就貢獻三個in文件吧,僅供參考。 同時,附件里貼出了我的計算結(jié)果。EMD的輸出結(jié)果(compute heat/flux command+compute tc command的計算結(jié)果)中, “ac.dat”(見附件中的"ac.wmf")是熱流自相關(guān)函數(shù)(我已經(jīng)修改了compute_tc.cpp,目前輸出的是normalized HCACF,但結(jié)果中給出的還是沒有歸一化的熱流自相關(guān)函數(shù),但形狀和歸一化的是一樣的,請注意。╇Sm的變化,"tc.dat"(見附件中的"tc.wmf" 是熱導率隨m的變化(m的涵義請參看熱導率計算的Green Kubo離散化公式,見附件"Comparison of atomic-level simulation methods for computing thermal conductivity”中的(9)式),"tc_time.dat"(見附件中的"tc_time.wmf" 是熱導率隨時間的變化;NEMD的結(jié)果中,"temp.profile"(見附件中的"temp_distribution.wmf" 是z方向上的溫度分布,"thermal_conductivity.dat“(見附件中的"NEMD.wmf" 表示熱導率隨時間的變化,兩者都包含了fix heat command 和fix thermal/conductivity command的計算結(jié)果。1.用compute heat/flux command+compute tc command得到熱流自相關(guān)函數(shù)和熱導率(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得到溫度梯度,進而得到熱導率(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命令需要特別注意,因為我所模擬的系統(tǒng),盒子邊長Lx=Ly=Lz,熱導率計算公式經(jīng)過推導變成為e_exchange/(4.0*t*L*delta_T), # 為了不在in文件里給L賦值,我修改了fix_thermal_conductivity.cpp文件(見附件),將e_exchange修改成了 e_exchange += force->mvv2e * (all[0].value - all[1].value) / (domain->zprd); 同時在end_of_step() 里添加了一句 “ e_exchange = 0.0;“,詳見附件中的fix_thermal_conductivity.cpp,這樣所得的e_exchange曲線基本上是一條水平曲線,而不是用原來的fix thermal/conductivity command所得到的斜向上的曲線,請注意。! # 所以才出現(xiàn)以上variable的表達式。 # 請看明白后再做計算,免得算出錯誤的結(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建立溫度梯度,進而得到熱導率(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 |
收藏 |

木蟲 (正式寫手)
金蟲 (小有名氣)
榮譽版主 (著名寫手)

木蟲 (正式寫手)
新蟲 (小有名氣)

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

新蟲 (小有名氣)

金蟲 (正式寫手)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 材料專碩326求調(diào)劑 +6 | 墨煜姒莘 2026-03-15 | 7/350 |
|
|---|---|---|---|---|
|
[考研] 求調(diào)劑,總分315,考的生物醫(yī)藥,一志愿湖南師范大學。調(diào)劑到任何專業(yè)都可以 +4 | 小丁想進步 2026-03-11 | 5/250 |
|
|
[考研] 有沒有道鐵/土木的想調(diào)劑南林,給自己招師弟中~ +3 | TqlXswl 2026-03-16 | 7/350 |
|
|
[考研] 085600材料與化工 +4 | 安全上岸! 2026-03-16 | 4/200 |
|
|
[考研] [導師推薦]西南科技大學國防/材料導師推薦 +3 | 尖角小荷 2026-03-16 | 6/300 |
|
|
[考研] 0856求調(diào)劑 +3 | 劉夢微 2026-03-15 | 3/150 |
|
|
[考研] 326求調(diào)劑 +3 | mlpqaz03 2026-03-15 | 3/150 |
|
|
[考研] 26考研一志愿中國石油大學(華東)305分求調(diào)劑 +3 | 嘉年新程 2026-03-15 | 3/150 |
|
|
[考研] 294求調(diào)劑 +3 | Zys010410@ 2026-03-13 | 4/200 |
|
|
[考研] 265求調(diào)劑 +4 | 威化餅07 2026-03-12 | 4/200 |
|
|
[考研] 一志愿哈工大材料324分求調(diào)劑 +5 | 閆旭東 2026-03-14 | 5/250 |
|
|
[考研] 341求調(diào)劑 +3 | 番茄頭--- 2026-03-10 | 3/150 |
|
|
[考研] 一志愿中科院,化學方向,295求調(diào)劑 +4 | 一氧二氮 2026-03-11 | 4/200 |
|
|
[考研] 26調(diào)劑/材料科學與工程/總分295/求收留 +9 | 2026調(diào)劑俠 2026-03-12 | 9/450 |
|
|
[考研] 310求調(diào)劑 +3 | 【上上簽】 2026-03-11 | 3/150 |
|
|
[考研] 一志愿211化學學碩310分求調(diào)劑 +8 | 努力奮斗112 2026-03-12 | 9/450 |
|
|
[考研] 工科調(diào)劑 +4 | Jiang191123! 2026-03-11 | 4/200 |
|
|
[考研] 土木第一志愿276求調(diào)劑,科研和技能十分豐富,求新興方向的導師收留 +3 | 土木小天才 2026-03-12 | 3/150 |
|
|
[考研] 070303一志愿西北大學學碩310找調(diào)劑 +3 | d如愿上岸 2026-03-13 | 3/150 |
|
|
[考研] 081200-11408-276學碩求調(diào)劑 +3 | 崔wj 2026-03-12 | 4/200 |
|