Thermodynamics is the branch of physical science which discusses the relation between heat and work. It forms the kernel of the modern doctrine of Energy (q.v.); for it was by the discovery that heat was energy and not matter that the conservation principle was established in its widest generality. Towards the end of the 18th century Davy and Rumford had independently shown that the caloric theory of heat was untenable. But it was not till thirty or forty years later that the scientific mind began to emancipate itself from this theory which regarded heat as an imponderable substance effecting thermal changes by combination with ordinary ponderable matter. With the early development of the true theory the names of Colding, Hirn, Joule, and Mayer are closely associated. The labours of Joule (q.v.) were particularly valuable, as he it was who first in 1843 obtained a really good measurement of the mechanical or dynamical equivalent of heat—that is, the amount of dynamical work which is equivalent to a given quantity of heat. This equivalent is commonly called Joule's Equivalent. By demonstrating experimentally that wherever energy in the dynamical form is lost an exact equivalent of heat is always obtained, Joule established what is known as the First Law of Thermodynamics. Briefly put, this law is the statement that heat is energy, and can be measured in the same units. When during any transformation of energy heat is generated, it is at the expense of an exact equivalence of energy in some other form. Or when, on the other hand, there is a disappearance of heat, an exact equivalence of energy in some other form or forms will appear.
It is a familiar fact that relative motion is destroyed by friction. But destruction of motion means loss of kinetic energy; and it is this lost energy which is transformed into the heat invariably produced by friction. There is no difficulty in effecting the transformation of other forms of energy into heat. It is impossible, indeed, to prevent some of the energy taking the form of heat whenever a transformation is effected—whenever, in other words, any change of physical conditions occurs. But whatever be the manner of the transformation, the first law of thermodynamics is found to be always fulfilled, the amount of heat generated is equivalent to the energy, in other forms, which has disappeared. Joule's earliest determination of the dynamical equivalent of heat differed by only per cent. from his latest, made in 1878. This last result has probably not been excelled in accuracy by any later experimenter. According to it the quantity of heat capable of raising the temperature of a pound of water, weighed in vacuo, from 60° to 61° Fahrenheit requires for its evolution an expenditure of work represented by the fall of 772.55 pounds through a distance of one foot at the sea-level at the latitude of Greenwich; or the dynamical equivalent of the unit of heat defined as above is 772.55 foot-pounds at Greenwich. The scientific unit of heat is now taken to be the amount of heat required to raise 1 gramme of water from 0° to 1° centigrade. Hence, reducing to the lower temperature and taking account of the change of thermometric scale, we get for the value of Joule's Equivalent 1391.8 foot-grammes or 42422 centimetre-grammes or ergs. We may assume these numbers to be correct to four significant figures.
To convert work into heat is an easy matter; but not so the reverse operation, to convert heat into work. This, however, is the function of all our heat engines, using the term in its widest sense as including steam-engines, gas-engines, and all machines which do work by combustion of fuel. It has long been recognised that such machines can work only when there is a difference of temperature. It matters not how much heat may be stored up in a body, it is practically impossible to utilise that heat as working energy unless we have a neighbouring body of lower temperature. But when a difference of temperature exists there is a constant passing of heat from the warmer to the colder body, so that the temperatures tend to become equalised. And thus the very nature of heat is such as to make it lose more and more of its availability for being transformed into useful work. Suppose, however, that it was possible to prevent heat from passing by conduction or diffusion from the warmer to the colder body, and that whatever heat was taken from the system during a suitable series of operations was altogether transformed into work, how does this transformability of the heat depend upon the temperatures? This is the question which is answered by the Second Law of Thermodynamics, the development of which is closely associated with the names of Carnot, Rankine, Clausius, and Thomson (Lord Kelvin).
Sadi Carnot (q.v.), in his famous Réflexions sur la Puissance du Feu (1824), clearly laid down the lines along which the complete theory must be developed. His own argument was vitiated by the assumption of the then accepted caloric theory of heat. But we know from his posthumous papers published in 1878 that Carnot himself had, before his premature death in 1832, recognised that heat was energy, and had fully enunciated the First Law of Thermodynamics.
Besides sketching out a series of experiments almost identical with the valuable researches subsequently made by Joule and Kelvin, Carnot made an estimate of the dynamical equivalent of heat, which, though one-sixth too small, was more accurate than Mayer's made in 1842. Carnot is now recognised as one of the greatest scientific men of the century; and had he survived there is no doubt that the theory of heat would have been established nearly thirty years earlier than it was. Carnot's methods, as given in his book, were not appreciated till Kelvin in 1848 drew attention to them. Soon after Clausius, correcting the one flaw in Carnot's reasoning, established the Second Law on its modern basis. To Kelvin we owe the doctrine of the dissipation of energy and the definition of the absolute thermometric scale. By this is meant an energy method of measuring temperature, independent, that is, of the kind of substance used. See TEMPERATURE and THERMOMETER. To make this scale intelligible involves the discussion of Carnot's principle, which is virtually the second law.

