Skip to main content
Sandbox Physics

F-X3 · The pressure inside a star

Inside a Star in Hydrostatic Balance

What holds a star up against its own gravity? Pressure rises toward the center, so each layer feels a stronger push from below than from above. That pressure difference balances the inward pull of the mass enclosed by the layer.

Open a stellar cross-section and drag a shell from the core to the surface. Compare the inward pull of gravity with the outward push from the pressure gradient.

Interactive modelInside a Star in Hydrostatic Balance
Central / mean density11
Enclosed mass11
Shell pressure11
Shell gravity11

Numerical hydrostatic solution

How the star changes with depth

Density and pressure

r/R,ρ/ρc,P/Pcr/R,\quad \rho/\rho_c,\quad P/P_c

Gold: density. Pink: pressure. Each is divided by its own central value. The bright marker follows the selected shell.

How much mass lies inside a shell

r/R,m(r)/Mr/R,\quad m(r)/M

Teal: the mass enclosed by radius. The surface contains the whole stellar mass.

Physics tutorial

Why the pressure rises toward the center

BackgroundA star contains layers of gas that all attract each other. A shell has to support the weight of the material above it.

Why it mattersThe surface tells us little about how mass is packed inside. Compare stars with the same mass and radius but different internal concentration.

Start with the essentials

Focus question
What holds a star up against its own gravity?
One-sentence intuition
A pressure difference between the two faces of each layer balances its weight.

Core mathematical model

Balance at each radius

dPdr=−ρ(r)Gm(r)r2\frac{dP}{dr}=-\rho(r)\frac{Gm(r)}{r^2}

Pressure P decreases outward. Density is rho, the mass inside radius r is m, and G is the gravitational constant. The pressure gradient supplies an outward force per volume equal to the inward gravitational force.

A polytropic pressure law

P=Kρ1+1/nP=K\rho^{1+1/n}

The index n sets the shape of the pressure–density relation. The constant K follows from the selected mass and radius. The uniform reference is the incompressible limit at index zero.

Common difficulties

Pressure and force

Typical misconceptionHigh pressure pushes the gas outward by itself.

Better mental modelPressure acts from every direction. The outward force comes from the difference between the stronger pressure below a layer and the weaker pressure above it.

Run the experiment

  1. 01

    Look below the surface

    Choose Broad interior and drag the bright shell toward the center.

    What to observe: The pressure and enclosed mass change smoothly. The two arrows stay equal because every layer is in equilibrium.
  2. 02

    Concentrate the mass

    Choose Dense core. Compare its density profile with Broad interior at the same mass and radius.

    What to observe: Much more mass sits near the center. The central density rises relative to the mean density.
  3. 03

    Compress the star

    Reduce Radius in Suns while leaving the mass fixed.

    What to observe: The central pressure rises steeply. A smaller sphere needs stronger internal pressure to support the same mass.
FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy