Mass Continuity Equation

A star is a self-gravitating ball of gas holding itself up against its own weight, and to describe what happens inside it we track how each physical quantity changes with distance from the centre. Of the four coupled relations that make up the theory of stellar structure, the mass continuity equation is the simplest and the most fundamental: it is nothing more than careful bookkeeping for mass. If we know the density ρ(r)\rho(r) at every radius, how much matter lies inside a sphere of radius rr? The answer is built one thin shell at a time — a shell at radius rr of thickness dr\mathrm{d}r has volume 4πr2 dr4\pi r^2\,\mathrm{d}r, so it holds mass dMr=4πr2ρ dr\mathrm{d}M_r = 4\pi r^2\rho\,\mathrm{d}r, and summing all the shells reconstructs the whole star. Trivial as it looks, this equation is structurally indispensable. By Newton's shell theorem, the gravity felt at radius rr inside a spherical body depends only on the mass interior to rr, the quantity MrM_r. Hydrostatic equilibrium therefore needs MrM_r at every point, and mass continuity is precisely what supplies it — the two equations are coupled and cannot be solved apart. Add an equation of state, an energy-transport law, and the energy-generation equation, and the system closes into a complete model of a star. The stellar form is one static, spherical face of a far more general law. In a moving fluid, conservation of mass reads ∂tρ+∇ ⁣⋅(ρv)=0\partial_t\rho + \nabla\!\cdot(\rho\mathbf{v}) = 0 — the continuity equation Leonhard Euler wrote down for fluid dynamics in 1757. Switch off the flow and impose spherical symmetry, and it collapses to dMr/dr=4πr2ρ\mathrm{d}M_r/\mathrm{d}r = 4\pi r^2\rho. That lineage links a stellar interior to accretion flows, stellar winds, and the smooth cosmological fluid whose density thins as the universe expands.

Key takeaways
  • The mass continuity equation, dMrdr=4πr2ρ\dfrac{\mathrm{d}M_r}{\mathrm{d}r}=4\pi r^2\rho, says the enclosed mass grows in each spherical shell as its volume 4πr2 dr4\pi r^2\,\mathrm{d}r times the local density ρ(r)\rho(r).
  • It is the first of the four equations of stellar structure and supplies the interior mass MrM_r that gravity — and hence hydrostatic equilibrium — depends on.
  • Integrating from the centre outward gives the total mass; special density laws (uniform, power-law) make the integral explicit and show where the mass concentrates.
  • The Lagrangian form drdMr=14πr2ρ\dfrac{\mathrm{d}r}{\mathrm{d}M_r}=\dfrac{1}{4\pi r^2\rho} makes enclosed mass the independent variable — the standard choice in every stellar-evolution code.
  • It is the static, spherical special case of the general fluid continuity equation ∂tρ+∇ ⁣⋅(ρv)=0\partial_t\rho+\nabla\!\cdot(\rho\mathbf{v})=0.
  • Key idea: in a spherically symmetric star the mass enclosed within radius rr increases as the volume of each successive shell times its local density, dMr=4πr2ρ dr\mathrm{d}M_r = 4\pi r^2\rho\,\mathrm{d}r — pure mass conservation, and the source of the interior mass on which all of stellar structure rests.
The core insight

In a spherically symmetric star the mass enclosed within radius rr increases as the volume of each successive shell times its local density: dMr=4πr2ρ dr\mathrm{d}M_r = 4\pi r^2\rho\,\mathrm{d}r. This is pure mass conservation, and it supplies the interior mass MrM_r that gravity — and hence hydrostatic equilibrium — depends on.

Where this lives today

The mass continuity equation is not a museum piece — it is executed billions of times a second inside every modern stellar-evolution calculation. Codes such as MESA (Modules for Experiments in Stellar Astrophysics, first released in 2011 and now the community standard) solve the four structure equations on a Lagrangian mesh, with mass MrM_r as the independent coordinate exactly as equation (3) prescribes: each zone carries a fixed slug of matter while the code lets the radius of that zone float, expanding it through the red-giant phase and squeezing it in a white-dwarf remnant. The fixed mass domain 0≤Mr≤M0\le M_r\le M is what keeps such a calculation numerically stable across the enormous radius changes of a star's life, and adaptive re-meshing simply splits and merges mass zones. On the observational side, helioseismology — the study of the Sun's acoustic oscillations by instruments like SOHO/MDI and the ground-based GONG network — has measured the solar interior density profile ρ(r)\rho(r) to better than one percent over much of the radius, turning the abstract ρ(r)\rho(r) of equation (2) into a directly tested function; asteroseismology with the Kepler and TESS missions is now doing the same for thousands of other stars. And the same conservation principle, with the flow restored, governs spherical (Bondi) accretion onto compact objects through M˙=4πr2ρv=const\dot M=4\pi r^2\rho v=\text{const}, stellar winds, and the diluting cosmic fluid of an expanding universe.

