Two ways to heat a cup of water
Put a cup of water on a stove and it gets hotter. Now take the same cup, seal it, and shake it hard for ten minutes. It also gets hotter. Nothing touched a flame. The energy came out of your arms.
That is the whole starting point of thermodynamics. Energy can cross the boundary of a system in two different ways: as heat, which flows because one side is hotter than the other, and as work, which is a force pushing something through a distance. Once the energy is inside, the water has no memory of which door it came through. A joule delivered by a paddle wheel and a joule delivered by a Bunsen burner raise the temperature by exactly the same amount.
The last few lessons tracked energy sloshing between a capacitor and an inductor, where none of it was ever lost. Here energy is still conserved, but you now have to count a channel that mechanics ignored. This lesson is the bookkeeping for that count, and most of the difficulty is not the physics. It is signs.
The first law
Call the energy stored inside the system its internal energy . For a gas, this is the total kinetic energy of all the molecules jiggling about, plus whatever energy is stored in their mutual attraction. You almost never need its absolute value, only how much it changes.
Two things change it. Heat added to the system raises . Work done by the system on its surroundings lowers , because the system spent that energy pushing on the outside world. Conservation of energy then says the change in is what went in minus what went out:
That is the first law of thermodynamics. It is not a new principle; it is energy conservation with the heat channel written down explicitly.
Read the signs off the definitions every time. means heat flows into the system. means the system expands and pushes outward. A gas that is compressed does negative work, and then becomes a positive contribution to : squeeze a gas and it warms up, which is exactly what the equation says.
Chemistry books usually write the first law as , where their is the work done on the system. Both versions are right, and they describe the same physics with opposite bookkeeping. Pick one convention at the start of a problem and never swap mid-solution. In this course is always the work done by the gas.
A gas absorbs J of heat and does J of work on the surroundings. Then
If instead the surroundings compress the gas, doing 480 J of work on it, while the gas releases 610 J of heat, you must flip both signs to match the convention: J and J, so J. The gas loses energy overall.
Quick check
A gas is compressed and gives off heat at the same time. What is the sign of its change in internal energy?
Work is the area under the P–V curve
Where does the expression for come from? A gas sits in a cylinder under a piston of area , pressing outward with pressure . The force on the piston is . Let the piston move out a small distance . The gas does work
because is exactly the extra volume swept out. Add up all the little pieces:
So the work done by a gas is the area under its path on a – diagram. That single sentence is worth more than the integral sign. If the path is a straight line, you get the area of a trapezoid without doing any calculus.
Two consequences follow at once. If the volume does not change, the gas does no work at all, whatever the pressure. And if two different processes connect the same starting state to the same finishing state, the areas under them are different, so the work is different.
Here is the deep point hiding in that figure. is a state function: fix the gas and fix its pressure and volume, and is determined, no matter how the gas got there. So is the same for all three paths. But is clearly not the same. Since , the heat cannot be the same either. Heat and work are properties of a process, not of a state. Only their difference belongs to the gas.
That turns some awkward-looking problems into one line. A gas goes from A to B absorbing 900 J and doing 400 J of work, so J. Along a completely different route from A to B it does 700 J of work. The internal energy change must still be 500 J, so J. You never needed to know either path.
The same trick handles a closed cycle. If the gas returns to its starting state, exactly, so the net heat absorbed equals the net work done. A cycle that does 2300 J of net work must have absorbed 2300 J of net heat.
Worked example 1: a straight line on the diagram
A gas follows a straight line from to . Find the work done by the gas.
The path is a straight line, so the area under it is a trapezoid: average height times width. The average pressure is
The width is . So
The volume increased, the answer is positive, and the gas did work on the world. That sign check takes two seconds and catches most errors.
What the ideal gas keeps inside
For an ideal gas the molecules do not attract each other, so there is no energy stored in how far apart they are. All of is molecular kinetic energy, and that depends only on temperature. Pull the walls apart and the molecules spread out without slowing down.
Measure the heat needed to warm a gas at constant volume. No work is done, so all of it goes into , and you define the molar heat capacity at constant volume by , where is the number of moles. Then
and because depends on nothing but , this formula holds for every ideal gas process, not just the constant-volume one. got its subscript from how it is measured, not from where it may be used. For a monatomic gas ; for a diatomic gas near room temperature , with J/mol·K.
Now heat the same gas at constant pressure instead. It expands, doing work (from ), so you must supply the internal energy and the work:
Monatomic: . Diatomic: . Their ratio is and .
always. only at constant volume, and only at constant pressure. Confusing the first with the second is the single most common mistake in this topic.
Two moles of monatomic gas heated from 290 K to 410 K in a rigid tank: K, and J. The same gas heated at constant pressure from 300 K to 500 K instead does work J, and needs J to do it.
The four processes
Almost every problem is one of four special paths, or a chain of them.
Isochoric, constant volume. , so . Heat 2400 J into a sealed rigid tank and J.
Isobaric, constant pressure. and . Gas at Pa expanding from to m³ does J.
Isothermal, constant temperature. for an ideal gas, so , and every joule of heat that comes in leaves again as work. Here you do need the integral, with :
Three moles at 350 K going from 0.0200 to 0.0600 m³: J, and is the same 9586 J.
Adiabatic, no heat exchanged, . Either the walls are insulated or the process is too fast for heat to move. Then : the gas can only do work by cooling itself down. Combining with the ideal gas law gives the two relations you will use constantly,
Compress a monatomic gas () at 300 K from 0.0400 to 0.0100 m³. Then K. Nothing was heated. The piston did the work and the gas kept it.
Quick check
An insulated rigid box is split by a partition, with gas on one side and vacuum on the other. The partition breaks. What happens to the temperature of an ideal gas?
Worked example 2: adiabatic, then isothermal
One mole of monatomic gas (, ) starts at 300 K in 0.0200 m³. It expands adiabatically to 0.0800 m³, then is compressed isothermally back to 0.0200 m³. Find the total work done by the gas.
Two steps, so do them one at a time and add.
Step 1, adiabatic. Use constant with :
Since , the work is all paid out of internal energy:
Step 2, isothermal at 119.1 K. The volume goes from 0.0800 back down to 0.0200 m³, a factor of :
Negative, as it must be: the gas was compressed, so work was done on it.
Notice the gas ends at the same volume but a much lower temperature, and still came out ahead on work. The compression was cheap because it happened cold.
Heat that does not change the temperature
Not every joule of heat raises a temperature. Two more pieces of vocabulary close the gap.
The specific heat is the heat needed per kilogram per kelvin: . Water's is 4186 J/kg·K, which is enormous, and is why oceans moderate climate.
The latent heat is the heat needed to change phase at constant temperature. Melting takes , boiling takes . For water J/kg and J/kg. Melting 0.250 kg of ice at 0 °C takes J and leaves it at 0 °C still. All that energy went into breaking the crystal apart, not into speeding molecules up.
In an insulated container, energy is conserved with no heat leaking out, so the heat lost by the hot things equals the heat gained by the cold things. That is calorimetry, and it is the first law with .
Mechanical work counts as an input in exactly the same ledger. A paddle wheel doing 12000 J of work on 0.500 kg of insulated water raises its temperature by K. Nothing was heated; work was converted directly.
Worked example 3: steam into water
Steam at 100 °C is bubbled into 0.400 kg of water at 15.0 °C until the water reaches 50.0 °C. Find the mass of steam condensed. Use J/kg·K and J/kg.
First ask what the cold side needs:
Now the hot side, and this is the step people drop. A mass of steam does two things: it condenses at 100 °C, releasing , and then the resulting water cools from 100 °C to the final 50 °C, releasing . Both count:
Set them equal:
About 24 grams, which is a small amount of steam for a large temperature rise. Latent heat is big.
Forgetting that the condensed steam keeps cooling after it becomes water. If you use only you get 0.0259 kg, and the answer looks plausible enough to keep. Whenever a substance crosses a phase boundary, write the journey as a list of legs (warm to the boiling point, change phase, warm again) and give every leg its own term.
Recognising which tool a problem wants
The topic looks like a pile of formulas. It is really four questions asked in order.
Is the system a gas in a cylinder, or a lump of stuff being warmed? Gas in a cylinder means – work, and , and the four processes. A lump of stuff means , latent heats, and calorimetry. The words "insulated container", "final temperature" and "specific heat" point hard at the second.
Which word describes the path? "Rigid" or "sealed tank" means isochoric, . "Freely sliding piston" or "open to the atmosphere" means isobaric. "Held at constant temperature" or "slowly, in a bath" means isothermal, . "Insulated", "sudden" or " is given" means adiabatic, . Each one of those kills a term in the first law, and that is why the problem is solvable.
Is any mechanical energy being dumped in? A falling mass, a paddle wheel, a stirrer, a drill. Then the work done on the system is the energy source: compute it with mechanics, and feed it into the thermal ledger as heat would be. A block descending at constant speed converts all of this way.
Does anything change phase, or does the path not matter? A phase change means an term with no . And if the problem gives you two different paths between the same states, it is testing one thing only: is the same for both.
One more habit worth building. Before you touch a calculator, write down which of , and you know, which is zero, and which you want. The first law has three slots. Fill two and the third is free.
Next you will look at what temperature actually is at the molecular level, and where came from in the first place, in kinetic theory of gases.