Math 6790
Case Studies in Computational Engineering and Science
Spring Semester, 2002

Course schedule: 12:25pm-1:45pm, MW, 03-Apr-2002 through 01-May-2002.
Location: INSCC 345

Instructor: Ben Bromley
Office: 218 INSCC
Phone: 581-8227
Office Hours: TBD

This web page contains information on the astrophysics component of the CES Case Studies course (MATH 6790). Below you will find an outline of the topics covered in the course, homework assignments and class project descriptions (as they become available), as well as links to astrophysics resourses.


In this part of the CES Case Studies course, we will consider astrophysical problems involving gravity, including interactions between stars within a galaxy, the clustering of galaxies with each other, and the large-scale structure of the Universe. For gravity calculations we will use direct solvers, spectral methods, and treecodes.

The full course description is available in postscript and pdf formats.

Course Outline

Astrophysics Resources

Here is a short but growing list of links to astrophysics-related webpages.

Class Assignments

Here is a list (REVERSE ORDER) of assignments for the course. All material will be turned in according to instructions discussed in lecture.

3. (Due 02-Apr-2002.) Turn in your code for your part of the class projects. Here

2. (Due 17-Apr-2002.) Code up the particles-in-a-box algorithm discussed in lecture. First, have your code create particles at some specified rate on the 6 surfaces of a cube. Give each created particle a velocity with elements (vx,vy,vz) drawn from a Gaussian distribution of mean zero and standard deviation s, the "velocity dispersion". Once created, calculate the trajectory of each particle under the gravitational influence a single star located at the center of the box. Let the star have a total mass M and a uniform mass density inside a radius R. The results will not be visually impressive -- use this code to confirm that your trajectory integrator is Ok and that particles are being created/injected as expected.

For definiteness, use M=1 M_Solar, R=1 R_Solar, s=200 km/s, and a box size of 0.5 AU (Atronomical Unit, the mean orbital radius of the earht about the Sun). Here are two files which may help:

Next, in a modified version of your code, take the limit of small velocity dispersion (zero is fine) and give all particles an initial velocity of magnitude 220 km/s in the position x-direction. This will mean particles only enter through a single face of the cube. Look for the conical and axial "wakes" in the particle flow behind the star, as described by Sikivie & Wick (2002)

Finally, change your central star to a binary system, two stars each of mass 1 M_Solar, separation 0.2 AU and circular speed of 94.2 km/s. Determine the increase in the fraction of particles that go into your system which leave with a speed greater than 400 km/s.

Here are two files which may help:

1. (Due 10-Apr-2002.) To simulate the gravitational interaction between a group of N stars, one must calculate N*(N-1) accelerations of the form

  aji = -G*mj*rji/rji3
where aji is the vector acceleration on particle i due to particle j, and rji is the location of particle j relative to particle i; G is the Newton constant and m refers to particle mass.

The C++ code in these files

performs this type of gravitational accleration calculation. Copy these files to your local system and compile/run as follows:
    g++ -O3 -o tree_test 
    tree_test 1000 0.5 2341899
(or use your favorite vendor compiler....) This will calculate the gravitational potential (times a constant factor) of a random star cluster of N=1000 stars (N is the first command line argument) in a cube of dimensions 2x2x2 centered on the origin. The last command line argument (2341899) is a seed for the random number generator used here. The code does the calculation in two ways, first using a treecode (see this URL for more information on treecodes) and then using a direct O(N^2) summation of the accelerations. Note that the second command line argument, "theta", governs the accuracy of the treecode. Try values between 0.1 and 1, bearing in mind that it governs the size of a "cell" (a spatial average) which may replace a direct point-by-point calculation. (Technically, a cell must be smaller than theta radians as seen by a particle before averages inside that cell can be used to replace a more precise calculation.) Theta=1 is low accuracy, theta=0.1 is high accuracy, and theta=0 results in an exact (N^2) solution.

Estimate the efficiency of the treecode relative to the direct algorithm. Find an approximate length of time needed to calculate the accelaration on N particles with both the treecode and the direct method for N=100, 1000, 10^4 and 10^6. For definiteness, take theta=0.5 in the case of the treecode. Note: the code will calculate both methods unless N>10^4, in which case it will skip the direct method. You may want to modify the code to get the timing estimates.

Bring your results to class on Wednesday.

Physics Department Home

University of Utah Content Disclaimer

Last updated: Tue Apr 16 11:27:19 MDT 2002 (bcb)