# Open Systems - Mass Balance Equations

Consider the an open system exchanging substances $1, \dots ,n$ with the environment through the boundery surface $\Sigma$, where $j_1^{\Sigma}, \dots , j_n^{\Sigma}$ are diffusion fluxes and $\rho_1^{\Sigma}, \dots , \rho_n^{\Sigma}$ concentrations of the substances. The normal vector to the surface $\Sigma$ is denoted $n$.
The mass conservation of an arbitrary system can be represented as follows \begin{equation} \frac{d_em}{dt} \equiv \text{mass flow trough surface } \Sigma \end{equation} There is no production of mass in the volume V. But the chemical constituents $(X_1, \dots , X_n)$ can be transformed from one to another. \begin{equation} \frac{dm_j}{dt}=\frac{d_em_j}{dt}+\frac{d_im_j}{dt} \hspace{1cm}j=1, \dots ,n \tag{1} \end{equation} with \begin{equation} \frac{d_im_j}{dt}=\text{Production of }X_j \text{ resulting from chemical reactions.} \end{equation} Assume $X_j$ is a reactant of $r$ chemical reactions with reaction rates $W_{\rho}(\rho =1, \dots , r)$. Supposing ideal mixture, the reaction obeys the laws of perfect solutions. For example, a homogeneous reaction occuring in the volume $\Delta V$: \begin{equation} A- X_j \overset{k_1}{\rightarrow} A+B \end{equation} the rate is \begin{equation} |W_1| = k_1 \Delta V \rho_A \rho_j \end{equation} equivalently, for \begin{equation} A- 2X_j \overset{k_2}{\rightarrow} A+B+C \end{equation} the rate is \begin{equation} |W_2| = k_2 \Delta V \rho_A \rho_j^2 \end{equation} The stoichiometric coefficients $v$ of $X_j$ tells us how many molecules disappear in each reaction ($v_1=-1$ $v_2=-2$). The total mass of constituent $X_j$ disappearing in this case is: \begin{equation} \frac{d_im_j}{dt}=-k_1 \Delta V \rho_A \rho_j - k_2 \Delta V \rho_A \rho_j^2 \end{equation} or in general: \begin{equation} \frac{d_im_j}{dt}=\sum_{\rho=1}^r v_{j\rho} W_{\rho} \end{equation} we now write Eq. (1) as \begin{equation} \frac{dm_j}{dt}=\frac{d_em_j}{dt}+\sum_{\rho=1}^r v_{j\rho} W_{\rho} \tag{2} \end{equation} Using mass density variables and introducing a reaction rate per unit volume, $w_{\rho}$ \begin{equation} W_{\rho}=\int_V dV \, w_{\rho} \end{equation} Equation (2) reduces to \begin{equation} \frac{d}{dt} \int_V dV \, \rho_j = \frac{d_em_j}{dt} +\sum_{\rho=1}^r v_{j\rho} \int_V dV \, w_{\rho} \tag{3} \end{equation} The chemical system we considered is in general spatially inhomogeneous. The flow term $d_em_j/dt$ describes the destibution of matter penetrating into $V$ through the surface $\Sigma$ \begin{equation} \frac{d_em_j}{dt}=-\int_{\Sigma} \mathbf{ j}_j^{\Sigma} \cdot \mathbf{n} \end{equation} with the corresponding diffusion flux $\mathbf{j}_j^{\Sigma}$. The normal vector $\mathbf{n}$ in figure above is pointing outwards V so the surface integral can be transformed by the Gaussian divergence theorem: \begin{equation} \int_{\Sigma} \mathbf{ j}_j^{\Sigma} \cdot \mathbf{n}=\int_V dV \, div \, \mathbf{j}_j^{\Sigma} \end{equation} so finally we get for the Eq. (3) a local equation for $\rho_j$. Assuming mechanical equilibrium, the derivative $d/dt$ commutes with the integral sign. We obtain
\begin{equation} \frac{\partial \rho_j}{\partial t}=- div \, \mathbf{j}_j + \sum_{\rho}v_{j \rho} w_{\rho} \end{equation} This is a system of nonlinear partial differential equations, since the $w_{\rho}$ values are even in simple cases nonlinear functions of $\left\lbrace \rho_j \right\rbrace$ values.