Thermodynamics is a branch of physics concerned with heat and temperature and their relation to energy and work. It defines macroscopic variables, such as internal energy, entropy, and pressure, that partly describe a body of matter or radiation. It states that the behavior of those variables is subject to general constraints, that are common to all materials, not the peculiar properties of particular materials. These general constraints are expressed in the four laws of thermodynamics. Thermodynamics describes the bulk behavior of the body, not the microscopic behaviors of the very large numbers of its microscopic constituents, such as molecules. Its laws are explained by statistical mechanics, in terms of the microscopic constituents.
Thermodynamics applies to a wide variety of topics in science and engineering.
Historically, thermodynamics developed out of a desire to increase the efficiency and power output of early steam engines, particularly through the work of French physicist Nicolas Léonard Sadi Carnot (1824) who believed that the efficiency of heat engines was the key that could help France win the Napoleonic Wars. Irish-born British physicist Lord Kelvin was the first to formulate a concise definition of thermodynamics in 1854.
"Thermo-dynamics is the subject of the relation of heat to forces acting between contiguous parts of bodies, and the relation of heat to electrical agency."
Initially, thermodynamics, as applied to heat engines, was concerned with the thermal properties of their 'working materials' such as steam, in an effort to increase the efficiency and power output of engines. Thermodynamics later expanded to the study of energy transfers in chemical processes, for example to the investigation, published in 1840, of the heats of chemical reactions by Germain Hess, which was not originally explicitly concerned with the relation between energy exchanges by heat and work. From this evolved the study of Chemical thermodynamics and the role of entropy in chemical reactions.