| 5 | 1/1 | 返回列表 |
| 查看: 7538 | 回復(fù): 13 | ||||
| 當(dāng)前只顯示滿足指定條件的回帖,點擊這里查看本話題的所有回帖 | ||||
zxzj05榮譽版主 (著名寫手)
|
[交流]
【轉(zhuǎn)帖】熱導(dǎo)率計算的in文件 已有12人參與
|
|||
|
看到有不少人在找熱導(dǎo)率計算方面的in文件,我就貢獻(xiàn)三個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ù),但形狀和歸一化的是一樣的,請注意!)隨m的變化,"tc.dat"(見附件中的"tc.wmf" 是熱導(dǎo)率隨m的變化(m的涵義請參看熱導(dǎo)率計算的Green Kubo離散化公式,見附件"Comparison of atomic-level simulation methods for computing thermal conductivity”中的(9)式),"tc_time.dat"(見附件中的"tc_time.wmf" 是熱導(dǎo)率隨時間的變化;NEMD的結(jié)果中,"temp.profile"(見附件中的"temp_distribution.wmf" 是z方向上的溫度分布,"thermal_conductivity.dat“(見附件中的"NEMD.wmf" 表示熱導(dǎo)率隨時間的變化,兩者都包含了fix heat command 和fix thermal/conductivity command的計算結(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得到溫度梯度,進而得到熱導(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命令需要特別注意,因為我所模擬的系統(tǒng),盒子邊長Lx=Ly=Lz,熱導(dǎo)率計算公式經(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); 同時在end_of_step() 里添加了一句 “ e_exchange = 0.0;“,詳見附件中的fix_thermal_conductivity.cpp,這樣所得的e_exchange曲線基本上是一條水平曲線,而不是用原來的fix thermal/conductivity command所得到的斜向上的曲線,請注意。! # 所以才出現(xiàn)以上variable的表達(dá)式。 # 請看明白后再做計算,免得算出錯誤的結(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建立溫度梯度,進而得到熱導(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 |
收藏 |

新蟲 (小有名氣)

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

木蟲 (正式寫手)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 283求調(diào)劑 +5 | A child 2026-03-28 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 數(shù)一英一271專碩(085401)求調(diào)劑,可跨 +3 | 前行必有光 2026-03-28 | 4/200 |
|
|
[考研] 286求調(diào)劑 +11 | PolarBear11 2026-03-26 | 11/550 |
|
|
[考研] 材料求調(diào)劑一志愿哈工大324 +7 | 閆旭東 2026-03-28 | 9/450 |
|
|
[考研] 0856調(diào)劑 +5 | 求求讓我有書讀?/a> 2026-03-26 | 6/300 |
|
|
[考研] 復(fù)試調(diào)劑,一志愿南農(nóng)083200食品科學(xué)與工程 +5 | XQTJZ 2026-03-26 | 5/250 |
|
|
[考研] 考研化學(xué)308分求調(diào)劑 +10 | 你好明天你好 2026-03-23 | 12/600 |
|
|
[考研] 085600,材料與化工321分,求調(diào)劑 +9 | 大饞小子 2026-03-27 | 9/450 |
|
|
[考研] 一志愿211,335分,0856,求調(diào)劑院校和導(dǎo)師 +4 | 傾____蕭 2026-03-27 | 5/250 |
|
|
[考研] 312求調(diào)劑 +9 | 上岸吧ZJY 2026-03-22 | 13/650 |
|
|
[考研] 調(diào)劑 +3 | 李嘉圖·S·路 2026-03-27 | 3/150 |
|
|
[考研] 求調(diào)劑 一志愿 本科 北科大 化學(xué) 343 +6 | 13831862839 2026-03-24 | 7/350 |
|
|
[考研] 【雙一流院校新能源、環(huán)境材料,材料加工與模擬招收大量調(diào)劑】 +4 | Higraduate 2026-03-22 | 8/400 |
|
|
[考研]
|
平樂樂樂 2026-03-26 | 4/200 |
|
|
[考研] 334分 一志愿武理 材料求調(diào)劑 +4 | 李李不服輸 2026-03-26 | 4/200 |
|
|
[考研] 085600 材料與化工 329分求調(diào)劑 +9 | Mr. Z 2026-03-25 | 9/450 |
|
|
[考研] 0854電子信息求調(diào)劑 +7 | α____ 2026-03-22 | 9/450 |
|
|
[考研] 318求調(diào)劑 +5 | plum李子 2026-03-21 | 8/400 |
|
|
[考研] 300分,材料,求調(diào)劑,英一數(shù)二 +5 | 超贊的 2026-03-24 | 5/250 |
|
|
[考研]
|
黃粱一夢千年 2026-03-24 | 3/150 |
|