PHYS 3061 Introduction to Computer Simulation of Physical Systems. Lab 2: Initialization with Boltzmann distribution



Similar documents
THE IDEAL GAS LAW AND KINETIC THEORY

Topic 3b: Kinetic Theory

momentum change per impact The average rate of change of momentum = Time interval between successive impacts 2m x 2l / x m x m x 2 / l P = l 2 P = l 3

PARTICLE SIMULATION ON MULTIPLE DUST LAYERS OF COULOMB CLOUD IN CATHODE SHEATH EDGE

Widths of spectral lines

A. Kinetic Molecular Theory (KMT) = the idea that particles of matter are always in motion and that this motion has consequences.

PHYS-2010: General Physics I Course Lecture Notes Section XIII

Data Visualization for Atomistic/Molecular Simulations. Douglas E. Spearot University of Arkansas

CHM 579 Lab 1: Basic Monte Carlo Algorithm

Summarizing and Displaying Categorical Data

Kinetic Theory of Gases. Chapter 33. Kinetic Theory of Gases

HEAT UNIT 1.1 KINETIC THEORY OF GASES Introduction Postulates of Kinetic Theory of Gases

SIZE OF A MOLECULE FROM A VISCOSITY MEASUREMENT

Statistical Mechanics, Kinetic Theory Ideal Gas. 8.01t Nov 22, 2004

Particle Physics. Bryan Webber University of Cambridge. IMPRS, Munich November 2007

Diagrams and Graphs of Statistical Data

Introduction to the Monte Carlo method

Vacuum Technology. Kinetic Theory of Gas. Dr. Philip D. Rack

Data Preparation and Statistical Displays

Kinetic Theory of Gases

1) Write the following as an algebraic expression using x as the variable: Triple a number subtracted from the number

2013 MBA Jump Start Program. Statistics Module Part 3

AP Physics 1 and 2 Lab Investigations

Temperature Measure of KE At the same temperature, heavier molecules have less speed Absolute Zero -273 o C 0 K

Vacuum Evaporation Recap

There is no such thing as heat energy

Petrel TIPS&TRICKS from SCM

Lecture#20 Ion Implant for ULSI

FEGYVERNEKI SÁNDOR, PROBABILITY THEORY AND MATHEmATICAL

Representing Uncertainty by Probability and Possibility What s the Difference?

BNG 202 Biomechanics Lab. Descriptive statistics and probability distributions I

STATS8: Introduction to Biostatistics. Data Exploration. Babak Shahbaba Department of Statistics, UCI

N 1. (q k+1 q k ) 2 + α 3. k=0

(1) The size of a gas particle is negligible as compared to the volume of the container in which the gas is placed.

Real Business Cycle Models

Evaluating the results of a car crash study using Statistical Analysis System. Kennesaw State University

) and mass of each particle is m. We make an extremely small

Summary of important mathematical operations and formulas (from first tutorial):

Data Visualization. Christopher Simpkins

Monte Carlo Sampling Methods

Big Data & Scripting Part II Streaming Algorithms

A Simple Pseudo Random Number algorithm

Foundation of Quantitative Data Analysis

Test 5 Review questions. 1. As ice cools from 273 K to 263 K, the average kinetic energy of its molecules will

Kinetic Molecular Theory and Gas Laws

Monte Carlo and Empirical Methods for Stochastic Inference (MASM11/FMS091)

Diffusion and Fluid Flow

CLASSICAL CONCEPT REVIEW 8

Experiment 9. The Pendulum

Density Curve. A density curve is the graph of a continuous probability distribution. It must satisfy the following properties:

KINETIC THEORY AND THERMODYNAMICS

Lecture 8. Generating a non-uniform probability distribution

LECTURE 11 : GLASSY DYNAMICS - Intermediate scattering function - Mean square displacement and beyond - Dynamic heterogeneities - Isoconfigurational

Introduction to Monte Carlo Methods

An Introduction to Basic Statistics and Probability

