PHYSICS 141

Winter 2004

Laboratory Session I

1/5/04

1. The Computational Physics Laboratory

As an important part of the new Computational Physics Program, in a collaborative effort with UCSD Academic Computing Services, we built a state-of-the-art computational physics laboratory which is located at 6126 Urey Hall. The new laboratory has a farm of modern workstations with scientific visualization and multimedia capabilities, access to a server of sufficient computational power and disk storage to implement the software gracefully, and auxillary equipment such as high-resolution laser printer, color printer, color scanner, etc. The configuration of the workstation platform was designed to be flexible. Each machine is dual bootable into Windows/NT and the Linux operating systems on demand, and a fast ethernet connection provides access to the campus and the Internet. As an important fringe benefit, this laboratory will also develop into a multifunctional role as a center and laboratory for the future phases of the program. As an example, based on the Beowulf model with fast ethernet connection between nodes and with MPI software in parallel applications, the laboratory will have the potential to provide first hand experience for advanced students in parallel supercomputing.

Laboratory Setup:

  • Accounts
  • Network
  • File System
  • Printing
  • Operating System
  • 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.


    2. Redhat Linux Enterprise 3 Step by Step

    HTML online manual

    We will practice the following selected topics:

  • Work With Your Users Account (Intro)
  • Getting Started
  • KDE and Gnome Desktops
  • The Shell
  • Assignment: Work through the selected topics as listed above.


    3. Mozilla WEB Browser

    The main functions of Mozilla:
  • Browsing on the Internet
  • Reading manuals
  • Displaying animations
  • Assignment: Set up Mozilla according to your preferences.


    4. First Look at Data Visualization: GNUPLOT

  • PDF Manual

  • WEB SITE FOR HELP

  • command:

    /home/linux/phcomp/ph141w/public/bin/gnuplot


  • 5. Data Visualization at a Higher Level: IBM Data Explorer

    This professional grade visualization platform is in the public domain now. We will adapt this package as our data visualization package. The introductory manual (Quickstart Guide) is available now for a first look. You can read the manual in HTML format using your Netscape browser. You can also download the manual in postscript and PDF format.
    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.


    6. Discussion of Homework Set I

    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.