You are on page 1of 5

COMPUTATIONAL PHYSICS

Nicholas J. Giordano
Department ofPhysics
Purdue University

PRENTICE HALL
Upper Saddle River, New Jersey 07458
Contents

PREFACE

1. A FIRST NUMERICAL PROBLEM

1.1 Radioactive Decay 1


1.2 A Numerical Approach 2
1.3 Construction of a Working Program 3
1.4 Testing Your Program 9
1.5 Numerical Considerations 10
1.6 Programming Guidelines and Philosophy 12

2. REAUSTIC PROJECTILE MOTION

2.1 Bicycle Racing: The Effect of Air Resistance 16


2.2 Projectile Motion: The Trajectory of a Cannon Shell 23
2.3 Baseball: Motion of a Batted Ball 28
2.4 Throwing a Baseball: The Effects of Spin 33
2.5 Golf 39

3. OSCILLATORY MOTION AND CHAOS

3.1 Simple Harmonie Motion 42


vi Contents
3.2 Chaos in the Driven Nonlinear Pendulum 48
3.3 Routes to Chaos: Period Doubling 56
3.4 The Lorenz Model 60
3.5 The Billiard Problem 67
3.6 Bouncing Balls: A Chaotic Mechanical System 73
3.7 Behavior in the Frequency Domain: Chaos and Noise 77

4. THE SOLAR SYSTEM 81

4.1 Kepler's Laws 81


4.2 The Inverse-Square Law and the Stability of Planetary Orbits 88
4.3 Precession of the Perihelion of Mercury 92
4.4 The Three-body Problem and the Effect of Jupiter on Earth 98
4.5 Resonances in the Solar System: Kirkwood Gaps and Planetary
Rings 102
4.6 Chaotic Tumbling of Hyperion 107

5. POTENTIALS AND FIELDS 113

5.1 Electric Potentials and Fields: Laplace's Equation 113


5.2 Potentials and Fields Near Electric Charges 125
5.3 Magnetic Field Produced by a Current 129
5.4 Magnetic Field of a Solenoid: Inside and Out 132
6. WAVES 136

6.1 Waves: The Ideal Case 136


6.2 Frequency Spectrum of Waves on a String 143
6.3 Motion of a (Somewhat) Realistic String 147
6.4 Waves on a String (Again): Spectral Methods 151

7. RANDOM SYSTEMS 157

7.1 Why Perform Simulations of Random Processes? 157


7.2 Generation of Random Numbers 158
7.3 Introduction to Monte Carlo Methods: Integration 166
Contents vli

7.4 Random Walks 169


7.5 Self-Avoiding Walks 173
7.6 Random Walks and Diffusion 175
7.7 Diffusion, Entropy, and the Arrow of Time 180
7.8 Cluster Growth Models 185
7.9 Fractal Dimensionalities of Curves 190
7.10 Percolation 195

8. STATISTICAL MECHANICS, PHASE TRANSITIONS, AND THE ISING


MODEL 204

8.1 The Ising Model and Statistical Mechanics 204


8.2 Mean-Field Theory 207
8.3 The Monte Carlo Method 213
8.4 The Ising Model and Second-Order Phase Transitions 215
8.5 First-Order Phase Transitions 225

9. MOLECULAR DYNAMICS 232

9.1 Introduction to the Method: Properties of a Dilute Gas 232


9.2 The Melting Transition 244

10. QUANTUM MECHANICS 253

10.1 Time-Independent Schrödinger Equation: Some


Preliminaries 254
10.2 One Dimension: Shooting and Matching Methods 257
10.3 A Variational Approach 272
10.4 Time-Dependent Schrödinger Equation: Direct Solutions 280
10.5 Spectral Methods 293

11. INTERDISCIPLINARY TOPICS 300

11.1 Protein Folding 300


11.2 Earthquakes and Self-Organized Criticality 315
11.3 Neural Networks and the Brain 328
Contents

Appendix 1 ORDINARY DIFFERENTIAL EQUATIONS 34

Al.l Euler Method and Some Relatives 347


A1.2 Runge-Kutta Methods 351
A1.3 Verlet Method 354

Appendix 2 THE FOURIER TRANSFORM 357

A2.1 Theoretical Background 357


A2.2 The Fast Fourier Transform (FFT) 359
A2.3 Estimation of the Power Spectrum 365
A2.4 FFT Programs: Discussion and Listings 366

Appendix 3 THE METHOD OF LEAST SQUARES 367

A3.1 Linear Least Squares 367

A3.2 More General Application of Least Squares 369

Appendix 4 SELECTED PROGRAM LISTINGS 371

A4.1 Chapter 1 372


A4.2 Chapter 2 372
A4.3 Chapter 3 374
A4.4 Chapter 4 377
A4.5 Chapter 5 378
A4.6 Chapter 6 383
A4.7 Chapter 7 385
A4.8 Chapter 8 388
A4.9 Chapter 9 392
A4.10 Chapter 10 396
A4.ll Appendix 2 403
A4.12 Appendix 3 412

INDEX 414

You might also like