deeplink to this page         astro 465         teaching

Astro 465

Introduction

Server

You should have obtained the log-in credentials to log in to your account on our server, which uses the GNU/Linux operating system. Available text editors are vi, emacs and nano (which works just like pico). If you don't know any of these, use the latter. You can open a text file by typing nano file.txt, the commands used most in nano can be found in the bottom two lines, where the ^ character stands for Ctrl-; e.g. Crtl-G brings up the help menu.

You can access the data you produce (code output, plots) either using scp or sftp (many sftp clients have a graphical user interface where you drag files from a 'remote' directory to a 'local' directory) in the same way (user, password, port) as you use ssh, or you can copy it to your ~/public_html/ folder and access in via a web browser. If you want to copy a lot of code output, the programs tar and gzip can be very useful. tar c star.* > star.tar archives all files with basename star into one file which makes it easier to transfer, and gzip file.tar compresses it, which will reduce the transfer time appreciably.

General

We are using the latest CVS version of the code, so make sure you pick that version of the manual from the TWIN page, you will need it. Section 1 of the manual should be useful; the compiled binary and environment variables discussed in section 1.1 should already be set up for you (check by running echo $evpath, echo $PATH and which ev; each should contain the directory /opt/stars in some form), section 1.2 shows how to actually run the code, which we will do in assignment 0. You can stop a running version of the code by typing
echo 1 > fort.11
in the directory where the code is running.

Note that although running the code should be straightforward, it may be a little awkward at first depending on your experience with these kinds of codes, or the Linux/Unix environment. Note that computing the evolution of a single star takes some time; roughly 10 minutes for each model. If 10 students need to run ~40 models each, this will take ~3 days to complete. However, computing the model is only the first part. Extracting and computing the desired results from the code output is the real work. Keep this in mind when planning these assignments.

Input files

Section 2 of the manual lists the input and output files. The code needs two input files: init.dat and init.run. The first file determines the computational details, which equations to solve and which physics to include. The second file detemines the starting and stopping conditions of the code, and is the input file we will need to change most. A pair of default input files can be found in /opt/stars/default_run/. Each file is described extensively in the sections init.dat and init.run respectively in the manual.

Output files

The code spits out a number of output files, (practically) all with the same base name (which you choose when starting the code, let's use star here) but with different extensions:
star.out1
If you want to know whether the code is running and producing output, use tail -f star.out1, which should be updated every few seconds.
star.plt1
When we want to extract global parameters (like age, time step, mass, radius, luminosity) that show us the star's evolution, we use the file star.plt1.
star.mdl1
To see the structure of the star at certain intervals, look at the file star.mdl1. A detailed description of the contents of the last two output files can be found in the sections file.plt and file.mdl respectively, in the manual (the columns 82-89 described for star.plt1 do not actually exist for this version of the code (yet)).

To look at text files, a program called less is very useful. For wide text files, like we usually have here, use less -S star.plt1 (type man less for much more information on less). For plotting, you can use your favourite program or look below.

Plotting

We provide two simple programs that read a code output file and plot selected variables:
plotplt
Plots the output in the evolution file star.plt1. You choose which plt1 file to plot (if there is more than one in the directory), pick the x and y variables, set options for logarithmic axes, axes ranges and highlighted points, and the plot will be saved to a file called star_plt.png. For your first excercise, if there's only one plt1 file present, the choices 201 n n (each followed by Enter produces an HR diagram.
plotmdl
plots the output in the evolution file star.mdl1. After selecting the file, the program lists the blocks of stellar-structure that are saved in the file and asks you to pick one. After that you choose an x and y variable and decide about logarithmic axes and axis ranges. The choices 1 1 2 y n plots for the ZAMS model log(R) vs. M.