Mass balance conservation checks

2025-08-03

This week I've been adding some conservation tests to my adsorption simulator AdSim. Although each equation is solved within a given tolerance, this does not imply overall conservation over the domain.

To verify overall mass conservation, we must check that the moles in minus the moles out equals the accumulation within the domain. In a packed bed, moles can accumulate in the gas phase and solid phase. For the gas phase over a step of time tstept_{step}:

Δngas=A0Lϵb(Ct=tstepCt=t0)dz\Delta n_{gas}=A\int_{0}^{L} \epsilon_b(C^{t=t_{step}} - C^{t=t_{0}}) dz

Where CC is the molar concentration. ϵb\epsilon_b is included as the gas phase is only present in the void space between the solid particles. Technically, if the particle void fraction is significant, we must use the total void fraction instead: ϵt=ϵb+(1ϵb)ϵp\epsilon_t=\epsilon_b + (1-\epsilon_b)\epsilon_p. In multi-layered beds, the void fraction may be different in each layer and will therefore change along the length, and so must be included within the integral.

Similarly, for the solid phase:

Δnsolid=A0Lρb(qt=tstepqt=t0)dz\Delta n_{solid}=A\int_{0}^{L} \rho_b(q^{t=t_{step}} - q^{t=t_{0}}) dz

The total accumulation is then the sum of accumulation in both phases: Δnsolid+Δngas\Delta n_{solid} + \Delta n_{gas}. Total accumulation must be balanced by the number of moles entering and leaving the domain, and can be calculated by integrating:

nin=A0tstep(uinCinuoutCout)dtn_{in}=A\int_{0}^{t_{step}} (u_{in}C_{in} - u_{out}C_{out}) dt

The overall mass balance is staisfied when nin=Δnsolid+Δngasn_{in} = \Delta n_{solid} + \Delta n_{gas}

© 2025 Sam Affleck. All rights reserved.

Don't miss the next essay.