Back to the on-screen lesson ·

The equations of stellar structure

Hydrostatic equilibrium, mass continuity, energy generation and radiative transport, with an equation of state and boundary conditions, fix a star's interior from its mass and composition.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to write the equations of hydrostatic equilibrium, mass continuity, energy transport and energy generation, and use them on a star's interior.

2. What you already know

You can find a star's mass from a binary orbit, its radius from its luminosity and temperature, and you know from physics that pressure in a fluid increases with depth. You can set up and integrate a differential equation. This lesson builds the four equations that describe a star's interior, the physics every model of a star, from the Sun to a red supergiant, starts from.

3. Words for this lesson

TermWhat it means
Hydrostatic equilibriumThe balance at every layer between gravity's inward pull and the outward push of the pressure difference.
Mass continuityThe rule that enclosed mass grows by the mass of each shell, dM = 4 pi r^2 rho dr.
Energy generation rate (epsilon)The power released per kilogram of gas by nuclear reactions, in watts per kilogram.
Opacity (kappa)How strongly a gas absorbs radiation, in square meters per kilogram.
Equation of stateThe relation between pressure, density and temperature, P = rho k T / (mu m_H) for an ideal gas.
Mean molecular weight (mu)The average mass of a gas particle in units of the hydrogen mass, about 0.6 in the ionized Sun.

4. Four equations for a ball of gas

A star in a steady state obeys four differential equations in the radius $r$:

$$\frac{dP}{dr} = -\frac{G M(r)\,\rho}{r^2}, \qquad \frac{dM}{dr} = 4\pi r^2 \rho,$$

$$\frac{dL}{dr} = 4\pi r^2 \rho\,\varepsilon, \qquad \frac{dT}{dr} = -\frac{3\kappa\rho L}{64\pi\sigma r^2 T^3}.$$

They are hydrostatic equilibrium, mass continuity, energy generation and energy transport by radiation. An equation of state, $P = \rho kT/\mu m_H$, ties pressure to density and temperature. With conditions at the center and the surface, the mass and composition alone fix the whole star.

Smooth approximations to the standard solar model: the mass inside radius r as a share of the Sun's mass, and the luminosity passing outward through radius r as a share of the Sun's luminosity, against r as a share of the Sun's radius. The luminosity curve climbs almost to 1 within a quarter of the radius, because fusion happens only in the hot, dense core, and stays flat outside it. The mass curve rises more slowly: half the mass lies within a quarter of the radius and about 94 percent within half of it, though that half of the radius holds only an eighth of the volume.
Smooth approximations to the standard solar model: the mass inside radius r as a share of the Sun's mass, and the luminosity passing outward through radius r as a share of the Sun's luminosity, against r as a share of the Sun's radius. The luminosity curve climbs almost to 1 within a quarter of the radius, because fusion happens only in the hot, dense core, and stays flat outside it. The mass curve rises more slowly: half the mass lies within a quarter of the radius and about 94 percent within half of it, though that half of the radius holds only an eighth of the volume.

Another way: picture

Picture a tall stack of mattresses. The top one carries nothing and stays fluffy; each one below carries all those above it and is squeezed harder. A star is the same, except that its layers are gas, so a squeezed layer pushes back with more pressure. At every depth the pressure is just enough to carry the weight of everything above.

Another way: steps

  1. Gravity inside: G M(r) / r^2, from the mass inside only.
  2. Pressure gradient: density times that gravity, pointing inward.
  3. Mass: add 4 pi r^2 rho dr shell by shell.
  4. Luminosity: grows only where fusion releases energy.
  5. Temperature: falls outward as energy flows out.

5. A star as a ball of gas in balance

The Sun has shone steadily for $4.6$ billion years, so on any timescale shorter than millions of years nothing inside it is accelerating. If gravity were unopposed, it would collapse in about half an hour, its free-fall time. If pressure were unopposed, it would expand as fast. Instead the two cancel at every layer.

That balance, together with the steady flow of energy from the center to the surface, is what the equations of stellar structure express. Each describes how one quantity changes as you move outward through the star: pressure, enclosed mass, luminosity and temperature.

6. Hydrostatic equilibrium

Take a thin shell of gas at radius $r$, of area $A$ and thickness $dr$, with mass $\rho A\,dr$. Gravity pulls it inward with force $G M(r)\rho A\,dr/r^2$, where $M(r)$ is the mass inside radius $r$; by Newton's shell theorem the mass outside exerts no net pull. The pressure below pushes up with $P(r)A$ and the pressure above pushes down with $P(r + dr)A$. For no acceleration,

