Physics 410/609---Computational Physics
Assignment #1---Due Tuesday, February 7, 2012
1) Complete problem 3.14 on page 68 of An Introduction to Computer
Simulation Methods.
2) An earlier edition of the book provided two data files from
an experiment. In my home directory on the Physics/Astronomy cluster
you will find two files corresponding to black coffee and coffee with cream:
coffee_black.dat
coffee_cream.dat
The first column is the time in minutes and the second is the temperature
in degrees Celsius. Room temperature (T_s) was 17 degrees Celsius.
a) Adjust your value of r to try to fit the data in coffee_black.dat.
Explain your criteria for selecting the best value of r. You might find
it convenient to write a shell script to run and plot several cases.
(Picking the best value of r will require careful thought as you will
find it hard to accurately get the entire curve. Can you think of
additional effects that would not be covered by Newton's law of cooling?)
b) Plot your results as a line and the data in coffee_black.dat as crosses.
Make sure that your graph axes are properly labeled (with units) and
indicate the value of r in the title.
c) Check to see if the value of r found in part (b) is appropriate for
coffee_cream.dat and make a plot similar to that in (b).