SAM Teachers Guide Heat and Temperature

Below is a very brief tutorial on the basic capabilities of Excel. Refer to the Excel help files for more information.

Monte Carlo-based statistical methods (MASM11/FMS091)

Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS Instructor: Michael Gelbart

Infrared Spectroscopy: Theory

1. The Kinetic Theory of Matter states that all matter is composed of atoms and molecules that are in a constant state of constant random motion

Exploratory Data Analysis

Monte Carlo Simulations in Proton Dosimetry with Geant4

APPLICATION OF ADVANCED SEARCH- METHODS FOR AUTOMOTIVE DATA-BUS SYSTEM SIGNAL INTEGRITY OPTIMIZATION

Chapter 3 RANDOM VARIATE GENERATION

Data representation and analysis in Excel

PTC Thermistor: Time Interval to Trip Study

Model-based Synthesis. Tony O Hagan

Signal to Noise Instrumental Excel Assignment

CHAPTER 7 INTRODUCTION TO SAMPLING DISTRIBUTIONS

3. Diodes and Diode Circuits. 3. Diodes and Diode Circuits TLT-8016 Basic Analog Circuits 2005/2006 1

Supplement to Call Centers with Delay Information: Models and Insights

Physics 9e/Cutnell. correlated to the. College Board AP Physics 1 Course Objectives

Uncertainty evaluations in EMC measurements

Kinetic Theory: Atomic and Molecular Explanation of Pressure and Temperature

How To Use Statgraphics Centurion Xvii (Version 17) On A Computer Or A Computer (For Free)

SIMPLIFIED METHOD FOR ESTIMATING THE FLIGHT PERFORMANCE OF A HOBBY ROCKET

Vertical Alignment Colorado Academic Standards 6 th - 7 th - 8 th

Using Excel (Microsoft Office 2007 Version) for Graphical Analysis of Data

General instructions for the content of all StatTools assignments and the use of StatTools:

Organizing Your Approach to a Data Analysis

Conservation of Momentum and Energy

Probability Distributions

NMR and IR spectra & vibrational analysis

Spike-Based Sensing and Processing: What are spikes good for? John G. Harris Electrical and Computer Engineering Dept

Numerical Methods for Option Pricing

EXPERIMENT 11 UV/VIS Spectroscopy and Spectrophotometry: Spectrophotometric Analysis of Potassium Permanganate Solutions.

Chapter 10. Key Ideas Correlation, Correlation Coefficient (r),

Analytical Test Method Validation Report Template

Hands-on: Data analysis and advanced scripting. Mario Orsi

Euler: A System for Numerical Optimization of Programs

Solving ODEs in Matlab. BP205 M.Tremont

Nonlinear Algebraic Equations. Lectures INF2320 p. 1/88

Mini-project in TSRT04: Cell Phone Coverage

Measurement of Charge-to-Mass (e/m) Ratio for the Electron

Practical Calculation of Expected and Unexpected Losses in Operational Risk by Simulation Methods

Nonlinear Algebraic Equations Example

Transcription:

PHYS 3061 Introduction to Computer Simulation of Physical Systems Lab 2: Initialization with Boltzmann distribution

Molecular Dynamic System (Ideal gas) At temperature T, f(v) Although the KE satisfies the statistical quantity, the system is not at equilibrium! v

Molecular Dynamic System (Ideal gas) At temperature T, After many collisions f(v) f(v) Must satisfies Maxwell Boltzmann distribution v v

Task for today Initialize the system at equilibrium (Maxwell Boltzmann distribution)

Initializing the system at equilibrium Reasons Reduce computational time for reaching equilibrium Reduce accumulated computational error (you will meet this problem when Euler algorithm is implemented after lab 3)

Initialization with Maxwell Boltzmann distribution The speed Maxwell Boltzmann distribution, But before we continue, we first take some time do decide what unit should be used So that the system is suitable for molecular dynamic simulation

