# Heat exchanged between two gases

## Homework Statement

A horizontal container with adiabatic walls has a vertical wall inside it which divides the container in two. The wall is free to move back and forth and is not adiabatic. Initially, 1 kg of air is in the compartment to the left of the wall, at 5 bar and 350 K, and to the right we have 3 kg of CO2, at 2 bar and 450 K. They are both to be considered ideal gases, with constant heat capacity. Determine the heat exchanged between the two gases till they reach an equilibrium configuration. M(air)= 28.96 kg/kmol, C_v(air) = 0.726 kJ/kg K. M(CO2)= 44 kg/kmol, C_v(CO2) = 0.750 kJ/kg K.

## Homework Equations

M = m/n

Ideal gas law: PV = nRT

First law of Thermodynamics: ΔU = Q - W

Work in PVT system, assuming quasistatic process, and following sign convention used in First law above: W = ∫pdV, between two volumes.

## The Attempt at a Solution

First of all, we need the equilibrium configuration. Applying the Frst law of Thermodynamics to all of the system (the container), we find that ΔU = 0 for it. So,

ΔU_air = - ΔU_CO2​

But ΔU = m C_v ΔT for an ideal gas, assuming constant heat capacity. So, we have, knowing that both gases will eventually reach a final equilibrium temperature T_f,

ΔU_air = - ΔU_CO2 → m_air C_v(air) (T_f - 350) = m_CO2 C_v(CO2) (450 - T_f)​

from where we can easily solve for T_f, the equilibrium temperature.

To get the equilibrium pressure, we know that it'll be the same value as well in both gases, because they'll be in mechanical equilibrium. For this, we use the ideal gas law, having obtained the amount of moles for both gases using the data provided for the mass and molar mass for each gas. Hence,

P_f V_f(air) = n_air R T_f

P_f V_f(CO2) = n_CO2 R T_f​

and dividing both equations term by term, we arrive at an equation relating V_f(air) and V_f(CO2). But we can already obtain another equation relating V_f(air) and V_f(CO2), since we can can calculate the initial volumes of both gases, and we know that the sum is the same, so V_f(air) + V_f(CO2) = known value, is another equation, from which we solve for V_f(air) and V_f(CO2). Then, using either value, we plug back into either equation of state for the final equilibrium state and solve for P_f.

Now, to get the heat exchanged between both gases, I've thought of using the First law. We already know ΔU for both gases, and we also know that ΔU = Q - W by the First law. So,

Q_air = ΔU_air + W_air

Q_CO2 = ΔU_CO2 + W_CO2​

and my question is evaluating the W work term. We can use W = ∫pdV for quasistatic processes, but this process (one of the gases quickly expands, while the other is compressed, till both reach equilibrium) doesn't seem quasistatic, so I am not sure how to evaluate the W term, nor if this is the correct approach.

Any help will be appreciated!

Thanks.

If you draw a control volume arount the whole system, does anything cross the boundary? Based on your correct answer above, what can you say about the energy of the system after the gases have equilibrated in temperature? For an ideal gas, internal energy is solely a function of what? Is pressure a factor in this problem?

If you draw a control volume arount the whole system, does anything cross the boundary? Based on your correct answer above, what can you say about the energy of the system after the gases have equilibrated in temperature? For an ideal gas, internal energy is solely a function of what? Is pressure a factor in this problem?

Nothing crosses the boundary if we take all of the system, and the total internal energy of the system remains constant; internal energy of an ideal gas is solely a function of temperature. As you can see, I've already used all this to obtain the final equilibrium temperature.

My question was regarding the heat exchanged between the two gases. The most I've managed to figure out is what's in the previous post, and the fact that since we have adiabatic walls for the container, that Q_CO2 = - Q_air. But I still seem to be missing something.

