Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

Work, heat and the First Law

Two ways of changing a system, pushing on it and warming it, look nothing alike, and the whole of the First Law rests on the discovery that they are interchangeable currencies of the same quantity.

Work, from mechanics to thermodynamics

Mechanics defines work as force acting through a displacement: if a force F moves its point of application a distance dx along its own line, the work done is Fdx. Nothing in that definition mentions temperature, gases or equilibrium, and it carries into thermodynamics unchanged. What changes is only that the force is now exerted by, or against, the boundary of a system.

Take the standard case: a gas in a cylinder closed by a frictionless piston of area A. The gas presses on the piston face with force pA, where p is the pressure at the boundary, and if the piston moves outward by dx the gas has done pAdx of work on its surroundings. The volume swept out is Adx, which is the increase dV in the gas volume. Substituting, the work done by the gas is pdV, and the work done on the gas is the negative of it:

δW=-pdV

The sign needs a decision, and this lesson makes it once and keeps it. Work done on the system is positive. Compress a gas and dV is negative, so δW is positive: you have put energy in, and the sign says so. Heat added to the system is positive on the same convention, and the First Law reads ΔU=Q+W. The alternative treats work done by the system as positive, giving ΔU=Q-W, and much of the engineering literature uses it, because engineers are usually selling the work a machine produces rather than paying for the work done on it. Neither is more correct. What is fatal is switching between them halfway through a problem.

Two conditions hide in the derivation. First, p must be the pressure at the moving boundary, and only in a quasi-static process, slow enough that the gas stays uniform, is that the pressure of the gas as a whole. Burst a diaphragm and let a gas rush into a vacuum and it does no work at all, because there is nothing at the boundary to push against. Second, -pdV can only be integrated once the path p(V) is known: the work is the area under the curve traced on a pressure-volume diagram, and two curves between the same endpoints enclose different areas.

The work done by an expanding gas as the area under its path on a pressure-volume diagram, with the region between the curve and the volume axis shaded from the initial volume to the final volume.
The work done by an expanding gas as the area under its path on a pressure-volume diagram, with the region between the curve and the volume axis shaded from the initial volume to the final volume.

Example. A gas is compressed at a constant pressure of 150 kPa from 3.0 L to 1.2 L. How much work is done on the gas?

At constant pressure the integral is just W=-pΔV. Here ΔV=(1.2-3.0)×10-3=-1.8×10-3 m³, so W=-(1.5×105)(-1.8×10-3)=+270 J. The volume shrank, the surroundings pushed the piston in, and the positive sign says energy went into the gas, exactly as the convention promises.

Now you. A gas expands at a constant pressure of 250 kPa from 2.0 L to 5.0 L. How much work is done on the gas?

Answer

ΔV=(5.0-2.0)×10-3=+3.0×10-3 m³, so W=-(2.5×105)(3.0×10-3)=-750 J. The gas expanded, so the work done on it is negative: it delivered 750 J to the surroundings.

Work that is not pdV

It is easy to leave a first course believing that thermodynamic work means a piston. The piston is one instance of a general pattern: work is always an intensive quantity, a generalised force, multiplied by the change in an extensive quantity, a generalised displacement.

Stir a liquid with a paddle wheel and the shaft does work on it through the torque it exerts, δW=τdθ. Notice what this pair cannot do: a paddle can put energy into a fluid, but no arrangement of paddles will pull it back out of a still fluid and lift the weight again. Pass a current through a resistor immersed in the system and the electrical work in time dt is EIdt. Stretch a wire by dL against tension F and the work is FdL, positive now rather than negative, because tension and extension point the same way while pressure resists expansion. Increase the area of a liquid film by dA against surface tension γ and the work is γdA. So ΔU=Q-pdV is not the First Law but a special case of it, valid when the only work is boundary displacement, and forgetting the other terms is how a perfectly good energy balance ends up not balancing.

Caloric, and why it had to die

For most of the eighteenth century heat was understood as a substance. Caloric was an invisible, weightless, self-repelling fluid that flowed from hot bodies to cold ones, and the theory was not foolish: it explained why heat runs downhill in temperature, since caloric particles repel and spread out, and it explained thermal expansion, since adding fluid to a body should swell it. Joseph Black's distinction between temperature and quantity of heat, and his discovery of latent heat in the 1760s, were made in caloric language and are still correct. Lavoisier listed caloric among the chemical elements in 1789, and Sadi Carnot's 1824 analysis of heat engines assumed that caloric passes through an engine undiminished.

The fatal property of caloric is that, being a substance, it must be conserved. You can move it, concentrate it or release it from where it lies latent, but you cannot make it. That is what Benjamin Thompson, Count Rumford, attacked at the Munich arsenal in 1798. Supervising the boring of brass cannon, he noticed that the process produced heat without apparent end: as long as the horses turned the borer, heat kept coming. He immersed a cannon blank and its borer in water and, by friction alone, brought it to a boil in about two and a half hours, with no fire anywhere near it.

