PythonBased Kinetic Monte Carlo Simulation Tool David R
Python-Based Kinetic Monte Carlo Simulation Tool David R. Ely 1, R. Edwin Garcia 1, Zaiwei Zhang 2, Jingyuan Liang 2 1 Purdue University, School of Materials Engineering, 2 Purdue University, School of Electrical and Computer Engineering Introduction Nowadays, scholars are working on nanoscale more and more frequently. At that scale, descriptions could be hard to made since most of nanomaterials cannot be seen at normal life. Thus, program simulation on nano-scaled materials are more and more needed. This research project is developing a simulation tool for the diffusion reactions in different types of materials. It is based on Kinetic Monte Carlo method. The program contains the physical engine of vacancy diffusion mechanism between material cubic and a GUI which can help the users on how to use the program. The simulation tool is programmed by python. Approaches to solve the problem Snap shots of GUI Interface: Results Conclusions Snap shots of the output picture: In this project, I found that when doing real time plotting. The graph object cannot be directly updated through iterations. It has to be changed through one instance of the object. Start of the Simulation References Objectives and Current Issues The program, which contains the physical engine of vacancy diffusion mechanism, has already been programmed by Prof. Garcia and Dave R. Ely in MSE department at Purdue. However, users cannot observe the changing numbers of diffusivities during Vacancy Diffusion simulations between different materials. Also, there is no Graphic User Interface for the simulation tools. To solve the problem, the Virtual Kinetics of Materials Laboratory program is used to create the Graphic User Interface. Also, GTK+ toolkit has been used to create a pop-up window displaying updated diffusivities during the simulation. For user purpose, the pop-up window has been set to display a plot of diffusivity versus simulation time. During the programming process, several problems were found and solved by using GTK+ main loop and functions in Matplotlib plotting library. Also, there were also design problems about the Graphic User Interface on areas such as error checking and user experience. RESEARCH POSTER PRESENTATION DESIGN © 2012 www. Poster. Presentations. com Middle of the Simulation 1. Ely, D. R. , & Garcia, E. R. (2013). KMC User Manual Version 0. 1. 2. Tosi, S (2009). Matplotlib for Python Developers. Birmingham, UK: Packt Publishing Ltd. Acknowledgements The project was supported by Prof. Edwin from School of Materials Engineering, and I received lots of help from David R. Ely. Thanks for their effort. Main features of the program: • Be able to generate a model for a cubic lattice with the three dimension measurements entered by users and the material chose by users • Simulation temperature is controlled by users • Number of hops during the simulation is controlled by users • Be able to generate a GIF file based on all the pictures generated during the simulation • Users can clear all the materials generated during the simulation by click the Run button beside the Reset Tag • Simulation results will be displayed graphically during the run-time simulation Finish of the Simulation Plotting during the real time simulation: Since most of the graph objects are not iterable, plotting during the simulation can be accomplished by using GTK+ main loop. By using the GTK+, the new data can be updated into the information object of a graph. Therefore, the graphic can be updated during the simulation. The graph is plotted by using Matplotlib software. Contact Me Zaiwei Zhang Email Address: zhang 936@purdue. edu School of Electrical and Computer Engineering
- Slides: 1