$$\frac{dP}{dr} = -\frac{G M(r)\,\rho}{r^2} = -\rho\,g(r).$$

The minus sign says pressure falls outward. The gradient is steepest where the gas is dense and gravity strong, near the center, where the Sun's pressure reaches about $2.5 \times 10^{16}$ pascals, two hundred billion times the air pressure at sea level.

7. Mass continuity

A shell of radius $r$ and thickness $dr$ has volume $4\pi r^2\,dr$, so it adds mass $dM = 4\pi r^2 \rho\,dr$:

$$\frac{dM}{dr} = 4\pi r^2 \rho.$$

This simply keeps track of where the mass is. It links the other equations, since gravity at each radius depends on $M(r)$. Integrated over the whole star it gives the mean density $\bar\rho = 3M/4\pi R^3$, about $1{,}408$ kg/m$^3$ for the Sun, a little denser than water. The factor $r^2$ matters: outer shells have much more volume, so even a modest density there holds a lot of mass.

8. Energy generation

Where nuclear reactions release energy at a rate $\varepsilon$ watts per kilogram, each shell adds $dL = 4\pi r^2 \rho \varepsilon\,dr$ to the power flowing outward:

$$\frac{dL}{dr} = 4\pi r^2 \rho\,\varepsilon.$$

Fusion rates rise steeply with temperature, so $\varepsilon$ is large only in the core. In the Sun, almost all the luminosity is generated inside a quarter of the radius; outside that, $L(r)$ is constant, and the same $3.83 \times 10^{26}$ watts pass through every outer shell. That is the flat part of the luminosity curve in the figure.

9. Energy transport

Energy flows down the temperature gradient. Where it is carried by radiation, photons are absorbed and re-emitted countless times, diffusing outward, and the flow is resisted by the gas's opacity $\kappa$. The result is

$$\frac{dT}{dr} = -\frac{3\kappa\rho L}{64\pi\sigma r^2 T^3}.$$

Higher opacity, higher density or more luminosity to carry all demand a steeper temperature drop. When the required gradient becomes too steep, the gas becomes unstable and convection takes over, carrying heat by bulk motion instead; lesson 8 takes up when that happens. In the Sun, radiation carries the energy from the core to $0.71$ of the radius and convection the rest of the way.

10. The equation of state

The four equations have five unknowns, $P$, $\rho$, $T$, $M$ and $L$, so one more relation is needed. In most stars the gas is ideal:

$$P = \frac{\rho kT}{\mu m_H} + \frac{1}{3}aT^4,$$

where $\mu$ is the mean mass of a particle in units of the hydrogen atom's mass and the second term is radiation pressure, important only in very massive stars. Ionization matters: fully ionized hydrogen splits into a proton and an electron, two particles sharing one hydrogen mass, so $\mu = 0.5$; for the Sun's ionized mixture of hydrogen and helium, $\mu \approx 0.6$, and in its cool, neutral photosphere about $1.3$. Opacity and energy generation are also functions of density, temperature and composition, supplied by atomic and nuclear physics.

11. Boundary conditions and solving the equations

At the center, no mass or luminosity is enclosed: $M(0) = 0$ and $L(0) = 0$. At the surface, the pressure is close to zero and the temperature is the effective temperature. With those conditions, the equations have one solution for each mass and composition. That is the Vogt-Russell theorem: a star's mass and composition determine its structure, and so its luminosity, radius and temperature.

The equations cannot be solved on paper for a realistic star; they are integrated numerically, shell by shell. Simple density laws, though, can be integrated by hand, and they show how the pieces fit, as the practice items here do. A related quantity, the pressure scale height $H = kT/\mu m_H g$, measures how quickly pressure falls near the surface: about $130$ km in the Sun's photosphere.

12. Reading the figure

The figure shows how the Sun's mass and luminosity are distributed, using smooth curves close to the standard solar model. The luminosity curve rises almost to $1$ within about a quarter of the radius and is flat beyond: the energy is made in the core and only carried through the rest. The mass curve climbs more gradually, reaching one half at a quarter of the radius and about $0.94$ at half the radius. That inner half of the radius is only an eighth of the Sun's volume, so the Sun is strongly concentrated toward its center, with a central density about $150$ times water's.

13. Checking an answer

Pressure and temperature must fall outward and enclosed mass and luminosity must never decrease; a sign that says otherwise is a slip. The enclosed mass can never exceed the total, and an integrated density law must give exactly the total at the surface. Gravity inside a star is $G M(r)/r^2$ using only the mass inside, so it can be larger below the surface than at it, as it is in the Sun's core region. A mean density should be in a sensible range: about $1{,}000$ kg/m$^3$ for Sun-like dwarfs, far less for giants, and around a billion for white dwarfs.

