PHYS 306:  Computational Physics Lab

Winter 2009

Homework #3
(Due:  February 17, 2009)



  1. A stratified medium is uniform in the $x$-direction and has a refractive index that varies with height ($y$ in the terminology of Exercise 5.1) as

    \begin{displaymath}
n(y) = \max(1.0, 1.5 - 0.5 y)\,.
\end{displaymath}

    Find the light path of least time between the points $(0,0)$ and $(1,0)$, starting from a path between these points with $y_i$ randomly distributed between 0 and 1. What is the maximum value of $y$ along this path?

  2. Following the discussion in class, write a program to determine the equilibrium distribution (in 2 dimensions) of $N$ identical charges initially randomly distributed within a conductor. The shape of the conductor is defined by the ellipse

    \begin{displaymath}
\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1\,,
\end{displaymath}

    where we will take $a=1$, $b=0.25$. Start by distributing charges randomly and uniformly within the $2\times2$ square containing the ellipse, accepting only those charges that lie within the ellipse. Continue until $N$ charges have been placed inside the conductor. For definiteness, take each charge to be $1 \mu C$.

    Use the Monte-Carlo technique discussed in class to find the equilibrium configuration of the charges. You should find that the charges distribute themselves on the surface of the conductor. Using $N=500$ charges, print out and turn in the initial and final configurations of the system, along with your program. Based on your final printout, estimate the number of charges per unit length (just count charges within small arc lengths of the ellipse) near the points $(a,0)$ and $(0,b)$. How is this charge density related to the curvature of the surface?

  3. Repeat the calculation of the previous problem, with the following changes:
    (a)
    Use a circular conductor (i.e. take $a=b=1$).
    (b)
    Assume that an external field of magnitude $E = 5,000,000\,{\rm V}{\rm m}^{-1}$ acts in the positive $x$-direction. Include the contribution from this field in the total potential.

    As before, plot the initial and final configurations of the system. How does the presence of the external field affect the final charge distribution?









Steve McMillan 2010-04-22