An Introduction to Computer Simulation Methods

Similar documents
MATLAB for Engineers

Feedback Control of Dynamic Systems

With Modern Physics For Scientists and Engineers

9TH EDITION. George B. Thomas, Jr. Massachusetts Institute of Technology. Ross L. Finney. With the collaboration of Maurice D.

ALGEBRA AND ALGEBRAIC COMPUTING ELEMENTS OF. John D. Lipson. Addison-Wesley Publishing Company, Inc.

CLASSICAL ELECTRICITY

Statistical Mechanics

An Introduction to. Michael E. Peskin. Stanford Linear Accelerator Center. Daniel V. Schroeder. Weber State University. Advanced Book Program

STOCHASTIC PROCESSES IN PHYSICS AND CHEMISTRY

Computational Methods for Nonlinear Systems

Fundamentals. Statistical. and. thermal physics. McGRAW-HILL BOOK COMPANY. F. REIF Professor of Physics Universüy of California, Berkeley

Boundary. DIFFERENTIAL EQUATIONS with Fourier Series and. Value Problems APPLIED PARTIAL. Fifth Edition. Richard Haberman PEARSON

Computer simulations as concrete models for student reasoning

Teaching Statistical and Thermal Physics Using Computer Simulations

Differential Equations with Mathematica

INTRODUCTION TO о JLXJLA Из А lv-/xvj_y JrJrl Y üv_>l3 Second Edition

Principles of Equilibrium Statistical Mechanics

DIFFERENTIAL EQUATIONS, DYNAMICAL SYSTEMS, AND AN INTRODUCTION TO CHAOS

Statistical Mechanics

Suggestions for Further Reading

Computational Methods for Nonlinear Systems

Introduction to Computational Materials Science

Fractals in Science. Armin Bunde Shlomo Havlin (Eds.) Springer-Verlag Berlin Heidelberg New York London Paris Tokyo HongKong Barcelona Budapest

Monte Carlo Simulations in Statistical Physics

Mathematica. A Systemjor Doing Mathematics by Computer. Stephen Wolfral1l. ~ C;:tr lju J. ~c~~

NANO/MICROSCALE HEAT TRANSFER

DIFFERENTIAL EQUATIONS, DYNAMICAL SYSTEMS, AND AN INTRODUCTION TO CHAOS

System Dynamics for Engineering Students Concepts and Applications

Statistical Signal Processing Detection, Estimation, and Time Series Analysis

SIMCON - Computer Simulation of Condensed Matter

List of Comprehensive Exams Topics

I NONLINEAR EWORKBOOK

MEASUREMENT THEORY QUANTUM AND ITS APPLICATIONS KURT JACOBS. University of Massachusetts at Boston. fg Cambridge WW UNIVERSITY PRESS

Advanced Stellar Astrophysics

Physics of atoms and molecules

Solid State Physics. GIUSEPPE GROSSO Professor of Solid State Physics, Department of Physics, University of Pavia, and INFM

Computational Physics. J. M. Thijssen

Elementary Lectures in Statistical Mechanics

Marcelo Alonso. Edward J. Finn. Georgetown University. Prentice Hall

Introduction to Modern Quantum Optics

PRINCIPLES OF PHYSICS. \Hp. Ni Jun TSINGHUA. Physics. From Quantum Field Theory. to Classical Mechanics. World Scientific. Vol.2. Report and Review in

Dynamic Systems. Modeling and Analysis. Hung V. Vu. Ramin S. Esfandiari. THE McGRAW-HILL COMPANIES, INC. California State University, Long Beach

Study Plan for Ph.D in Physics (2011/2012)

NPTEL

ANALYTICAL MECHANICS. LOUIS N. HAND and JANET D. FINCH CAMBRIDGE UNIVERSITY PRESS

PHYSICS-PH (PH) Courses. Physics-PH (PH) 1

Computational Fluid Dynamics

Chaotic Vibrations. An Introduction for Applied Scientists and Engineers