The physical picture

Picture assembling a star out of concentric, onion-like shells. A shell at radius rr with thickness dr\mathrm{d}r has surface area 4πr24\pi r^2 and volume 4πr2 dr4\pi r^2\,\mathrm{d}r; multiply by the density there and you have the mass that shell holds. Stack the shells from the centre outward and you rebuild the whole star, with the running total MrM_r climbing from zero at the core to the full mass MM at the surface. Because gravity in a spherical body answers only to interior mass, that running total is the physically active quantity, and the continuity equation is the ledger that keeps it honest at every radius.

Figure
Building a star shell by shell: a thin spherical shell at radius r with thickness dr has area 4πr², volume dV = 4πr² dr, and mass dM_r = ρ dV = 4πr²ρ dr, so dM_r/dr = 4πr²ρ
Mass adds up shell by shell — the ledger dM_r = 4πr²ρ dr r shell dr centre surface r = R area of the shell: A = 4πr² volume of the shell: dV = 4πr² dr mass of the shell: dM_r = ρ dV dM_r / dr = 4πr²ρ M_r(0) = 0 M_r(R) = M gravity at r feels only M_r — Newton's shell theorem — never the total mass M

The steepness of the running total Mr(r)M_r(r) tells you where the mass actually lives. In a centrally condensed star the curve climbs steeply near the middle and flattens toward the surface, so most of the mass is buried deep inside even though most of the volume is in the outer envelope. The second figure makes this concrete by comparing two density laws whose integrals we can do by hand: a uniform sphere and a mildly centre-heavy linear model. The gap between the curves is the whole content of "centrally condensed", and the numbers attached to it — the Sun's mean density and the four-fold central enhancement of the linear model — are the kind of estimate this one equation delivers immediately.

Figure
Enclosed-mass fraction M_r/M versus radius fraction r/R for two density laws: a uniform sphere gives M_r/M = (r/R)³, and a centre-heavy linear model ρ = ρ_c(1 − r/R) gives M_r/M = 4(r/R)³ − 3(r/R)⁴ with central density ρ_c = 4ρ̄; for the Sun ρ̄ = 1.41×10³ kg m⁻³
Where the mass lives: enclosed-mass fraction M_r/M vs r/R 0 0.25 0.5 0.75 1.0 0 0.5 1.0 radius fraction r/R enclosed-mass fraction M_r/M 0.62R 0.79R uniform (r/R)³ linear 4(r/R)³ − 3(r/R)⁴ half the mass sits inside 0.62R for the centre-heavy model, 0.79R when uniform

The core equations

The differential equation is the local statement of mass conservation: the rate at which enclosed mass grows with radius equals the density times the surface area of the sphere at that radius. It is the workhorse form, used at every point in a stellar model.

dMrdr=4πr2ρ(1)\frac{\mathrm{d}M_r}{\mathrm{d}r}=4\pi r^2\rho \qquad (1)

where: MrM_r — mass enclosed within radius rr; rr — radial distance from the stellar centre; ρ=ρ(r)\rho=\rho(r) — local mass density; 4πr24\pi r^2 — surface area of a sphere of radius rr. Read it as: each shell contributes its own volume 4πr2 dr4\pi r^2\,\mathrm{d}r times what is packed into it. Integrating (1) from the centre out accumulates the running total, and evaluating at the surface r=Rr=R returns the whole stellar mass. This is the global statement — the total mass is the volume integral of the density profile.

Mr=∫0r4πr′2 ρ(r′) dr′(2)M_r=\int_0^r 4\pi r'^2\,\rho(r')\,\mathrm{d}r' \qquad (2)

where: r′r' — dummy integration variable running from the centre to rr; ρ(r′)\rho(r') — the density profile. Setting r=Rr=R gives M=∫0R4πr′2ρ dr′M=\int_0^R 4\pi r'^2\rho\,\mathrm{d}r', the total mass. Because a star's total mass barely changes over its life while its radius can swing by factors of hundreds, it is far more convenient to make enclosed mass the independent variable. Inverting (1) does exactly this and produces the Lagrangian form.

