Stellar Structure Equations
The Sun has been shining, steadily and quietly, for about 4.6 billion
years. In all that time it has neither collapsed into a point nor blown itself apart — it has sat in
an almost perfect balance, its brightness drifting by only a few percent over its entire life. That
is astonishing when you think about what a star actually is: a colossal ball of hot gas, more than a
million times the volume of the Earth, held together by nothing but its own gravity. Gravity is
relentlessly trying to crush it. So why doesn't the Sun collapse?
The answer is the single idea this page is built on: at every radius inside the star, the
inward pull of gravity is held up, exactly, by an outward push from the pressure of the gas below.
Squeeze the gas and it pushes back harder; the deeper you go, the more weight there is to support, so
the higher the pressure climbs. This standoff is called hydrostatic equilibrium, and
it is the load-bearing wall of the whole subject of stellar structure. Get this one equation, and
three companions that go with it, and you have — in principle — the entire interior of a star, from
its blazing core out to the thin skin we see as the surface.
Below we build hydrostatic equilibrium from a plain force balance on a single thin shell of gas, then
assemble the full set of four coupled structure equations, estimate the crushing
pressure at the Sun's centre, and finally see the beautiful reason a star is stable rather
than merely balanced: it behaves like a thermostat, quietly correcting itself whenever it is nudged.
This page assumes you have met the broad picture in
astrophysics.
Weighing a shell of gas
Imagine reaching into the star and picking out a single thin spherical shell: a
layer of gas at radius r from the centre, with a small thickness
\mathrm{d}r. Consider a little patch of that shell with area
A. Three forces act on the gas in that patch, all pointing along the
radius:
-
Gravity, pulling it inward. Only the mass enclosed below the
shell matters (a spherical shell exerts no net gravity on what is inside it), so if
m(r) is the mass within radius r and
\rho(r) the local density, the patch has mass
\rho\,A\,\mathrm{d}r and feels a weight
F_\text{grav} = \frac{G\,m(r)}{r^2}\,\big(\rho\,A\,\mathrm{d}r\big).
-
Pressure from below, P(r), pushing outward on
the inner face: force P(r)\,A upward.
-
Pressure from above, P(r+\mathrm{d}r), pushing
inward on the outer face: force P(r+\mathrm{d}r)\,A downward.
For the shell to just sit there — in equilibrium — the forces must cancel. The two pressure forces
act in opposite directions, so their net outward push is
\big[P(r) - P(r+\mathrm{d}r)\big]A, and that must support the weight:
\big[P(r) - P(r+\mathrm{d}r)\big]\,A = \frac{G\,m(r)}{r^2}\,\rho\,A\,\mathrm{d}r.
Reveal the figure step by step to watch the shell, its inward gravity, and the two pressure forces
appear — and see why the outward push has to win by exactly the weight of the gas.
The equation of hydrostatic equilibrium
Take the force balance from the shell and divide both sides by the volume
A\,\mathrm{d}r. On the left, the difference in pressure across the
thickness \mathrm{d}r, divided by \mathrm{d}r,
is exactly minus the pressure gradient:
\frac{P(r) - P(r+\mathrm{d}r)}{\mathrm{d}r} = -\frac{\mathrm{d}P}{\mathrm{d}r}.
So the whole balance collapses to one compact, powerful statement:
\boxed{\;\dfrac{\mathrm{d}P}{\mathrm{d}r} = -\dfrac{G\,m(r)\,\rho(r)}{r^2}\;}
Read the sign carefully, because it carries the physics. The right-hand side is negative
(everything in it is positive), so \mathrm{d}P/\mathrm{d}r < 0:
pressure falls as you move outward. It is highest at the centre, where the whole
weight of the star bears down, and drops to essentially zero at the surface, where there is nothing
left above to support. That is exactly what you would expect from a stack of anything heavy — the
cards at the bottom of the deck are squeezed hardest — and it is the reason a star's core is a place
of extraordinary pressure and temperature while its surface is comparatively gentle.
A tempting but wrong reading: "the gas isn't going anywhere, so there must be no net force on it."
The truth is subtler and more interesting. There are two enormous forces on every parcel
of gas — gravity pulling in and the pressure-gradient force pushing out — and hydrostatic
equilibrium says only that they cancel at every point. The net force is zero not
because the forces are absent but because they are matched. Turn off either one and the star would
not sit still: with no pressure it would collapse in free-fall in under an hour; with no gravity it
would burst outward at the speed of sound.
The word "equilibrium" here also means mechanical balance, not that nothing ever changes.
A star still slowly evolves — it fuses hydrogen, its composition drifts, its core
gradually contracts and heats over millions of years — but on the timescale it takes a sound wave to
cross the star (minutes to hours), the mechanical balance is re-established almost instantly. The
star is in equilibrium the way a tightrope walker is "still": actively, dynamically, and only on
average.
The full set: four coupled equations
Hydrostatic equilibrium fixes the pressure gradient, but it contains m(r),
\rho(r) and (through the equation of state)
T(r) — quantities that themselves vary through the star. To close the
problem we need to say how the enclosed mass, the luminosity, and the temperature each change with
radius. Together these make the four equations of stellar structure.
-
Hydrostatic equilibrium — gravity is balanced by the pressure gradient:
\frac{\mathrm{d}P}{\mathrm{d}r} = -\frac{G\,m\,\rho}{r^2}.
-
Mass continuity — the mass in a shell is its volume times its density:
\frac{\mathrm{d}m}{\mathrm{d}r} = 4\pi r^2 \rho.
-
Energy generation — luminosity grows outward by whatever the gas produces, at a
rate \varepsilon of energy per unit mass per unit time (from nuclear
fusion):
\frac{\mathrm{d}L}{\mathrm{d}r} = 4\pi r^2 \rho\,\varepsilon.
-
Energy transport (radiative diffusion) — heat leaks outward down a temperature
gradient set by the opacity \kappa and the flux:
\frac{\mathrm{d}T}{\mathrm{d}r} = -\frac{3\,\kappa\,\rho\,L}{16\pi\,a\,c\,r^2\,T^3}.
Each equation is a plain accounting statement. Mass continuity just says that a thin shell of area
4\pi r^2 and thickness \mathrm{d}r holds a mass
equal to its volume 4\pi r^2\,\mathrm{d}r times the local density
\rho. The energy-generation equation is the same shape: the luminosity
passing through a shell increases, from the inside face to the outside face, by exactly the power the
shell's own fusion adds. The transport equation is the one carrying the most physics — it says heat
diffuses outward like light struggling through fog, and the more opaque the gas
(\kappa large) or the more flux L it must carry,
the steeper the temperature gradient has to be to push that heat through.
The transport equation above assumes energy travels by radiative diffusion —
photons random-walking outward. But sometimes the temperature gradient that radiation would demand
becomes too steep: steeper than the gradient a rising blob of gas would keep if it expanded
without exchanging heat (the adiabatic gradient). When that happens the gas becomes
buoyantly unstable and starts to physically churn — hot parcels rise, cool ones sink — and
convection takes over as the dominant way heat escapes, exactly as it does in a pot
of boiling water.
The rule for which mechanism wins is the Schwarzschild criterion: a layer is
convective wherever the radiative gradient would exceed the adiabatic one,
\nabla_\text{rad} > \nabla_\text{ad}. The Sun carries energy
radiatively through its inner two-thirds and convectively through its outer third; low-mass red
dwarfs are convective all the way through; hot massive stars, the other way around. In a convective
zone you swap the radiative transport equation for the (much simpler, nearly adiabatic) convective
one — but the other three equations stand unchanged.
How steeply pressure and density fall
Solving the four equations for a realistic star gives smooth profiles: pressure, density and
temperature are all highest at the centre and fall away to the surface — but they do not
fall at the same rate. Because pressure depends on both density and temperature (roughly
P \propto \rho T for an ideal gas), and both of those are dropping
together, pressure plunges more steeply than density does. The sketch below shows the characteristic
shape: most of a star's mass, and almost all of its pressure, is packed into the inner half of its
radius.
This central concentration is why the core is where all the action is. Fusion is ferociously
sensitive to temperature, so it switches on only in the innermost region where the temperature crests
above about 10^7\ \text{K}. The outer layers are just a heavy, glowing
blanket, their whole job being to press down and keep the core hot and dense enough to burn.
Worked example 1 — the pressure at the Sun's centre
We can squeeze a genuine number out of hydrostatic equilibrium with almost no effort, just by
estimating the sizes of things. Rearrange the equation and integrate it from the centre to the
surface. Very crudely, replace \mathrm{d}P by the full pressure drop
P_c (centre to surface, where pressure is near zero),
\mathrm{d}r by the radius R,
m by the total mass M, and
\rho by the mean density
M/\left(\tfrac{4}{3}\pi R^3\right):
\frac{P_c}{R} \sim \frac{G\,M}{R^2}\cdot\frac{M}{\tfrac{4}{3}\pi R^3} \;\Longrightarrow\; P_c \sim \frac{G M^2}{R^4}.
That single scaling, P_c \sim G M^2/R^4, is worth memorising — it tells you
the central pressure of any star at a glance. Put in the Sun's numbers,
M_\odot \approx 2.0\times10^{30}\ \text{kg},
R_\odot \approx 7.0\times10^{8}\ \text{m}, and
G \approx 6.67\times10^{-11}\ \text{N·m}^2\text{/kg}^2:
P_c \sim \frac{(6.67\times10^{-11})(2.0\times10^{30})^2}{(7.0\times10^{8})^4} \approx \frac{6.67\times10^{-11}\times 4.0\times10^{60}}{2.4\times10^{35}} \approx 1.1\times10^{15}\ \text{Pa}.
A more careful integration bumps this up to about
2\times10^{16}\ \text{Pa} — the order of magnitude is the win. Either way
it is staggering: a few hundred billion times the atmospheric pressure at sea level
(1\ \text{atm} \approx 10^5\ \text{Pa}). That is the weight of half a
million kilometres of overlying star, and it is precisely the pressure the core's hot gas must
summon to avoid being crushed.
Worked example 2 — the pressure gradient in a shell
Let's put concrete numbers through the hydrostatic equation itself, at a point partway out in the
Sun. Take a shell at radius r = 3.5\times10^{8}\ \text{m} (about half the
solar radius), where the enclosed mass is roughly
m \approx 1.8\times10^{30}\ \text{kg} (most of the Sun's mass lies inside
the halfway point) and the local density is about
\rho \approx 1.0\times10^{3}\ \text{kg/m}^3 (a little denser than water).
The pressure gradient there is
\frac{\mathrm{d}P}{\mathrm{d}r} = -\frac{G\,m\,\rho}{r^2} = -\frac{(6.67\times10^{-11})(1.8\times10^{30})(1.0\times10^{3})}{(3.5\times10^{8})^2}.
\frac{\mathrm{d}P}{\mathrm{d}r} \approx -\frac{1.2\times10^{23}}{1.2\times10^{17}} \approx -1.0\times10^{6}\ \text{Pa/m}.
The minus sign is the physics: pressure is dropping as we head outward, by about a million
pascals for every metre we climb. Over the roughly 3.5\times10^{8}\ \text{m}
that remains out to the surface, that gradient integrates to a pressure change of order
10^{6}\times3.5\times10^{8}\approx 3\times10^{14}\ \text{Pa} — comfortably
consistent with the central pressure we estimated above. The equation is not just a symbol; it is a
real, checkable statement about how hard the gas is squeezed at each depth.
The stellar thermostat: why stars are stable
Balance is not the same as stability. A pencil balanced on its tip is in equilibrium too, but the
faintest nudge topples it. What makes a main-sequence star not merely balanced but genuinely
stable — able to shrug off a disturbance and return to where it was — is a feedback
loop so elegant it deserves its own name: the stellar thermostat.
Follow what happens if the core is momentarily squeezed a little too tightly — say the outer layers
settle and compress it:
- Compressing the core heats it up (compress a gas and its temperature rises).
-
Fusion is ferociously temperature-sensitive — for the Sun's proton–proton chain
the energy-generation rate goes roughly as \varepsilon \propto T^{4},
and for the CNO cycle in heavier stars as steeply as
\varepsilon \propto T^{16\text{–}20}. So a small rise in temperature
makes the fusion rate soar.
-
The sudden flood of energy raises the pressure, which pushes back on the overlying
layers and lets the core expand again.
- Expanding cools the core, the fusion rate falls back, and the star settles.
Every link in the chain opposes the original disturbance — that is negative
feedback, the defining signature of a thermostat. Push the core in and it pushes back out;
let it drift out and it cools, dims, and sinks back. The star holds itself at just the temperature
where the energy it fuses equals the energy it radiates, and it does so automatically, with no
controller and no set point but the laws of gas and gravity. This is the deep answer to the question
we started with: the Sun has burned steadily for billions of years not by luck, but because it is a
self-correcting machine.
Here is one of the most counter-intuitive facts in astrophysics, and it falls straight out of the
same physics. A self-gravitating ball of gas has a negative heat capacity: cool it down
and it gets hotter. Remove energy from a star and gravity pulls it into a smaller,
more tightly bound configuration; the virial theorem then says half the released gravitational
energy goes into heat, so the interior temperature actually rises. This is exactly why a
contracting protostar heats up until fusion ignites, and why a star's core, as it slowly uses up
its fuel and contracts, gets ever hotter and drives ever more vigorous burning. A star fighting to
lose heat only stokes its own furnace — the thermostat runs in reverse, and it is what ultimately
marches a star through its whole life cycle.
Closing the system: what determines a star
Count what we have: four first-order differential equations for four quantities —
P, m, L and
T — as functions of radius r. But they contain
extra unknowns: the density \rho, the opacity
\kappa, and the generation rate \varepsilon.
These are supplied by three constitutive relations from microphysics — the
equation of state P = P(\rho, T, \text{composition}), the
opacity law \kappa = \kappa(\rho, T, \text{composition}),
and the nuclear energy-generation rate
\varepsilon = \varepsilon(\rho, T, \text{composition}). With those plugged
in, the system is closed: as many equations as unknowns.
It still needs boundary conditions — at the centre both the mass and the luminosity
vanish (m = 0 and L = 0 at
r = 0), and at the surface the pressure and temperature drop essentially
to zero (P \to 0, T \to 0 at
r = R). Fixing the values at both ends makes this a two-point boundary
problem, which for a real star can only be solved numerically, by computer, marching
the equations inward and outward until they meet consistently.
-
For a star in equilibrium, its total mass and its composition
(the run of chemical elements through it) determine its entire structure — every
profile of pressure, density, temperature and luminosity, and hence its radius, brightness and
surface temperature.
-
In other words, tell me a star's mass and what it's made of, and — solving the four equations plus
the constitutive relations — I can, in principle, hand you the whole star. This is why the
main sequence is a one-parameter family (essentially, ordered by mass).
This is the quiet triumph of the subject. A handful of accounting statements — weigh a shell, count
its mass, tally its energy, let heat leak out — plus the microphysics of gas, radiation and nuclei,
pin down everything about an object 10^{9} metres across and
10^{7} kelvin at its heart, sitting a hundred and fifty million kilometres
away. You cannot cut a star open, but you can compute its insides.