14. In the world: listening to the inside of the Sun

The Sun rings like a bell. Convection near its surface excites millions of sound waves that travel through the interior and set the surface moving up and down at a few hundred meters per second, with periods near five minutes. The Global Oscillation Network Group, a ring of six observatories run by the National Solar Observatory, including stations at Big Bear in California and Mauna Loa in Hawaii, watches these oscillations around the clock, as does NASA's Solar Dynamics Observatory from orbit.

Because the speed of sound depends on temperature and composition, the frequencies of the oscillations map the interior. They show the base of the convection zone at $0.713$ of the radius and confirm the sound speed predicted by the standard solar model, built from exactly these four equations, to within a few tenths of a percent throughout most of the Sun.

15. In the world: a stellar model on a laptop

In 2011, Bill Paxton and collaborators released MESA, Modules for Experiments in Stellar Astrophysics, an open-source code that solves the equations of stellar structure numerically, together with equations for how composition changes as fusion proceeds. It divides a star into a thousand or more shells and adjusts pressure, temperature, radius and luminosity in each until all four equations and the boundary conditions hold together.

Thousands of astronomers now use it, from graduate students modeling the Sun to researchers following massive stars to collapse. A model of the Sun that took a mainframe computer in the 1960s now runs in minutes on a laptop, and the physics inside it is the four equations of this lesson plus tables of opacity and nuclear reaction rates.

16. A star is held up by explosions

It is natural to picture the Sun as a vast nuclear bomb or bonfire whose blasts hold off gravity. In fact fusion releases energy steadily and only in the core, and what holds every layer up is ordinary gas pressure, the same thing that keeps a balloon inflated. The energy from fusion matters because it replaces the heat the star loses from its surface, keeping the gas hot enough to maintain that pressure.

A related slip is thinking the star's outer layers press down on the core with their whole weight as if gravity were the same everywhere. Gravity at radius $r$ comes only from the mass inside $r$, so it is zero at the very center, even though the pressure there is greatest.

17. Gravity and the pressure gradient inside the Sun

  1. At half the Sun's radius, $M(r) = 0.94$ suns and $\rho = 1{,}300$ kg/m$^3$. Write the local gravity.

    $g = 274 \times \dfrac{M(r)}{r^2}$

    In suns and solar radii; 274 m/s^2 for both equal to one.

  2. Square the radius.

    $0.5^2 = 0.25$

    Gravity falls as the square.

  3. Divide the enclosed mass by it and multiply by 274.

    $g = 274 \times 0.94 \div 0.25 = 1{,}030\ \text{m/s}^2$

    Nearly four times the surface gravity.

  4. Multiply by the density.

    $\rho g = 1{,}300 \times 1{,}030 = 1.34 \times 10^{6}\ \text{Pa/m}$

    Hydrostatic equilibrium.

  5. Interpret the result.

    $\text{13 atmospheres lost per meter outward}$

    One atmosphere is about 101,000 Pa.

18. Mass and gravity in a uniform-density star

  1. A star has uniform density. Integrate mass continuity.

    $M(r) = \int_0^r 4\pi r'^2 \rho\,dr' = \tfrac{4}{3}\pi r^3 \rho$

    The density comes out of the integral.

  2. Divide by the total mass.

    $\dfrac{M(r)}{M} = \left(\dfrac{r}{R}\right)^3$

    Volume fraction.

  3. Evaluate at half the radius.

    $\left(0.5\right)^3 = 0.125$

    An eighth of the mass.

  4. Write the gravity there in surface units.

    $\dfrac{g(r)}{g(R)} = \dfrac{M(r)/r^2}{M/R^2} = \dfrac{r}{R}$

    Gravity grows linearly from the center.

  5. Evaluate at half the radius.

    $g = 0.5\,g(R)$

    Half the surface gravity.

  6. Compare with the Sun.

    $\text{Sun at } 0.5R: \ 0.94 \text{ of the mass, } 3.8\,g(R)$

    A real star is centrally concentrated.

