# Contradictory result for mass balance

I solved this problem by doing a mass balance for the mixing chamber and an energy balance for the water heater and the mixing chamber as follows:

$$\dot{m}_{\text{mix}}=\dot{m}_{\text{Tank}}+\dot{m}_{\text{Cold}}\\ \\ \dot{m}_{\text{mix}}\hat{H}_{\text{mix}}=\dot{m}_{\text{Tank}}\hat{H}_{\text{tank}}+\dot{m}_{\text{Cold}}\hat{H}_{\text{cold}}\\ \\ \frac{m_{\text{water in tank}}C_{\text{v}}\left ( T_2-T_1 \right )}{\Delta t}=\dot{W}_{\text{e}}+\dot{m}_{\text{Cold}}\hat{H}_{\text{cold}}-\dot{m}_{\text{Tank}}\hat{H}_{\text{tank}}$$

resulting in:

$$\dot{m}_{\text{Tank}}=0.05838 \text{ kg/s}\\ {T}_{\text{shower}}=44.67 \text{ °C}$$

and my results are in agreement with the solutions manual. But, if I do a mass balance in the water heater I obtain

$$\dot{m}_{\text{water heater}}=\dot{m}_{\text{Cold}}-\dot{m}_{\text{TanK}}$$

and if I replace the value that I have obtained previously, I do not obtain a zero mass flow for the tank. So, ¿Is my answer or mass balance wrong, or I misunderstand something in the problem statement?

Regards

$$\iint_S \rho(\vec{v}_{in}.\vec{n}) \,ds+\iint_S \rho(\vec{v}_{out}.\vec{n}) \,ds+\frac{\partial }{\partial t}\iiint_V \rho \,dV = 0$$
The first two terms are mass flux into and out of the control volume respectively, and the third term represents the mass accumulation, here the last term is zero. $$\rho$$ is the density and $$\vec{v}_{in}$$, $$\vec{v}_{out}$$ the velocity of the fluid. Notice the terms in the above equation have the dimension of $$\frac{kg}{s}$$.
By defining the tank as the control volume, the mass per second that exits the tank is indeed equal to $$0.05838\frac{kg}{s}$$ (assuming your calculations are correct). By assuming no accumulation in the tank, this mass should be replaced by the cold water, however this is not necessarily equal to the mass of cold water mixing in the mixing chamber. You confuse the control volume of the tank with the control volume of the mixing chamber. Another way to say it, is there are two channels that provide the cold water, one goes into the tank with the same mass rate as the hot water comes out of the other side, and the one goes inside the mixing chamber. Now if you define the control volume as the volume of the tank and the mixing chamber then you'll see, the $$m_{mix}$$ is equal to $$m_{tank} + m_{cold, chamber} +m_{cold, tank}$$