# adiabatic work done by gas

Suppose we have an adiabatic box with a fixed volume $V$ and contains $n_0$ mol of gas at pressure $p_0$ and temperature $T_0$. Now the box is punctured by a small hole and gas from the outside flows in. The outside (surrounding) has a pressure of $p$ and a temperature of $T_0$. Assume the internal energy of $n$ mol of gas at temperature $T$ is $nc_v T$.

What is the final temperature in the box?

I tried the above problem but couldn't get far; I can get the temperature $T$ in terms of $T_0, R, c_v$ if the box is empty at first (ie. a vacuum). $\left(T = T_0 \frac{c_v + R}{c_v}\right)$

For this problem my thinking is something like:

$\Delta Q = 0$, so $\Delta U = \Delta W$

Then the gas outside has to do both boundary and shaft/flow work

The boundary work is done as the gas outside is expanding against the pressure $p_0$ in the box and

The shaft/flow work is done as the gas enters the box through the hole

However this is where I can't quite continue

Is $\Delta W = \Delta(PV) = P\Delta V + V\Delta P$? Or is $\Delta W = P\Delta V + PV$?

Furthermore, if $\Delta W = P\Delta V + PV$, then is the $P$ in $PV$ equal to $p - p_0$?

Finally, if, as the temperature of the gas originally in the box increases due to the work done by the outside gas, in order to calculate the final temperature in the box we need to know how much gas from outside entered, how can we do this?

Thanks.

• So what happens if you compute the "start empty - got to pressure $p_0$" result and subtract if from "start empty - go to pressure $p$"? Shouldn't that be the work done going from $p_0$ to $p$? – Floris Apr 4 '18 at 14:27
• @Floris I'm not sure if that approach would work, because (I think that) in your scenario the internal energy of the gas in the box at $p_0$ is greater than $T_0$ due to the gas entering, whereas in the original scenario the initial temperature of the gas inside the box is at $T_0$ - do correct me if I went wrong somewhere though, thanks! – Russell Ng Apr 4 '18 at 14:33
• Alright - figure out what temperature you need to start at to get the gas inside to the right temperature, and make the correction by doing the first part starting at a different temperature. So there are then 3 parts to the calculation - does that make sense? – Floris Apr 4 '18 at 14:35
• @Floris just to check that I understood that correctly, basically $\Delta U =$ (work from empty to pressure $p$) - [(work from empty to pressure $p_0$) - (heat required to be removed to make temperature $T_0$)], is that right? Also just for further clarification wouldn't the number of moles of gas that entered the box be different for the "empty to $p$" and the "empty to $p_0$", wouldn't this affect the final temperature? Thanks – Russell Ng Apr 4 '18 at 14:40
• Yes you need to be careful - my point is that you can come up with a cycle of steps (that you know how to calculate) that allows you to go from the correct initial state to the correct final state. I will leave the hard work up to you... since this seems to be a "homework-like" question, and that's how the policy works. – Floris Apr 4 '18 at 14:49

The shaft work is the amount of work by the system on its surroundings, over and above the work required to push mass into and out of the control volume. For this problem this shaft work is zero.

The open system first law energy balance on the control volume becomes: $$\Delta U=\Delta nh_{in}$$ or $$(n_0+\Delta n)C_vT_f-n_0C_vT_0=\Delta n(C_v+R)T_0$$This gives: $$\frac{T_f}{T_0}=1+\frac{\Delta n}{n_0+\Delta n}\frac{R}{C_v}\tag{1}$$ The final pressure is going to be equal to the outside pressure p. From the ideal gas law we have, from the initial condition, $$p_0V=n_0RT_0$$and, from the final condition, we have:$$pV=(n_0+\Delta n)RT_f$$So, $$\frac{T_f}{T_0}=\frac{p}{p_0}\frac{n_0}{(n_0+\Delta n)}\tag{2}$$ Eqns. 1 and 2 provide two equations in the two unknowns $T_f$ and $\Delta n$. The solution for $T_f$ is as follows: $$\frac{T_f}{T_0}=\frac{\gamma}{1+(\gamma-1)(p_0/p)}$$

