# Entropy Change from Joule Expansion

## Main Question or Discussion Point

Assume we have an ideal gas of N particles inside a thermally isolated cylinder of volume V, and that the cylinder is equipped with a piston that can trap the air on one side. (Assume the piston occupies no volume in the cylinder.) Initially, the piston is fully withdrawn and the gas occupies a the entire volume V.

Step one:
The piston is slowly moved until the gas is compressed to half its original volume, V/2. Assume that this step is entirely quasistatic.

Step two:
A crack suddenly forms in the piston and the gas leaks back into the original volume V.

I am confused about what the entropy change is after step two. I can't seem to reconcile the thermodynamic answer with my statistical mechanics reasoning. Please help me out. Here are my thoughts:

Step one is explicitly stated to be quasistatic. Since the system is thermally isolated, I'm thinking that the process is adiabatic, since it is in equilibrium the entire time and no heat flows. For a reversible process, dS = dQ/T, and since dQ=0, we have that dS=0. So there is no entropy change during a quasistatic compression of a thermally isolated ideal gas. So the entropy change at the end of step one is zero.

Step two is Joule expansion. Joule expansion is not reversible and there is a nonzero entropy change. Since the energy E of an ideal gas is given by E = 3/2 NkT, and since no heat or work is performed on the system, the temperature must be the same. Since entropy is a function of state, one can say that the entropy change of the gas is equal to the entropy change along an isothermal expansion, which is given by $\Delta S = \int_{V}^{2V} \frac{p}{T}dV = \int_{V}^{2V} \frac{Nk}{V}dV = Nk\ln(2)$ where I have used the ideal gas equation of state PV=NkT.

So after step 2 is finished, there is a nonzero entropy increase equal to Nk ln(2). So my thermodynamic reasoning says there is an entropy change.

However, when I think about the statistical mechanics of this, I am baffled. The energy of the gas E=3/2 NkT never changes over the whole process, and thus after step two is over, the gas has returned to the same volume and energy it had before step 1. Thus the number of microstates of the gas after step 2 has to be exactly the same as the number of microstates before step 1. If we use the statistical definition of entropy, S = k lnΩ, then ΔS=0.

I guess that this second line of reasoning must be wrong, but I cannot figure out why. Would someone explain this to me?

Last edited:

Related Classical Physics News on Phys.org
Andrew Mason
Homework Helper
Step one is explicitly stated to be quasistatic. Since the system is thermally isolated, I'm thinking that the process is adiabatic, since it is in equilibrium the entire time and no heat flows. For a reversible process, dS = dQ/T, and since dQ=0, we have that dS=0. So there is no entropy change during a quasistatic compression of a thermally isolated ideal gas. So the entropy change at the end of step one is zero.

Step two is Joule expansion. Joule expansion is not reversible and there is a nonzero entropy change. Since the energy E of an ideal gas is given by E = 3/2 NkT, and since no heat or work is performed on the system, the temperature must be the same. Since entropy is a function of state, one can say that the entropy change of the gas is equal to the entropy change along an isothermal expansion, which is given by $\Delta S = \int_{V}^{2V} \frac{p}{T}dV = \int_{V}^{2V} \frac{Nk}{V}dV = Nk\ln(2)$ where I have used the ideal gas equation of state PV=NkT.

So after step 2 is finished, there is a nonzero entropy increase equal to Nk ln(2). So my thermodynamic reasoning says there is an entropy change.

However, when I think about the statistical mechanics of this, I am baffled. The energy of the gas E=3/2 NkT never changes over the whole process, and thus after step two is over, the gas has returned to the same volume and energy it had before step 1. Thus the number of microstates of the gas after step 2 has to be exactly the same as the number of microstates before step 1. If we use the statistical definition of entropy, S = k lnΩ, then ΔS=0.

I guess that this second line of reasoning must be wrong, but I cannot figure out why. Would someone explain this to me?
Check your conclusion that the energy of the gas never changes over the whole process. Work is done on the gas in compressing it in the first step. If there is no heat flow out of the gas, what happens to the internal energy?

AM

Thanks a lot for your response! Much appreciated. I forgot about the work done during the adiabatic compression.

Let me just ask a long follow-up question to see if I have this straight now. Does this mean we can calculate the ratio of microstates for an ideal gas of N particles if it undergoes a given energy change ΔE? I think the answer is yes and I derived something, but please check my work because I'm obviously a bit hazy on this.

The statistical definition of entropy is:
$S=k \ln(\Omega)$

In general for an ideal gas,
$PV = NkT$
$E = \frac{3}{2}kT$

For an adiabatic process we have that:
$PV^{\gamma}=constant$
Combining the last two equations we have:
$EV^{\gamma-1}=constant$
And thus for an adiabatic compression from Vi to Vf,
$\left ( \frac{E_i}{E_f} \right )^{\frac{1}{\gamma-1}}=\frac{V_f}{V_i}$
(Equation 1)