drdMr=14πr2ρ(3)\frac{\mathrm{d}r}{\mathrm{d}M_r}=\frac{1}{4\pi r^2\rho} \qquad (3)

where: MrM_r — now the independent coordinate, labelling each mass shell; rr — the radius of the shell that encloses mass MrM_r. Every zone keeps a fixed mass label as the star expands or contracts, which is why evolution codes prefer it. All of the above are the static, spherical shadow of the general law of mass conservation in a moving fluid, which keeps the time-derivative and the full divergence of the mass flux ρv\rho\mathbf{v}.

∂ρ∂t+∇ ⁣⋅(ρv)=0(4)\frac{\partial\rho}{\partial t}+\nabla\!\cdot(\rho\mathbf{v})=0 \qquad (4)

where: ρ\rho — mass-density field; v\mathbf{v} — fluid velocity field; tt — time. The stellar equation is the case v=0\mathbf{v}=0, ∂tρ=0\partial_t\rho=0 with spherical symmetry. A single number falls out of (2) immediately: divide the total mass by the total volume and you get the mean density, the crudest but most useful one-number summary of how tightly a star is packed.

ρˉ=M43πR3=3M4πR3(5)\bar{\rho}=\frac{M}{\tfrac{4}{3}\pi R^3}=\frac{3M}{4\pi R^3} \qquad (5)

where: ρˉ\bar\rho — volume-averaged density; MM — total mass; RR — stellar radius. Real stars are far denser at the centre than ρˉ\bar\rho, so this is a floor on the central density, not an estimate of it. Finally, feeding MrM_r into hydrostatic equilibrium and changing variable with (3) yields the mass-coordinate momentum equation — the companion structure equation, shown here to make the coupling explicit.

dPdMr=−GMr4πr4(6)\frac{\mathrm{d}P}{\mathrm{d}M_r}=-\frac{GM_r}{4\pi r^4} \qquad (6)

where: PP — pressure; GG — Newton's gravitational constant; MrM_r — enclosed mass, supplied by mass continuity. Without equation (1) there is no MrM_r to place in the numerator, so (6) cannot even be written down on its own.

Derivation AShell by shell from mass conservation

The goal is to obtain the differential equation dMr/dr=4πr2ρ\mathrm{d}M_r/\mathrm{d}r = 4\pi r^2\rho directly from the physical statement that the mass added between rr and r+drr+\mathrm{d}r is the density there times the volume of the shell, and to show that this is exactly the Fundamental Theorem of Calculus applied to the enclosed-mass integral, so that differentiating and integrating are inverse operations here as everywhere else. We assume spherical symmetry throughout, so density depends only on radius, ρ=ρ(r)\rho=\rho(r), and there is no angular dependence to integrate over.

Step 1. Define enclosed mass as the volume integral of density over the ball of radius rr: Mr=∫0r4πr′2ρ(r′) dr′M_r=\int_0^r 4\pi r'^2\rho(r')\,\mathrm{d}r', where the factor 4πr′24\pi r'^2 is the area of the sphere at radius r′r' and dr′\mathrm{d}r' its thickness. Why: spherical symmetry lets the three-dimensional volume integral collapse to a single radial integral over spherical shells, each of volume 4πr′2 dr′4\pi r'^2\,\mathrm{d}r'.

Step 2. Add one more shell of thickness dr\mathrm{d}r at radius rr. To first order in dr\mathrm{d}r the extra mass is Mr+dr−Mr=ρ(r) 4πr2 drM_{r+\mathrm{d}r}-M_r = \rho(r)\,4\pi r^2\,\mathrm{d}r; the neglected terms are of order dr2\mathrm{d}r^2 (the shell's own curvature and the density's variation across it) and vanish in the limit. Why: over an infinitesimally thin shell the density is effectively constant and the shell's volume is area times thickness, so its mass is just ρ⋅4πr2⋅dr\rho\cdot 4\pi r^2\cdot\mathrm{d}r.

