# 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 $$\frac{d_em}{dt} \equiv \text{mass flow trough surface } \Sigma$$ 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. $$\frac{dm_j}{dt}=\frac{d_em_j}{dt}+\frac{d_im_j}{dt} \hspace{1cm}j=1, \dots ,n \tag{1}$$ with $$\frac{d_im_j}{dt}=\text{Production of }X_j \text{ resulting from chemical reactions.}$$ 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$: $$A- X_j \overset{k_1}{\rightarrow} A+B$$ the rate is $$|W_1| = k_1 \Delta V \rho_A \rho_j$$ equivalently, for $$A- 2X_j \overset{k_2}{\rightarrow} A+B+C$$ the rate is $$|W_2| = k_2 \Delta V \rho_A \rho_j^2$$ 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: $$\frac{d_im_j}{dt}=-k_1 \Delta V \rho_A \rho_j - k_2 \Delta V \rho_A \rho_j^2$$ or in general: $$\frac{d_im_j}{dt}=\sum_{\rho=1}^r v_{j\rho} W_{\rho}$$ we now write Eq. (1) as $$\frac{dm_j}{dt}=\frac{d_em_j}{dt}+\sum_{\rho=1}^r v_{j\rho} W_{\rho} \tag{2}$$ Using mass density variables and introducing a reaction rate per unit volume, $w_{\rho}$ $$W_{\rho}=\int_V dV \, w_{\rho}$$ Equation (2) reduces to $$\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}$$ 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$ $$\frac{d_em_j}{dt}=-\int_{\Sigma} \mathbf{ j}_j^{\Sigma} \cdot \mathbf{n}$$ 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: $$\int_{\Sigma} \mathbf{ j}_j^{\Sigma} \cdot \mathbf{n}=\int_V dV \, div \, \mathbf{j}_j^{\Sigma}$$ 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
$$\frac{\partial \rho_j}{\partial t}=- div \, \mathbf{j}_j + \sum_{\rho}v_{j \rho} w_{\rho}$$ 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.