Cross-section averaged phase mass balance (source code)

= Cross-section averaged phase mass balance
{title2=$\partial_t(\alpha\bar\rho)+\partial_x(\alpha\bar\rho\bar u)=0$}

For a pipe of area $A$, let a phase <indicator function> be $\chi$. Define $\alpha=A^{-1}\int\chi\,dA$, $\bar\rho=(A\alpha)^{-1}\int\chi\rho\,dA$ and the mass-weighted axial velocity $\bar u=(A\alpha\bar\rho)^{-1}\int\chi\rho u_x\,dA$. Without interfacial mass transfer, integrate $\partial_t(\chi\rho)+\nabla\cdot(\chi\rho\mathbf u)=0$ over a cross-section with impermeable lateral wall. The resulting averaged mass and flux are exactly $\alpha\bar\rho$ and $\alpha\bar\rho\bar u$, proving the displayed law. The complementary phase uses $1-\chi$ and $1-\alpha$. An unweighted phase velocity would not generally factor the mass flux correctly.