The novel feature of Carnot's method was the invention of the cycle of operations, and especially the reversible cycle. An engine or working substance will have passed through a cycle of operations when all its parts have recovered exactly those physical conditions (volume, pressure, temperature, and the like) which they had at the beginning. It is only when such a cycle has been completed that we have any right to reason about the transformations of energy which have taken place during the progress of the operations which constitute the cycle. For simplicity take as working substance a definite quantity of air contained in a chamber, whose volume may be varied indefinitely by the outward or inward motion of a piston. We shall assume that the walls of this chamber can be made either perfectly impervious to heat or perfectly diathermanous. When in this latter condition the substance is to be kept in contact with another substance at the same constant temperature. Volume and pressure changes, which take place in this condition in the working substance, take place isothermally, there being no change of temperature. On the other hand, when the impervious condition is realised, whatever changes take place in the working substance take place adiabatically, there being no loss or gain of heat. When the temperature of air is kept constant we know by Boyle's law that the pressure varies inversely as the volume. This relation and all similar relations may be represented graphically by means of a curve, every point of which denotes a definite state of pressure and volume. Such a curve is called an isothermal line. For any given mass of gas or air there will be a different isothermal line for each different temperature. If we trace a series of isothermals, we can at a glance determine any one of the quantities, temperature, pressure, volume, when the other two are given. In the figure two isothermals, AB, CD, corresponding to temperatures S and T, are shown. T is supposed to be the higher temperature. Volume is measured horizontally from the origin O, and pressure vertically. The lines CA, DB are supposed to be adiabatic lines. They show how volume and pressure vary with one another when heat is allowed neither to leave nor to enter the substance. Just as along each isothermal the temperature is constant, so along each adiabatic there is a quantity called the entropy, which remains constant. Adiabatic lines are also called isentropic. To pass from one isotherm to another we must change the temperature. In like manner, to pass from one adiabatic to another we must change the entropy.
Begin with the working substance in the state A — i.e. with volume , pressure , and temperature S. Compress adiabatically till the temperature rises to T and the state C is reached. In this first operation a definite amount of work is done, but no heat is gained or lost. Next, let the substance expand isothermally to any state D, doing work and at the same time taking in heat from the source, which is kept permanently at the temperature T. In the third operation let the substance expand adiabatically until the temperature falls to S and the state B is reached. In this operation a definite amount of work is done by the substance. Finally, compress the substance isothermally until the original state A is reached. Here work is done on the substance, and heat is given out to the refrigerator, which is kept permanently at temperature S. The cycle is now complete. The work done by the working substance or engine is represented by the area ACDB; and this work done must be equivalent to the heat which has disappeared. If units of heat are taken in in the second operation (CD), and units of heat given out in the fourth (BA), must be greater than , and the difference will be dynamically equivalent to the work () done by the engine. Now if the engine is reversible in Carnot's sense, it will be possible to go round the cycle in the opposite direction, reversing all the physical processes involved, and generating units of heat by the expenditure of units of work. Carnot's principle is that this reversibility is the test of a perfect engine. A more efficient engine than the reversible engine cannot exist. To prove this, let N be the reversible engine, and suppose that M is a more efficient engine than N. In other words, M can, with a given supply of heat, do more work than N. The units of heat taken in by M during the cycle will be transformed into units of work; and of these units will be changed back into units of heat by the reversible engine, N, working backwards. Thus in a complete double cycle units of work will be done, while the heat originally taken from the source at temperature T has been restored to it. To account for this overplus of work we must suppose an equivalent of heat to be taken from the refrigerator at temperature S. Hence if a more efficient engine than the reversible engine existed it would be possible to do work by means of heat taken from the refrigerator. By taking as refrigerator any limited part of the universe, we should be able to cool that part until all heat was removed from it, and so to obtain from it useful work. Such a result is contradicted by all our experience. Hence we conclude that the reversible engine is the perfect engine.
Returning to the cycle of operations, we see that units of heat are taken in at the temperature T, and units given out at the temperature S; and by experience we know that and T are greater than and S respectively. Kelvin's absolute scale of temperature is obtained by defining T and S such that their ratio is the same as and , or
this gives .
Now is the ratio of the usefully transformed heat to the whole heat supplied, and is called the efficiency of the engine. Hence the greatest possible efficiency of a heat engine is measured by the ratio of the difference of temperatures of the source and refrigerator to the temperature of the source. This absolute scale is found to be in close accordance with the scale of the air thermometer; and its zero, as determined by Kelvin and Joule, lies centigrade below the freezing-point of water. Thus a perfect engine working between temperatures to C. would have an efficiency of , or little more than one-fourth. Practically it will hardly exceed half this value.
Now looking back to the diagram we see that is the heat taken in as we pass from the adiabatic CA to the adiabatic DB along the isotherm T, and similarly that is the heat taken in as we pass between the same adiabatics along the isotherm S. But , and the same ratio is given by whatever isotherm—i.e. at whatever temperature—we may pass between the adiabatics. We may therefore take this ratio to be the amount by which the entropy increases as we pass from the one adiabatic to the other. The universal tendency of heat is to pass by conduction or radiation from the warmer to the colder body. If, then, units of heat pass from a body at temperature to a body at temperature , the warmer body will lose entropy to the amount , and the colder will gain entropy . being smaller than , the gain will be greater than the loss, and hence the entropy of the system will increase by the amount . Thus we have Clausius' theorem that the entropy of the universe tends to a maximum. Kelvin's view is slightly different. His doctrine of the dissipation or degradation of energy, otherwise the loss of motivity, will be found discussed under ENERGY. Maxwell has pointed out that if we could deal with the individual molecules of gaseous matter, it would be possible without expenditure of work to raise the temperature of one region and lower that of another, in contradiction to the second law of thermodynamics. Thus it appears that the second law stands on a distinctly different footing from the first law. Its basis is really to be found in the fact that we can deal with molecules of matter only in the aggregate and statistically, and not individually. That it is, nevertheless, essentially involved in many of the processes of nature is shown by the remarkable results which have been obtained by its means. Its consequences have been developed by Rankine, James Thomson, Kelvin, and Clausius, and in later times by Massieu, Gibbs, Helmholtz, and others. Thermo-electricity, radiation, capillarity, the conditions of equilibrium of heterogeneous bodies, the co-existence of different states of the same body, and generally the interrelations of electricity, magnetism, heat, and light, all give interesting illustrations of the second law of thermodynamics.
See Maxwell's Theory of Heat and Tait's Heat for elementary discussion of the subject, and Tait's Thermodynamics for the historical aspect. Bayne's Thermodynamics and Parker's Elementary Thermodynamics (1891) are the only formal treatises in English. J. J. Thomson's Applications of Dynamics to Physics and Chemistry (1888) contains the solution of many complex problems. Clausius' and Kelvin's original papers are still the most important in all thermodynamic literature.