Moving Boundary Work
Definition and Significance
Moving boundary work is the work done by or on a system when the system boundary physically moves, causing a change in volume. Think of a gas inside a piston-cylinder device: as the gas expands, it pushes the piston outward and does work on the surroundings. As the piston is pushed inward, the surroundings do work on the gas.
This type of work is central to closed system analysis because it's the primary mechanism by which a closed system exchanges energy as work with its surroundings.
A few key points to keep straight:
- The work equals the area under the process curve on a P-V diagram. This geometric interpretation comes up constantly in problems.
- Moving boundary work is a path function, not a state function. The amount of work depends on how the system gets from state 1 to state 2, not just on the endpoints themselves. Two different process paths between the same two states will generally produce different amounts of work.
- Sign convention: work done by the system (expansion) is positive; work done on the system (compression) is negative. This follows from the integral , since during expansion and during compression.
Factors Affecting Moving Boundary Work
For moving boundary work to occur at all, there must be a pressure difference between the system and its surroundings, and the boundary must be free to move.
The magnitude of the work depends on:
- The initial and final pressures and volumes of the system
- The process path connecting the two states (because work is path-dependent)
- The direction of the volume change: expansion () yields positive work, compression () yields negative work
Forms of Work in Closed Systems

Compression and Expansion Work
Compression and expansion work are simply the two directions of moving boundary work. In a piston-cylinder setup:
- Expansion work occurs when the gas pushes the piston outward, increasing the system volume. The system does work on the surroundings.
- Compression work occurs when an external force pushes the piston inward, decreasing the system volume. The surroundings do work on the system.
These are by far the most common forms of work encountered in closed system problems.
Other Forms of Work
Closed systems can also exchange energy through work modes that don't involve a moving boundary:
- Shaft work: Energy transferred by a rotating shaft crossing the system boundary, such as a paddle wheel or stirrer driven by an external motor. The shaft transmits torque and rotation into the system.
- Electrical work: Energy transferred when electrical current crosses the system boundary. A resistor inside the system being powered by an external source is a classic example: , where is voltage, is current, and is time.
- Stirring work: A specific case of shaft work where a paddle wheel or impeller agitates the fluid inside the system, transferring energy in through friction and mixing.
- Gravitational work: Work associated with raising or lowering the system's center of mass in a gravitational field. For most closed-system problems in this course, changes in elevation are negligible, but the concept applies when they aren't.
Each of these can appear alongside moving boundary work in the energy balance for a closed system.
Calculating Work in Thermodynamic Processes

General Equation and Specific Cases
The general expression for moving boundary work is:
To evaluate this integral, you need to know how pressure relates to volume along the process path. Here are the most common cases:
Constant pressure (isobaric) process: Since is constant, it comes out of the integral:
Constant volume (isochoric) process: If the volume doesn't change, everywhere, so:
No moving boundary work occurs, regardless of what happens to the pressure.
Polytropic process: The pressure and volume are related by (a constant), where is the polytropic exponent. Substituting into the integral and evaluating gives:
Different values of correspond to different process types: gives an isobaric process, gives an isothermal process (for an ideal gas), and (the specific heat ratio) gives an isentropic process.
Isothermal and PV Diagram Methods
Isothermal process (ideal gas): When temperature is constant, , which is the polytropic case with . The formula above doesn't apply when (division by zero), so you integrate directly:
This can also be written as since for an ideal gas (where is mass and is the specific gas constant).
PV diagram method: When the process path doesn't follow a neat equation, you can still determine work graphically. The work equals the area under the process curve on a P-V diagram. For expansion (moving right on the diagram), the area is positive work. For compression (moving left), the area is negative work.
This graphical approach is especially useful for:
- Piecewise processes (e.g., constant pressure followed by constant temperature)
- Processes given only as a plotted curve without an explicit relationship
- Comparing the work of different process paths between the same two states
Pressure, Volume, and Work in Closed Systems
Inverse Relationship and Boyle's Law
For a fixed mass of ideal gas at constant temperature, pressure and volume are inversely proportional. This is Boyle's Law:
If you double the volume, the pressure drops to half its original value, and vice versa. This relationship produces the familiar hyperbolic curves (isotherms) on a P-V diagram.
Boyle's Law is strictly valid only for ideal gases at constant temperature, but it captures the general tendency of real gases as well and provides the foundation for understanding isothermal processes.
PV Diagrams and Process Paths
PV diagrams are one of the most useful tools for visualizing and comparing thermodynamic processes. Here's how to read them:
- A horizontal line represents a constant-pressure (isobaric) process.
- A vertical line represents a constant-volume (isochoric) process, where no boundary work is done.
- A hyperbolic curve () represents an isothermal process for an ideal gas.
- Curves with steeper negative slopes generally correspond to polytropic processes with larger values of .
Because work is a path function, two processes connecting the same initial and final states can enclose a region on the PV diagram. The area of that enclosed region equals the difference in work between the two paths. This is a direct visual confirmation that work depends on the path, not just the endpoints.