Step 3. Divide by dr\mathrm{d}r and take the limit: dMrdr=lim⁡dr→0Mr+dr−Mrdr=4πr2ρ\dfrac{\mathrm{d}M_r}{\mathrm{d}r}=\lim_{\mathrm{d}r\to0}\dfrac{M_{r+\mathrm{d}r}-M_r}{\mathrm{d}r}=4\pi r^2\rho. This is the derivative of the integral in Step 1 — the integrand evaluated at the upper limit. Why: differentiating an accumulated quantity returns the local rate of accumulation, which is the whole meaning of the continuity equation as a conservation law. *Verified: differentiating Mr=∫0r4πr′2ρ dr′M_r=\int_0^r 4\pi r'^2\rho\,\mathrm{d}r' returns the integrand 4πr2ρ4\pi r^2\rho exactly, and the boundary values Mr(0)=0M_r(0)=0, Mr(R)=MM_r(R)=M are recovered.*

Go deeper · Derivation B · 1 minThe uniform sphere and the mean density
Derivation BThe uniform sphere and the mean density

The goal is to work the enclosed-mass integral all the way through for the one profile that makes it trivial — constant density — and in doing so to derive both the cubic growth law Mr∝r3M_r\propto r^3 and the mean-density formula ρˉ=3M/4πR3\bar\rho = 3M/4\pi R^3, then check the result against the Sun. This uniform model is crude (real stars are strongly centre-heavy) but it fixes the density scale of a star and is the springboard for every order-of-magnitude estimate of interior conditions. We set ρ(r)=ρ0\rho(r)=\rho_0, a constant, everywhere inside the star.

Step 1. Integrate continuity with ρ0\rho_0 pulled outside: Mr=∫0r4πr′2ρ0 dr′=4πρ0r33=43πr3ρ0M_r=\int_0^r 4\pi r'^2\rho_0\,\mathrm{d}r' = 4\pi\rho_0\dfrac{r^3}{3} = \tfrac{4}{3}\pi r^3\rho_0. Why: with density constant the integral is elementary, and the result is just density times the volume 43πr3\tfrac43\pi r^3 of the ball — enclosed mass grows as the cube of the radius.

Step 2. Evaluate at the surface to get the total mass: M=MR=43πR3ρ0M=M_R=\tfrac{4}{3}\pi R^3\rho_0. Why: the total mass is the enclosed mass at the outermost radius r=Rr=R, which closes the model.

Step 3. Solve for the density: ρ0=3M4πR3≡ρˉ\rho_0=\dfrac{3M}{4\pi R^3}\equiv\bar\rho. For a genuinely uniform star ρ0\rho_0 equals the mean density; for a real star this same expression defines ρˉ\bar\rho as the total mass spread over the total volume. Why: it converts two of a star's most directly measured properties — mass and radius — into a density, without any knowledge of the interior profile. *Verified: for the Sun, M⊙=1.989×1030 kgM_\odot=1.989\times10^{30}\,\mathrm{kg} and R⊙=6.96×108 mR_\odot=6.96\times10^{8}\,\mathrm{m} give ρˉ=1.41×103 kg m−3\bar\rho=1.41\times10^{3}\,\mathrm{kg\,m^{-3}}, the standard mean solar density (about 1.4 times water).*

Go deeper · Derivation C · 1 minPassing to the Lagrangian mass coordinate
Derivation CPassing to the Lagrangian mass coordinate

The goal is to change the independent variable from radius rr to enclosed mass MrM_r, showing that inverting the one-line continuity equation converts every structure equation to mass-coordinate form and, in the case of hydrostatic balance, makes the density cancel to leave the clean expression used in stellar-evolution codes. The pay-off is numerical: the mass domain 0≤Mr≤M0\le M_r\le M is essentially fixed over a star's life, whereas its radius can change by orders of magnitude, so a mass grid keeps every computational zone tied to a definite parcel of matter. We start from the Eulerian continuity equation (1) and the radius-form hydrostatic equation.

Step 1. Invert continuity directly: drdMr=(dMrdr)−1=14πr2ρ\dfrac{\mathrm{d}r}{\mathrm{d}M_r}=\left(\dfrac{\mathrm{d}M_r}{\mathrm{d}r}\right)^{-1}=\dfrac{1}{4\pi r^2\rho}, valid wherever ρ≠0\rho\neq0, i.e. everywhere inside the star. Why: making mass the independent variable requires the reciprocal derivative, and continuity is exactly the relation between the two, so no new physics is introduced.

