Energy Balance for Ideal Gas [Example# 3.10 of textbook]
Example: Two tanks are connected by a valve. One tank contains 2-kg CO gas at
77°C and 0.7 bar. The other tank holds 8-kg of the same gas at 27°C and 1.2 bar.
The valve is opened and the gases are allowed to mix while receiving energy by heat
Transfer from the surroundings. The final equilibrium temperature is 42°C. Assuming
Ideal gas behavior with constant $C_p$, determine i) the final equilibrium pressure, in bar
ii) The heat transfer for the process, in kJ.