The measurements he made to close the loopholes matter more than the boiling water. If the metal were releasing stored caloric its capacity to hold heat should have changed, so he compared the specific heat of the borings with that of the parent metal and found no difference. If caloric were a substance it should weigh something, so he weighed bodies hot and cold and found no change. Above all the supply was inexhaustible, and, as he wrote, anything which an insulated body can continue to furnish without limitation cannot possibly be a material substance. His own conclusion, that heat is a form of motion, was not accepted quickly: he could show caloric was wrong without saying what the exchange rate was between the work the horses did and the heat that appeared.

Joule and the mechanical equivalent of heat

James Prescott Joule, a Manchester brewer's son with good instruments and an obsessive standard of care, spent 1843 to 1850 measuring that exchange rate by as many independent methods as he could contrive: forcing water through narrow tubes, compressing air, running current through a resistance (which gave him the law I2R). Each gave a similar figure, and their agreement was the argument.

The famous apparatus is the paddle wheel. Two weights on cords fall a measured height, turning a spindle carrying vanes that stir water inside an insulated copper vessel fitted with fixed baffles, so the water is churned rather than spun. The energy input is known exactly: mgh for the falling weights, corrected for the small kinetic energy they retain at the bottom and for friction in the pulleys. The output is a temperature rise, and the difficulty is that the rise is tiny. Joule was resolving a few hundredths of a degree Fahrenheit with mercury thermometers he had calibrated himself, at a time when that precision was close to unheard of.

His 1850 paper gives the mechanical equivalent of heat as 772.692 foot-pounds of work per British thermal unit, about 4.159 joules per calorie against a modern 4.1855 for the 15 degree calorie, low by roughly six parts in a thousand. The significance is not the digits but the claim behind them: a fixed amount of work always produces the same amount of heat, whatever mechanism converts it. Heat is not a substance. It is energy in transit, and work is the same energy arriving by a different route.

Adiabatic work, and where internal energy comes from

Joule's result can be turned into a definition, and this is the honest route into the First Law, because it introduces heat as a derived quantity rather than assuming everyone already knows what heat is.

Start with an adiabatic process, one in which the system is thermally insulated so that its only interaction with the surroundings is work. That can be said without mentioning heat: an adiabatic boundary is one across which the state of the system is unaffected by anything outside except displacement of the boundary itself. Now take two equilibrium states, 1 and 2, and connect them adiabatically in every way you can devise: stir a fluid, compress it, run a current through a resistor inside it, do all three in various orders. The experimental finding, Joule's finding generalised, is that the work required is the same for every adiabatic path. Churn a kilogram of water from 20 to 21 degrees, or compress it, or heat it electrically; the same 4.18 kilojoules are needed each time.

A quantity whose change is the same along every path is the difference of a function of state. So define the internal energy U by

ΔU=U2-U1=Wad

the adiabatic work between the two states. This fixes U up to an additive constant, exactly as gravitational potential energy is fixed only up to a choice of zero. Note what has been achieved: U is a property of the state, while work is a property of a process.

Now remove the insulation and take the system between the same two states by some other route. The state change is the same, so ΔU is the same, but the measured work W is generally different. Energy has crossed the boundary by a route that is not work, and that quantity is what we define heat to be:

QΔU-W

Heat is not assumed, not defined by feeling warm, and not a fluid. It is the residual: the amount by which the actual work falls short of the adiabatic work between the same two states. Calorimetry and the rest follow from that definition plus a way of measuring work.

The First Law and inexact differentials

Rearranged, the definition becomes the statement usually called the First Law of Thermodynamics:

ΔU=Q+W

The energy of a closed system changes by exactly the heat added to it plus the work done on it, and by nothing else: no third channel, no leak. The law is a definition of U plus one empirical claim, the path independence of adiabatic work, and that claim is what makes U exist as a state function. It cannot be proved from mechanics. It is a summary of what experiment has never contradicted in nearly two centuries of looking.

Example. A gas absorbs 850 J of heat while a piston compresses it, doing 300 J of work on it. What is ΔU?

On this lesson's convention both entries are positive as given: heat in is positive, work done on the system is positive. So ΔU=Q+W=850+300=+1150 J. The internal energy rises by 1150 J, and it does not matter in what order or by what mechanism the two contributions arrived.

Now you. A gas loses 420 J of heat to its surroundings while 640 J of work is done on it. What is ΔU?

Answer

Heat leaves, so Q=-420 J; work is done on the system, so W=+640 J. Then ΔU=-420+640=+220 J. The internal energy rises even though the gas is losing heat, because the work put in more than covers the loss.

