| 5 | 1/1 | 返回列表 |
| 查看: 7543 | 回復(fù): 13 | ||||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | ||||
zxzj05榮譽(yù)版主 (著名寫手)
|
[交流]
【轉(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”(見附件中的"ac.wmf")是熱流自相關(guān)函數(shù)(我已經(jīng)修改了compute_tc.cpp,目前輸出的是normalized HCACF,但結(jié)果中給出的還是沒有歸一化的熱流自相關(guān)函數(shù),但形狀和歸一化的是一樣的,請(qǐng)注意。╇Sm的變化,"tc.dat"(見附件中的"tc.wmf" 是熱導(dǎo)率隨m的變化(m的涵義請(qǐng)參看熱導(dǎo)率計(jì)算的Green Kubo離散化公式,見附件"Comparison of atomic-level simulation methods for computing thermal conductivity”中的(9)式),"tc_time.dat"(見附件中的"tc_time.wmf" 是熱導(dǎo)率隨時(shí)間的變化;NEMD的結(jié)果中,"temp.profile"(見附件中的"temp_distribution.wmf" 是z方向上的溫度分布,"thermal_conductivity.dat“(見附件中的"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)過推導(dǎo)變成為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); 同時(shí)在end_of_step() 里添加了一句 “ e_exchange = 0.0;“,詳見附件中的fix_thermal_conductivity.cpp,這樣所得的e_exchange曲線基本上是一條水平曲線,而不是用原來的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 |
收藏 |

榮譽(yù)版主 (著名寫手)

金蟲 (小有名氣)
木蟲 (正式寫手)
木蟲 (正式寫手)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 材料求調(diào)劑 一志愿哈工大總分298分,前三科223分 +9 | dongfang59 2026-03-27 | 9/450 |
|
|---|---|---|---|---|
|
[考研] 哈爾濱工業(yè)大學(xué)材料與化工專碩378求調(diào)劑 +3 | 塔比烏斯 2026-03-30 | 3/150 |
|
|
[考研] 求調(diào)劑,一志愿 南京航空航天大學(xué) ,080500材料科學(xué)與工程學(xué)碩,總分289分 +9 | @taotao 2026-03-29 | 9/450 |
|
|
[考研] 285求調(diào)劑 +6 | AZMK 2026-03-29 | 9/450 |
|
|
[考研] 一志愿中海洋材料357 +3 | 麥恩莉. 2026-03-30 | 3/150 |
|
|
[考研] 求收留 +6 | 1943443204 2026-03-28 | 6/300 |
|
|
[考研] 071010 323 分求調(diào)劑 +3 | Baekzhy 2026-03-27 | 3/150 |
|
|
[考研] 070300化學(xué)354求調(diào)劑 +7 | 101次希望 2026-03-28 | 7/350 |
|
|
[考研] 296求調(diào)劑 +10 | 彼岸t 2026-03-29 | 10/500 |
|
|
[考研] 317求調(diào)劑 +10 | 蛋黃咸肉粽 2026-03-26 | 10/500 |
|
|
[考研] 332求92調(diào)劑 +8 | 蕉蕉123 2026-03-28 | 8/400 |
|
|
[考研] 321求調(diào)劑 +7 | 璞玉~~ 2026-03-25 | 8/400 |
|
|
[考研] 11408軟件工程求調(diào)劑 +3 | Qiu學(xué)ing 2026-03-28 | 3/150 |
|
|
[考研] 本科新能源科學(xué)與工程,一志愿華理能動(dòng)285求調(diào)劑 +7 | AZMK 2026-03-28 | 11/550 |
|
|
[考研] 322求調(diào)劑 +5 | 舊吢 2026-03-24 | 5/250 |
|
|
[考研] 292求調(diào)劑 +14 | 鵝鵝鵝額額額額?/a> 2026-03-25 | 15/750 |
|
|
[考研] 0703化學(xué)求調(diào)劑,各位老師看看我。! +5 | 祁祺祺 2026-03-25 | 5/250 |
|
|
[考研] 0856調(diào)劑 +5 | 求求讓我有書讀?/a> 2026-03-26 | 6/300 |
|
|
[考研]
|
WWW西西弗斯 2026-03-24 | 8/400 |
|
|
[考研] 網(wǎng)絡(luò)空間安全0839招調(diào)劑 +4 | w320357296 2026-03-25 | 6/300 |
|