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, beyond 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.
The basic results of thermodynamics rely on the existence of idealized states of thermodynamic equilibrium. 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, especially physical chemistry, chemical engineering and mechanical engineering.
Historically, the distinction between heat and temperature was studied in the 1750s by Joseph Black. Characteristically thermodynamic thinking began in the work of Carnot (1824) who believed that the efficiency of heat engines was the key that could help France win the Napoleonic Wars.
The 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 was later expanded to the study of energy transfers in chemical processes, such as 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.