Appropriate units Choose the most convenient unit for MD simulation and visualization by VMD 1. Length : (10 ) 2. Time : ps (10 ) 3. Energy : ev All the constants should be written in unit of, ps and ev. Speed of light : c 3.0 10 3.010 Boltzmann constant : 8.617 10 / Declare them at the beginning of the program is helpful (with high precision) #define Kb 8.6173324e-5 //Boltzmann constant (in ev/k) #define PI 3.14159265 #define light_speed 2997924.58 // in angstrom/ps

Define useful constants Be careful and denote the units of the constants Boltzmann constants: 8.62 10-5 ev/k vs 1.38 10-23 J/K Always write units of your constants in the comment

How to handle mass of particle? In MD simulation, particles are often atoms. It is easy and straightforward to use atomic mass as the unit. Convert atomic mass to standard unit by 1 931.49 9.314910

Initialization with Maxwell Boltzmann distribution The speed with Maxwell Boltzmann distribution, Equivalently, the one-dimensional velocity satisfies Gaussian distribution, (For detail explanations, please take PHYS4031 Statistical Mechanics)

Convert uniform distribution to other distributions For Gaussian distribution, direct conversion (Box-Muller method) may be used, 1 2π 1 2 2 For general distribution, Monte Carlo method should be used (If you are interested in Monte Carlo method, please take PHYS4061 Computational Physics)

Convert uniform distribution to Gaussian distribution Box-Muller transform, Where ϑ1, ϑ2 are independent random numbers, 0 < ϑ1, ϑ2 < 1 x1, x2 are independent random numbers with standard normal distribution https://en.wikipedia.org/wiki/box Muller_transform#/media/File:Box- Muller_transform_visualisation.svg

Sample C/C++ Code for the Box Muller transform #include <math.h> #define PI 3.14159265359 using namespace std; double Box_Muller_Transform(double y1, double y2){ //y1 and y2 are independent random numbers, where 0 < y1,y2 <1 // Remember to exclude 0!!! Since log(0) will cause bugs double x1 = sqrt(-2*log(y1))*cos(2*pi*y2); return x1; } //For those who use java: Just use Random.nextGaussian()

Maxwell Boltzmann distribution After getting the one-dimensional velocity, which satisfies What is the deviation now? Obviously not 1! Simply, get the velocity by Hint: linear transformation to the correct scale

After initialization of the atoms Check your result! Use Excel to plot a histogram for the distribution in speed Print the mean and Max speed Implement a free expansion simulation to see - Is the initial position and the expansion spherically symmetric?

Excel Histogram Scatter plot Output the speeds & Put them in Frequency Column of data (in this case, E) Velocity (Å/fs) Column of interval (in this case, G)

Compare the result with analytic solution Check the peak value of speed Does it match with the analytic solution Probably, you need to check again the temperature of your MD system By checking mean KE

Free expansion Simulation Write a function to update the position of the particles by Δ Δ Out put your result in.xyz file

Appropriate system size Appropriate system size is critical to meet approximation and reach convergence 1. Too large far from reaching equilibrium 2. Too small violate ideal gas law 3. Too many particles heavy computational process 4. Too few particles statistical properties hidden Probably, you will only meet problem 4 in this LAB but all of them in the next LAB

Summary of today tasks

Checklist 1. Set proper units and constants for the physical properties of the particle 2. Set appropriate system size 3. All your particles should be Argon (Ar) atoms with atomic mass 39.948u. 4. Initialise the position of particles with randomly uniform distribution 5. Initialise the velocity of particles according to Maxwell-Boltzmann distribution for a given temperature of the system 6. Check the temperature (mean KE), centre of mass and max particle speed of the system 7. Compare the distribution and the peak value of speed, v p, with analytic solution in Excel 8. Create a free expansion simulation and output results in.xyz file

Submission Flow chart Code - Initialisation (check if it fulfills point 1-6) - Free expansion Excel file Table Chart Analysis (check if it fulfills point 6 7)