QUANTUM MECHANICS. Franz Schwabl. Translated by Ronald Kates. ff Springer

Physics Courses. Courses. Physics Courses 1

Contents. 1 Introduction and guide for this text 1. 2 Equilibrium and entropy 6. 3 Energy and how the microscopic world works 21

The Transition to Chaos

An Introduction to Computational Physics

PHYSICS OF SEMICONDUCTORS AND THEIR HETEROSTRUCTURES

AN INTRODUCTIONTO MODERN ASTROPHYSICS

DEPARTMENT OF PHYSICS

Frank Y. Wang. Physics with MAPLE. The Computer Algebra Resource for Mathematical Methods in Physics. WILEY- VCH WILEY-VCH Verlag GmbH & Co.

INTRODUCTION TO THE CALCULUS OF VARIATIONS AND ITS APPLICATIONS

ICCP Project 2 - Advanced Monte Carlo Methods Choose one of the three options below

Understanding temperature and chemical potential using computer simulations

APPLIED PARTIM DIFFERENTIAL EQUATIONS with Fourier Series and Boundary Value Problems

FUNDAMENTALS OF AERODYNAMICS

Numerical Methods with MATLAB

AGuideto Monte Carlo Simulations in Statistical Physics

Time-Dependent Statistical Mechanics 1. Introduction

Numerical Methods for Engineers

Shigeji Fujita and Salvador V Godoy. Mathematical Physics WILEY- VCH. WILEY-VCH Verlag GmbH & Co. KGaA

Preface Introduction to the electron liquid

Exploring Monte Carlo Methods

Diffusion and Reactions in Fractals and Disordered Systems

College Algebra. Third Edition. Concepts Through Functions. Michael Sullivan. Michael Sullivan, III. Chicago State University. Joliet Junior College

Midterm EXAM PHYS 401 (Spring 2012), 03/20/12

THE OBSERVATION AND ANALYSIS OF STELLAR PHOTOSPHERES

Molecular Aggregation

Outline for Fundamentals of Statistical Physics Leo P. Kadanoff

FISES - Statistical Physics

INTRODUCTION TO MODERN THERMODYNAMICS

Computational Nanoscience

1. Introductory Examples

MODERN PHYSICS Frank J. Blatt Professor of Physics, University of Vermont

4/18/2011. Titus Beu University Babes-Bolyai Department of Theoretical and Computational Physics Cluj-Napoca, Romania

Computational Physics, 3rd Ed

The Raman Effect. A Unified Treatment of the Theory of Raman Scattering by Molecules. DerekA. Long

EXPERIMENTS IN PHYSICAL CHEMISTRY

Information, Physics, and Computation

Their Statistical Analvsis. With Web-Based Fortran Code. Berg

Introduction to Computational Materials Science

Computational Nanoscience

Modified Physics Course Descriptions Old

Cluster Monte Carlo study of multicomponent fluids of the Stillinger-Helfand and Widom- Rowlinson type

1.1 Variational principle Variational calculations with Gaussian basis functions 5

Physics for Scientists & Engineers with Modern Physics Douglas C. Giancoli Fourth Edition

Ab initio molecular dynamics and nuclear quantum effects

A guide to Feynman diagrams in the many-body Problem

Electronic and Optoelectronic Properties of Semiconductor Structures

Edwin R. Jones бшя? Richard L. Childers University of South Carolina

MATHEMATICAL STRUCTURES IN CONTINUOUS DYNAMICAL SYSTEMS

Preface. Preface to the Third Edition. Preface to the Second Edition. Preface to the First Edition. 1 Introduction 1

Condensed Table of Contents for Introduction to Stochastic Search and Optimization: Estimation, Simulation, and Control by J. C.

Dynamical Systems with Applications

Transcription:

An Introduction to Computer Simulation Methods Applications to Physical Systems Second Edition Harvey Gould Department of Physics Clark University Jan Tobochnik Department of Physics Kalamazoo College Addison-Wesley Publishing Company Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario Wokingham, England Amsterdam Bonn Sydney Singapore Tokyo Madrid San Juan Milan Paris

