PHYSICS 360: COMPUTERS IN PHYSICS: Problem Set #3

Due 11/13


1. Coupled ordinary differential equations.  Let there be three scalar functions of time, h[t], s[t], d[t].  These functions are related by coupled differential equations:
    h'[t] = - a * h[t] * s[t]
    s'[t] = +a * h[t] * s[t] - b* s[t]
    d'[t] = + b* s[t]

A) Show analytically that n[t] = h[t] + s[t] + d[t] is constant in time.
B)  These three first-order equations require three initial conditions to determine a solution.  Let the initial conditions be:
    (1) h[0] = 1
    (2) s[0] = 0.01
    (3) d[0] = 0.0
Also, choose the constant b =1.
As a function of a=0.01, 0.1, 0.5, 1.0, 2, 10, 100 determine numerically the value of h[t] as "t -> Infinity", that is, for values of t large enough so that h[t] no longer changes.
C) How is the solution of this system of differential equations related to the midterm project, "The Black Death"?

2. Electoral system.  We have a one-dimensional array of integers, taking the values +1 and -1, like so (here, there are 10 items).
-1  1 -1   1   1 -1    1 -1   1 -1
x=1 x=2 x=3 x=4 x=5 x=6 x=7 x=8 x=9 x=10
Each "vote"  therefore is for "party A" (+1) or for "party B" (-1).  The average of the votes determines an election:  (s(1)+s(2)+s(3)+...+ s(n-1)+s(n))/n >0 means "party A" wins, etc. where n is the number of voters in this one-dimensional system.  Lets suppose that each person picks a party affiliation based on what everyone around them is doing.

That is, do a simulation in which you randomly pick a "voter,"  (that is, an integer from 1 to  10).  Let the probability that you CHANGE his vote (i.e. from -1 to +1 or vice versa) be

            Pflip = Exp[ -beta * (average vote) * (current vote of person x)].

Note that the minus sign above is *VERY* important.  Lets suppose that the average vote is +1 (i.e., every voter is going for party A).  Then, the probability to change a vote is Exp[ - beta] < 1.  Sometimes you will be forced to change a vote, and sometimes you will be forced not to, depending on the size of beta and the random number you generate.  Now, lets suppose that a voter is going for party "B" under these conditions.  The probability that he will change his vote is Pflip = Exp[ - beta * 1 * ( -1)] > 1, i.e. you will always change his vote.

We will designate 100 random choices of the voters to be ONE STEP (i.e., everyone gets on average one chance to change their vote every STEP).  Construct a simulation showing the average vote on each of STEP = 1, ..., 100, for the following choices of the "voter interaction parameter" beta= 0, beta = 4.0, by steps of 0.1.
After doing 50 STEPS, (as an "equilibration period"), calculate the AVERAGE of the average vote, and make a plot of this quantity vs. beta.  You should notice that the behavior of the electorate changes at beta = 2.0.  What does beta < 2 mean for a general election, and what does beta > 2 mean?

3. Heating a turkey.  The basic equation controlling the movement of heat through an isotropic body is the "Heat Equation"

d/dt T  = Laplacian [T].

So that in one dimension, we have,

d/dt T[x,t] = d^2/dx^2 T[x,t],

where the "d/dt" and like operator should be understood to be partial derivatives, and the function T[x,t] is the temperature at the point x and the time t along the body.

Let a one-dimensional turkey of length L=1, initially at at temperature T_o be placed in an oven which is held at at temperature T_1 > T_o.  As a function of time, plot the temperature at the midpoint of the turkey, x=1/2.  When this temperature reaches (T_1 + T_o)/2, the bird is "finished".  Do the problem completely numerically by placing the bird on a lattice, and using the discrete laplacian operator we develop in class.

A) What is the cooking time?
B) What is the temperature distribution in the bird (i.e., what is T[x, t_done]).