What is the physics of a gas mass subject to gravity in space?

There are many formulas for atmospheric pressure on earth, but how does gas behave in free space?

I am thinking about why stars form. I am guessing that the gas density will influence pressure, as well as gravitational force. So both factors must determine if a given gas mass in a given volume in space will collapse into a star.

So a more well defined question would be: what is the relation between mass and volume in space (let's think about hydrogen only) so that this mass will collapse into a star (or at least forms a spherical body)?

A second question is: given a mass and volume so that the gas collapses into a spherical body, what is the pressure vs. distance from the center of the sphere?

Quite interesting I think!

Any ideas?

• This is all very available on google. But perhaps you want more comments, than equations, would you? – Py-ser Jun 25 '14 at 2:00
• SE is different than google right. Let's not discourage. :P – MycrofD Jun 26 '14 at 11:21

The formula for the change of pressure with altitude is the same-you need hydrostatic equilibrium. This means that at constant temperature and over small height differences (so gravity can be considered constant) the pressure falls exponentially with the scale height. You have $\frac {dp}{dz}=-{\rho g}$ You can compute the local $g$ by taking everything closer to the center as a point mass and ignoring all the mass outside the current radius. You can consider the compression adiabatic, but need to use the appropriate value of $\gamma$ in $PV^\gamma=k$ for the local temperature. Calculating the radiation is hard unless there is enough dust around, in which case the grains can be black bodies. If you assume rotational symmetry, you have a 2D problem, which you can model on a grid and step through.