Interactive physics simulator
Work Done by Gas: W = PΔV
Observe how expanding thermodynamic systems exert forces, move boundaries, and perform mechanical work on their surroundings. Study constant pressure, changing volume, and cyclic engine loops in real-time.
Thermodynamic Work Lab
Alter pressure, volume boundaries, and heating elements to see how molecules push physical boundaries and perform mechanical work.
Live Telemetry
- Pressure (P)
- 101.3 kPa
- Init Volume (Vi)
- 2.00 L
- Curr Volume (V)
- 2.00 L
- Change (ΔV)
- 0.00 L
- Displacement (Δx)
- 0.00 cm
- Lifting Force
- 101.3 N
- Work Done (W)
- 0.0 J
- Cylinder Press
- 101.3 kPa
- Volume (V)
- 50.0 mL
- Displacement (Δx)
- 0.00 cm
- Piston Force
- 0.0 N
- Scale Reading
- 0.0 N
- Work Done (W)
- 0.0 J
- Boiler Press
- 150.0 kPa
- Engine Speed
- 0 RPM
- Crank Angle
- 0°
- Instant Torque
- 0.00 Nm
- Energy Output
- 0.0 J
What is Work Done by a Gas?
In thermodynamics, work done by a gas represents the transfer of mechanical energy between a gas system and its surroundings. When a gas expands inside a container with a movable wall (such as a piston in a cylinder), it exerts an outward force due to collision pressure. As the gas pushes the boundary outward over a distance, it performs positive work on the surroundings:
This mechanical displacement removes energy from the gas molecules and transfers it into useful mechanical energy in the environment (such as lifting a weight or turning a crank). Conversely, when external forces compress the gas, work is done on the system, bringing energy into the gas and raising its temperature.
Deriving the Expansion Formula
The mechanical work done by a constant force moving an object is defined as:
Consider a cylinder with a movable piston of cross-sectional area A. The pressure P of the gas creates an outward force on the piston surface equal to:
If the gas expands and pushes the piston outward by a distance d (displacement Δx), the work done is:
Since the product of the cross-sectional area and the displacement equals the change in volume (ΔV = A · d), we arrive at the standard isobaric work equation:
The P-V Diagram & Shaded Area
Because pressure and volume are the fundamental variables in gas systems, thermodynamic states are plotted on a **P-V Diagram** (Pressure on the vertical axis, Volume on the horizontal axis).
For any thermodynamic path, the work done is mathematically defined by the integral:
On a P-V graph, this integral corresponds precisely to the **geometric area under the curve** representing the process path.
- Isobaric (constant P): The path is a horizontal line; area is a simple rectangle.
- Isothermal (constant T): Pressure drops non-linearly; area is calculated using natural logs.
- Isochoric (constant V): Path is a vertical line; area is zero (no work done).
Sign Conventions & Energy Flow
Understanding the sign of thermodynamic work is critical for tracking energy conservation:
- Expansion (W > 0): The volume increases (ΔV > 0). The gas pushes the boundary outward, doing work *on* the surroundings. Internal energy decreases unless heat is added.
- Compression (W < 0): The volume decreases (ΔV < 0). The surroundings push the boundary inward, doing work *on* the gas. Internal energy increases unless heat is removed.
- Rigid Container (W = 0): The volume is locked (ΔV = 0). No mechanical work is performed, meaning any heat added goes entirely into temperature rise.
Solved Examples
An ideal gas is heated at a constant pressure of 1.5 × 105 Pa (isobaric process) inside a cylinder with a movable piston. The volume increases from 0.020 m3 to 0.045 m3. Calculate the work done by the gas and state if work is done on or by the surroundings.
- Identify the given values: Constant pressure, P = 1.5 × 105 Pa. Initial volume, Vi = 0.020 m3. Final volume, Vf = 0.045 m3.
- Calculate the change in volume: ΔV = Vf - Vi = 0.045 m3 - 0.020 m3 = 0.025 m3.
- State the formula for work done under constant pressure: W = P · ΔV.
- Substitute the values: W = (1.5 × 105 Pa) · (0.025 m3).
- Solve the expression: W = 3,750 Joules.
- Interpret the sign: The calculated work is positive (+3,750 J). This indicates that the expanding gas performs positive work on its surroundings, transferring energy out of the gas.
Answer: W = +3,750 J (Work is done BY the gas)
A gas cylinder is compressed by an external piston. The volume of the gas decreases from 8.0 Liters to 3.0 Liters at a constant pressure of 2.0 atmospheres (approximately 2.03 × 105 Pa). Calculate the work done by the gas in Joules, explaining the thermodynamic sign convention.
- Convert the volumes from Liters to SI units (cubic meters): Recall that 1 L = 10-3 m3. Thus, Vi = 8.0 × 10-3 m3, and Vf = 3.0 × 10-3 m3.
- Identify the constant pressure: P = 2.03 × 105 Pa.
- Calculate the volume change: ΔV = Vf - Vi = 3.0 × 10-3 m3 - 8.0 × 10-3 m3 = -5.0 × 10-3 m3.
- Recall the isobaric work formula: W = P · ΔV.
- Perform the calculation: W = (2.03 × 105 Pa) · (-5.0 × 10-3 m3) = -1,015 Joules.
- Explain the sign: The work is negative (-1,015 J). Under the standard thermodynamic sign convention, negative work means the surroundings perform mechanical work on the gas, compressing it and adding energy to the system.
Answer: W = -1,015 J (Work is done ON the gas)
A rigid-walled metal container holds 0.50 moles of an ideal gas. Heat energy of 1,200 Joules is added to the container, raising the temperature from 300 K to 400 K. Calculate the mechanical work done by the gas.
- Identify the type of process: Since the container has rigid walls, the volume cannot change. This is an isochoric (constant volume) process.
- State the volume change: ΔV = 0.
- Recall the general definition of work done by gas: W = ∫ P dV.
- Since dV = 0 at every point in the process, the integral evaluates to zero: W = P · ΔV = P · 0 = 0 Joules.
- Conclude the result: The gas does 0 Joules of mechanical work. According to the First Law of Thermodynamics (ΔU = Q - W), since W = 0, the entire 1,200 J of added heat goes strictly into increasing the internal energy of the gas (ΔU = 1,200 J), which directly raises its temperature.
Answer: W = 0 J (No work is performed)
Common Mistakes
- Assuming volume change is displacement: Confusing the volume change (in cubic meters or liters) with physical displacement (in meters). Remember that ΔV = A · d, where A is the cross-sectional area.
- Ignoring units conversion: Multiplying pressure in atmospheres by volume change in Liters without converting to Pa and m3. Doing so yields incorrect units. Keep pressure in Pascals (N/m2) and volume in m3 to obtain work in Joules.
- Work in Isochoric processes: Believing work is done because pressure rises. If volume is constant (ΔV = 0), work is strictly zero, no matter how high the pressure climbs.
- Free expansion work: Assuming a gas expanding freely into a vacuum does work. Work requires an opposing force. If Pext = 0, no work is done.
Useful Mechanical Work Output
In a real steam engine, steam is generated in a boiler and fed into a cylinder. The expanding steam does positive work by pushing a piston outward.
A connecting rod translates this linear piston stroke into the rotation of a heavy flywheel. The inertia of the rotating flywheel stores this kinetic energy, driving the piston back to expel cold exhaust steam and maintaining continuous rotational energy. This cycle forms the basis of all thermal power plants and reciprocating engines.
Practice Questions
1. What is the distinction between thermodynamic work done by a gas and work done on a gas?
Work done by the gas occurs when the gas expands (ΔV > 0), pushing its boundary outward and performing positive work (W > 0) on the surroundings. Work done on the gas occurs when the surroundings push the boundary inward, compressing the gas (ΔV < 0) and resulting in negative work (W < 0) done by the gas.
2. Why is the area under the curve on a Pressure-Volume (P-V) diagram equal to the work done by the gas?
The mechanical definition of work is W = ∫ F dx. For a piston of cross-sectional area A, the force exerted by pressure is F = P · A, and the displacement is dx. Substituting these gives W = ∫ P · A dx = ∫ P dV. On a plot of Pressure (Y-axis) versus Volume (X-axis), the integral ∫ P dV is mathematically equal to the geometric area under the path curve.
3. If a gas expands into a vacuum (free expansion) without any external constraints, does it perform work?
No. For work to be performed, the gas must push against an opposing external force. In a vacuum, the external pressure is zero (Pext = 0). Thus, even though the volume increases (ΔV > 0), the work done is W = Pext · ΔV = 0 Joules.
4. Compare the work done during isobaric, isothermal, and adiabatic expansions starting from the same initial state (Pi, Vi) to the same final volume Vf.
On a P-V diagram, the isobaric path is a horizontal line (pressure remains constant). The isothermal path drops as P ∝ 1/V. The adiabatic path drops even steeper (P ∝ 1/Vγ) because no heat enters to maintain temperature. Since the area under the curve is largest for the isobaric line and smallest for the adiabatic curve, the work done ranks: Wisobaric > Wisothermal > Wadiabatic.
FAQ
Frequently Asked Questions
What is work done by a gas?
Work done by a gas is the mechanical energy transferred when the gas expands or contracts, pushing or being pushed by a movable boundary (such as a piston) against an external opposing pressure.
What is the formula for work done by a gas?
For a constant pressure (isobaric) process, the formula is W = PΔV, where P is pressure and ΔV is volume change. For processes with changing pressure, it is calculated as the integral: W = ∫ P dV.
What is the sign convention for work done by a gas?
In physics and chemistry, gas expansion does positive work (W > 0) because the system transfers energy to the surroundings. Gas compression does negative work (W < 0) because surroundings transfer energy into the gas.
How is work represented on a P-V diagram?
On a Pressure-Volume (P-V) diagram, the mechanical work done by the gas during a state transition is equal to the geometric area under the process curve between the initial and final volume coordinates.
Why is work done by a gas considered a path function?
Unlike internal energy, work is a path function because the amount of work done depends on the specific steps (path) taken to get from the initial state to the final state, not just on the starting and ending state values.
What is the work done by a gas in an isochoric process?
In an isochoric (constant volume) process, the volume change is zero (ΔV = 0). Since the boundary does not move, the mechanical work done by the gas is exactly zero (W = 0).
What is the formula for work in an isothermal expansion?
For a monatomic ideal gas expanding isothermally at temperature T, the work done is W = nRT ln(Vf / Vi), where n is moles, R is the gas constant, and Vf/Vi are final/initial volumes.
What is free expansion, and how much work is done?
Free expansion occurs when a gas expands into a vacuum without any external pressure to push against. Since the opposing force is zero, the work done is exactly zero (W = 0), even though the volume changes.
How does heat added relate to work done?
According to the First Law of Thermodynamics (ΔU = Q - W), when heat (Q) is added to a gas, it is split between increasing the internal energy of the gas (ΔU, raising its temperature) and performing expansion work (W).
What is the net work done in a cyclic process?
The net work done is the area enclosed inside the closed loop of the cycle on a P-V diagram. It is positive if the cycle goes clockwise (as in heat engines) and negative if it goes counterclockwise (as in refrigerators).