Laboratory Setup:
Assignment: Familiarize yourself with the Computer Lab setup as much as possible. Get your account working, access phcomp.ucsd.edu from different environments, check out your file system, check out the printer environment.
We will practice the following selected topics:
Assignment: Work through the selected topics as listed above.
Assignment: Set up Mozilla according to your preferences.
The IBM Documentation for Data Explorer exists in different formats.Quickstart Guide: This guide presents a "hands on" introduction to Data Explorer and is designed to help you start working with it immediately.
[ | HTML ]
Assignment: Read Chapter 1 and Chapter 2 from the manual and work out the suggested tutorial exercises.
Due date: 1/23/04
For the next two problems you will need to download and modify a simple numerical program. The source code is available in either C (leapint.c) or Fortran 77 (leapint.f). To compile the program, give either of the commands
% gcc -o leapint leapint.c
% g77 -o leapint leapint.f
depending on which language you are using. To run the compiled
program, give the command
% leapint
The output consists of four columns, listing (1) time, (2) point index, (3) position x, and (4) velocity v. Running the program as supplied yields the trajectory of a point starting at (x,v) = (1,0) in the phase flow defined by the `linear pendulum' or harmonic oscillator, a(x) = -x. The total number of steps taken, number of steps between outputs, and timestep used are determined by the parameters mstep, nout, and dt, respectively; these parameters are set in the main procedure of the program.
1. (a) Modify the statements which set up initial conditions in the main program to produce trajectories starting from the points (2,0) and (3,0). On the (x,v) plane, plot these trajectories together with the one starting from (1,0). (b) Replace the linear pendulum in the accel routine with the `inverse linear pendulum', a(x) = x, and again plot trajectories starting from the points (1,0), (2,0), & (3,0). (c) Plot trajectories starting from the same three points for the `nonlinear pendulum', a(x) = - sin(x).
2. (a) Modify the initial conditions to set up n = 100 points in a circle of radius 0.5 centered on the point (0,1), and illustrate the effect of the phase flow of the inverse linear pendulum, a(x) = x, on this circle by plotting these points at several well-spaced times. (b) Now do the same thing for the nonlinear pendulum, a(x) = - sin(x). Hint: to increase the time interval between successive outputs, use a larger value for the parameter nout. For example, with the given timestep dt = 1/32, setting nout = 32 will output the system state once every time unit.