# Relation between central density and mass of ZAMS stars

Let's compare ZAMS stars with different mass and equal composition. Higher mass might produce higher central density (and pressure) because more gas is pulled inwards and compresses the center. But this seems to be simplistic: very low mass stars have an electron degenerate core and are fully convective, which isn't true for heavy stars. The temperature profile in a massive star isn't the same as in the Sun. Assuming constant density throughout the star gives an equation for the central density depending on the mass, but the assumption isn't realistic. So it isn't obvious how the central density depends on the stellar mass.

My questions:

(1) how does the central density depend on the total mass for ZAMS stars with the same composition? Is the relation monotonic? A diagram would be welcome.

(2) is the relation between central pressure and total mass the same as for the central density?

The central density decreases with increasing mass; from about 600 g/cm$$^3$$ at $$0.1 M_{\odot}$$, to about 10 g/cm$$^3$$ at $$7M_{\odot}$$.
The central gas pressure also decreases with increasing mass; from about $$10^{16}$$ Pa at $$0.1 M_{\odot}$$ to $$10^{14}$$ Pa at $$7M_{\odot}$$.
Note that it's quite tricky to pin this information down. The ZAMS is normally defined as the state where the star is mostly powered by hydrogen fusion. This occurs at different ages for different masses, so you can't just use an isochrone. The link above uses this definition, but I suspect the numerical resolution is not that great and may account for some "lumpiness" in the relation. There may be a little kink at around $$1.5M_{\odot}$$ where there is a transition from the pp chain to the CNO cycle as the dominant energy generation mechanism. Note also that my estimate for the central pressure in low-mass stars will be a bit off because I used the perfect gas law, but below $$0.3M_{\odot}$$ electron degeneracy becomes increasingly important.