For an isothermal process we have that:
$\mathrm{d}S = \frac{Nk}{V}dV$
So for an isothermal expansion from Vi to Vf
$\Delta S = Nk \ln(\frac{V_f}{V_i})$
Therefore,
$k \ln(\frac{\Omega_f}{\Omega_i})=Nk\ln(\frac{V_f}{V_i}) \Rightarrow \frac{\Omega_f}{\Omega_i}=\left ( \frac{V_f}{V_i} \right )^N$
And since S is a function of state, these equations also hold for Joule expansion.

Now go back to the steps that I outlined in my first post. However, let's make the adiabatic compression in step one compress the gas to some arbitrary volume, not necessarily one-half the original volume. I'll denote the variables before step 1 with a subscript 0, the variables after step one but before step two with a subscript 1, and the variables after step two with a subscript 2.

For step 1,
$S_0=S_1, \ \ \Omega_0=\Omega_1, \ \ E_1-E_0=E_1\left ( 1-\left ( \frac{V_1}{V_0} \right )^{\gamma-1} \right )$
by Equation 1.

For step 2,
$E_2 = E_1, \ \ S_2-S_1=Nk\ln\left ( \frac{V_2}{V_1} \right )$
$\Rightarrow \frac{\Omega_1}{\Omega_2}=\left ( \frac{V_2}{V_1} \right )^N$

Thus when all is said and done, $$\frac{\Omega_2}{\Omega_0}=\left (\frac{V_0}{V_1} \right )^N=\left ( \frac{V_0}{V_0\left ( \frac{E_0}{E_1} \right )^\frac{1}{\gamma-1}} \right )^N = \left (\frac{E_2}{E_0} \right )^\frac{N}{\gamma-1}$$ since E2=E1 and V0=V2.

Thus if we define the total energy input as
$\Delta E = E_2-E_0$
We have that
$\frac{\Omega_2}{\Omega_0}=\left ( 1+\frac{\Delta E}{E_0} \right )^\frac{N}{\gamma-1}$

Now since S and E are functions of state, that should hold for any arbitrary energy input ΔE and not just this particular sequence of processes. So we have a general expression for the ratio of numbers of microstates for an ideal gas before and after an arbitrary energy input ΔE.

Is this all correct?

Thanks!

Last edited:
Andrew Mason
Homework Helper
Now since S and E are functions of state, that should hold for any arbitrary energy input ΔE and not just this particular sequence of processes. So we have a general expression for the ratio of numbers of microstates for an ideal gas before and after an arbitrary energy input ΔE.

Is this all correct?
I don't think so. The ΔE term is not a function of state. It is determined by the process that the gas undergoes.

Try it for heat flow into the gas at constant volume. The entropy change would be:

$$\Delta S = \int dQ/T = \int nC_vdT/T = nC_v\ln{\left(\frac{T_f}{T_i}\right)} = nC_v\ln{\left(\frac{E_f}{E_i}\right)}$$

AM

The first law refers to energy changes across the boundary, since only these are meaningful.

The second law does not refer to entropy changes across the boundary since entropy changes may also occur within the system or surroundings, but to entropy changes within either the system or the surroundings.

Last edited:
Andrew Mason
Homework Helper
I don't think so. The ΔE term is not a function of state. It is determined by the process that the gas undergoes.

Try it for heat flow into the gas at constant volume. The entropy change would be:

$$\Delta S = \int dQ/T = \int nC_vdT/T = nC_v\ln{\left(\frac{T_f}{T_i}\right)} = nC_v\ln{\left(\frac{E_f}{E_i}\right)}$$
Just looking at this again, your equation would be correct if there is no change in volume:

$$\Delta S = \int dQ/T = \int nC_vdT/T = nC_v\ln{\left(\frac{T_f}{T_i}\right)} = nC_v\ln{\left(\frac{E_f}{E_i}\right)} = n\left(\frac{1}{\gamma-1}\right)R\ln{\left(\frac{E_f}{E_i}\right)} = N\left(\frac{1}{\gamma-1}\right)k\ln{\left(\frac{E_f}{E_i}\right)} = k\ln{\left(\frac{\Omega_f}{\Omega_i}\right)}$$

which can be rearranged as:

$$\left(1 + \frac{\Delta E}{E_i}\right)^{\left(\frac{N}{\gamma-1}\right)} = \frac{\Omega_f}{\Omega_i}$$

However, if there is a change in volume - for example if the gas was compressed adiabatically and then expanded freely to twice the original volume, ΔE would be the same but the entropy increase and, therefore, ratio of Ωf/ΩI, would not.

AM

Last edited:
Great, thanks a lot AM. I did assume through the whole derivation that V0=V2 but I forgot to state that in my final summary, which should read:
Now since S and E are functions of state, that should hold for any arbitrary energy input ΔE and not just this particular sequence of processes, provided Vi=Vf. So we have a general expression for the ratio of numbers of microstates for an ideal gas before and after an arbitrary energy input ΔE if the gas returns to its original volume.
I got a little miffed when you said you thought my derivation was wrong, but I did notice that in your example, you might be able to invoke the definitions of $\gamma$ and Cv to get to my equation. (But I didn't actually do it.) Also, I do think that since E is a function of state, the energy change can just be regarded as E2-E1, which are the endpoints of a function of state--so I think the derivation does apply to different processes that have the same endpoints (E1,V) and (E2, V).