It is perhaps surprising that discretization schemes aimed at solving partial differential equations have a direct connection with the model approach depicted in the last sections. However, when the different compartments are visualized as spatially different containers for the pollutant, it becomes clear that the resulting compartment model is nothing else than a spatial discretization of the underlying partial differential equation. In other words, when compartment models are used to discretize the spatial distribution of the pollutant, the method of lines (MOL) is employed to solve the corresponding partial differential equation. This can be seen in the following illustrative example.
The last example can easily be generalized to two- or three-dimensional spatial domains.
Inflow and outflow to and from compartment no. k occur only with respect to the compartments spatially neighboring k, and the system matrix in (3.3) is exactly the standard finite-difference matrix. As a consequence, we regain the well-known method of lines: the space is discretized into a finite number of points or areas or volumes (compartments), while time is treated continuously. It has therefore to be stressed that the simple considerations with respect to the numerical solution of (3.3) made in Section 3.1 are only valid for a small number of compartments not representing a full spatial discretization of a certain volume. Finite-difference methods are known to be prone to numerical difficulties of several types, and the reader is urged to consult the literature before modeling spatial domains with compartment models of a fine spatial resolution.