• @pglpm What you are saying is technically correct, and that, if one waited long enough after the pressures effectively equilibrated, conductive heat transfer could occur through the hole until the temperature inside equilibrated with the outside temperature. However, in my judgment, this was not the intent of the homework exercise represented by this problem. I think the student was expected to assume that either the hole was plugged by insulation after pressure equilibration, or that the problem ended at the effective time of equilibration. – Chet Miller Apr 4 '18 at 19:46
• This is the same as the scenario you already described, where heat transfer is allowed through the hole between the two chambers. The actual problem is more like one involving two chambers at different pressures separated by an insulated barrier, in which a hole is poked in the barrier. For the lower pressure chamber, this is a very irreversible process in which viscous heating accounts for the increase in temperature (while the gas remaining in the higher pressure chamber at the end has expanded reversibly to push part of the mass out and suffers a temperature decrease). – Chet Miller Apr 4 '18 at 20:49
• Who says that an ideal gas is inviscid? In the limit of low densities, all gases approach ideal gas behavior and also approach a constant viscosity that is a function only of temperature. When an ideal gas expands rapidly and irreversibly against a constant external pressure (that is much lower than the initial gas pressure), what did you think was the source of the irreversibility? And in the Joule Thompson flow of an ideal gas through a porous plug (where the gas suffers an irreversible expansion), what did you think the reason was that the gas doesn't cool? – Chet Miller Apr 4 '18 at 22:10
• Well, I think we have a disagreement between experts here. Maybe an ideal gas is inviscid by your definition, but not generally. There are still collisions between molecules in ideal gases that allow for exchange of kinetic energy between molecules. This is sufficient to result in viscous behavior. See Bird, Stewart, and Lightfoot, Transport Phenomena for the derivation of the equation for viscosity in the limit of ideal gas behavior. – Chet Miller Apr 4 '18 at 22:35
• @CM Thank you for replying – and so quickly. Funnily enough I'd just come round to this understanding. Using a much less sophisticated argument than yours, I imagined the gas being pushed through the hole at temperature $T_0$ and pressure $p_0$ by a piston. This would require work $p \Delta V =p \frac{\Delta n \ RT_0}{p}=\Delta n\ RT_0$. This has to be added to the internal energy $\Delta n\ c_{v}T_0$ that the gas takes with it into the adiabatic chamber. This leads to exactly your result. – Philip Wood Apr 11 '18 at 23:19

This Answer provides an entirely different method of solving the present problem, based on treating the box and surroundings as a closed system (and thus using the closed system version of the first law of thermodynamics). This is the approach alluded to by @pglpm in one of his comments. Rather than considering the surroundings outside the box as being infinite, we consider the gas outside the box as being enclosed within a larger adiabatic container of finite volume. We then solve this problem in the limit as the outer container volume becomes infinite.

Here are the parameters employed in the present analysis:

Box:

$n_0$ = number of moles of gas in box initially

V = Volume of box

$T_0$ = Initial Temperature

$p_0$ = Initial Pressure

n = number of moles in box in final state

T = Temperature in box in final state

p* = Pressure in box in final state (identical to final pressure outside box)

Outside Enclosure:

$n_{s0}$ = number of moles of gas in enclosure initially

$V_s$ = Volume of enclosure

$T_0$ = Initial temperature

p = Initial pressure

$n_s$ = Final number of moles in enclosure

T* = Final temperature of gas in enclosure

p* = Final pressure of gas in enclosure (identical to final pressure in box)

From the ideal gas law, we have: $$n_0=\frac{p_0V}{RT_0}\tag{1a}$$ $$n=\frac{p^*V}{RT}\tag{1b}$$ $$n_{s0}=\frac{pV_S}{RT_0}\tag{1c}$$ $$n_s=\frac{p^*V_S}{RT^*}\tag{1d}$$

As shown in Example 6.10 of Fundamentals of Engineering Thermodynamics by Moran et al, when a gas within an adiabatic enclosure escapes very slowly (in our case into the box), the gas that still remains inside the enclosure at any time during the process has suffered an adiabatic reversible expansion. This means that the final pressure and temperature of the gas in the enclosure will be less than the initial pressure and temperature. Furthermore, quantitatively, we will have that: $$p^*\left(\frac{V_s}{n_s}\right)^{\gamma}=p\left(\frac{V_s}{n_{s0}}\right)^{\gamma}$$or equivalently, $$\frac{n_s}{n_{s0}}=\left(\frac{p^*}{p}\right)^{1/\gamma}$$or equivalently,$$n_s=\frac{pV_S}{RT_0}\left(\frac{p^*}{p}\right)^{1/\gamma}\tag{2}$$Moreover, we have: $$\frac{T^*}{T_0}=\left(\frac{p^*}{p}\right)^{\frac{\gamma - 1}{\gamma}}\tag{3}$$

