Density and pressure
Gold: density. Pink: pressure. Each is divided by its own central value. The bright marker follows the selected shell.
F-X3 · The pressure inside a star
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.
Numerical hydrostatic solution
Gold: density. Pink: pressure. Each is divided by its own central value. The bright marker follows the selected shell.
Teal: the mass enclosed by radius. The surface contains the whole stellar mass.
Physics tutorial
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
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.
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.
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.
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.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.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.