next up previous
Next: About this document ...

ASTR615 Fall 2015 Problem Set #3


Due Oct 21, 2015


Topics for this problem set include round-off error and linear algebra.

  1. As an example of an unstable algorithm, consider integer powers of the ``Golden Mean'' $\phi = (\sqrt{5} - 1)/2$. It can be shown that $\phi^{n+1} = \phi^{n-1} - \phi^n$, i.e. successively higher powers of $\phi$ can be computed from a single subtraction rather than a more expensive multiply. Write a single-precision program to compute a table consisting of the columns $n$, $\phi^n$ computed from the recursion relation, and $\phi^n$ computed directly (i.e. $\phi^n = \phi\phi^{n-1}$), for $n$ ranging from 1 to 20. Is the round-off error random? What happens in double precision?

  2. Write a program to compute the instantaneous spin period of a rigid body made up of identical, discrete, point particles. Use the fact that the angular momentum is
    \begin{displaymath}
\mathbf{L} = \sum_i m_i (\mathbf{r}_i \mbox{\boldmath$\times$}\mathbf{v}_i) = \mathbf{I}
\mbox{\boldmath$\omega$},
\end{displaymath} (1)

    where $m_i$ is the mass of particle $i$, $\mathbf{r}_i$ and $\mathbf{v}_i$ are its position and velocity vectors with respect to the centre of mass, $\mbox{\boldmath$\omega$}$ is the spin vector, and $\mathbf{I}$ is the inertia tensor

    \begin{displaymath}
\mathbf{I} = \sum_i m_i (r_i^2 \mathbf{1} - \mathbf{r}_i \mathbf{r}_i),
\end{displaymath}

    where $\mathbf{1}$ is the unit matrix. [For continuous bodies the summations are replaced by volume integrations and the particle masses become a mass density. In the present case the $m_i$'s can be omitted entirely since the particles are identical.] Write a program to solve Eq. ([*]) for $\mbox{\boldmath$\omega$}$ (feel free to use the routines in Numerical Recipes). The spin period is then $2\pi/\vert\mbox{\boldmath$\omega$}\vert$.

    1. Test your code by reading the data file
      http://www.astro.umd.edu/~ricotti/NEWWEB/teaching/ASTR415/ps2.dat
      which is in the format $x$ $y$ $z$ $v_x$ $v_y$ $v_z$ (i.e. 6 values to a line separated by white space). The units are mks (SI). What is the spin period in hours?

    2. Make a graphical representation of the body using your favorite graphing package. If you use 2-D projections, be sure to include enough viewing angles to get a complete picture.




next up previous
Next: About this document ...
Massimo Ricotti 2015-10-06