19. The Sun's photospheric scale height

  1. The Sun's photosphere is at $5{,}772$ K, with $\mu = 1.3$ and $g = 274$ m/s$^2$. Combine the two equations.

    $\dfrac{dP}{dr} = -\rho g, \quad P = \dfrac{\rho kT}{\mu m_H}$

    Hydrostatic equilibrium and the ideal gas.

  2. Substitute the density from the gas law.

    $\dfrac{dP}{dr} = -\dfrac{\mu m_H g}{kT}\,P$

    Pressure decays in proportion to itself.

  3. Solve for an isothermal layer.

    $P = P_0\,e^{-r/H}, \quad H = \dfrac{kT}{\mu m_H g}$

    An exponential fall-off.

  4. Multiply Boltzmann's constant by the temperature.

    $kT = 1.381 \times 10^{-23} \times 5{,}772 = 7.97 \times 10^{-20}\ \text{J}$

    Thermal energy.

  5. Multiply the particle mass by gravity.

    $1.3 \times 1.674 \times 10^{-27} \times 274 = 5.96 \times 10^{-25}\ \text{N}$

    Weight of one particle.

  6. Divide the two.

    $H = 7.97 \times 10^{-20} \div 5.96 \times 10^{-25} = 1.34 \times 10^{5}\ \text{m}$

    About 134 km.

  7. Compare with the Sun's radius.

    $134 \div 696{,}000 \approx 0.0002$

    Why the Sun's edge looks sharp.

20. Your turn: find the Sun's mean density from $M = 1.989 \times 10^{30}$ kg and $R = 6.957 \times 10^{8}$ m.

  1. Write the mean density.

    $\bar\rho = \dfrac{3M}{4\pi R^3}$

    Mass over the volume of a sphere.

  2. Cube the radius and multiply by four pi over three.

    $\tfrac{4}{3}\pi (6.957 \times 10^{8})^3 = 1.410 \times 10^{27}\ \text{m}^3$

    The Sun's volume.

  3. Your turn: work this step out. Its working is at the end of the packet.

    Divide the mass by the volume.

21. Guided practice

The Sun has neither collapsed nor blown apart in 4.6 billion years. What does hydrostatic equilibrium balance at each layer inside it?

22. Guided practice

Complete the worked solution: a star of $0.2$ suns and $0.4$ solar radii has a photospheric layer of density $0.0008$ kg/m$^3$ and thickness $10000$ m. The Sun's surface gravity is $274$ m/s$^2$. Find the pressure difference across the layer.

  1. Scale the Sun's gravity by the mass over the radius squared.

    $g =$ g $\text{m/s}^2$

    Surface gravity.

  2. Multiply density, gravity and thickness.

    $\Delta P =$ d $\text{Pa}$

    Hydrostatic equilibrium over a thin layer.

  3. Say which side is higher in words.

    $\text{the pressure is greater at the bottom of the layer}$

    It carries the layer's weight.

23. Guided practice

Match each equation of stellar structure to the principle it expresses.

hydrostatic equilibriummass continuityenergy generationenergy transport
how pressure changes with radius
how enclosed mass changes with radius
how luminosity changes with radius
how temperature changes with radius

24. Practice

At $0.5$ solar radii from the Sun's center, the enclosed mass is $0.94$ suns and the density is $1300$ kg/m$^3$. Taking surface gravity for one sun and one solar radius as $274$ m/s$^2$, fill in the gravity there and the size of the pressure gradient.

value
gravity (m/s^2)
pressure gradient (Pa/m)

25. Practice

In a model star, the density at fractional radius $x = r/R$ is $\rho = \rho_c\,1$. Using mass continuity, write the mass inside $x$, as a share of the star's total mass, as a function of $x$.

Answer:

26. Practice

A star's photosphere is at $30000$ K with mean molecular weight $0.6$ and surface gravity $1000$ m/s$^2$. Find its pressure scale height in kilometers, $H = kT/(\mu m_H g)$, with $k = 1.381 \times 10^{-23}$ J/K and $m_H = 1.674 \times 10^{-27}$ kg.

Answer: kilometers

27. Somewhere new

Sirius A has about $2.06$ solar masses and $1.71$ solar radii. Taking the Sun's mean density as $1{,}408$ kg/m$^3$, what is its mean density in kg/m$^3$? Give three significant figures.

Answer: kg per cubic meter

28. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

29. Test question

In a model star, the density at fractional radius $x = r/R$ is $\rho = \rho_c\,(1 - x^3)$. Using mass continuity, write the mass inside $x$, as a share of the star's total mass, as a function of $x$.

Answer:

30. What you can do now

You can set up a star's interior. Find the gravity and pressure gradient at half the Sun's radius, and the enclosed mass of a star whose density falls as 1 - x.

Working for the steps left to you

20. Your turn: find the Sun's mean density from $M = 1.989 \times 10^{30}$ kg and $R = 6.957 \times 10^{8}$ m., step 3

$\bar\rho = 1.989 \times 10^{30} \div 1.410 \times 10^{27} = 1{,}410\ \text{kg/m}^3$

A little denser than water.