Step 2. Apply the chain rule to hydrostatic equilibrium dP/dr=−GMrρ/r2\mathrm{d}P/\mathrm{d}r=-GM_r\rho/r^2: dPdMr=dPdrdrdMr=−GMrρr2⋅14πr2ρ\dfrac{\mathrm{d}P}{\mathrm{d}M_r}=\dfrac{\mathrm{d}P}{\mathrm{d}r}\dfrac{\mathrm{d}r}{\mathrm{d}M_r}=-\dfrac{GM_r\rho}{r^2}\cdot\dfrac{1}{4\pi r^2\rho}. Why: the chain rule threads the continuity factor dr/dMr\mathrm{d}r/\mathrm{d}M_r into every radius-form equation, which is all that "changing variable to MrM_r" means.

Step 3. Cancel the density: dPdMr=−GMr4πr4\dfrac{\mathrm{d}P}{\mathrm{d}M_r}=-\dfrac{GM_r}{4\pi r^4}. The ρ\rho from hydrostatic balance and the ρ\rho from continuity divide out exactly, leaving a form that depends on rr and MrM_r but not explicitly on ρ\rho. Why: the cancellation is algebraically exact and is precisely why the Lagrangian formulation is numerically well-behaved — the density, the most rapidly varying quantity, disappears from the momentum equation. *Verified: density cancellation is exact; the result matches the standard Lagrangian stellar-structure system (Kippenhahn, Weigert & Weiss, Ch. 9), and reduces to equation (6) above.*

Limiting cases

Special density profiles turn the enclosed-mass integral into something you can read off by eye, and each one teaches a different lesson about how mass concentrates.

CaseResultMeaning
Uniform densityMr=43πr3ρ0,M=43πR3ρ0M_r=\tfrac{4}{3}\pi r^3\rho_0,\quad M=\tfrac{4}{3}\pi R^3\rho_0Constant ρ0\rho_0; enclosed mass grows as r3r^3. Crude but sets the density scale — the source of ρˉ=3M/4πR3\bar\rho=3M/4\pi R^3.
Power law ρ∝r−α\rho\propto r^{-\alpha}Mr∝r3−α (α<3)M_r\propto r^{3-\alpha}\ (\alpha<3)For α<3\alpha<3 the central mass is finite; for α≥3\alpha\ge3 it diverges, signalling an unphysical singular core.
Isothermal-sphere tail ρ=A/r2\rho=A/r^2Mr=4πA rM_r=4\pi A\,rThe α=2\alpha=2 case: enclosed mass grows linearly. Models molecular-cloud cores and flat-rotation-curve dark-matter halos.
Point massMr→MM_r\to M for all r>0r>0All mass at the origin gives a Keplerian exterior; ρ\rho is a delta function and continuity is vacuous outside.
Boundary conditionsMr(0)=0,Mr(R)=MM_r(0)=0,\qquad M_r(R)=MThe two anchors that pin the integration of the full structure equations.

Worked examples

1 · Mean density of the Sun (confidence builder)

Estimate the Sun's mean density from its mass and radius, and say what it does and does not tell you about the core.

Step 1. Use equation (5). With M⊙=1.989×1030 kgM_\odot=1.989\times10^{30}\,\mathrm{kg} and R⊙=6.96×108 mR_\odot=6.96\times10^{8}\,\mathrm{m}, first the volume: 43πR⊙3=43π(6.96×108)3=1.41×1027 m3\tfrac{4}{3}\pi R_\odot^3=\tfrac{4}{3}\pi(6.96\times10^{8})^3=1.41\times10^{27}\,\mathrm{m^3}.

Step 2. Divide: ρˉ=M⊙43πR⊙3=1.989×10301.41×1027=1.41×103 kg m−3\bar\rho=\dfrac{M_\odot}{\tfrac43\pi R_\odot^3}=\dfrac{1.989\times10^{30}}{1.41\times10^{27}}=\mathbf{1.41\times10^{3}\ kg\,m^{-3}}, about 1.4 times the density of water.

Step 3. Interpret it. This is a volume average, and equation (2) makes clear it is dominated by the outer envelope where most of the volume is. The Sun's actual central density is roughly 1.5×105 kg m−31.5\times10^{5}\,\mathrm{kg\,m^{-3}} — some 100 times the mean — because the star is strongly centrally condensed. So ρˉ\bar\rho is a firm lower bound on the central density and a good scale-setter, but never a substitute for solving the structure equations. The Sun's mean density is 1.41×10³ kg m⁻³, roughly one-hundredth of its central value.

2 · A centre-heavy linear model (fully worked)

