Computational Physics: An introductory course

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Author(s): Richard Fitzpatrick

Language: English
Pages: 322

Major sources......Page 8
Programming methodologies......Page 9
Scientific programming languages......Page 11
Variables......Page 13
Expressions and statements......Page 15
Operators......Page 18
Library functions......Page 24
Data input and output......Page 26
Structure of a C program......Page 33
Control statements......Page 35
Functions......Page 46
Pointers......Page 55
Global variables......Page 64
Arrays......Page 66
Character strings......Page 73
Multi-file programs......Page 75
Command line parameters......Page 77
Timing......Page 79
Random numbers......Page 81
C++ extensions to C......Page 83
Complex numbers......Page 87
Variable size multi-dimensional arrays......Page 89
The CAM graphics class......Page 93
Introduction......Page 101
Euler's method......Page 102
Numerical errors......Page 103
Runge-Kutta methods......Page 106
An example fixed-step RK4 routine......Page 109
An example calculation......Page 111
Adaptive integration methods......Page 113
An example adaptive-step RK4 routine......Page 117
The physics of baseball pitching......Page 121
Air drag......Page 122
The Magnus force......Page 126
Simulations of baseball pitches......Page 127
The knuckleball......Page 134
Introduction......Page 140
Analytic solution......Page 142
Validation of numerical solutions......Page 148
The Poincaré section......Page 151
Spatial symmetry breaking......Page 152
Basins of attraction......Page 157
Period-doubling bifurcations......Page 163
The route to chaos......Page 166
Sensitivity to initial conditions......Page 173
The definition of chaos......Page 179
Periodic windows......Page 180
Further investigation......Page 184
Introduction......Page 189
1-d problem with Dirichlet boundary conditions......Page 190
An example tridiagonal matrix solving routine......Page 193
1-d problem with mixed boundary conditions......Page 194
An example 1-d Poisson solving routine......Page 195
2-d problem with Dirichlet boundary conditions......Page 197
2-d problem with Neumann boundary conditions......Page 201
The fast Fourier transform......Page 202
An example 2-d Poisson solving routine......Page 207
An example solution of Poisson's equation in 2-d......Page 211
Example 2-d electrostatic calculation......Page 213
3-d problems......Page 216
Introduction......Page 218
1-d problem with mixed boundary conditions......Page 219
An example 1-d diffusion equation solver......Page 220
An example 1-d solution of the diffusion equation......Page 221
von Neumann stability analysis......Page 224
The Crank-Nicholson scheme......Page 225
An improved 1-d diffusion equation solver......Page 226
An improved 1-d solution of the diffusion equation......Page 228
2-d problem with Dirichlet boundary conditions......Page 229
2-d problem with Neumann boundary conditions......Page 231
An example 2-d diffusion equation solver......Page 232
3-d problems......Page 236
The 1-d advection equation......Page 238
The Lax scheme......Page 240
The Crank-Nicholson scheme......Page 243
Upwind differencing......Page 245
The 1-d wave equation......Page 248
The 2-d resonant cavity......Page 252
Introduction......Page 265
Normalization scheme......Page 266
Evaluation of electron number density......Page 267
Solution of Poisson's equation......Page 268
An example 1D PIC code......Page 269
Results......Page 281
Discussion......Page 282
Random numbers......Page 284
Distribution functions......Page 291
Monte-Carlo integration......Page 294
The Ising model......Page 302