The differential form exposes the asymmetry. Write it as dU=δQ+δW, with a d on the left and a δ on the right. The d marks an exact differential: dU is the differential of a function that exists, U(T,V), so integrating it between two states gives U2-U1 regardless of route. The δ marks an inexact one. No function Q of the state has δQ as its differential: it makes no sense to ask how much heat a system contains, only how much crossed its boundary during a process. Writing ΔQ is therefore a category error.

The cyclic integral makes the distinction concrete. Take a system round a closed loop back to its starting state. Since U depends on the state alone,

dU=0

always, for every cycle, in every substance. But δQ need not vanish, and in a working engine it had better not: an engine runs precisely because it absorbs more heat over a cycle than it rejects. What the First Law demands is that the two inexact integrals cancel, δQ=-δW. Over one cycle the net heat absorbed equals the net work delivered, which is the entire budget of every engine ever built.

Perpetual motion of the first kind

A perpetual motion machine of the first kind is a device that runs in a cycle and delivers net work while absorbing no net heat: energy from nothing, forever. The First Law kills it in one line. Round a cycle dU=0, so δQ=-δW, and if no net heat is absorbed then no net work can be delivered. A machine returned to its initial state has no store left to draw on, because U is back where it started. The argument runs both ways: accept that no cyclic device can create energy and you can reconstruct the existence of U.

Be clear about what the law does not forbid, because it forbids less than beginners expect. It has no objection to a machine that takes heat from the ocean and turns all of it into work, with the books balancing perfectly. Such a device, a perpetual motion machine of the second kind, would power a ship from seawater and violate no conservation principle. That it is nonetheless impossible needs a second, independent law, which is where this course goes shortly.

Two paths, one state change

Here is the whole lesson in numbers. Take one mole of an ideal monatomic gas at T1=300 K and p1=200 kPa, so V1=RT1/p1=(8.314)(300)/(2.00×105)=1.2471×10-2 m³, or 12.47 litres. Bring it to state 2 with V2=2.4942×10-2 m³ at T2=300 K, so p2=100 kPa. Since the temperature of an ideal gas fixes its internal energy, ΔU=0 for this state change whatever route is taken.

Path A, reversible isothermal expansion. Hold the gas at 300 K and let it expand slowly against a pressure matched to its own at every instant, with p=RT/V. Then W=-pdV=-RTln(V2/V1). With RT=(8.314)(300)=2494.2 J and ln2=0.6931, the work is WA=-1728.9 J. Since ΔU=0, the First Law gives QA=+1728.9 J: the gas absorbs 1729 J of heat and hands every joule straight out as work.

Path B, expand at constant pressure, then cool at constant volume. Hold p at 200 kPa and expand from V1 to V2: the work is W=-pΔV=-(2.00×105)(1.2471×10-2)=-2494.2 J, and the temperature at the end of the leg is T=pV2/R=(2.00×105)(2.4942×10-2)/8.314=600 K. For a monatomic ideal gas ΔU=32RΔT=(1.5)(8.314)(300)=3741.3 J, so Q=ΔU-W=6235.5 J, which the check Q=CpΔT=52(8.314)(300) confirms. Now cool at fixed volume from 600 K back to 300 K, dropping the pressure to 100 kPa. No volume change means no work, so W=0 and Q=ΔU=-3741.3 J.

Add the legs: WB=-2494.2 J and QB=6235.5-3741.3=+2494.2 J. The work differs from path A by 765 J, more than forty per cent, and so does the heat. Yet ΔU=Q+W is zero on both. Neither Q nor W is a property of the endpoints, and their sum is nothing else.

Example. 2.0 mol of an ideal gas at 350 K expands reversibly and isothermally from 10.0 L to 30.0 L. Find W and Q.

The method is path A's. For a reversible isothermal expansion W=-nRTln(V2/V1), and with nRT=(2.0)(8.314)(350)=5819.8 J and ln3=1.0986, W=-6393.7 J. The temperature is unchanged, so for an ideal gas ΔU=0, and the First Law gives Q=ΔU-W=+6393.7 J: every joule of heat absorbed leaves again as work.

Now you. 0.50 mol of an ideal gas at 400 K expands reversibly and isothermally from 5.0 L to 20.0 L. Find W and Q.

Answer

nRT=(0.50)(8.314)(400)=1662.8 J and ln(20/5)=ln4=1.3863, so W=-nRTln(V2/V1)=-2305.1 J. Since ΔU=0 at constant temperature, Q=+2305.1 J.

That is the result the rest of the subject is built on, and it leaves an obvious question. The constant-pressure leg needed 6235.5 J for a 300 K rise, while the constant-volume leg gave up only 3741.3 J over the same 300 K, a ratio of exactly 5/3. What a temperature change costs depends on what is held fixed while you make it, and the bookkeeping for constant-pressure processes is tidy enough to deserve a state function of its own. That function is enthalpy, and it is next.