From Diffusion to Compartments
A spatial model may represent tissue as a continuous concentration field or as a set of well-mixed regions connected by exchange. The second representation can be useful when the model already tracks compartments, or when a lower-dimensional approximation is needed. But a chain of compartments does not represent diffusion merely because neighboring regions exchange material: the exchange rate must scale with spacing in a way consistent with diffusive flux.
This tutorial derives that scaling for a uniform one-dimensional tissue, then shows how to test whether the resulting compartment profile is sufficiently close to the continuous one. The compartment model is an approximation whose quality depends on the spatial variation being represented, not just on the number of compartments.
This definition assumes constant \(D\), equal compartment volumes, equal spacing, and concentration that is uniform within each compartment. The last assumption is the key lumping approximation: the model retains differences between compartments but discards variation inside each one. Local reaction or loss can be added to each compartment separately. The exchange rule is not a claim that molecules move directly between physical, perfectly mixed boxes; it is a finite-volume approximation to the diffusive flux between adjacent tissue regions.
Deriving the Exchange Rule
For adjacent compartment centers separated by \(h\), approximate the concentration gradient at their shared interface by \((C_{i+1}-C_i)/h\). Fick's law gives the rate of material transfer into compartment \(i\) from compartment \(i+1\) as \(D A(C_{i+1}-C_i)/h\). Divide this amount-per-time by the receiving volume \(Ah\) to obtain its contribution to the concentration rate of change. Applying the same calculation at the other interface gives the interior-compartment equation:
The factor \(A\) cancels because the same area appears in the interface flux and the compartment volume. The rate \(k\) therefore has units \((\text{length}^2/\text{time})/(\text{length}^2)=1/\text{time}\). If the compartments have unequal volumes or interface areas, this uniform formula does not apply unchanged: transfer rates must be divided by the appropriate receiving volumes.
At an interior interface, the amount leaving one compartment enters the next at the same rate. Thus, with no-flux outer boundaries and no reactions, total amount is conserved. For equal volumes, total amount is proportional to \(\sum_i C_i\). In a finite tissue, endpoint equations must represent the chosen boundary condition consistently; the interior equation alone does not specify them. A prescribed boundary concentration, a prescribed boundary flux, and a no-flux boundary are different physical conditions.
Worked Example: Checking Exchange and Mass Balance
Suppose three equal-volume compartments have concentrations \(C_1=10\), \(C_2=4\), and \(C_3=1\) micromolar. Let \(D=0.02\) square millimeters per minute and \(h=0.20\) millimeters. Assume no-flux outer boundaries and no reactions.
The exchange rate is \(k=D/h^2=0.02/(0.20)^2=0.50\) per minute. For the first compartment, the no-flux boundary leaves only exchange with compartment 2: \(dC_1/dt=k(C_2-C_1)=0.50(4-10)=-3.0\) micromolar per minute.
For the middle compartment, \(dC_2/dt=k(C_1-2C_2+C_3)=0.50(10-8+1)=1.5\) micromolar per minute. For the last compartment, \(dC_3/dt=k(C_2-C_3)=0.50(4-1)=1.5\) micromolar per minute.
The sum of the three concentration rates is \(-3.0+1.5+1.5=0\). Since the volumes are equal, total amount is conserved. The first compartment loses material, and the other two gain precisely the same total amount. The concentration units are micromolar; multiplying each concentration rate by its compartment volume gives amount per minute.
How Spacing Controls Approximation Quality
The discrete exchange equation uses a centered second difference to approximate the continuous spatial derivative. For a sufficiently smooth concentration profile, that difference approaches the second derivative as \(h\) decreases. But a profile that changes substantially within one compartment cannot be represented accurately by one concentration per compartment. A useful practical check is therefore to compare \(h\) with the shortest spatial scale that materially affects the prediction, such as a penetration depth or a wavelength of a spatial mode.
The effect of spacing can be quantified for a spatial Fourier mode. Let its wavenumber be \(\kappa\), in inverse length, so the mode varies as \(e^{\mathrm{i}\kappa x}\). Substitution into the continuous diffusion equation gives a decay rate \(D\kappa^2\). Substitution into the compartment equation gives a different rate:
As \(\kappa h\) approaches zero, the ratio approaches one. At larger \(\kappa h\), the discrete mode decays more slowly than the continuous mode. In other words, a coarse compartment chain smooths short-wavelength variation less rapidly than the diffusion equation does. For small \(\kappa h\), the ratio is approximately \(1-(\kappa h)^2/12\), so this expression can provide a quantitative, mode-specific spacing check. It is not a universal error guarantee for every nonlinear model or boundary condition.
Worked Example: Comparing Diffusion of a Spatial Mode
Consider a hypothetical mode with wavelength \(2.0\) millimeters, so \(\kappa=2\pi/(2.0)=\pi\) per millimeter. Let \(D=0.020\) square millimeters per minute and \(h=0.20\) millimeters. Then \(\kappa h=0.6283\), and \(\kappa h/2=0.3142\).
The ratio of discrete to continuous decay rates is \(\left[\sin(0.3142)/0.3142\right]^2=(0.3090/0.3142)^2=0.9675\). The continuous decay rate is \(D\kappa^2=0.020\pi^2=0.1974\) per minute, so the discrete rate is \(0.9675(0.1974)=0.1910\) per minute. For this mode and spacing, the compartment model predicts a decay rate about 3.25% lower than the continuous model.
If the spacing is increased to \(0.50\) millimeters, then \(\kappa h/2=0.7854\). The rate ratio becomes \([\sin(0.7854)/0.7854]^2=0.8106\), a roughly 18.9% reduction relative to the continuous rate. The comparison shows why a spacing that is acceptable for broad gradients may be too coarse to reproduce finer spatial structure.
Steady Profiles with Local Loss
A second useful check concerns a steady gradient shaped by diffusion and local first-order loss. For a continuous one-dimensional model with loss rate \(\lambda\), a steady profile away from sources satisfies \(D\,d^2C/dx^2-\lambda C=0\). Its decaying solution has the form \(C(x)\propto e^{-qx}\), where \(q=\sqrt{\lambda/D}\) and the continuous attenuation length is \(1/q\).
For the compartment model, the steady interior equation is \(k(C_{i-1}-2C_i+C_{i+1})-\lambda C_i=0\). Substituting a decaying sequence \(C_i\propto e^{-qih}\) gives the discrete attenuation relation below. This provides a direct check of how compartment spacing affects the shape of a reaction-diffusion profile.
Worked Example: Checking a Steady Attenuation Profile
Suppose a hypothetical tissue has \(D=0.020\) square millimeters per minute and first-order loss \(\lambda=0.080\) per minute. The continuous attenuation rate is \(q=\sqrt{0.080/0.020}=2.000\) per millimeter, giving an attenuation length of \(0.500\) millimeters.
With \(h=0.10\) millimeters, \(k=D/h^2=2.00\) per minute. Thus \(\cosh(q_{\mathrm{disc}}h)=1+0.080/(2(2.00))=1.020\), so \(q_{\mathrm{disc}}=\operatorname{arcosh}(1.020)/0.10=1.997\) per millimeter. The attenuation length is \(1/1.997=0.5008\) millimeters, close to the continuous value.
With \(h=0.50\) millimeters, \(k=0.020/(0.50)^2=0.080\) per minute. Now \(\cosh(q_{\mathrm{disc}}h)=1+0.080/(2(0.080))=1.50\), giving \(q_{\mathrm{disc}}=\operatorname{arcosh}(1.50)/0.50=1.925\) per millimeter. Its attenuation length is \(0.5195\) millimeters. The rate differs from the continuous value by about 3.76%; over one millimeter, the continuous exponential factor is \(e^{-2.000}=0.1353\), whereas the discrete attenuation factor is \(e^{-1.925}=0.1459\). Whether this discrepancy is acceptable depends on the model's intended use and required accuracy.
Diagnostics, Alternatives, and Limitations
A compartment approximation should be checked against its intended outputs, rather than judged by visual smoothness alone. Useful diagnostics include:
- Refinement: reduce \(h\) while keeping the physical domain, \(D\), reactions, and boundary conditions fixed. Compare quantities such as penetration depth, peak concentration, and total tissue amount.
- Mass balance: with no-flux boundaries and no reactions, verify that the sum of compartment amounts stays constant. For equal volumes, this is equivalent to checking that \(\sum_i C_i\) stays constant.
- Spatial resolution: compare compartment width with relevant gradients or wavelengths. A large change in a concentration across one compartment is a warning that within-compartment variation matters.
- Physical behavior: check that concentrations do not become negative and that the expected smoothing direction is present. Unexpected oscillations or boundary distortions can signal an implementation or discretization problem.
The main alternative is a continuous reaction-diffusion model, which represents concentration at every position and is appropriate when spatial detail is central. A finite-difference or method-of-lines model also uses spatial points and ordinary differential equations; with consistent fluxes, it is mathematically closely related to the compartment chain derived here. The practical distinction is often how the spatial grid is interpreted and whether the model needs compartment-level states for other processes. A single well-mixed compartment is simpler still, but cannot represent a spatial gradient at all.
A common mistake is to choose an exchange rate independently of spacing, or to keep \(k\) fixed while changing \(h\). For diffusion, \(k=D/h^2\): halving \(h\) increases \(k\) fourfold. Holding \(k\) fixed during refinement changes the implied diffusion coefficient to \(kh^2\), so it does not test convergence to the same tissue model. Another pitfall is assuming that an accurate interior exchange rule guarantees an accurate boundary. Boundary fluxes and prescribed concentrations must be represented consistently with the physical problem.
Compartment models are limited when gradients are sharp within compartments, tissue properties vary substantially across space, or geometry makes equal-width, equal-volume regions inappropriate. Those cases may require nonuniform volumes, spatially varying interface conductances, or an explicitly spatial model. The decisive test is whether refinement and comparison with the relevant continuous scale leave the predictions of interest acceptably unchanged.
Check Your Understanding
Answer each question using the assumptions and equations developed above. Short solutions follow the questions.
- If \(D=0.012\) square millimeters per minute and \(h=0.15\) millimeters, what exchange rate \(k\) gives the uniform compartment approximation?
- Why does a no-flux chain of equal-volume compartments conserve total amount when there are no reactions?
- For a spatial mode with \(\kappa h\) not small, does the discrete mode decay faster or slower than the continuous mode?
- In the steady loss model, how does reducing \(h\) affect the discrete attenuation rate relative to the continuous rate?
- Why is it invalid to keep \(k\) fixed when halving \(h\) in a refinement check intended to represent the same diffusion coefficient?
Solutions. (1) \(k=0.012/(0.15)^2=0.5333\) per minute. (2) Each internal interface contributes an equal and opposite amount transfer to its two neighboring compartments; with no boundary flux, those transfers cancel in the total. (3) It decays more slowly, since \([\sin(\kappa h/2)/(\kappa h/2)]^2<1\) for nonzero \(\kappa h\). (4) Reducing \(h\) brings the discrete attenuation rate closer to the continuous value, as the discrete relation approaches \(q=\sqrt{\lambda/D}\). (5) Since \(D=kh^2\), fixed \(k\) and halved \(h\) imply a diffusion coefficient one quarter as large, not the same tissue model.