If you know the final equilibrium temperature for the gases, then it is an easy matter to determine how much heat crossed the boundary. No heat is lost due to the adiabatic walls (to the surroundings) but heat crosses the piston that separates the gases. One gas cools, the other heats. Q=m*Cv*delta T. If you computed the final temperature correctly, one Q will be the negative of the other.

If you know the final equilibrium temperature for the gases, then it is an easy matter to determine how much heat crossed the boundary. No heat is lost due to the adiabatic walls (to the surroundings) but heat crosses the piston that separates the gases. One gas cools, the other heats. Q=m*Cv*delta T. If you computed the final temperature correctly, one Q will be the negative of the other.
But can I use C_v? I mean, the volume isn't constant for each gas, the non-adiabatic wall which separates both is free to move around.

Hm, and also, m*Cv*delta T happens to be the change of internal energy, so if I use that formula, it'd be like saying that neither gas does work, nor has work done on it. Is that true in this case?

Like you said: "Q_air = ΔU_air + W_air"

q=U2-U1 + W = Cv*(T2-T1) + W

Referring to a thermodynamics book, the expansion of a combustion gas in the cylinder of an engine is considered a polytropic process so PV^n is constant.

W = (P2*V2-P1*V1)/(1-n)

You can determine n for the chambers because you can determine initial volumes and the ratio of final volumes because temperatures are equal. From this you can determine final volumes and then final pressure. From that you can determine n so work can be evaluated.

Like you said: "Q_air = ΔU_air + W_air"

q=U2-U1 + W = Cv*(T2-T1) + W

Referring to a thermodynamics book, the expansion of a combustion gas in the cylinder of an engine is considered a polytropic process so PV^n is constant.

W = (P2*V2-P1*V1)/(1-n)

You can determine n for the chambers because you can determine initial volumes and the ratio of final volumes because temperatures are equal. From this you can determine final volumes and then final pressure. From that you can determine n so work can be evaluated.
Are you sure the process can be considered polytropic? I mean, the expansion of one gas/compression of the other seems like an internal irreversibility to me, so during that process, the pressure isn't a well-defined property (you got turbulence and in general a fairly complicated gas dynamics problem), so I'm not sure how one can easily relate the pressure to the volume this way.

I mean, you definitely are right in the sense that you can deduce the n for the polytropic process using the initial and final values for P and V for both gases, but that other consideration still makes me think.

I got my information from the text by Van Wylen and Sonntag, Chapter 7, entitled Entropy. I also can recall an undergraduate test we did in thermo lab where we determined n for an instrumented compressor. PV^n did plot as a straight line. Our goal was to determine n.

This is all I can say about the problem. Perhaps another will chime in.

I got my information from the text by Van Wylen and Sonntag, Chapter 7, entitled Entropy. I also can recall an undergraduate test we did in thermo lab where we determined n for an instrumented compressor. PV^n did plot as a straight line. Our goal was to determine n.

This is all I can say about the problem. Perhaps another will chime in.
I see, that's interesting. Did you actually happen to see how the components of the compressor moved, that is, if it's safe to assume that it moved in a quasistatic manner? Because if it did, then I may have my answer.

It was a piston compressor driven by a large electric motor via V belts. It had a bore of 8-10 inches. I cannot remember the specifics of the experiment but the P and V data were somehow taken while it was running. We did it my second year in engineering school many, many years ago.

If you want to see the page where it mentions a reciprocating engine is a polytropic process, I could photograph it and email it to you.

That would be nice of you. I think I have the book here somewhere (the 6th edition), so I'll try and look for it in the Entropy chapter. If I can't find it, I'll let you know.

update:

I spoke to a professor from the Thermodynamics department, and apparently, there's an error on the original exam sheet. During this particular examination, they made it known to the students then and there that where it said:

"The wall is free to move back and forth and is not adiabatic."

It should have said:

"The wall is NOT free to move back and forth and is not adiabatic."

So, the wall inside stays in place and from there, it's easy to obtain everything they ask for.

I just wish they'd fix the exam sheets and then distribute them.