Content of article
 1 Basic concepts
 2 Linear stellar model
 3 Death of Stars: Low Mass
 4 Energy from the Solar Surface
 5 Free fall timescale
 6 Gnuplot
 7 Hydrostatic Equilibrium
 8 Linear Solar Model
 9 Main Sequence
 10 Planetary Nebulae and White Dwarfs
 11 Protostars
 12 References
 13 Simple stellar models
 14 Solar central temperature
 15 Structure of a star in equilibrium
 16 Einstein timescale
 17 KelvinHelmholtz timescale
Basic concepts
A star is a self gravitating ball of gas. There are two basic forces at
work, on one hand gravity, which is attempting to make the star collapse inward
on itself, and on the other hand there is the generation of energy and pressure
from within the star, which holds the star up.
Linear stellar model
Assuming that the density in a star varies linearly with radius as
(25) 
we use the equation of hydrostatic equilibrium to derive

(26) 
From Eqn 3.19 the mass varies with the radius as

(27) 
Integrating we get

(28) 
We can normalise the equation to the total mass, M, by noting that
at r=R,

(29) 
Substituting for r_{cen}, we derive

(30) 
Inserting this result into the equation of hydrostatic equilibrium (Eqn
3.26), we derive

(31) 
Problem 3.8 Integrate the equation above to derive the pressure as a function of radius, P(r).
Hint: assume that the pressure at the surface of the star is 
Substituting for the central density r_{cen} (from Eqn 3.29),
we derive
One can derive the temperature profile in the star by substituting the equation
of state for an ideal gas, T = mm_{H} P/rk, where m_{H} is the proton
mass and k is the Boltzmann constant, and m is the mean molecular weight,
(N.B.
Problem 3.9 Verify that the temperature is given by

A specific instance of the linear model is one in which the density is
constant — i.e. there is no gradient in the density
We can use this model to rederive our results in the previous section
for the central pressure and central temperature. We have:
(36) 
and
substituting for m(r) into Eqn 3.36 and integrating
(using the boundary condition that P=0 at the surface of the star r=R) we
obtain as a constant of the integration the central pressure
(38) 
and since the density is constant, the mean density is the same as
the central density
and so we derive a central pressure of
(40) 
The pressure as a function of the radius is given by

(41) 
Death of Stars: Low Mass
For stars with masses 0.2M
(which is the majority of them) They will live quietly and contently, not changing much, for several billion years on the main sequence. (The Sun will live 10 billion years on the main sequence, it’s about 5 billion years old now).
There comes a time when all of the available hydrogen in the core is used up and has been converted to helium. The core is then made almost entirely of helium. The nuclear reactions in the core stop, and the core cools.
This causes gravity to take over again (after quite a long respite) it contracts the star which will heat it again. A shell of hydrogen gas surrounding the core will then begin to heat up and reach sufficient temperature and density to start fusing hydrogen to helium.
This shell of burning hydrogen heats up the envelope of the star which increases the outward pressure which expands the envelope. The surface cools and the Star bloats up to become a Red Giant.
The hydrogen burning shell rains down «helium ash» onto the helium core, thus increasing its mass and causing it to contract and heat. Eventually the helium core reaches T = 10^{8} K and helium begins fusing
3_{2}He^{4} {amp}gt; _{6}C^{12} energy
This reaction is much faster than the hydrogen reaction and this doesn’t last for very long ~ 10
^{6}
years.
During this time the core can reach sufficient temperature to have the additional reaction of
_{6}C^{12} _{2}He^{4} {amp}gt; _{8}O^{16} energy
A core composed of Carbon and Oxygen forms and begins to contract because the Temperature is too low for further fusion. Just as before the contracting core will heat the envelope and cause it to expand out further making an even
bigger and cooler Red Giant
Energy from the Solar Surface
The sun radiates 1.374 ×10^{6} ergs/sec/cm^{2} at the surface of the
Earth, or about 1.4 kW per square meter, a quantity called the solar
constant. The Sun’s mean distance from us is 1.496 ×10^{13} cm (or 1
astronomical unit = 1 A.U.) and hence its luminosity is
(1) 
Free fall timescale
If there were no outward force holding a star up against gravity, how long
would it take to collapse? This quantity is called the «freefall» time
scale, t_{ff}.
We allow a test particle to fall from the surface of the star of radius R
and mass M. Its distance from the star center is given by r. Its
acceleration is then
where G is the gravitational constant.
Integrating this equation, and using the boundary condition r = R at t = 0,
leads to the freefall time
Problem 3.1 Show that t_{ff} has the dimension of time. 
Using the mass and radius of the Sun,

(4) 
we derive the Solar free fall time t_{ff} = 27 minutes.
Problem 3.2 Show that the freefall time can be expressed
Verify the freefall time for the Sun of approx 27 minutes. 
This is a very short time! The Sun would collapse on this timescale were it
not for the pressure support due to the outward flow of generated energy.
Problem 3.3 Note that the freefall time is proportional to M/R^{3}, which is a density. What is the freefall time expressed as a function of the mean density of an object of mass M and radius R? 
Gnuplot
In class you’ll get a floppy disk containing the public domain program GNUPLOT,
published by the Gnu Foundation.
A good site for help with gnuplot is at
http://www.cs.uni.edu/Help/gnuplot/.
You can get the windows version of the program from
http://www.astro.utu.fi/~cflynn/Stars/gnuplot3_7cyg.zip.
Here is a quick guide to doing some basic things. Start gnuplot by clicking on
the icon or typing gnuplot.
To plot out a simple function:
gnuplot{amp}gt; plot sin(x)
to plot with some parameters set:
gnuplot{amp}gt; plot f(x) = sin(x*a), a = 0.2, f(x)
to plot with x and y axis limits
gnuplot{amp}gt; plot [t=1:10] [pi:pi*2] tan(t)
set range of Xaxis
gnuplot{amp}gt; set xrange [1:10]
set range of Yaxis
gnuplot{amp}gt; set yrange [pi:pi]
plot out a parabola
gnuplot{amp}gt; set xrange[10:10] gnuplot{amp}gt; f(x) = x**2 gnuplot{amp}gt; plot f(x)
plot data from a file
gnuplot{amp}gt; plot 'fig5.dat'
define a 2D function
gnuplot{amp}gt; f(x,y) = x**2 y**2
plot a 2D function
gnuplot{amp}gt; splot f(x,y)
same with ranges set
gnuplot{amp}gt; splot [x=5:5] [y=5:5] [0:200] f(x,y)
define Xaxis label
gnuplot{amp}gt; set xlabel "radius [r/R]"
define Yaxis label
gnuplot{amp}gt; set xlabel "temperature [T/Tc]"
Example input file (e.g. «linear.gp»):
t(x) = 1.0 x  (19.0/5.0)*x**2 (9.0/5.0)*x**3 m(x) = 4.0*x**3  3.0*x**4
read commands from this file
gnuplot{amp}gt; load "linear.gp"
plot several functions
gnuplot{amp}gt; plot t(x),m(x)
Problem 3.11 Use Gnuplot to plot the temperature, density and pressure relative to their central values as a function of radius for the linear and constant density stellar models. Use R=1 for the radius of the star. 
Hydrostatic Equilibrium
At every layer within a stable star, there is a balance between the inward pull of gravitation and the gas pressure. This is a stable equilibrium, for if gravity were greater than the gas pressure, the star would contract. On the other hand, if the gas pressure were greater, then the star would expand. In a stable configuration, the two must balance. Gas pressure in any layer thus is just equal to the weight (gravitational force) on all the matter above that given layer, in the same manner that the pressure at any depth in a pool of water equals the weight of the water above that depth, hence the term hydrostatic equilibrium. An immediate consequence is that gas pressure must increase inward toward the center of a star.
For the majority of the life of a star, the gravitational force (due to the mass of the star) and the gas pressure (due to energy generation in the core of the star) balance, and the star is said to be in ‘hydrostatic equilibrium’. This balance is finelytuned and selfregulating: if the rate of energy generation in the core slows down, gravity wins out over pressure and the star begins to contract. This contraction increases the temperature and pressure of the stellar interior, which leads to higher energy generation rates and a return to equilibrium.
Consider a small mass element at a distance r from the center of a spherical
body, with density r, area A and thickness dr (see Figure 3.1).
The gravitational force inward on the mass element is given by
where M(r) is the mass of the body inside radius r.
The pressure force outward on the mass element is related to the difference
between the pressure on the upper surface of the mass element and the lower
surface. We denote this pressure difference dP.
For a star in mechanical equilibrium, these forces balance, so that
Problem 3.4 Use the above equations to show that
This important relation is called the equation of hydrostatic 
We can use this equation to derive first order estimates of the temperature and
pressure at the center of the Sun.
The gas exerts a pressure outward, which resists the force of gravity. Pressure is a force per unit area. You may recall from chemistry that it is proportional to density and Temperature
(the perfect gas law: P = nkT, n is the number density of particles)
As temperature and density increase so does the outward pressure. Eventually the star reaches a point at which the internal pressure outward will exactly balance the force of gravity inward. This point of mechanical balance is called Hydrostatic equilibrium
If a star does not have more mass than about 0.008M_{} then it will never do anything more interesting than slowing cool from this point on.
We might imagine that the release of fusionenergy would blow a star apart. Or we might imagine that the relentless pull of gravity would cause a star to collapse. Yet we know that, for instance, the Sun is a stable star which has been shining steadily for billions of years. It will continue to shine steadily for billions of years in the future. Why is a star not unstable, like a bomb? We can look for a physical principle that unites stars with very different properties.
» datafancybox=»alexa» datacaption=»The volume of liquid stays in place due to the balance of the forces acting on the liquid.» alt=»The volume of liquid stays in place due to the balance of the forces acting on the liquid.» href=»//content.teachastronomy.com/taweb/images/textbook/fd753c36262498856a39e61ae5624dfcea0ea30c.png» style=»width:212px;»{amp}gt;
The concept of thermal equilibrium tells us that heat always tends to flow from hotter to cooler regions in order to equalize the temperature. A star like the Sun has a constant source of energy from fusion reactions in its core. Heat is therefore constantly flowing outwards. A star cannot reach thermal equilibrium as long as there is an energy source at the core — the inner regions will always be hotter than the outer regions. Stars undergoing fusion in their cores do not «cool off.» Think of an oven set to some high temperature. If you left the oven door open, it would keep heating the kitchen, never cooling off while it was «on.»
Stars that are in the process of converting hydrogen into helium, like the Sun, are also stable. This stability is described by the principle of hydrostatic equilibrium. The term hydrostatic is a combination of hydro, meaning that the gas in a star acts like a fluid, and –static, meaning that the star is not expanding or contracting. Hydrostatic equilibrium says that there is a balance between two forces at every point within a star. One force is the inward force of gravity. The other force is the pressure in the gas caused by its temperature (recall that the pressure in an ideal gas is proportional to its temperature). The temperature within a star is controlled by the heat flow from the nuclear reactions in the core. A star therefore stays «puffed up» against the force of gravity.
» datafancybox=»alexa» datacaption=»A simple diagram of the force balance (or Hydrostatic Balance) in Hydrostatic Equilibrium.» alt=»A simple diagram of the force balance (or Hydrostatic Balance) in Hydrostatic Equilibrium.» href=»//content.teachastronomy.com/taweb/images/textbook/f94e95ecc05e3308c2a019ab973b407d098bba39.png» style=»width:212px;»{amp}gt;
If we imagine a star as having a series of layers of gas, then the pressure in each layer must balance the weight (gravitational pull) on that layer. Deeper layers of the star have more weight pressing down on them, so the pressure must increase as we move toward the center. Increasing pressure means increasing temperature. The idea of a star as a series of layers makes the idea of a balance between pressure and gravity clearer, but a star does not actually have distinct layers; the pressure, density, and temperature all increase smoothly towards the center. Hydrostatic equilibrium governs the physical conditions at any position inside a star, like the Sun, are also stable.
Linear Solar Model
Continuing from the last section, where we derived basic results for the
linear stellar model, we will look this week at a practical example of
programming to solve the model for the specific case of the Sun.
We would like to determine the pressure, P(r), and temperature, T(r)
profiles for the Sun in this model as a function of radius, r:

(42) 

(43) 
From these expressions it is easy to see that the central pressure and central
temperature (at r=0) are given by
and
(45) 
The density r(r) falls linearly with radius and is given by
(46) 
where the central density can be found from (Eqn 3.29)
i.e. for the Sun
Here is a listing of the Gnuplot commands needed to plot the temperature as a
function of radius in the Sun. The physical quantities needed for a linear
model of the Sun are listed in Table 3.1.
# first, define the values of constants gnuplot{amp}gt; G = 6.67259E8 gnuplot{amp}gt; Msun = 1.99E 33 gnuplot{amp}gt; Rsun = 6.96E10 gnuplot{amp}gt; mu = 0.6 gnuplot{amp}gt; mp = 1.
672631E24
gnuplot{amp}gt; k = 1.380658E16
# now compute central values of P, T and rho
gnuplot{amp}gt; P0 = (5.0*G*Msun**2)/(4.0*pi*Rsun**4)
gnuplot{amp}gt; rho0 = 3.0*Msun/(pi*Rsun**3)
gnuplot{amp}gt; T0 = (5.
0*pi*G*mu*mp*rho0*Rsun**2)/(36.0*k)
# Print out the results
gnuplot{amp}gt; print «Central Pressure = «, P0
gnuplot{amp}gt; print «Central Temperature = «, T0
gnuplot{amp}gt; print «Central Density = «,rho0
# Plot the temperature profile, T
gnuplot{amp}gt;
Table 1: Physical parameters for the models
G  6.67259 ×10^{—8}  Grav. const. (cm^{3} g^{—1} sec^{—2}) 
k  1.380658 ×10^{—16}  Boltzmann constant (erg K^{—1}) 
m_{p}  1.672631 ×10^{—24}  Mass of a proton (g) 
m  0.6  Mean molecular weight 
M_{O}  1.99 ×10^{33}  Solar mass (g) 
R_{O}  6.96 ×10^{10}  Solar radius (cm) 
Problem 3.12 Use Gnuplot to plot the temperature, density and pressure profiles as a function of radius for this model of the Sun. 
Main Sequence
If a star has sufficient mass, the temperature in its core can reach T = 10
^{6}
K or greater, It will also be very dense way down in there. These are ripe conditions for
nuclear reactions
to occur.
When a protostar has collapses down to the point where nuclear reactions first ignite in the core we now call it a star, and find that it is located at some point on the main sequence that corresponds to its mass.
The newborn star will have a luminosity and surface temperature now that will change very little over the course of its lifetime. So it stays put on the HR diagram for a good long while.
In the centers of stars the conditions are so hot (e.g., in Sun’s core, T = 1.5 x 10^{7} K) and dense that atoms have all of their electrons stripped away from them, they are completely ionized. Thus we have atomic nuclei (mostly hydrogen, single protons) all zipping to and fro in the core.
Nuclear Fusion:
produces energy:
In chemical reactions the electrons of atoms and molecules interact and reconfigure themselves into different energy states. When they configure themselves into states that have lower energy than the initial states energy is released: exothermic reactions.
For atomic nuclei the principle is the same; they interact with other atomic nuclei to make new configurations that have less energy than initially (more tightly bound) thus releasing energy in the reaction.
4_{1}H^{1} {amp}gt; _{2}He^{4} energy _{2}^{4}
is more tightly bound than 4
_{1}^{1}
, so energy is emitted. It turns out that the Helium nucleus has
less mass
than the sum of 4 individual protons. In the reaction 0.7% of the mass of 4
_{1}^{1}
is converted to energy:
E = mc^{2}
(In the Sun, 700 million tons of H {amp}gt; He every second!!)
The reason we need hot temperatures and high densities for nuclear reactions to occur is that the strong nuclear force is a very short range force. The electric force makes protons repel one another.
The nuclei (protons) have to be moving very fast and have enough near collisions with each other so that they can get close enough for the strong nuclear force to take effect. Once it does it is far, far stronger than the electrical repulsion that the protons feel.
Iron (Fe) — 26 protons — has the most tightly bound nucleus, so fusion of nuclei up to Fe will release energy.
By mass, Sun is 70% H, 28% He, and 2% heavier elements: Lot’s of raw material to fuse !
Several reactions can occur depending on the temperature of the core. Net Effect: conversion of 4 protons to a Helium nucleus (2 protons 2 neutrons) plus energy.
This is what is happening inside Main Sequence Stars. Nuclear fusion produces energy to heat the core (and outer layers through heat conduction) and thus maintains the pressure needed to resist the inward force of gravity.
NOTE: The photons produced in the core take millions of years to leak out from the core out to the photosphere where they then stream away freely into cold, dark space.
Solar Neutrinos:
The reaction that converts 4 protons to a He nucleus involves the conversion of protons into neutrons. This reaction looks like this
p^{ } {amp}gt; n e^{ } ^{ }
is called a positron, it is what we call
antimatter
. It annihilates with electrons (e
^{—}
) and produces a photon with energy equal to the sum of their masses (E = mc
^{2}neutrinos
To do this we build giant tanks filled with a liquid compound akin to cleaning solution and put them far underground. Since neutrinos hardly react to anything we expect to detect only 1 neutrino per day interacting with the liquid in the tank! We actually detect significantly fewer.
Most probable solution is that neutrinos have some (nonzero) mass which allows them to mutate from one kind of neutrino to another. We can only currently detect electron neutrinos, which are those produced in the center of the Sun.
Planetary Nebulae and White Dwarfs
The star is now very unstable. The outer layers of the star will begin to be ejected (~ 0.2M
_{*}
). The outer layers will «sluff off» forming a
Planetary Nebula
(they have nothing to do with planets, the name is kept for historical reasons). This is an expanding shell of chemically enriched ionized gas.
The Planetary Nebula and winds from the star will cause the star to loose mass, revealing the hot Carbon/Oxygen core. In the end all that is left behind is just this whitehot cinder (the core of the Red Giant) that is composed of mostly Carbon and Oxygen, with a little hydrogen and helium still mixed in. This is called a White Dwarf.
The White Dwarf will have a mass less than 1.4M_{}, even if the star had 4M_{<img src="https://cse.ssl.berkeley.edu/bmendez/ay10/pics/greek/smsun.}
gif»> when it was born. It’s size is about that of Earth (R ~ 6000 km). So it is incredibly dense! If you brought 1 cm^{3} of white dwarf matter to the surface of Earth it would weight as much as a 1ton truck.
Electron Degeneracy Pressure:
What provides the pressure to hold a white dwarf up under its considerable weight? It’s a quantum mechanical effect…
The electrons in the star are moving very fast, and they are prevented from slowing down (cooling down, losing energy) by a law in quantum mechanics known as the «Pauli exclusion principle». This says that no two particles may share the same quantum states.
Once the lower energy states get filled (become degenerate) the remaining electrons must maintain their fast speeds and hence high temperature and pressure. This pressure provides the hydrostatic balance needed to keep gravity at bay.
The atomic nuclei (positive ions) in the star are not degenerate and are able to lose energy (cool). The white dwarf shines as the atomic nuclei cool. There are no nuclear reactions.
After about 10^{10} years, the nuclei cool down and the luminosity of the star becomes very low. The star is now what is sometimes called a «black dwarf». The Universe may not be old enough yet for any black dwarfs to exist.
Protostars
The life story begins in the large, roughly spherical clouds that fill interstellar space. The clouds are composed of
gas and dust
(tiny solid particles of matter).
If the cloud is dense enough its own gravity will cause it to contract. Just as a compressed gas heats up so does a contracting cloud of gas.
The cloud fragments into smaller pieces as it contracts, these smaller pieces continue to contract under their own weight and heat up as they go. We call these pieces Protostars.
The time it takes for a star to contract down to the size of a star is short. The protostar phase lasts for only about a few hundred thousand to a few million years.
As the contraction continues density increases, which causes gravity to increase, which leads to more contraction, which heats up the protostar to greater temperatures.
References
 []
 R. Bowers and T. Deeming in Astrophysics I, Stars,
1984, Jones and Bartlett Publishers  []
 W. Press, Astrophysics Lecture Notes, Chapter 5.
http://cfata2.harvard.edu/whp/ay45top.html
Simple stellar models
We cannot integrate the equation of hydrostatic equilibrium to derive the
behaviour of temperature, density, pressure etc without further assumptions
about the physics of energy production and the manner in which it is transfered
to the surface.
However, several instructive «toy models» can be developed
which give an idea of the kind of behaviour we can expect. We will look at two
such models, the linear stellar model and (later) the socalled
polytropes.
In the first of these models the density of the star takes an arbitrarily
assumed form, which decreases linearly from the center to the surface.
In the second model a simple form for the pressure as a function of
the density is adopted
where K and g are constants.
Solar central temperature
To first order, we can consider dP/dr as the pressure difference between
the edge and the center of the sun. From Eqn 3.14, we have

(15) 
using the mean density of the sun, r = M_{O}/((4 p/3)R_{O}^{3}), and assuming that the central pressure is much greater than the
surface pressure, we get

(16) 
or about 5 ×10^{9} atmospheres. Obviously the above
approximation was very rough, and a careful analysis shows that it is about two
orders of magnitude too small. However, it is not a too bad first
approximation.
Figure 1: Stellar hydrostatic equilibrium
We now have an estimate of the central pressure, and assuming that the
material at the center is a still a gas, we can relate this pressure to the
temperature, T, and the Boltzmann constant k via the equation of state for
an ideal gas:
where N is the number density of particles.
Problem 3.5 Assume the Sun is a uniform sphere made of protons, and use the mass of the sun and the mass of the proton to estimate N, the number density of particles. Hence show that the central temperature of the Sun is about 20 ×10^{6} K. 
A detailed analysis shows that the central solar temperature is about 15×10^{6} K, so this simple estimate is not too bad.
Structure of a star in equilibrium
Consider the equation of Hydrostatic equilibrium in terms of the mean density
r of a spherical shell within a spherically symmetric star.
(18) 
Here P(r) is the pressure as a function of radius, r; m(r) is
the mass inside radius r, and G is the gravitational constant (see Figure
3.2). The mass of the shell dm, is given by its area, thickness
dr and density r
The two equations above can be combined to give
(20) 
where the radius is now treated as a function of the interior mass,
r = r(m). This equation can be integrated to derive a result for the maximum
central density of the star, by considering the quantity P�
Problem 3.6 Differentiate P� with respect to r, and using the equation of hydrostatic equilibrium, show that [(dP�)/dr] {amp}lt; 0 for all r. 
The problem above shows that [(dP�)/dr] is always negative going
outward from the center of the star, so it follows that P� always
decreases going outward. At the center of the star, the second term in the
quantity P� approaches 0, and hence P� approaches the central
pressure P_{cen}. It follows that
This sets a lower limit to the central pressure in a star.
Problem 3.7 What is the value of the lower limit for the central pressure in the Sun? 
Figure 2: Hydrostatic equilibrium
Einstein timescale
The amount of energy in the Sun in its rest mass, M_{O}, is given by

(9) 
The Einstein time scale, t_{E}, is then

(10) 
Here we assume that all the rest mass energy is converted into radiation —
i.e. the Sun radiates and finally disappears when it is finished burning!
Detailed analysis reveals that the Sun will be about 0.1% efficient in
converting its mass into radiant energy, and the lifetime for a star like the
Sun is therefore reduced by this factor to circa 10^{10} years, or about the
present age of the Universe.
KelvinHelmholtz timescale
One idea proposed in the 19th century as the source of the Sun’s energy is
gravitational contraction. If a massive body gets smaller, it releases
gravitational potential energy, in this case in the form of heat.
The gravitational potential energy is given by the integral over
for masses m and m� separated by a distance r.
For a spherical body, such as a star, one finds (to within a small constant)
For the Sun, this is W_{O} = 4 ×10^{48}erg.
Suppose now that the Sun is collapsing slowly in order to generate its
luminosity. How long would it be able to shine? This time scale is called the
KelvinHelmholtz timescale, t_{KH}.
The solar luminosity is L_{O} = 3.86 ×10^{33} erg/sec, hence the Sun
can shine at this rate by converting potential energy for

(8) 
This is quite a long time, and in the middle of the 19th century, when it
was first derived, it was considered to be the best estimate for the age of the
Sun. Late in the 19th century and early in the 20th, the age of the Earth
became much better understood than the age of the Sun, with geological evidence
and radioactivity indicating that it is billions of years old.