A cylinder of volume \(0.1 \, m^3\) is filled with nitrogen at \(10 \, MPa\) and \(300 \, K\).
Consider nitrogen to be an ideal gas. The cylinder develops a leak and nitrogen escapes to the atmosphere which is at \(0.1 \, MPa\). After some time, the pressure in the cylinder reduces to \(5 \, MPa\).
Assuming the cylinder and the leaked gas temperature remains constant at \(300 \, K\), the work done (in MJ) by nitrogen gas is: