Professional Documents
Culture Documents
Methods
1 Introduction 8
1.1 Importance of computers in physics . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 The importance of computer simulation . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 Programming languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4 Object oriented techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5 How to use this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1
CONTENTS 2
4 Oscillations 95
4.1 Simple Harmonic Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
4.2 The Motion of a Pendulum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4.3 Damped Harmonic Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
4.4 Response to External Forces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.5 Electrical Circuit Oscillations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
4.6 Accuracy and Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
4.7 Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
10 Electrodynamics 386
10.1 Static Charges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
10.2 Electric Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
10.3 Electric Field Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
10.4 Electric Potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
10.5 Numerical Solutions of Boundary Value Problems . . . . . . . . . . . . . . . . . . . 399
10.6 Random Walk Solution of Laplace’s Equation . . . . . . . . . . . . . . . . . . . . . 408
10.7 *Fields Due to Moving Charges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
10.8 *Maxwell’s Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
10.9 Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Appendix A: Plotting Vector Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
12 Percolation 474
12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
12.2 The Percolation Threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
12.3 Finding Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
12.4 Critical Exponents and Finite Size Scaling . . . . . . . . . . . . . . . . . . . . . . . 494
12.5 The Renormalization Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
12.6 Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
CONTENTS 5