Take a toy star whose density falls linearly to zero at the surface, ρ(r)=ρc(1−r/R)\rho(r)=\rho_c\left(1-r/R\right), with ρc\rho_c the central density. Find Mr(r)M_r(r), the total mass, and the ratio of central to mean density. Then evaluate ρc\rho_c for the Sun.

Step 1. Integrate continuity (equation 2): Mr=∫0r4πr′2ρc(1−r′R)dr′=4πρc(r33−r44R)M_r=\int_0^r 4\pi r'^2\rho_c\left(1-\dfrac{r'}{R}\right)\mathrm{d}r' = 4\pi\rho_c\left(\dfrac{r^3}{3}-\dfrac{r^4}{4R}\right). Factoring, Mr=4πρcR3[13(r/R)3−14(r/R)4]M_r=4\pi\rho_c R^3\left[\tfrac13(r/R)^3-\tfrac14(r/R)^4\right], which in fractional form is Mr/M=4(r/R)3−3(r/R)4M_r/M = 4(r/R)^3-3(r/R)^4 — the blue curve in the second figure.

Step 2. Total mass at the surface r=Rr=R: M=4πρc(R33−R34)=4πρcR3⋅112=πρcR33M=4\pi\rho_c\left(\dfrac{R^3}{3}-\dfrac{R^3}{4}\right)=4\pi\rho_c R^3\cdot\dfrac{1}{12}=\mathbf{\dfrac{\pi\rho_c R^3}{3}}.

Step 3. Compare with the mean density from equation (5): ρˉ=3M4πR3=34πR3⋅πρcR33=ρc4\bar\rho=\dfrac{3M}{4\pi R^3}=\dfrac{3}{4\pi R^3}\cdot\dfrac{\pi\rho_c R^3}{3}=\dfrac{\rho_c}{4}. So ρc=4ρˉ\boxed{\rho_c=4\bar\rho} — this model concentrates the centre to four times the mean, a genuine improvement on the uniform sphere but still far short of reality.

Step 4. Put in numbers for the Sun. With ρˉ=1.41×103 kg m−3\bar\rho=1.41\times10^{3}\,\mathrm{kg\,m^{-3}} from Example 1, the model predicts ρc=4ρˉ=5.6×103 kg m−3\rho_c=4\bar\rho=\mathbf{5.6\times10^{3}\ kg\,m^{-3}}. The true solar central density is about 1.5×105 kg m−31.5\times10^{5}\,\mathrm{kg\,m^{-3}}, so even a centre-heavy linear law underestimates the real concentration by a factor of ∼27\sim27. The lesson: the Sun is far more centrally condensed than any simple polynomial density law — its core is dense because a realistic equation of state and the steep run of pressure demand it.

3 · Enclosed mass of a singular isothermal sphere

A dark-matter halo (or a self-gravitating gas cloud) has ρ(r)=A/r2\rho(r)=A/r^2. How does the enclosed mass run with radius?

Step 1. Integrate: Mr=∫0r4πr′2Ar′2 dr′=4πA∫0rdr′=4πA rM_r=\int_0^r 4\pi r'^2\dfrac{A}{r'^2}\,\mathrm{d}r'=4\pi A\int_0^r\mathrm{d}r'=\mathbf{4\pi A\,r}. The r′2r'^2 in the shell volume cancels the r′−2r'^{-2} in the density, leaving a constant integrand.

Step 2. So Mr∝rM_r\propto r: enclosed mass grows linearly, without limit as r→∞r\to\infty (the profile must be truncated at a finite radius). A test particle orbiting at radius rr then feels vcirc2=GMr/r=4πGA=constv_{\rm circ}^2=GM_r/r=4\pi GA=\text{const} — a flat rotation curve, which is exactly why this profile is the textbook first model for the dark matter inferred around spiral galaxies.

Physics of the portrait

The mass continuity equation of a star is one static, spherical instance of a law older than astrophysics itself: the conservation of mass in a moving fluid, first written in the form we still use by Leonhard Euler.

Origins · 1 minLeonhard Euler and how this was discovered
LE
Leonhard Euler
1707–1783 · the continuity equation of fluid dynamics

