In thermodynamics, work performed by a system is the energy transferred by the system to another that is accounted for by changes in the external generalized mechanical constraints on the system. As such, thermodynamic work is a generalization of the concept of mechanical work in physics.
The external generalized mechanical constraints may be chemical, electromagnetic, (including radiative), gravitational or pressure/volume or other simply mechanical constraints, including momental, as in radiative transfer. Thermodynamic work is defined to be measurable solely from knowledge of such external macroscopic constraint variables. These macroscopic variables always occur in conjugate pairs, for example pressure and volume, magnetic flux density and magnetization, mole fraction and chemical potential. In the SI system of measurement, work is measured in joules (symbol: J). The rate at which work is performed is power.
It is customary to calculate amount of energy transferred as work through quantities external to the system of interest, and thus belonging to its surroundings. Nevertheless, for historical reasons, the customary sign convention is to consider work done by the system on its surroundings as positive. Although all real physical processes entail some dissipation of kinetic energy, it is matter of principle that the dissipation that results from transfer of energy as work occurs only inside the system; energy dissipated outside the system, in the process of transfer of energy, is not counted as thermodynamic work. Thermodynamic work does not account for any energy transferred between systems as heat.
Mechanical thermodynamic work is performed by actions such as compression, and including shaft work, stirring, and rubbing. In the simplest case, for example, there are work of change of volume against a resisting pressure, and work without change of volume, known as isochoric work. An example of isochoric work is when an outside agency, in the surrounds of the system, drives a frictional action on the surface of the system. In this case the dissipation is not necessarily actually confined to the system, and the quantity of energy so transferred as work must be estimated through the overall change of state of the system as measured by both its mechanically and externally measurable deformation variables (such as its volume), and its non-deformation variable (usually internal to the system, for example its empirical temperature, regarded not as a temperature but simply as a mechanically measurable variable). In a process of transfer of energy by work, the internal energy of the final state of the system is then measured by the amount of adiabatic work of change of volume that would have been necessary to reach it from the initial state, such adiabatic work being measurable only through the externally measurable mechanical or deformation variables of the system, but including also full information about the forces exerted by the surroundings on the system during the process. In the case of some of Joule's measurements, the process was so arranged that heat produced outside the system by the frictional process was practically entirely transferred into the system during the process, so that the quantity of work done by the surrounds on the system could be calculated as shaft work, an external mechanical variable. For closed systems, internal energy changes in a system other than as work transfer are as heat.
Work, i.e. "weight lifted through a height", was originally defined in 1824 by Sadi Carnot in his famous paper Reflections on the Motive Power of Fire. Specifically, according to Carnot:
- We use here motive power (work) to express the useful effect that a motor is capable of producing. This effect can always be likened to the elevation of a weight to a certain height. It has, as we know, as a measure, the product of the weight multiplied by the height to which it is raised.
In 1845, the English physicist James Joule wrote a paper On the mechanical equivalent of heat for the British Association meeting in Cambridge. In this work, he reported his best-known experiment, in which the work released through the action of a "weight falling through a height" was used to turn a paddle-wheel in an insulated barrel of water.
In this experiment, the friction and agitation of the paddle-wheel on the body of water caused heat to be generated which, in turn, increased the temperature of water. Both the temperature change ∆T of the water and the height of the fall ∆h of the weight mg were recorded. Using these values, Joule was able to determine the mechanical equivalent of heat. Joule estimated a mechanical equivalent of heat to be 819 ft•lbf/Btu (4.41 J/cal). The modern day definitions of heat, work, temperature, and energy all have connection to this experiment.
The first law of thermodynamics relates changes in the internal energy of a closed thermodynamic system to two forms of energy transfer, as heat and as work. Essential to the thermodynamic concept of work is that the energy transfer in fictive principle be able to occur at a finite rate without any of it necessarily being dissipated by friction or chemical degradation, which are necessarily dissipative. A thermodynamic dissipative process is one in which energy, internal, bulk flow kinetic, or system potential, is transduced from some initial form to some final form, the capacity to do mechanical work of the final form being less that that of the initial form. For example, transfer of energy as heat is dissipative because it is a transfer of internal energy from a body at one temperature to a body at a lower temperature. The second law of thermodynamics implies that this reduces the capacity of that internal energy to do mechanical work.
The concept of thermodynamic work is more general than that of simple mechanical work because it includes other types of energy transfers as well. Thermodynamic work is strictly and fully defined by its external generalized mechanical variables. The other form of energy transfer between closed systems is as heat. Heat is measured by change of temperature of a known quantity of calorimetric material substance; it is of the essence of heat transfer that it is not mediated by the external generalized mechanical variables that define work. This distinction between work and heat is essential to thermodynamics.
Work refers to forms of energy transfer between closed systems that can be accounted for in terms of changes in the external macroscopic physical constraints on the system, for example energy which goes into expanding the volume of a system against an external pressure, by driving a piston-head out of a cylinder against an external force. The electrical work required to move a charge against an external electrical field can be measured.
This is in contrast to heat, which is the energy that is transported or transduced as the microscopic thermal motions of particles and their associated inter-molecular potential energies, or by thermal radiation. There are just two forms of macroscopic heat transfer between closed systems: conduction, and thermal radiation. There are several forms of dissipative transduction of energy that can occur internally within a system at a microscopic level, such as friction including bulk and shear viscosity, chemical reaction, unconstrained expansion as in Joule expansion and in diffusion, and phase change; these are not transfers of heat between systems. Convection of internal energy is a form a transport of energy but not, as sometimes mistakenly supposed (a relic of the caloric theory of heat), a form of heat transfer, because convection is not in itself a microscopic motion of microscopic particles or their intermolecular potential energies, or photons, nor is it a form of work.
Formal definition 
In thermodynamics, the quantity of work done by a closed system on its surroundings is defined by factors strictly confined to the interface of the surroundings with the system and to the surroundings of the system, for example an extended gravitational field in which the system sits, that is to say, to things external to the system. There are a few especially important kinds of thermodynamic work.
A simple example of one of those important kinds is pressure-volume work. The pressure of concern is that exerted by the surroundings on the surface of the system, and the volume of interest is the negative of the increment of volume gained by the system from the surroundings. It is usually arranged that the pressure exerted by the surroundings on the surface of the system is well defined and equal to the pressure exerted by the system on the surroundings. This arrangement for transfer of energy as work can be varied in a particular way that depends on the strictly mechanical nature of pressure-volume work. The variation consists in letting the coupling between the system and surroundings be through a rigid rod that links pistons of different areas for the system and surroundings. Then for a given amount of work transferred, the exchange of volumes involves different pressures, inversely with the piston areas, for mechanical equilibrium. This cannot be done for the transfer of energy as heat because of its non-mechanical nature.
Another important kind of work is isochoric work, that is to say work that involves no eventual overall change of volume of the system between the initial and the final states of the process. Examples are friction on the surface of the system as in Rumford's experiment; shaft work such as in Joule's experiments; and slow vibrational action on the system that leaves its eventual volume unchanged, but involves friction within the system. Isochoric work for a body in its own state of internal thermodynamic equilibrium is done only by the surroundings on the body, not by the body on the surroundings, so that the sign of isochoric work with the present sign convention is always negative.
When work is done by a closed system that cannot pass heat in or out because it is adiabatically isolated, the work is referred to as being adiabatic in character. Adiabatic work can be of the pressure-volume kind or of the isochoric kind, or both.
According to the first law of thermodynamics for a closed system, any net increase in the internal energy U must be fully accounted for, in terms of heat δQ entering the system and the work δW done by the system:
The letter d indicates an exact differential, expressing that internal energy U is a property of the state of the system; they depend only on the original state and the final state, and not upon the path taken. In contrast, the Greek deltas (δ's) in this equation reflect the fact that the heat transfer and the work transfer are not properties of the final state of the system. Given only the initial state and the final state of the system, one can only say what the total change in internal energy was, not how much of the energy went out as heat, and how much as work. This can be summarized by saying that heat and work are not state functions of the system.
The minus sign in front of indicates that a positive amount of work done by the system leads to energy being lost from the system. This is the sign convention for work in many textbooks on physics. This sign convention entails that a non-zero quantity of isochoric work always has a negative sign, because of the second law of thermodynamics.
(An alternate sign convention is to consider the work performed on the system by its surroundings as positive. This leads to a change in sign of the work, so that . This is the convention adopted by many modern textbooks of physical chemistry.)
Pressure-volume work 
Pressure-volume work, (or PV work) occurs when the volume, V of a system changes. PV work is often measured in units of litre-atmospheres , where 1L·atm = 101.325J. However the litre-atmosphere is not a recognised unit in the SI system of units, which measures P in Pascal (Pa), V in m3 and PV in Joule (J), where 1 J = 1 Pa-m3. PV work is an important topic in chemical thermodynamics.
denotes an infinitesimal increment of work done by the system;
denotes the pressure inside the system and outside the system, against which the system expands; the two pressures are practically equal for a reversible process;
denotes the infinitesimal increment of the volume of the system.
denotes the work done by the system during the whole of the reversible process.
The first law of thermodynamics can then be expressed as
(In the alternate sign convention where W = work done on the system, , but is unchanged.)
Path dependence 
As for all kinds of work, in general PV work is path-dependent and is therefore a thermodynamic process function. The statement that a process is reversible and adiabatic serves as a specification of the path, but does not determine the path uniquely, because the path can include several slow goings backward and forward in volume, as long as there is no transfer of energy as heat. The first law of thermodynamics states . For an adiabatic process, and thus the integral amount work done is equal to the change in internal energy. For a reversible adiabatic process, the integral amount of work done during the process depends only on the initial and final states of the process, and is the one and the same for every intermediate path.
If the process took a path other than an adiabatic path, the work would be different. This would only be possible if heat flowed into/out of the system. In a non-adiabatic process, there are indefinitely many paths between the initial and final states.
In another notation, δW is written đW (with a line through the d). This notation indicates that đW is not an exact one-form. The line-through is merely a flag to warn us there is actually no function (0-form) W which is the potential of đW. If there were, indeed, this function W, we should be able to just use Stokes Theorem to evaluate this putative function, the potential of đW, at the boundary of the path, that is, the initial and final points, and therefore the work would be a state function. This impossibility is consistent with the fact that it does not make sense to refer to the work on a point in the PV diagram; work presupposes a path.
Free energy and exergy 
The amount of useful work which may be extracted from a thermodynamic system is determined by the second law of thermodynamics. Under many practical situations this can be represented by the thermodynamic availability, or Exergy, function. Two important cases are: in thermodynamic systems where the temperature and volume are held constant, the measure of useful work attainable is the Helmholtz free energy function; and in systems where the temperature and pressure are held constant, the measure of useful work attainable is the Gibbs free energy.
See also 
- Guggenheim, E.A. (1985). Thermodynamics. An Advanced Treatment for Chemists and Physicists, seventh edition, North Holland, Amsterdam, ISBN 0444869514.
- Jackson, J.D. (1975). Classical Electrodynamics, second edition, John Wiley and Sons, New York, ISBN 047143232X.
- Konopinski, E.J. (1981). Electromagnetic Fields and Relativistic Particles, McGraw-Hill, New York, ISBN 007035264X.
- Essex, C., Kennedy, D.C., Bludman, S.A. (2005). "The nonequilibrium thermodynamics of radiation interaction", Chapter 12, pages 603-626 in Variational and Extremum Principles in Macroscopic Systems, ed. S. Sieniutycz, H. Farkas, Elsevier, Amsterdam, ISBN 0080444881.
- North, G.R., Erukhimova, T.L. (2009). Atmospheric Thermodynamics. Elementary Physics and Chemistry, Cambridge University Press, Cambridge (UK), ISBN 9780521899635.
- Kittel, C. Kroemer, H. (1980). Thermal Physics, second edition, W.H. Freeman, San Francisco, ISBN 0716710889.
- Buchdahl, H.A. (1966). The Concepts of Classical Thermodynamics, Cambridge University Press, London, p. 40.
- Bailyn, M. (1994). A Survey of Thermodynamics, American Institute of Physics Press, New York, ISBN 0-88318-797-3, pp. 35–36.
- Joule, J.P. (1845) "On the Mechanical Equivalent of Heat", Brit. Assoc. Rep., trans. Chemical Sect, p.31, which was read before the British Association at Cambridge, June
- G.J. Van Wylen and R.E. Sonntag, Fundamentals of Classical Thermodynamics, Chapter 4 - Work and heat, (3rd edition)
- Prevost, P. (1791). Mémoire sur l'equilibre du feu. Journal de Physique (Paris), vol 38 pp. 314-322.
- Planck, M. (1914). The Theory of Heat Radiation, second edition translated by M. Masius, P. Blakiston's Son and Co., Philadephia, 1914.
- Kondepudi, D. (2008). Introduction to Modern Thermodynamics, John Wiley and Sons, Chichester, ISBN 978-0-470-01598-8.
- Rayleigh, J.W.S (1878/1896/1945). The Theory of Sound, volume 2, Dover, New York, 
- Tisza, L. (1966). Generalized Thermodynamics, M.I.T. Press, Cambridge MA, p. 37.
- Freedman,Roger A. and Young,Hugh D. (2008). 12th Edition. Chapter 19: First Law of Thermodynamics, page 656. Pearson Addison-Wesley, San Francisco.
- G.J. Van Wylen and R.E. Sonntag (1985), Fundamentals of Classical Thermodynamics, John Wiley & Sons, Inc., New York ISBN 0-471-82933-1