C O N T E N T S Preface v 1 Introduction 1 1.1 Importance of Computers in Physics 2 1.2 The Nature of Computer Simulation 3 1.3 Importance of Graphics 4 1.4 Programming Languages 5 1.5 Learning to Program 7 1.6 How to Use This Book 7 1A Laboratory Report 8 2 The Coffee Cooling Problem 11 2.1 Background 12 2.2 The Euler Algorithm 13 2.3 A Simple Example 14 2.4 Some True BASIC Programs 15 2.5 A Computer Program for the Euler Method 19 2.6 The Coffee Cooling Problem 21 2.7 Accuracy and Stability 24 2.8 Simple Plots 26 2.9 Visualization 29 2.10 NuclearDecay 32 2.11 Overview 34 2A Integer and Real Variables 35 3 The Motion of Falling Objects 37 3.1 Background 38 3.2 The Force on a Falling Object 38 3.3 The Euler Method for Newton's Laws of Motion 41 3.4 A Program for One-Dimensional Motion 42 3.5 Two-Dimensional Trajectories 48 ix

X Contents 3.6 Levels of Simulation 51 3.7 Further Applications 51 3A Subroutine for Drawing Axes 51 3B Data Files 52 3C Strong Typing and Debugging 53 3D The Euler-Richardson Method 56 The Two-Body Problem 59 4.1 Introduction 60 4.2 The Equationsof Motion 60 4.3 Circular and Elliptical Orbits 62 4.4 Astronomical Units 64 4.5 Array Variables and Aspect Ratio 64 4.6 Log-log and Semilog Plots 67 4.7 Simulation of the Orbit 70 4.8 Perturbations 74 4.9 Velocity Space 77 4.10 A Mini-Solar System 79 4.11 Two-Body Scattering 82 4.12 Projects 89 Simple Linear and Nonlinear Systems 95 5.1 Simple Harmonie Motion 96 5.2 Numerical Simulation of the Harmonie Oscillator 97 5.3 The Simple Pendulum 100 5.4 Output and Animation 103 5.5 Dissipative Systems 106 5.6 Response to External Forces 108 5.7 Electrical Circuit Oscillations 111 5.8 Projects 118 5A Numerical Integration of Newton's Equation of Motion 120 The Chaotic Motion of Dynamical Systems 127 6.1 Introduction 128 6.2 A Simple One-Dimensional Map 128 6.3 Period-Doubling 135 6.4 Universal Properties and Self-Similarity 141 6.5 Measuring Chaos 146 6.6 Controlling Chaos 150 6.7 Higher-Dimensional Models 153 6.8 Forced Damped Pendulum 156

Contents xi 6.9 Hamiltonian Chaos 161 6.10 Perspective 169 6.11 Projects 170 6A Stability of the Fixed Points of the Logistic Map 180 7 Random Processes 185 7.1 Order to Disorder 186 7.2 The Poisson Distribution and Nuclear Decay 190 7.3 Introduction to Random Walks 194 7.4 Problems in Probability 198 7.5 Method of Least Squares 201 7.6 A Simple Variational Monte Carlo Method 206 7A Random Walks and the Diffusion Equation 210 8 The Dynamics of Many Particie Systems 213 8.1 Introduction 214 8.2 The Intermolecular Potential 214 8.3 The Numerical Algorithm 216 8.4 Boundary Conditions 216 8.5 Units 219 8.6 A Molecular Dynamics Program 220 8.7 Thermodynamic Quantities 230 8.8 Radial Distribution Function 237 8.9 Hard disks 240 8.10 Dynamical Properties 255 8.11 Extensions 261 8.12 Projects 263 9 Normal Modes and Waves 267 9.1 Coupled Oscillators and Normal Modes 268 9.2 Fourier Transforms 275 9.3 Wave Motion 286 9.4 Interference and Diffraction 292 9A Fast Fourier Transform 295 10 Electrodynamics 301 10.1 Static Charges 302 10.2 Numerical Solutions of Laplace's Equation 310 10.3 Random Walk Solution of Laplace's Equation 318 10.4 Fields Due to Moving Charges 321