The continuity equation is the oldest of the conservation laws written in the differential language of fields, and it is Euler's. In his 1757 memoir Principes généraux du mouvement des fluides, Euler set out the equations of an ideal fluid — the momentum equations that bear his name, and alongside them the statement that mass is neither created nor destroyed as the fluid flows, ∂tρ+∇ ⁣⋅(ρv)=0\partial_t\rho+\nabla\!\cdot(\rho\mathbf{v})=0. It was among the first partial differential equations of mathematical physics, and it encodes a deceptively simple idea: the rate at which density piles up at a point is minus the net rate at which mass streams away from it. Every later conservation law — of charge, of probability in quantum mechanics, of energy in a flowing medium — is cast in this same continuity form. When astrophysicists in the nineteenth and twentieth centuries built the first mathematical stars, they took Euler's equation, switched off the flow, and imposed spherical symmetry, and out fell dMr/dr=4πr2ρ\mathrm{d}M_r/\mathrm{d}r=4\pi r^2\rho. J. Homer Lane in 1870 and Robert Emden in 1907 turned such gas spheres into the polytrope models, Eddington assembled the coupled structure equations in the 1920s, and Chandrasekhar gave them their modern form — but the mass equation at their base is Euler's continuity law, seen in the mirror of a static, spherical star.

History
1757
— Euler publishes the general equations of fluid motion, including mass continuity
1870
— Lane treats the Sun as a gaseous sphere in equilibrium, founding the theory of polytropes
1907
— Emden's Gaskugeln systematizes polytropic gas spheres and their structure
1926
— Eddington's The Internal Constitution of the Stars sets out the coupled structure equations
1939
— Chandrasekhar's An Introduction to the Study of Stellar Structure gives the modern formulation

Going further

Texts. Carroll & Ostlie, An Introduction to Modern Astrophysics, 2nd ed., Ch. 10 (equations of stellar structure) · Kippenhahn, Weigert & Weiss, Stellar Structure and Evolution, 2nd ed., Ch. 9 (the Lagrangian formulation) · Binney & Tremaine, Galactic Dynamics, 2nd ed., Ch. 2 (potential theory and enclosed mass) · Dodelson, Modern Cosmology, 2nd ed. (the continuity equation and conservation laws) · Ryden, Introduction to Cosmology, 2nd ed. (continuity for the cosmic fluid).

Provenance. The mass equation and its role among the structure equations follow Carroll & Ostlie Ch. 10; the Lagrangian mass-coordinate formulation and the exact density cancellation in equation (6) follow Kippenhahn, Weigert & Weiss Ch. 9; the general continuity equation ∂tρ+∇ ⁣⋅(ρv)=0\partial_t\rho+\nabla\!\cdot(\rho\mathbf{v})=0 is Euler's, as recorded in Binney & Tremaine, Dodelson, and Ryden. A verifier should confirm: (1) differentiating Mr=∫0r4πr′2ρ dr′M_r=\int_0^r 4\pi r'^2\rho\,\mathrm{d}r' returns 4πr2ρ4\pi r^2\rho; (2) the uniform sphere Mr=43πr3ρ0M_r=\tfrac43\pi r^3\rho_0 and ρˉ=3M/4πR3\bar\rho=3M/4\pi R^3; (3) the mean solar density ρˉ=1.41×103 kg m−3\bar\rho=1.41\times10^{3}\,\mathrm{kg\,m^{-3}} from M⊙=1.989×1030 kgM_\odot=1.989\times10^{30}\,\mathrm{kg}, R⊙=6.96×108 mR_\odot=6.96\times10^{8}\,\mathrm{m}; (4) the linear-model results M=πρcR3/3M=\pi\rho_c R^3/3 and ρc=4ρˉ\rho_c=4\bar\rho; (5) ρ∝r−2⇒Mr∝r\rho\propto r^{-2}\Rightarrow M_r\propto r; (6) density cancellation giving dP/dMr=−GMr/4πr4\mathrm{d}P/\mathrm{d}M_r=-GM_r/4\pi r^4.

Prerequisites. Density and spherical geometry · Newton's shell theorem. Leads to. Hydrostatic Equilibrium in Stars · Equations of Stellar Structure · Energy Generation Equation · Virial Theorem for Stars.

Ask the tutor: Want to see how mass continuity and hydrostatic equilibrium lock together to predict a star's central pressure — or how a MESA model marches this equation on a mass grid? Ask and we'll work it through.

Why is the surface area factor 4πr² and not something else?

Because a sphere of radius rr has surface area 4πr24\pi r^2, and a thin shell at that radius is essentially that surface swept through a small thickness dr\mathrm{d}r. Its volume is therefore area times thickness, 4πr2 dr4\pi r^2\,\mathrm{d}r, and its mass is that volume times the local density. The r2r^2 is the geometric heart of the equation: it says a shell far from the centre, though the same thickness as a shell near the centre, encloses vastly more volume and so — at equal density — vastly more mass. This is exactly why most of a star's volume lives in its outer layers even when most of its mass is deep inside.

