1. Trang chủ
  2. » Luận Văn - Báo Cáo

Sự hấp phụ hydro lên bề mặt pt(100) tính toán bằng lý thuyết phiếm hàm mật độ và mô phỏng monte carlo

102 6 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Sự Hấp Phụ Hydro Lên Bề Mặt Pt(100): Tính Toán Bằng Lý Thuyết Phiếm Hàm Mật Độ Và Mô Phỏng Monte Carlo
Người hướng dẫn PGS. TS. Trần Thị Thu Hạnh, TS. Phan Hùng Khiêm, PGS. TS. Phan Thị Ngọc Loan
Trường học Đại Học Bách Khoa
Chuyên ngành Vật Lý Kỹ Thuật
Thể loại luận văn
Năm xuất bản 2022
Thành phố Thành Phố Hồ Chí Minh
Định dạng
Số trang 102
Dung lượng 1,87 MB

Nội dung

I H C QU C GIA THÀNH PH H CHÍ MINH I H C QU C GIA TP H TR TR NGă NGă CHÍ MINH I H C BÁCH KHOA I H C BÁCH KHOA KHOA KHOA H C NG D NG NGUY NăV NăHịA S ăH PăPH ăHYDROăLểNăB ăM TăPT(100): TệNHăTOỄNăB NGăLụăTHUY TăPHI MăHĨMăM Tă ă VÀ MÔ PH NGăMONTEăCARLO C NGăLU NăV N Chuyên ngƠnh: V t lỦ k thu t Mư s : 8520401 NGHIÊN C U PH N LU NăV NGCăS KH NăTH OXY TRÊN I N C C CATHODE PORPHYRIN PHENOL Ngành V t lý k thu t TP H CHÍ MINH, tháng 07 n m 2022 i CỌNG TRÌNH TR Cán b h NG C HOÀN THÀNH T I I H C BÁCH KHOA ậ HQG -HCM ng d n khoa h c : PGS TS Tr n Th Thu H nh Cán b ch m nh n xét : TS Phan H ng Khiêm Cán b ch m nh n xét : PGS.TS Phan Th Ng c Loan Lu n v n th c s đ c b o v t i Tr ngày 23 tháng n m 2022 ng i h c Bách Khoa, HQG Tp HCM Thành ph n H i đ ng đánh giá lu n v n th c s g m: (Ghi rõ h , tên, h c hàm, h c v c a H i đ ng ch m b o v lu n v n th c s ) PGS.TS Hu nh Quang Linh ậ Ch t ch TS Ph m Th H i Mi n ậ Th kỦ TS Phan H ng Khiêm ậ Ph n bi n PGS.TS Phan Th Ng c Loan ậ Ph n bi n PGS.TS Tr n Th Thu H nh - y viên Xác nh n c a Ch t ch H i đ ng đánh giá LV Tr ngành sau lu n v n đ c s a ch a (n u có) CH T CH H Iă NG TR ng Khoa qu n lý chuyên NG KHOA KHOA H C NG D NG ii I H C QU C GIA TP.HCM TR NGă C NGăHọAăXĩăH IăCH ăNGH AăVI TăNAM căl pă- T ădoă- H nhăphúc IăH CăBỄCHăKHOA NHI MăV ăLU NăV NăTH CăS H tên h c viên: Nguy n V n Hóa MSHV: 2070276 NgƠy, tháng, n m sinh: 11/10/1997 N i sinh: TPHCM Chuyên ngành: V t lỦ k thu t I TểNă Mư s : 8520401 ăTĨI:ă S h p ph hydro lên b m t Pt(100): tính tốn b ng lý thuy t phi m hàm m t đ mô ph ng Monte Carlo (The hydrogen adsorption on the Pt(100) surface: calculated by density functional theory and Monte Carlo simulation) II NHI MăV ăVĨăN IăDUNG:           Xác đ nh v trí h p ph hydro kh d b m t Pt(100) Tính n ng l ng h p ph hydro Kh o xác s h i t theo thông s m k s l p nguyên t b m t Kh o sát t m nh h ng c a hydro h p ph lên b m t Tính n ng l ng dao đ ng m không c a hydro h p ph v trí khác nhau, theo ph ng khác X p x n ng l ng t ng tác gi a hydro h p ph v i Xây d ng ch ng trình mơ ph ng Monte Carlo cho h H/Pt(100) Tính n ng l ng t ng tác trung bình gi a H ậ H b m t Pt(100) Kh o sát s thay đ i t ng tác H ậ H theo m t đ hydro b m t ánh giá sai s c a đ ng cong đ i l ng t ng tác so v i th c nghi m III NGĨYăGIAOăNHI MăV : 14/02/2022 IV NGĨYăHOĨNăTHĨNHăNHI MăV : 21/06/2022 V CỄNăB ăH NGăD N: PGS TS Tr n Th Thu H nh CỄNăB ăH NGăD N (H tên vƠ ch kỦ) TR Tp HCM, ngày tháng n m 20 CH ăNHI M B ăMỌNă ĨOăT O (H tên vƠ ch kỦ) NGăKHOA KHOAăH Că NGăD NG (H tên vƠ ch kỦ) iii L IăC Mă N L i c m n đ u tiên xin g i đ n gia đình c a tơi t t c Gia đình đư ln th ng u, tin t ng, ng h nh ng l a ch n c a Tôi c ng xin g i c m n sơu s c t i giáo viên h ng d n c a tôi, cô Tr n Th Thu H nh Trong su t th i gian h c t p nghiên c u th i đ i h c cao h c, cô đư giúp r t nhi u khơng ch cơng vi c mà cịn cu c s ng Tôi c m th y may m n g p đ c m t ng ih ng d n t n tâm t v i nh cô, đ c cô tin t ng, ch d n trao cho r t nhi u c h i Bên c nh đó, tơi xin c m n tr đ th c hi n lu n v n nƠy Khoa h c ng i h c Bách Khoa TPHCM đư t o u ki n ng th i, c m n th y cô, cán b khoa ng d ng đ c bi t nh ng anh ch , th y thu c phịng thí nghi m V t lý tính tốn nh ng ki n th c chun mơn s hịa đ ng mà nh n đ Cu i cùng, xin c m nh ng ng su t th i gian qua Tôi c m n c i b n t v i đư đ ng hành, s chia tơi iv S ăH PăPH ăHYDROăLểNăB ăM TăPT(100): TÍNH TOÁN B NGăLụăTHUY TăPHI MăHĨMăM Tă ăVĨăMỌăPH NGă MONTE CARLO TịM T T Pt(100) lƠ m t nh ng ti u m t ph bi n nh t b m t xúc tác th c t c a n c c platinum, đóng vai trị thi t y u pin nhiên li u Do đó, vi c nghiên c u s h p ph hydro lên b m t nƠy r t quan tr ng vi c t ng hi u su t c a chuy n đ i n ng l ng c a pin nhiên li u Các ph ng pháp tính tốn lý thuy t đư đ c s d ng lên mơ hình b m t siêu chơn khơng đ kh o sát trình h p ph hydro c a b m t Pt(100) LỦ thuy t phi m hƠm m t đ (density functional theory ậ DFT) vƠ mô ph ng Monte Carlo (MC) đ c áp d ng đ xác đ nh tính ch t v s nguyên t hydro h p ph vƠ t hi n v i phi m hƠm n ng l n đ nh, dao đ ng c a ng tác gi a c p hydro Các tính tốn DFT đ ng trao đ i ậ t c th c ng quan GGA ậ PBE, v i gi th ph n m m SIESTA Các d li u h i t đư cho th y r ng hydro h p ph t i v trí c u n i (bridge ậ B) có n ng l ng h p ph ơm nh t Trong đó, s dao đ ng theo ph ng vng góc b m t c a hydro h p ph v trí đ nh (top ậ T) lƠ m nh nh t hydro h p ph Mô ph ng MC xét s ng c a s gia t ng đ bao ph c a hydro b m t Pt(100) ( H), cho t i ML (monolayer), đ n n ng l Ch có hydro h p ph giá tr thu đ tham s t nh h v trí B đ ng t ng tác c p gi a hydro c tính đ n mơ ph ng MC vƠ đ ng cong c có d ng g n v i k t qu c a thí nghi m quét n th vòng Vi c gi m ng tác c p xu ng 30% lƠm giá tr đ n 0.6, giá tr t ng thích t t v i d li u th c nghi m nguyên t hydro s ch y u đ đ bao ph hydro c ng gi m Trong kho ng H t 0.3 i u ch r ng c h p ph lên v trí c u n i b m t Pt(100) m c trung bình v THE HYDROGEN ADSORPTION ON THE PT(100) SURFACE: CALCULATED BY DENSITY FUNCTIONAL THEORY AND MONTE CARLO SIMULATION ABSTRACT Pt(100) is one of the most popular facets of a real platinum electrode surface, which plays an essential role in a fuel cell Thus, the adsorption of hydrogen on this surface is important to be researched in order to increase energy conversion efficiency The theoretical methods have been used within the conventional ultrahigh vacuum (UHV) surface modeling to investigate the hydrogen adsorption of Pt(100) Both density functional theory (DFT) and Monte Carlo (MC) simulation are performed to determine the stability, vibrational properties of adsorbed hydrogen atoms, and the pair interaction between them The DFT calculations were implemented with GGA ậ PBE exchange ậ correlation energy functional and under pseudopotential implemented in SIESTA software The converged data show that the H adsorbed on the bridge (B) sites have the most negative adsorption energy Meanwhile, the vertical vibration of H on the top (T) sites is strongest between adsorbed hydrogen atoms The MC simulation considers the influence of the increment of H coverage ( H), up to ML (monolayer), to the pair interaction energy Only the H on B sites are accounted in the MC simulation and the shape of the obtained curve consists with the result of cyclic voltammetry measurement Reducing the pair interaction parameter by about 30% yields the decrement of In the range of 0.3 to 0.6 of H, the is in accord with the experimental data This implies that the hydrogen atoms are mainly absorbed on the bridge sites of Pt(100) surface in the medium range of H coverage vi L IăCAMă OAN H c viên xin cam đoan nh ng k t qu có đ th c hi n d kh o đư đ is h c lu n v n lƠ b n thân h c viên ng d n c a PGS TS Tr n Th Thu H nh Ngoài ph n tài li u tham c li t kê, s li u k t qu th c nghi m trung th c k t qu đư đ c cơng b m t cơng trình khoa h c Nguy n V n Hóa vii M CL C L I C M N iii TịM T T .iv ABSTRACT v L I CAM OAN vi M C L C vii DANH SÁCH HÌNH NH x DANH SÁCH B NG xii DANH SÁCH T CH NG VI T T T .xiv M U 1.1 M c đích vƠ Ủ ngh a khoa h c c a đ tài 1.2 M c tiêu, đ i t CH NG ng, ph m vi đ tài T NG QUAN 2.1 Vai trò xúc tác c a Platinum ph n ng oxi hóa hydro 2.1.1 Pin nhiên li u 2.1.2 V t li u xúc tác ậ kim lo i platinum 2.1.3 B m t Pt(100) 2.2 H p ph n hóa hydro .8 2.2.1 Ph n ng oxy hóa n hóa hydro (hydrogen oxidation reaction ậ HOR) 2.2.2 Th nhi t đ ng l c 11 2.2.3 H p ph Langmuir Frumkin 13 2.3 Lý thuy t phi m hàm m t đ 14 2.3.1 Ph ng trình Shrodinger vƠ hƠm m t đ 14 viii 2.3.2 Các đ nh lý Hohenberg ậ Kohn 17 2.3.3 Các x p x tính tốn DFT .17 2.3.4 H tu n hoƠn vƠ đ nh lý Bloch 22 2.3.5 Gi i ph ng trình Kohn ậ Sham 25 2.4 Mô ph ng Monte Carlo 26 2.5 Mơ hình Ising 27 CH NG PH NG PHÁP TệNH TOÁN 30 3.1 Tính tốn SIESTA 30 3.1.1 Các thông s c b n mô ph ng SIESTA 30 3.1.2 Mơ hình b m t Pt(100)-(1x1) h p ph hydro 32 3.2 N ng l ng m không (Zero ậ Point Energy ậ ZPE) 34 3.3 N ng l ng t ng tác H ậ H b m t Pt(100) 35 3.3.1 N ng l ng h p ph 35 3.3.2 C p t ng tác H ậ H 36 3.3.3 Các c u hình h p ph hydro ậ m u h i quy 37 3.3.4 Tính giá tr 41 3.4 Mô ph ng Monte Carlo h H/Pt(100) 43 3.4.1 Áp d ng mơ hình Ising thơng s mơ ph ng 43 3.4.2 Thu t toán mô ph ng 44 CH NG K T QU VÀ TH O LU N 46 4.1 H p ph hydro 46 4.1.1 N ng l ng h p ph 46 4.1.2 S h i t 47 ix dài liên k t Pt ậ H 50 4.1.3 4.2 N ng l ng m không 52 4.2.1 Dao đ ng ph ng ngang 52 4.2.2 Dao đ ng ph ng d c .53 4.2.3 N ng l 4.3 N ng l ng t ng h p ph có tính ZPE 54 ng tác c p 55 4.3.1 N ng l ng h p ph c a c u hình 55 4.3.2 N ng l ng t ng tác c p ậ Ph ng trình h i quy 57 4.4 Mô ph ng Monte Carlo 61 4.4.1 4.4.2 CH NG Å Å 61 K T LU N VÀ H 5.1 K t qu đ t đ 5.2 H Å 63 NG PHÁT TRI N 69 c 69 ng phát tri n 69 DANH M C CƠNG TRÌNH Ã CỌNG B 70 TÀI LI U THAM KH O 72 PH L C 77 72 TÀI LI U THAM KH O [1] H Zhang and W.-X Li, "First-principles investigation of surface and Subsurface H adsorption on Ir(111)," The Journal of Physical Chemistry C, vol 113, no 51, pp 21361-21367, 2009 [2] S Nave, A K Tiwari and B Jackson, "Methane dissociation and adsorption on Ni(111), Pt(111), Ni(100), Pt(100), and Pt(110)-(1×2): Energetic study," The Journal of Chemical Physics, vol 132, no 5, p 054705, 2010 [3] E d V Gómez, S Amaya-Roncancio, L B Avalle, D H Linares and M C Gimenez, "DFT study of adsorption and diffusion of atomic hydrogen on metal," Applied Surface Science, vol 420, pp 1-8, 2017 [4] P Ferrin, S Kandoi, A U Nilekar and M Mavrikakis, "Hydrogen adsorption, absorption and diffusion on and in transition metal surfaces," Surface Science, vol 606, no 7-8, p 679ậ689, 2012 [5] C R.Henry, "Surface studies of supported model catalysts," Surface Science Reports, vol 31, no 7-8, pp 231-325, 1998 [6] A Lasia, "Modeling of hydrogen upd isotherms," Journal of Electroanalytical Chemistry, vol 562, no 1, pp 23-31, 2004 [7] T Hanh, Y Takimoto, O Sugino, "First-principles thermodynamic description of hydrogen electroadsorption on the Pt(111) surface," Surface Science, vol 625, pp 104-111 [8] T L Teck, W Lin-Lin, J Duane and B Kewu, "Hydrogen deposition on Pt(111) during electrochemical hydrogen evolution from a first-principles 73 multiadsorption-site study," The Journal of Physical Chemistry C, vol 117, no 44, pp 22696-22704, 2013 [9] Q Shi and R Sun, "Adsorption manners of hydrogen on Pt(100), (110) and (111) surfaces at high coverage," Computational and Theoretical Chemistry, vol 1106, pp 43-49, 2017 [10] J Perdew, K Burke, M Ernzerhof, "Generalized Gradient Approximation Made Simple," Physical Review Letters, vol 77, no 18, pp 3865-3868, 1996 [11] D Vasić, Z Ristanović, I Paởti and S Mentus, "Systematic DFT-GGA study of hydrogen adsorption on transition metals," Russian Journal of Physical Chemistry A, vol 85, no 13, p 2373ậ2379, 2011 [12] F Saad, M Zemirli, M Benakki and S Bouarab, "Ab-initio study of the coadsorption of Li and H on Pt(001), Pt(110) and Pt(111) surfaces," Physica B: Condensed Matter, vol 407, no 4, p 698ậ704, 2012 [13] Y Yu, J Yang, C Hao, X Zhao and Z Wang, "The adsorption, vibration and diffusion of hydrogen atoms on Platinum Low-index surfaces," Journal of Computational and Theoretical Nanoscience, vol 6, no 2, p 439ậ448, 2009 [14] H Ogasawara and M Ito, "Hydrogen adsorption on Pt(100), Pt(110), Pt(111) and Pt(1111) electrode surfaces studied by in situ infrared reflection absorption spectroscopy," Chemical Physics Letters, vol 221, no 3-4, pp 213-218, 1994 [15] D Zemlyanov, M Smirnov and V Gorodetskii, "HREELS characterization ofhydrogen adsorption states on the Pt(100)-(hex) and (1 x 1) surfaces," Catalysis Letters, vol 43, no 3/4, pp 181-187, 1997 74 [16] B Schumm, "Encyclopedia Britannica," Encyclopedia Britannica, Inc, 27 2006 [Online] Available: https://www.britannica.com/technology/fuel-cell [Accessed 12 2019] [17] J M Jaksic, N M Ristic, N V Krstajic, M M Jaksic, "Electrocatalysis for hydrogen electrode reactions in the light of fermi dynamics and structural bonding FACTORSẮI individual electrocatalytic properties of transition metals," International Journal of Hydrogen Energy, vol 23, no 12, pp 1121-1156, 1998 [18] Y Waseda, K Hirata, M Ohtani, "High-temperature thermal expansion of platinum, tantalum, molybdenum, and tungsten measured by x-ray diffraction," High Temp - High Pressures, vol 7, no 2, pp 221-226, 1975 [19] S Jun, L Zhi-Xin, "Three-Dimensional Molecular Dynamic Study on Accommodation Coefficients in Rough Nanochannels," Heat Transfer Engineering, vol 32, no 7-8, pp 658-666, 2011 [20] C Doan, S Lower and H Le, "Chemistry LibreTexts," NICE CXone Expert, 14 February 2022 [Online] Available: https://chem.libretexts.org/Bookshelves/Physical_and_Theoretical_Chemistry_T extbook_Maps/Supplemental_Modules_(Physical_and_Theoretical_Chemistry)/ Thermodynamics/Energies_and_Potentials/Free_Energy/Gibbs_(Free)_Energy [Accessed June 2022] [21] P Fleming, "Chemoistry LibreTexts," NICE CXone Expert , 13 April 2022 [Online] [Accessed June 2022] [22] V Saveleva, "Paul Scherrer Institut," 2019 [Online] Available: https://www.psi.ch/en/search?keywords=Viktoriia%20Saveleva&mode=terms&s ort_by=search_api_relevance [Accessed June 2022] 75 [23] K Burke, The ABC of DFT, Irvine: Department of Chemistry, University of California, 2007 [24] L H Thomas, "The calculation of atomic fields," Mathematical Proceedings of the Cambridge Philosophical Society, vol 23, no 5, pp 542-548, 1927 [25] P Hohenberg and W Kohn, "Inhomogeneous Electron Gas," Physical Review, vol 136, no 3, pp B864-B871, 1964 [26] W Kohn and L J Sham, "Self-Consistent Equations Including Exchange and Correlation Effects," Physical Review, vol 140, no 4A, pp A1133-A1138, 1965 [27] M Payne, M Teter, D Allan, T Arias and J Joannopoulos,, "Iterative minimization techniques forab initiototal-energy calculations: molecular dynamics and conjugate gradients," Reviews of Modern Physics, vol 64, no 4, pp 1045-1097, 1992 [28] J Martínez-Duart, R Martín-Palma and F Agulló-Rueda, Nanotechnology for Microelectronics and Optoelectronics, Madrid: Elsevier Science, 2006 [29] H Monkhorst, J Pack, "Special points for Brillouin-zone integrations," Physical Review B, vol 13, no 12, pp 5188-5192, 1976 [30] P Ordejón, E Artacho, J Soler, "Self-consistent order-Ndensity-functional calculations for very large systems," Physical Review B, vol 53, no 16, pp R10441-R10444, 1996 [31] J Soler et al, "The SIESTA method forab initioorder-Nmaterials simulation," Journal of Physics: Condensed Matter, vol 14, no 11, pp 2745-2779, 2002 76 [32] C D Vurdu, "The Adsorption and Diffusion Manners of Hydrogen Atoms on Pt (100), Pt (110), and Pt (111) Surfaces," Advances in Condensed Matter Physics, vol 2018, pp 1-10, 2018 [33] P Moussounda, M Haroun, G Rakotovelo and P Légaré, "A theoretical study of CH4 dissociation on PT(100) surface," Surface Science, vol 601, no 18, pp 36973701, 2007 [34] A J Renouprez and H Jobic, "Neutron scattering study of hydrogen adsorption on platinum catalysts," Journal of Catalysis, vol 113, no 2, pp 509-516, 1988 77 PH L C Ch đ ng trình mơ ph ng Monte Carlo theo mơ hình Ising cho m ng b m t H/Pt(100) c vi t b ng ngơn ng Python Ch ng trình g m hai file py:  module.py: ch a hàm function c n thi t cho ch  main.py: ch u m c a ch ng trình ng trình th c hi n mô ph ng Monte Carlo ng trình n m vi c tính tốn song song nh hai y u t :  Th vi n numpy Python th c hi n tính tốn ma tr n m t cách song song  Th vi n joblib cho kh n ng t n d ng ch y vòng l p m t cách song song core khác c a CPU máy tính File script module.py: """ Created on Thu Apr 22 15:06:43 2021 @author: Nguyen Van Hoa flag: np.array() size 4*(N+2) x 4*(N+2), marking the presentation sites of H : N+2 presented periodic condition """ # PARAMETERS import numpy as np import random as rd import matplotlib.pyplot as plt a=4 #lenght of pt(100)-(1x1) unit cell b=2 c=1 h=b k=c n_x=5 n_y=5 len_x=n_x*a len_y=n_y*a E_site=[-0.79894,-0.79894] #sb1, sb2 type_site=len(E_site) 78 corr=list(range(0,type_site)) ''' #E_int=[0.06082,0.02800,0.00970,0.01300,0.00956,-0.00024,-0.01200] E_int=[0.06122, 0.02592, 0.01089, 0.01323, 0.00913, 0.00200, 0.01219] corr[0]=np.array([[7,0,5,0,4,0,5,0,6],\ [ 0,0,0,0,0,0,0,0,0],\ [ 5,0,3,0,1,0,2,0,5],\ [ 0,0,0,0,0,0,0,0,0],\ [ 4,0,1,0,0,0,1,0,4],\ [ 0,0,0,0,0,0,0,0,0],\ [ 5,0,2,0,1,0,3,0,5],\ [ 0,0,0,0,0,0,0,0,0],\ [ 6,0,5,0,4,0,5,0,7]],dtype=int) corr[1]=np.array([[6,0,5,0,4,0,5,0,7],\ [ 0,0,0,0,0,0,0,0,0],\ [ 5,0,2,0,1,0,3,0,5],\ [ 0,0,0,0,0,0,0,0,0],\ [ 4,0,1,0,0,0,1,0,4],\ [ 0,0,0,0,0,0,0,0,0],\ [ 5,0,3,0,1,0,2,0,5],\ [ 0,0,0,0,0,0,0,0,0],\ [ 7,0,5,0,4,0,5,0,6]],dtype=int) ''' E_int=[999,0.02814,0.00676,0.00964,0.01295] # int corr[0]=np.array([[0,0,5,0,4,0,5,0,0],\ [ 0,0,0,0,0,0,0,0,0],\ [ 5,0,3,0,1,0,2,0,5],\ [ 0,0,0,0,0,0,0,0,0],\ [ 4,0,1,0,0,0,1,0,4],\ [ 0,0,0,0,0,0,0,0,0],\ [ 5,0,2,0,1,0,3,0,5],\ [ 0,0,0,0,0,0,0,0,0],\ [ 0,0,5,0,4,0,5,0,0]],dtype=int) corr[1]=np.array([[0,0,5,0,4,0,5,0,0],\ [ 0,0,0,0,0,0,0,0,0],\ [ 5,0,2,0,1,0,3,0,5],\ [ 0,0,0,0,0,0,0,0,0],\ - 79 [ 4,0,1,0,0,0,1,0,4],\ [ 0,0,0,0,0,0,0,0,0],\ [ 5,0,3,0,1,0,2,0,5],\ [ 0,0,0,0,0,0,0,0,0],\ [ 0,0,5,0,4,0,5,0,0]],dtype=int) ''' E_int=[0.06328,0.02800,0.00717] corr[0]=np.array([[3,0,1,0,2],\ [ 0,0,0,0,0],\ [ 1,0,0,0,1],\ [ 0,0,0,0,0],\ [ 2,0,1,0,3]],dtype=int) corr[1]=np.array([[2,0,1,0,3],\ [ 0,0,0,0,0],\ [ 1,0,0,0,1],\ [ 0,0,0,0,0],\ [ 3,0,1,0,2]],dtype=int) ''' L=len(corr[0]) # _ def shift(configure,vector): ##vector=[x,y] shifted_config=[] for coor in configure: shifted_config.append(list(np.array(coor,dtype=int)+np.array(vector,dtype=int)) ) return shifted_config def lattice(unit_cell, lattice_vector, n_x, n_y): #characterized by label h site 0,1 (sb1,sb2) lattice=unit_cell for i in range(1,n_x): lattice=lattice + shift(unit_cell,[0,lattice_vector[1]*i,0]) unit_cell_temp=lattice for i in range(1,n_y): lattice=lattice + shift(unit_cell_temp,[0,0,lattice_vector[2]*i]) return lattice def pick_randow(empty_pos): 80 chosen_pos=empty_pos[rd.randrange(0,len(empty_pos),1)] empty_pos.remove(chosen_pos) return chosen_pos,empty_pos def flag_1(flag,h_pos,value): for i in range(3): for ii in range(3): flag[len_x*i+len_x-1-h_pos[2],len_x*ii+h_pos[1]]=value return flag def add_H_1(H_pos,flag,empty_pos): #random h_pos, b= pick_randow(empty_pos) H_pos.append(h_pos) empty_pos=b flag=flag_1(flag,h_pos,1) return H_pos,flag,empty_pos #origin_pos must exist in empty_pos def add_H_2(H_pos,flag,empty_pos,origin_pos): #add H with Kawasaki dynamic type around_pos=[[0,-2,-2],[0,2,2],[0,-2,2],[0,2,-2],[-1,0,2],[-1,2,0],[-1,0,-2],[-1,2,0],[0,0,0]] rd.shuffle(around_pos) for i in around_pos: chosen_pos=[abs(origin_pos[0]+i[0]),(origin_pos[1]+i[1])%len_x,(origin_pos[ 2]+i[2])%len_y] if empty_pos.count(chosen_pos)==1: H_pos.append(chosen_pos) flag=flag_1(flag,chosen_pos,1) empty_pos.remove(chosen_pos) break else: continue return H_pos,flag,empty_pos def del_H(present_H_pos, H_pos,flag, empty_pos): H_pos.remove(present_H_pos) empty_pos.append(present_H_pos) flag=flag_1(flag,present_H_pos,0) return H_pos,flag,empty_pos def energy_H(h_pos, flag): 81 temp=np.reshape(flag[2*len_y-1-h_pos[2]-int((L-1)/2):2*len_y-1h_pos[2]+int((L-1)/2)+1,\ len_x+h_pos[1]-int((L-1)/2):len_x+h_pos[1]+int((L-1)/2)+1]\ *corr[h_pos[0]],L**2) temp=temp.tolist() num_type=[int(temp.count(i)) for i in range(1,len(E_int)+1)] E_int_h=np.multiply(num_type,E_int,dtype=float) energy_h=np.nansum(E_int_h)+E_site[h_pos[0]] return num_type,E_int_h,energy_h def plot_Econv(ntot,E,num_H,max_H): plt.plot(list(range(1,ntot+1)), E) plt.xlabel('MC_step') plt.ylabel('E(ev)') plt.title(str(num_H)+'/'+str(max_H)+' ML') plt.show() 82 File script main.py: """ Created on Mon Apr 26 15:44:20 2021 @author: Nguyen Van Hoa """ # PARAMETERS import module_ver2 as md import numpy as np import random as rd import math import time import pandas as pd from joblib import Parallel, delayed kB= 8.6173324*10**(-5) #(eV/T) a=4 #lenght of pt(100)-(1x1) unit cell b=2 c=1 h=b k=c T=303 #[0.0261] temperature nequiv=10000 nmeasure=10000 n_x=5 n_y=5 len_x = n_x*a len_y = n_y*a kBT=kB*T label=['Temp','Loading','Ave Eng','Accept Rate','Vint1','Vint2','Vint3','Vint4','Vint5','runtime']#,'Vint6','Vint7' ntot=nequiv+nmeasure h_unit_site = [[0,1,1],[0,3,3],[1,3,1],[1,1,3]] #only including sb sites lattice_vector = [0,a,a] empty_pos = md.lattice(h_unit_site,lattice_vector,n_x,n_y) flag=np.zeros([3*(n_x)*a,3*(n_y)*a], dtype=int) 83 max_H=n_x*n_y*len(h_unit_site) E_site=[-0.79894,-0.79894] #sb1, sb2 #E_int=[0.06328,0.02800,0.00717,0.00951,0.01052] #E_int=[0.06082,0.02800,0.00970,0.01300,0.00956,-0.00024,-0.01200] E_int=[999,0.02814,0.00676,0.00964,0.01295] # int # _ def calculate_at_numH(num_H): start_time = time.time() accept_rate = sum_energy = E_corr = [0]*len(E_int) rate = #sb = #f = #t = empty_pos = md.lattice(h_unit_site,lattice_vector,n_x,n_y) flag=np.zeros([3*(n_x)*a,3*(n_y)*a], dtype=int) H_pos=[] #clear all H adsorbed while len(H_pos) < num_H: H_pos,flag,empty_pos = md.add_H_1(H_pos,flag,empty_pos) #calculating initial energy E_corr_last=np.zeros(len(E_int),dtype=float) energy_last=0 for i in H_pos: num_type,E_int_h,energy_h = md.energy_H(i, flag) E_corr_last += E_int_h*0.5 energy_last += energy_h energy_last = energy_last - sum(E_corr_last) if E_corr_last[0]!=0: print(E_corr_last[0]) # -MC loop: shifting hydro to another pos for i in range(0,ntot): #creating recovery point H_pos_temp = list(H_pos) flag_temp = np.array(flag,dtype=int) empty_pos_temp = list(empty_pos) energy_last_temp = energy_last E_corr_last_temp = np.array(E_corr_last,dtype=float) 84 #shifting hydro = deleting hydro + adding hydro #delete hydro and calculate the energy that hydro contributing to the system h_moved = H_pos[rd.randrange(0,num_H,1)] num_type,E_int_moved,E_h_moved = md.energy_H(h_moved,flag) E_corr_check = E_corr_last - E_int_moved energy_check = energy_last - E_h_moved H_pos,flag,empty_pos = md.del_H(h_moved,H_pos,flag,empty_pos) #add hydro and calculate the energy that hydro contributing to the system H_pos,flag,empty_pos = md.add_H_1(H_pos,flag,empty_pos) #H_pos,flag,empty_pos = md.add_H_2(H_pos,flag,empty_pos,h_moved) num_type,E_int_added,E_h_added = md.energy_H(H_pos[-1],flag) E_corr_check = E_corr_check + E_int_added energy_check = energy_check + E_h_added #checking if energy_check 0: print(T, num_H,'need to be re-run!') break #printing time collapse end_time=time.time() print(T, num_H, end_time - start_time) #result table temp=[T, num_H, sum_energy/nmeasure, accept_rate/nmeasure] for i in range(0, len(E_corr)): temp.append(E_corr[i]/nmeasure) temp.append(end_time - start_time) temp=np.array(temp) df = pd.DataFrame(np.reshape(temp, (1,5+len(E_int)))) df.to_csv(fol_name,mode='a',index=None, header=None) # -fol_name=str(n_x)+'x'+str(n_y)+'_'+str(T)+'_MD1_'+str(nmeasure)+'testing 111.csv' temp=np.zeros(shape=(1,len(E_int)+5),dtype=int) df = pd.DataFrame(temp) df.to_csv(fol_name,header=label,index=False) Parallel(n_jobs=1)(delayed(calculate_at_numH)(num_H) for num_H in range(48,50)) 86 PH N LÝ L CH TRÍCH NGANG H tên: Nguy n V n Hóa NgƠy,ătháng,ăn măsinh: 11/10/1997 N iăsinh: TPHCM a ch liên l c: 399 t 1, khu ph 3B, ph ng Th nh L c, qu n 12, TPHCM QUỄăTRỊNHă ĨOăT O - 09/2015 ậ 04/2020: K s V t lý k thu t, thu c khoa Khoa h c i h c Bách Khoa TPHCM ậ - i h c Qu c Gia TPHCM 09/2020 ậ 08/2022: Th c s V t lý k thu t, thu c khoa Khoa h c i h c Bách Khoa TPHCM ậ ng d ng, ng d ng, i h c Qu c Gia TPHCM QUÁ TRÌNH CƠNG TÁC - 09/2020ăđ n nay: c ng tác viên nghiên c u phịng thí nghi m V t lý tính tốn, i h c Bách Khoa ậ Tr n Th Thu H nh i h c Qu c gia TPHCM, d is h ng d n PGS.TS ... ph hydro lên b m t Pt(100): tính tốn b ng lý thuy t phi m hàm m t đ mô ph ng Monte Carlo (The hydrogen adsorption on the Pt(100) surface: calculated by density functional theory and Monte Carlo. .. b s err s mô ph ng Monte Carlo đ c Monte Carlo, g i N Công th c sai c cho b i (2.41) Qua có th th y, sai s nh s b Thông th ng, mô ph ng Monte Carlo đ ngh a lƠ s b c mô ph ng Monte Carlo l n c... 2.3 Lý thuy t phi m hàm m tăđ Lý thuy t phi m hàm m t đ m t lý thuy t đ c dùng đ mô t tính ch t c a h electron nguyên t , phân t , v t r n, khuôn kh c a lý thuy t l ng t Trong lý thuy t này, tính

Ngày đăng: 13/10/2022, 08:19

TRÍCH ĐOẠN

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN

w