For this lesson you will need:
Let's take a look at the data file. It looks like this:
To start with, we need only concern ourselves with a few of these numbers. The first number is the number of mesh points the model will have. We'll go with 199 for now -- we want to evolve our model quickly. Similiarly, the last number on the fourth row controls the size of the timestep, based on the size of the changes made to the model in the previous timestep. 5 is quite large so things should go quickly. Our model starts out as a cold ball of gas with no nuclear reactions happening -- this is a good place to reset the composition of the model. To do this we set NCH=3 (i.e. the 3 in the first line). The code will reset the composition and metallicity based on the numbers we give it in line 17. The first number is the metallicity (always remember to check your metallicity matches that of your opacity table!). The third is the hydrogen abundance and the remainder are the fraction of metals that are a given element.
When you run the model, you get a whole bunch of output files. The most interesting to start with is the file plot. If you use your favourite ploting package to plot up column 4 of this file against column 5, you obtain a Hertzsprung-Russell diagram:
The plot file contains many useful things that you might want to plot up. These are listed in the manual and we will mentioned some of them specifically in upcoming lessons.
The out file also contains a lot of important information about the stellar model. There are two forms of output in this file. The most common is the short summary that is printed for every model. The summary looks like this:
The age of the model can be found in the second column and is the second number down. As you can see, we've chosen a model that is close to the current age of the sun. As we expect, the mass fraction of hydrogen (the top line underneath the heading H1) is about a half of what it originally was. In fact, the right-hand side of this summary contains a lot of information about the composition and physical characteristics of the model, with details being given at the centre, surface and the point of maximum temperature (which just happens to be the centre in this case).
The model eventually fails to converge at the tip of the giant branch because of the onset of the core helium flash. We'll revisit this model to push it a bit further in another lesson.