What is the difference between the Eulerian and Lagrangian forms?

They are the same physics seen through two choices of independent variable. The Eulerian form dMr/dr=4πr2ρ\mathrm{d}M_r/\mathrm{d}r=4\pi r^2\rho asks "how does enclosed mass change as I step outward in radius?" — natural if you are standing at a fixed point in space. The Lagrangian form dr/dMr=(4πr2ρ)−1\mathrm{d}r/\mathrm{d}M_r=(4\pi r^2\rho)^{-1} asks "how does radius change as I step outward through successive shells of mass?" — natural if you follow a fixed parcel of gas. For a static star either works; for an evolving star the Lagrangian view wins, because the parcels of matter persist while the radius they sit at drifts, and computing on a fixed mass grid conserves mass automatically.

Does the mean density formula tell me the density at the centre?

No — and treating it as if it did is a classic error. The mean density ρˉ=3M/4πR3\bar\rho=3M/4\pi R^3 is the total mass divided by the total volume, a single average dominated by the roomy outer envelope. Real stars are strongly centrally condensed: the Sun's central density is about 1.5×105 kg m−31.5\times10^{5}\,\mathrm{kg\,m^{-3}}, roughly a hundred times its mean of 1.41×103 kg m−31.41\times10^{3}\,\mathrm{kg\,m^{-3}}. So ρˉ\bar\rho is best read as a firm lower bound on the central density and a convenient scale-setter for order-of-magnitude estimates. The actual central value comes only from integrating the full set of structure equations with a proper equation of state.

When does the static equation fail, and what replaces it?

It fails whenever the gas is genuinely moving — a collapsing protostellar cloud, a pulsating Cepheid, a supernova, an accreting envelope. In all these cases the velocity field v\mathbf{v} is not zero and the density at a point changes with time, so you must keep the full law ∂tρ+∇ ⁣⋅(ρv)=0\partial_t\rho+\nabla\!\cdot(\rho\mathbf{v})=0. The static stellar form is the approximation valid when the star changes slowly compared with its dynamical (free-fall) time — true for nearly all of a star's main-sequence and giant life, but emphatically not during dynamical events. The rule of thumb: if the timescale you care about is longer than the sound-crossing or free-fall time, the static equation is safe.

How is this equation actually one of "four" equations of stellar structure?

The four are mass continuity (dMr/dr=4πr2ρ\mathrm{d}M_r/\mathrm{d}r=4\pi r^2\rho), hydrostatic equilibrium (dP/dr=−GMrρ/r2\mathrm{d}P/\mathrm{d}r=-GM_r\rho/r^2), energy generation (dLr/dr=4πr2ρ ε\mathrm{d}L_r/\mathrm{d}r=4\pi r^2\rho\,\varepsilon), and energy transport (dT/dr\mathrm{d}T/\mathrm{d}r by radiation or convection). Mass continuity is the one that supplies MrM_r, which appears in the gravity term of hydrostatic balance — so the first two are inextricably coupled. Add an equation of state relating PP, ρ\rho and TT, plus opacity and nuclear-reaction physics, and four boundary conditions (Mr=0M_r=0 and Lr=0L_r=0 at the centre, P→0P\to0 and a temperature condition at the surface), and the system determines the star's entire interior structure uniquely.

Why does the density cancel in the mass-coordinate hydrostatic equation?

Because ρ\rho enters twice with opposite roles. Hydrostatic balance in radius form carries a factor of ρ\rho in its gravity term (dP/dr=−GMrρ/r2\mathrm{d}P/\mathrm{d}r=-GM_r\rho/r^2), and the change of variable from rr to MrM_r brings in dr/dMr=1/(4πr2ρ)\mathrm{d}r/\mathrm{d}M_r=1/(4\pi r^2\rho), which carries ρ\rho in its denominator. Multiplying them, the two densities divide out exactly, leaving dP/dMr=−GMr/4πr4\mathrm{d}P/\mathrm{d}M_r=-GM_r/4\pi r^4 with no explicit ρ\rho. This is more than an algebraic curiosity: the density is the fastest-varying quantity in a star, spanning many orders of magnitude, so removing it from the momentum equation is a large part of why the Lagrangian formulation is so numerically well-behaved.

Where this leads