Reversible and Irreversible Expansion or Compression Work

This Demonstration shows animations and calculates work for reversible and irreversible expansions and compressions (adiabatic or isothermal) of an ideal diatomic gas in a piston-cylinder system. Select either compression or expansion using the buttons, and compare two processes side-by-side using drop-down menus. Change the final pressure with the slider; the pressure ranges are different for compression and expansion. For adiabatic processes, the final temperature is calculated. For all processes, the final volume is calculated. Press the play button to start compression or expansion. For reversible processes, more weights (blue rectangles) are added to the piston for compression or removed for expansion. For irreversible processes, the external pressure is constant at the final value, so the number of weights is fixed, and initially stops (red triangles) prevent the piston from moving until the play button is pressed. Animations of reversible processes represent slow processes; irreversible processes are much faster and the piston overshoots the final volume, but these behaviors are not shown in the animations.


  • [Snapshot]
  • [Snapshot]


Expansion-compression work for all four processes is calculated from
where is the external pressure and is in units of kJ/mol. The external pressure and the gas pressure are equal for a reversible process, whereas for an irreversible process the external pressure is the final pressure.
Initial state:
where the subscript refers to the initial state, is the ideal gas constant (kJ/(mol K)), is volume (), is temperature (K) and is pressure (Pa).
For an isothermal process:
where the subscript refers to the final condition.
Reversible work:
Irreversible work:
For an adiabatic process on an ideal diatomic gas:
where , is the constant volume heat capacity, and is the constant pressure heat capacity (kJ/(mol K)).
Reversible process:
Irreversible process:
The screencast video [2] explains how to use this Demonstration.
[1] J. R. Elliott and C. T. Lira, Introductory Chemical Engineering Thermodynamics, New York: Pearson Education, 2012.
[2] Reversible and Irreversible Expansion or Compression Work [Video]. (Mar 29, 2017) www.colorado.edu/learncheme/thermodynamics/ReversibleIrreversibleExpansionCompression.html.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+