# Thermodynamic Work

Thermodynamic work done by or on a gas is equal to $-P_{\rm{out}}\cdot{\rm\Delta}V$.
Work (w) is the force (F) acting on a body multiplied by distance ($\Delta d$) along which that force is applied.
$w=F\cdot\Delta d$
Work is measured in joules (J), which is equivalent to newton meters (N·m). Work is a change in energy. Consider a gas in a piston, assuming the mass of the piston and friction are both negligible. Under normal conditions, the air outside the system applies force on the piston, pushing it down. At the same time, the gas inside applies force on the piston, pushing it up. These forces balance each other, and there is no net force on the piston. In this condition, the magnitude of the pressure of the gas inside (Pg) is equal to the magnitude of the air pressure outside (Pout). Pg and Pout have the same magnitude, but they have opposite directions. Therefore, $P_{\rm{g}}=-P_{\rm{out}}$.

#### Pressure-Volume Work

If the gas is heated, its particles will move faster, which increases the pressure in a fixed-volume container. Heating the gas causes the piston to rise. The pressure inside (Pg) remains equal to the pressure outside (Pout). Consider the initial equation for work, $w=F\cdot{\rm\Delta} d$. In this case, the pressure of the expanding gas is applying a force on the surface area (A) of the piston. F is equal to Pg multiplied by A.
$w=P_{g}A\Delta d$
At the same time, $\Delta d$ is the distance the piston rises. It can be written as $\Delta h$.
$w=P_{g}A\Delta h$
Note that the term $A\Delta h$ is the surface area multiplied by the change in height. Area multiplied by height equals volume. Area multiplied by change in height is equal to the change in volume, or $\Delta V$.
$w=P_{g}\Delta V$
Traditionally, the work done by a piston is written in terms of the pressure the piston works against. Therefore, the term Pg is replaced by Pout, giving an equation that relates work and outside pressure.
$w=-P_{\rm{out}}\Delta V$
In this sign convention, when $\Delta V$ is positive, w is negative. This means that as the gas does work on its surroundings, it loses energy. The gas is doing work by pushing the piston and is losing energy in doing so. If $\Delta V$ is negative, w is positive. This means that if the surroundings do work on the gas, the gas gains energy. The gas is being compressed by the surroundings and is gaining energy while being compressed.