PHYS 252

Always hand in:
  1. written solutions to any questions
  2. a paper print-out of well-commented code. Include a multiline comment at the top of your code with (i) the assignment name, (ii) your name, and (iii) the date you handed in all elements of the assignment
  3. paper print-out of output (graph or text)
  4. also, e-mail me (y-lithwick@northwestern.edu) the code with your name and the exercise number in the subject line

Assignment #11
10pts, due 2pm, May 22

  1. Simulate a random walk in two dimensions, allowing the walker to make steps of unit length, but in a random direction.
    1. Plot the trajectories of six different walkers, for 1000 steps each. (To plot them all on the same plot with gnuplot, it can help to make a script file, like I did for the gnuplot movie.)
    2. Now calculate < r2> for 1000 walkers. Show that < r2>= k t, where k is a constant. What is the value of k?
    3. Repeat (ii), but for values appropriate to heat diffusion in water (or a turkey, which is mostly water). In that case, the stepsize of a "walker" (i.e. an atom) is a=1Angstrom (roughly the distance between atoms), and the speed of a walker is c=1km/sec (roughly the speed of sound in water). What is k? Tell me what units you are using. Now, deduce how long it takes to cook a turkey. (Note, we're assuming the turkey is two-dimensional, but adding the third dimension doesn't change things by much).
    4. (For 1 bonus point:) Derive the expected value of k analytically in part (ii), and hence what is the formula for k in part (iii) in terms of a and c? Compare to the result of your simulation.
    1. Exercise 7.9; show plots at at least two times. Also show me a movie of your simulation result.
    2. (For up to 2 bonus points:) Explore what happens when you change various things. For example, try changing the initial shape of the profile in various ways, such as using a narrower or wider peak, or a double-peak. Or fix one point at N=1 throughout the simulation and see what happens. Or play around with changing the boundary conditions or number of points on the grid or Δt. Or use your imagination. Show some plots and write briefly what you've learnt.
  2. Reproduce the plots you made for Exercise 7.9 using 1-D random walkers, and compare against equation 7.22 again. Explain briefly your procedure, and comment on your results.