Mixing two containers of each water and ethanol to varying degrees of purity In the following question, the water/wine mixing problem was recast in chemical terms. However, partial molar volumes can make this a much more challenging problem than it appears on the surface. 

https://chemistry.stackexchange.com/questions/33579/wine-water-mixing-problem

For example, consider a container of $\pu{10 L}$ of ethanol and another container of $\pu{10 L}$ of water. To make a point, let's transfer $\pu{5 L}$ of ethanol to the water container and then transfer $\pu{5 L}$ of the water/ethanol solution back to the ethanol container. What is the purity in each container at the end?

We need to consider that mixtures of water and ethanol have less volume than the two do separately:



For example, after the first transfer, the water container contains $\pu{10.000 kg}$ of water and $\pu{3.945 kg}$ of ethanol for a total mass of $\pu{13.945 kg}$. However, we need to compute mole fraction to determine the volume of the solution:

$$\begin{array}{c|c|c}
\ &amp; \text{water} &amp; \text{ethanol}\\ \hline
\text{mass in kg} &amp; 10.000 &amp; 3.945\\ \hline
\text{moles} &amp; 555 &amp; 85.6\\ \hline
\text{mole fraction} &amp; 0.866 &amp; 0.134
\end{array}$$

From our graph, it looks like we have an excess volume of $\pu{-0.75 mL/mol}$. Since we have total moles $=640.6$, we have an excess volume of $\pu{-0.75 mL/mol}\times \pu{640.6 mol}\times \pu{1 \times 10^{-3} L/mL}= \pu{-0.480 L}$. Thus the actual volume is not $\pu{15 L}$ but more like $\pu{14.5 L}$. 

If we transfer $\pu{5 L}$ back, we are left with less than $\pu{10 L}$ in the water container. We will also have less than $\pu{10 L}$ in the ethanol container! 


  What volume $V_1$, as a fraction of the original volume $V_0$, needs to be transferred in order for both containers to have the same final purity?
$$\begin{array}{c|c|c}
\ &amp; \text{water} &amp; \text{ethanol}\\ \hline
\text{Volume in concern, in L} &amp; 10.00 &amp; 5.00 \\ \hline
\text{Density in kg/L} &amp; 1.000 &amp; 0.789 \\ \hline
\text{Molar mass in g/mol} &amp; 18.015 &amp; 46.069\\ \hline
\text{mass in kg} &amp; 10.000 &amp; 3.945\\ \hline
\text{moles} &amp; 555 &amp; 85.63\\ \hline
\text{mole fraction} &amp; \frac{555}{555+85.63} = 0.866 &amp; \frac{85.6}{555+85.63} = 0.134
\end{array}$$

From the given graph, it looks like we have an excess volume of $\pu{-0.75 mL/mol}$ (at $\chi_\text{EtOH}=0.134$). Since we have total amount of water and ethanol, $555+85.63=\pu{640.63 mol}$, we can calculate the excess volume of the container:

$$\pu{-0.75 mL/mol} \times \pu{640.63 mol} \times \pu{1 \times 10^{-3} L/mL}= \pu{-0.480 L}$$
Thus the actual volume is not $\pu{15 L}$, but $\pu{(10.00+5.00-0.480) L}=\pu{14.52 L}$

Suppose, we transfer $V_1$ of water/ethanol mixture back to the container-2 containing the remaining of $\pu{5.00 L}$ of ethanol. That $V_1$ contains:
$$\frac{\pu{555 mol}\text{ water}}{\pu{14.52 L}}\times V_1 \ \pu{L} = 38.22V_1 \ \pu{mol}\text{ water}$$ 
and,
$$\frac{\pu{85.63 mol}\text{ EtOH}}{\pu{14.52 L}}\times V_1 \ \pu{L} = 5.90V_1 \ \pu{mol}\text{ EtOH}$$

Thus container-2 has $38.22V_1 \ \pu{mol}$ of water and $\left(5.90V_1 + \pu{85.63 mol}\right)$ of ethanol after the addition of $V_1 \ \pu{L}$ of water/ethanol mixture from container-1.

Suppose we have made both containers have the same purity (by $\%(w/w)$) by this action. Let's calculate the masses of water and ethanol ($m_{w2}$ and $m_{et2}$, respectively) in container-2:

$$m_{w2} = 38.22V_1 \ \pu{mol}\text{ water}\times \frac{\pu{18.015 g}\text{ water}}{\pu{1.0 mol}\text{ water}}= 688.5 V_1 \ \pu{g}\text{ water}$$

Similarly,

$$m_{et2} = \left(5.90V_1 + 85.63\right) \ \pu{mol}\text{ EtOH}\times \frac{\pu{46.069 g}\text{ EtOH}}{\pu{1.0 mol}\text{ EtOH}}= \left(271.8V_1 + 3945\right) \ \pu{g} \text{EtOH}$$

Now, we'll calculate the masses of water and ethanol ($m_{w1}$ and $m_{et1}$, respectively) in container-1. Amounts of water and ethanol in this container is:

$$\frac{\pu{555 mol}\text{ water}}{\pu{14.52 L}}\times (14.52 - V_1) \ \pu{L} = \left(555 - \frac{555V_1}{14.52}\right) \ \pu{mol}\text{ water}$$ 
and,
$$\frac{\pu{85.63 mol}\text{ EtOH}}{\pu{14.52 L}}\times (14.52 - V_1) \ \pu{L} = \left(85.63 - \frac{85.63V_1}{14.52}\right)  \ \pu{mol}\text{ EtOH}$$

Thus,

$$m_{w1} = \left(555 - \frac{555V_1}{14.52}\right) \ \pu{mol}\text{ water}\times \frac{\pu{18.015 g}\text{ water}}{\pu{1.0 mol}\text{ water}}= \left(555 - \frac{555V_1}{14.52}\right)\times   \pu{18.015 g}\text{ water}$$

Similarly,

$$m_{et1} = \left(85.63 - \frac{85.63V_1}{14.52}\right)  \ \pu{mol}\text{ EtOH}\times \frac{\pu{46.069 g}\text{ EtOH}}{\pu{1.0 mol}\text{ EtOH}}= \left(85.63 - \frac{85.63V_1}{14.52}\right)\times   \pu{46.069 g}\text{ EtOH}$$

Theoretically, the condition for same purity by $w/w$ is:

$$\frac{m_{w1}}{m_{w1}+m_{et1}} = \frac{m_{w2}}{m_{w2}+m_{et2}} $$

or

$$\frac{m_{et1}}{m_{w1}+m_{et1}} = \frac{m_{et2}}{m_{w2}+m_{et2}} $$