xii Contents 10.5 Maxwell's Equations 329 10.6 Project 339 t 11 Numerical Integration and Monte Carlo Methods 343 11.1 Numerical Integration Methods in One Dimension 344 11.2 Simple Monte Carlo Evaluation of Integrals 349 11.3 Numerical Integration of Multidimensional Integrals 351 11.4 Monte Carlo Error Analysis 353 11.5 Nonuniform Probability Distributions 358 11.6 Neutron Transport 361 11.7 Importance Sampling 364 11.8 Metropolis Monte Carlo Method 366 11A Error Estimates for Numerical Integration 368 11B The Standard Deviation of the Mean 370 HC The Acceptance-Rejection Method 371 12 Random Walks 373 12.1 Introduction 374 12.2 Modified Random Walks 378 12.3 Applications to Polymers 388 12.4 Diffusion Controlled Chemical Reactions 397 12.5 The Continuum Limit 400 12.6 Random Number Sequences 401 12.7 Projects 406 13 Percolation 413 13.1 Introduction 414 13.2 The Percolation Threshold 417 13.3 Cluster Labeling 424 13.4 Critical Exponents and Finite Size Scaling 431 13.5 The Renormalization Group 435 13.6 Projects 444 14 Fractals 451 14.1 The Fractal Dimension 452 14.2 Regulär Fractals 461 14.3 Fractal Growth Processes 464 14.4 Fractals and Chaos 489 14.5 Many Dimensions 492 14.6 Projects 493

Contents XIII 15 Complexity 501 15.1 Cellular Automata 502 15.2 Lattice Gas Models of Fluid Flow 513 15.3 Self-Organized Critical Phenomenon 518 15.4 Neural Networks 527 15.5 Genetic Algorithms 531 15.6 Overview and Projects 536 16 The Microcanonical Ensemble 543 16.1 Introduction 544 16.2 The Microcanonical Ensemble 544 16.3 The Demon Algorithm 546 16.4 One-Dimensional Classical Ideal Gas 547 16.5 The Temperature and the Canonical Ensemble 549 16.6 The Ising Model 550 16.7 HeatFlow 557 16.8 Comment 561 16A Relation of the Mean Demon Energy to the Temperature 561 17 Monte Carlo Simulation of the Canonical Ensemble 565 17.1 The Canonical Ensemble 566 17.2 The Metropolis Algorithm 566 17.3 Verification of the Boltzmann Distribution 568 17.4 The Ising Model 572 17.5 The Ising Phase Transition 584 17.6 Other Applications of the Ising Model 589 17.7 Simulation of Classical Fluids 594 17.8 Optimized Monte Carlo Data Analysis 600 17.9 Other Ensembles 605 17.10 More Applications 607 17.11 Projects 610 17 A Fluctuations in the Canonical Ensemble 621 17B Exact Enumeration of the 2 x 2 Ising Model 622 18 Quantum Systems 627 18.1 Introduction 628 18.2 Review of Quantum Theory 629 18.3 Bound State Solutions 630 18.4 The Time-Dependent Schrödinger Equation 635

xiv Contents 18.5 Introduction to Variational Methods 641 18.6 Random Walk Quantum Monte Carlo 644 18.7 Diffusion Quantum Monte Carlo 650 18.8 Path Integral Quantum Monte Carlo 654 19 Epilogue: The Same Algorithms Give the Same Results 661 19.1 The Unity of Physics 662 19.2 Percolation and Galaxies 663 19.3 Numbers, Pretty Pictures, and Insight 668 19.4 What are Computers Doing to Physics? 670 Appendixes A From BASIC to FORTRAN 673 B From BASIC to C 693 Index 715