# Heat loss by gas compression - reversible vs. irreversible

I just solved a problem involving the following scenario:

A gas following the van der Waals equation of state (not an ideal gas) is placed in a cylinder and undergoes isothermal compression. The temperature is kept constant because the cylinder is in a heat bath. What is the heat loss by the gas, assuming the compression happens reversibly?

After working out an expression for $\rm dS$, I am simply able to integrate from State 1 to State 2 via: $$\Delta S = \int_1^2{\frac{\rm \partial Q}{T}}$$ and then use $Q=T\Delta S\;.$

Easy. The assumption of reversibility, however, is bothering me. Here are my questions:

1. Could I use this same procedure to calculate $Q$ if the process happens irreversibly?

2. If not, then how do we calculate $Q$ for an irreversible isothermal compression (or expansion)?

3. I imagine an answer for 2) involves using the first law $Q = \Delta U + W \;.$ But then how do you calculate $W$ for an irreversible compression (or expansion)? Can we still use $W = \int_1^2{P\;\rm dV}\;?$

• Ever heard of state function?
– user36790
Jan 29, 2016 at 3:23
• Yes, @user36790. I understand entropy is a state function. Whether the process is reversible or not, the change in entropy will be the same. But intuition tells me that the heat loss is not the same, and that is the point of my questions (mainly 2 and 3). Jan 29, 2016 at 3:38
• Then you are right; heat loss is not same. Let me check I've a link that might provide you a good intuition.
– user36790
Jan 29, 2016 at 3:40
• Check this link of mit.edu; there you can find $$\Delta S\gt \int \frac{\rm \partial Q_\rm{irrev}}{T}\;.$$
– user36790
Jan 29, 2016 at 3:45
• Thanks, it makes sense how the entropy change of the irreversible process is larger. That inequality doesn't allow you to calculate the heat transferred though, it only states the second law. I can't seem to find anything on how to calculate heat transfer for an irreversible process, and that's why making the assumption of reversible processes always bothers me. Jan 29, 2016 at 4:00

For an irreversible expansion or compression, let $P_B(t)$ represent the gas pressure on the portion of its boundary where the work is being done, and let $T_B(t)$ represent represent the gas temperature on the portion of the boundary where heat transfer is taking place, with $t$ representing the time during the irreversible change. If the change is occurring irreversibly, the gas pressure P away from the boundary and the temperature $T$ away from the boundary will vary with spatial position within the gas. So we won't be able to use an equation of state, such as the ideal gas law, to calculate the pressure at the boundary because, for a given gas volume, the pressure and temperature are not even constant over the volume. In addition to this, there are extra contributions to the force per unit area at the boundary as a result of viscous stresses in the gas (that are important only in irreversible changes, where the gas is deforming rapidly). The force per unit area depends not just on the volume but also on the rate of change of volume.

For a reversible change, all these difficulties go away. The pressure and temperature of the gas are uniform throughout and viscous stresses are negligible, so the boundary pressure $P_B$ is equal to the average gas pressure, and the equation of state can be used to describe the pressure, volume, and temperature.

So, what do we do in the case of an irreversible change. Basically, for both irreversible and reversible changes, the equation for the work is the same:$$W=\int P_B\rm\; dV\;.$$ This is just the integral of the force the gas exerts on its surroundings over the distance the force is applied. But, unlike a reversible change, we can not depend on the equation of state to control the value of the boundary pressure $P_B$. So we need to control it manually from the outside, using either a pressure transducer at the boundary combined with a feedback control system on the piston movement, or, in simpler cases, by adding or removing a weight to the piston.

In the case you were describing, the initial and final temperatures of the gas were the same, so there was no change in internal energy. Therefore, the heat added in the irreversible process as equal to the work:$$Q=\int P_B\;\rm dV\;.$$ Also, because the part of the cylinder where heat transfer is occurring is in contact with a constant temperature bath, $T_B$ is equal to the bath temperature.

It is not very widely known, but the Clausius inequality calls for the use of the boundary temperature in comparing $\Delta S$ to the integral of $\rm \partial Q/T.$ In particular, $$\Delta S \geq \int \frac{\rm \partial Q}{T_B}\;.$$ So, how do you get the change in entropy for an irreversible process if you can't use this equation. You start out by forgetting all about the irreversible process and focusing only on the two end states. You then devise a reversible process between these same two end states and calculate the entropy change for that process. This will give you the entropy change for your irreversible process.

• What a co-incidence! I also referenced your physicsforum insights page to OP in my comments above. +1 ; )
– user36790
Jan 29, 2016 at 15:13
• You said that change in internal energy is zero for an isothermal process, but isn't that only for an ideal gas? If my system is obeying some other kind of equation of state (like a van der Waals gas) then we will have a change in energy, correct? Jan 29, 2016 at 16:19
• Yes. I was thinking ideal gas. Jan 29, 2016 at 17:30