Thermal Equilibrium

In a steady‐state (not changing) or equilibrium situation, the total energy flowing outward at a given radius (the luminosity at that radius) must just equal the total energy being generated interior to that layer. Why? Because energy always flows from a hotter to a cooler region. If energy is flowing outward faster than it is being generated, then the interior is cooling; this lowers the gas pressure, and the star will shrink. But as the star shrinks, the density will increase and the release of gravitational energy will go into heating up the material. This process causes nuclear reactions to go faster, thus generating more energy. When a balance is struck between energy generation and the outflow of energy, the star has achieved a stable structure, and no additional readjustment of the structure will occur. An immediate consequence of thermal equilibrium is that the inner layers of a star must be hotter than the outer layers.