Why did the sun get hot?

From a straight dope article, but not really a comment on it:

So I get why nuclear fusion causes heat output. But how does being condensed cause heat? Sorry if this is a dumb question.

Try it yourself.

Find a car tire in need of air and a bicycle pump. Casually hold the pump cylinder and roughly gauge its base temperature. Attach the pump hose to the tire in order to fill the tire. Pump vigorously for 60 seconds. Feel the pump cylinder again with your hand. Warmer?

If you need the actual formula … Compressor - Wikipedia

That doesn’t really explain why.

That happens because of friction not pressure. The piston goes up and down in the tube and rubs on the sides. For all the pressure that’s created in the pump, you have just as much vacuum when you pull back up on it, that would cool it back down. Also, by your logic, the item you’re inflating would heat up just as much since there’s the same amount of pressure in that as there is in the pump.

The sun would have heated up due to the enormous pressure. Same reason the center of the Earth is molten.

So why does pressure cause it to heat up?

The short answer is gases don’t just condense on their own and the energy required to condense them can’t just disappear afterwords.

Imagine that instead of a cloud of gas in space the proto-sun is instead gas in a well insulated container (vacuum is a pretty good insulator). If you press down on a piston to compress the gas you’ve done work to the gas and the gas now has more energy. And since the container is insulated the gas can’t just let the heat flow out into the rest of the universe.

Now the sun wasn’t compressed by an external pressure but instead by its own gravity but the concept is similar. The molecules of gas reduced their gravitational potential energy and gained kinetic energy.

Charles’s law: a drop in volume of a sample of gas (in this case a a drop in volume caused by the rise in pressure caused by the gravity of the gas itself) causes the temperature to go up. Ultimately the explanation of Charles’ Law itself (and related gas laws, such as Boyle’s) depends on a statistical understanding of how the molecules in the gas are moving.

That’s a little out of my jurisdiction at 12:40 in the morning. If you Google things like “physics gas laws” or “pressure gas laws” and throw in words like ‘ideal’ and ‘mass’ you’ll end up with more then you want to know about it. But basically all it comes down to is that if you compress a gas it gets hot, that’s how diesel engines run without spark plugs. That’s how this demonstration works.

You don’t have to watch the whole thing, but basically, he’s just showing you that when the air inside is compressed that much it gets hot enough to ignite the cloth that he put in the tube. It’s a neat little science demo to prove something you know should work, in theory.

So gravity creates energy? But the gravity isn’t going anywhere, so it just creates energy on and on and on? If I press down on a piston, I’m adding kinetic energy to it, no? But if I have an atom, the gravity of the atom… what, just creates extra energy infinitely?

(Edited: I’m not actually sure my answer is correct, I’ll leave it for someone more expert.)

No. This is not correct. It is due to pressure. It would happen in a “perfect” piston with no friction.

It’s not infinite, but all matter in the universe carries a tremendous amount of potential energy by virtue of it being (mostly) widely separated. When a cloud of gas condenses into a star, a tiny portion of that potential energy is converted to kinetic energy, and eventually heat.

On the off chance that the universe ultimately collapses in a big crunch, all of that potential energy will get converted to some other form. In the meantime, various processes like neutron starts, black holes, galactic mergers, and so on will recover a small fraction of it.

If it helps, think of the opposite scenario - releasing gas from a pressurised container such as a CO2 fire extinguisher or spray can - it gets cold - energy is absorbed by the expansion and phase change(latent heat of vaporisation).

Nm.

No you don’t. The pump admits more air at atmospheric pressure when you pull the piston back - at least, I wouldn’t buy an air pump that didn’t. Also, the pressure in the pump exceeds the pressure in the tyre, or you wouldn’t be getting any air into the tyre.

One way to see the relationship between pressure and temperature is to look at the way temperature changes with altitude.

Local effects can temporarily alter this, but in general, near the surface of the earth temperature decreases with altitude at the rate of 3 degrees C (5.4 degrees F) per thousand feet - as pressure decreases. This is why mountains can be snow-capped while valleys are warm.

The atoms possess gravitational potential energy because:

  1. they exert an attractive force on each other due to gravity,

AND

  1. they are separated from each other.

Gravity (item #1) doesn’t create energy by itself; you need gravity and separation. Rock sitting on the ground? Zero potential energy. Lift that rock over your head, and you have done mechanical work on it, increasing its gravitational potential energy by separating it from the earth.

Same deal with a giant cloud of hydrogen atoms out in space. They’re all attracted to each other due to their own gravity. Get enough of them in one region, and the gravitational attraction starts to pull them together. They accelerate toward each other, i.e. the gravitational energy is being converted to kinetic energy on an atom-by-atom basis. Eventually, they’re hauling ass and start banging into each other. The gravitational field gets more intense as they get closer together, so they really start hauling ass. kinetic energy, at the level of the individual atom/molecule, manifests as heat (at the bulk level, it manifests as pressure).

Nope, not due to friction. It’s due to adiabatic compression. When you push on the pump piston, you are doing mechanical work; that energy manifests as heat in the gas that is being compressed. There are thermodynamic equations that will tell you, based on starting pressure/temperature and final pressure, what the final temperature will be; mechanical friction is not part of this equation.

Adiabatic compression is why diesel engines work. It’s why the outlet tube between an electric compressor and its tank can get hot enough to give you a third-degree burn. On the flip side, adiabatic expansion is why CO2 fire extinguishers emit a mix of solid CO2 and cold CO2 gas; it’s also why, when you remove the valve core from your tire, you can actually develop frost on the valve stem. It’s also why clouds form: warm moist air rises, experiences a drop in pressure, and cools off to the point where the moisture in it condenses.

I thought the center of the Earth was hot because of radioactivity, rather than pressure. Which is it really?

It’s certainly both. The centre of the earth was hot ab initio for pretty much the same reason that stars are hot before they start to fuse – the compression from it’s formation convert gravitational potential energy to heat. This is supplemented by heat from radioactivity in the earth, in the same way that fusion supplements the heat of formation in stars.

Yeah, ab initio, as you say, but if it wasn’t for the radioactivity it would have cooled way down long, long ago.