For the closed system consisting of the box and the rigid insulated enclosure, there is no work done by the system on its surrounding and no heat exchange between the system and its surroundings. Therefore, from the version of the first law of thermodynamics applicable to a closed system, the change in internal energy of this combined system is zero. Initially, the gas in both the enclosure and the box are at the same temperature, $T_0$. In the final state of the system, the $n_s$ moles of gas in the enclosure are at T* and the n moles of gas in the box are at T. Therefore, from the first law: $$nC_v(T-T_0)+n_sC_v(T^*-T_0)=0\tag{4}$$From a mass balance on the system, the number of moles of gas in the initial state is equal to the number of moles of gas in the final state: $$n+n_s=n_0+n_{s0}\tag{5}$$If we substitute Eqns. 1 into Eqns. 4 and 5, we obtain:$$V\left(1-\frac{T_0}{T}\right)+V_S\left(1-\frac{T_0}{T^*}\right)=0\tag{6}$$and$$\left(V\frac{T_0}{T}+V_S\frac{T_0}{T^*}\right)=\frac{p_0V+pV_S}{p^*}\tag{7}$$ Combining Eqns. 6 and 7 yields: $$p^*=\frac{V_S}{(V_S+V)}p+\frac{V}{(V_S+V)}p_0\tag{8}$$According to Eqn. 8, the final pressure p* is just a weighted average of the initial pressures in the enclosure and the box, weighted in terms of the volumes of the two containers.

We can now determine the final temperature T* in the enclosure by combining Eqns 3 and 8 to yield: $$\frac{T^*}{T_0}=\left(\frac{V_S}{(V_S+V)}+\frac{V}{(V_S+V)}\frac{p_0}{p}\right)^{\frac{\gamma - 1}{\gamma}}\tag{9}$$

If we substitute this into Eqn. 6 and solve for T, the final temperature in the box, we obtain: $$\frac{T}{T_0}=\frac{1}{\left[1+\frac{V_S}{V}\left(1-\frac{\left(1+\frac{V}{V_S}\right)^{(\gamma-1)/\gamma}}{\left(1+\frac{V}{V_S}\frac{p_0}{p}\right)^{(\gamma-1)/\gamma}}\right)\right]}\tag{10}$$If we take the limit of this relationship as $V/V_S$ approaches zero (i.e., the volume of the enclosure becomes infinite), we obtain:$$\frac{T}{T_0}=\frac{\gamma}{1+(\gamma-1)(p_0/p)}\tag{11}$$ This is exactly the same result we obtained in the previous analysis using the open system version of the first law of thermodynamics.

• Wow! Thank you very much for posting this. I've got the general drift and am now slowly working through all the steps. I think it will be worth it. – Philip Wood Apr 13 '18 at 20:32
• I like this very much, because there are no doubtful assumptions. The fact that anyone considered it worthwhile to produce this undeniably long solution seems to me to confirm that the problem posed was more challenging than it looked. I'm still quite attached to my approach (replacing the infinite external gas reservoir by a piston and cylinder). This gives the right answer for $T/T_0$ with little effort, and I doubt if it does so by cancellation of errors, but as I've said in an earlier comment, it's not as easily justified as the very interesting method you've just given. – Philip Wood Apr 13 '18 at 22:01
• "the gas that still remains inside the enclosure at any time during the process has suffered an adiabatic reversible expansion." This, I think, is your key sentence. It's what shows my (piston) method to be equivalent to your second answer. The gas that goes through the hole $might\ as\ well$ be separated from the gas that remains in the enclosure by a piston. And the work done by this piston gives the extra internal energy acquired by the gas that finishes up in the box. [Of course the work done by the piston is at the expense of the gas that remains in the enclosure.] – Philip Wood Apr 14 '18 at 10:03
• I like to visualize it as Moran el al have shown in their figure, more like an invisible membrane separating the gas that eventually remains outside the box from the from the gas that eventually ends up inside the box. Of course, topologically, thinking of it as a piston is just as valid. – Chet Miller Apr 14 '18 at 10:59
• I see. I don't possess Moran, but I believe that physicists can often learn from an approach directed at engineers. Many thanks for engaging in this dialogue; I've benefited greatly . Maybe others have, too. – Philip Wood Apr 14 '18 at 11:17