# Mixing fluids of different pressure

## Main Question or Discussion Point

Suppose, there is a container containing 7 kg of air at 2 barA pressure and another container that contains 1 kg of air at 40 barA pressure. Now, they are connected by a tube. What would be the final pressure of the mixture?
As per simple arithmetic, it would be 54/8 barA i.e. around 7 barA. Am I right?

Assuming that the system is not thermally insulated, for the first tank, the number of moles is $$n_1=\frac{m_1}{M}$$, and the volume from the ideal gas law is is $$V_1=\frac{m_1}{M}\frac{RT}{p_1}$$
for the second tank, the number of moles is $$n_2=\frac{m_2}{M}$$, and the volume from the ideal gas law is is $$V_2=\frac{m_2}{M}\frac{RT}{p_2}$$So the final number of moles is $$n=\frac{m_1}{M}+\frac{m_2}{M}=\frac{(m_1+m_2)}{M}$$ and the final volume is $$V=\frac{RT}{M}\left(\frac{m_1}{p_1}+\frac{m_2}{p_2}\right)$$So the final pressure from the ideal gas law is $$p=\frac{nRT}{V}=\frac{(m_1+m_2)}{\left(\frac{m_1}{p_1}+\frac{m_2}{p_2}\right)}=\frac{8}{\left(\frac{7}{2}+\frac{1}{40}\right)}=2.27\ bars$$