# Nebulas and Ideal Gas Equation confusion

I was wondering how stars form and watched this video: https://youtu.be/mkktE_fs4NA?t=18s The lady says:

"Gravity brings matter together. And when you bring matter together, when you squeeze things into smaller spaces, they necessarily heat up, it's a simple law of chemistry."

But if we look at PV=nRT, then temperature should go down.

I would really appreciate if someone could untangle things for me. Does the ideal gas law not apply for nebulas and I should be using thermodynamics, kinetic theory, or whatever other theory instead?

Also on a similar line, concerning PV=nRT, which is a 3-way relation (between pressure, volume and temperature), if we simply decrease the volume of a system (in this case the nebulae), how should we expect pressure and temperature to behave? (in which cases would only one of them increase/decrease, and in which cases would temperature decrease and pressure increase?)

I am rather looking for a model/theory based answer, in the sorts of "energy-work theorem is really what you should be looking at, and from this we can derive all of these situations... etc."

Does the ideal gas law not apply for nebulas

It's an approximate model and it works surprisingly well for a wide range of matter. There are better models, but it's probably "good enough" for your needs.

if we simply decrease the volume of a system (in this case the nebulae), how should we expect pressure and temperature to behave?

Think about why volume decreased : gravity compressed it.

That's an increase in pressure.

Temperature increases because the energy of the collapse has to go somewhere and it goes into the collision of the particles which generates heat.

I am rather looking for a model/theory based answer, in the sorts of "energy-work theorem is really what you should be looking at, and from this we can derive all of these situations... etc."

The study of the gravitational collapse of nebula is a pretty complex area of study but I think this page will give you some deeper understanding of the modeling of this process.

You'll note from that page that thermodynamics is involved.

That model does not involve any angular momentum (rotation), but that's another factor.

• Thanks! I guess my problem was forgetting about energy conservation then? I was thinking that if volume decreases, then according to PV=nRT only the pressure could compensate for this volume decrease without T increasing. But this would violate the energy conservation, in that work would be done on the system to decrease the volume, so heat should leave the system if we want T to stay the same. Is this correct? – samlaf Apr 7 '17 at 2:02