## New Research In

### Physical Sciences

### Social Sciences

#### Featured Portals

#### Articles by Topic

### Biological Sciences

#### Featured Portals

#### Articles by Topic

- Agricultural Sciences
- Anthropology
- Applied Biological Sciences
- Biochemistry
- Biophysics and Computational Biology
- Cell Biology
- Developmental Biology
- Ecology
- Environmental Sciences
- Evolution
- Genetics
- Immunology and Inflammation
- Medical Sciences
- Microbiology
- Neuroscience
- Pharmacology
- Physiology
- Plant Biology
- Population Biology
- Psychological and Cognitive Sciences
- Sustainability Science
- Systems Biology

# Transit-time and age distributions for nonlinear time-dependent compartmental systems

Edited by Steven C. Wofsy, Harvard University, Cambridge, MA, and approved December 15, 2017 (received for review May 4, 2017)

## Significance

What is the distribution of the time required for particles to transit a compartmental system? What is the age distribution of particles in the system? These questions are important to understand the dynamics of modeled processes in many scientific fields. Until now, they could be answered only for systems in steady state, but the steady-state assumption is very restrictive and almost always unreasonable. Nonlinear relations between compartments and changing environmental factors keep systems permanently changing. A theory is presented here to describe the time evolution of age densities under changing environmental influences in nonlinear systems. An application is provided, addressing questions of high scientific and societal interest such as the lifetime of fossil fuel-derived atmospheric carbon.

## Abstract

Many processes in nature are modeled using compartmental systems (reservoir/pool/box systems). Usually, they are expressed as a set of first-order differential equations describing the transfer of matter across a network of compartments. The concepts of age of matter in compartments and the time required for particles to transit the system are important diagnostics of these models with applications to a wide range of scientific questions. Until now, explicit formulas for transit-time and age distributions of nonlinear time-dependent compartmental systems were not available. We compute densities for these types of systems under the assumption of well-mixed compartments. Assuming that a solution of the nonlinear system is available at least numerically, we show how to construct a linear time-dependent system with the same solution trajectory. We demonstrate how to exploit this solution to compute transit-time and age distributions in dependence on given start values and initial age distributions. Furthermore, we derive equations for the time evolution of quantiles and moments of the age distributions. Our results generalize available density formulas for the linear time-independent case and mean-age formulas for the linear time-dependent case. As an example, we apply our formulas to a nonlinear and a linear version of a simple global carbon cycle model driven by a time-dependent input signal which represents fossil fuel additions. We derive time-dependent age distributions for all compartments and calculate the time it takes to remove fossil carbon in a business-as-usual scenario.

Compartmental systems are used in a large variety of scientific fields such as systems biology, toxicology, ecology, hydrology, and biogeochemistry (1⇓⇓⇓⇓–6). The dynamics of such systems can be better understood if it is known how long particles need to travel through the system (transit time), how old particles in a specific compartment are (compartment age), and how old the particles in the system are (system age) (7, 8).

A first attempt to compute age structures of compartmental systems was to establish density formulas in dependence on a not explicitly known system response function (9). A similar response function approach was further used to derive explicit formulas for models with very simple structure (10) and to obtain age densities by long-term numerical simulations (11). Only recently, explicit density formulas have been derived by a probabilistic approach (12). Most importantly, all these approaches were concerned with linear time-independent models in steady state. This restriction is often very unrealistic since most systems in nature are intrinsically nonlinear and influenced by time-depending factors (e.g., a fluctuating external environment). For such systems out of steady state, formulas have been developed for one-compartment hydrological systems, without expanding the theory to networks of multiple interconnected compartments (13⇓–15). A first milestone in this direction was the mean age system (16), a system of linear ordinary differential equations (linear ODEs) describing the time evolution of mean compartment ages of linear systems with time-dependent coefficients.

In this article, we derive formulas not only for means, but also for entire densities of transit time, compartment ages, and system age of time-dependent models. Moreover, our approach works even for nonlinear models. We further extend the mean age system to higher-order moments. This allows a simple computation also of the variance and the SD. Additionally, we provide ODEs to describe the time evolution of quantiles such as the median of age distributions. This framework results in much faster computations of entire age distributions than what was possible before. These results generalize many earlier results from different scientific fields such as atmospheric sciences, ecology, and hydrology. In *S6. The Relations to Earlier Results and Possible Applications*, we explain in detail how our framework relates to these fields.

As an example application of our theoretical results, we apply them to a simple global carbon cycle model and address the following questions: How old is atmospheric carbon? How long will a significant fraction of a pulse of fossil fuel carbon, emitted to the atmosphere today, remain in the system? We compare transit times and ages of a nonlinear and a linear version of the model and highlight significant differences in their age structure, which were not possible to characterize by the mean ages alone.

## 1. Well-Mixed Compartmental Systems

Following ref. 6, a compartment of a well-mixed system is an amount of kinetically homogeneous material. Kinetically homogeneous means that any material entering the system is immediately mixed with the material of the compartment. A well-mixed compartmental system is then a collection of **1** is supposed to admit a unique solution on

Eq. **1** describes how mass flows into the system through the vector-valued input function

A quadratic matrix is called compartmental if all its diagonal entries are nonpositive, all its off-diagonal entries are nonnegative, and all its column sums are nonpositive (6).

### A. Classification of Compartmental Systems.

It is important to note that, in a general compartmental system,

### B. Linear Interpretation of the Nonlinear Solution.

Only in special cases can we find an analytical solution to Eq. **1**. Nevertheless, we assume to know the unique solution at least numerically and denote it by **1** and both systems are equivalent, **1** as being the solution of the equivalent linear system **2**. This linear interpretation of

### C. General Solution of the Linear System.

We consider the linear time-dependent compartmental system*S1. The State Transition Matrix Φ*). This state transition matrix describes the transport of particles through the system and is a generalized Green’s function. Since the system is time dependent,

From Eq. **4** we see that the vector of compartment contents at time

## 2. Age Distributions

### A. Compartment Age Densities.

We now assume that the initial content

It turns out that **1**, since (*S2. The McKendrick–von Foerster Equation*), for

### B. System Age Density.

The age density of the entire system is just the sum of the compartment age densities, and we denote it by

### C. Cumulative Compartment Age Distribution.

We denote by uppercase letters the cumulative age distributions corresponding to age densities. This means for the initial age density **5**,

### D. Cumulative System Age Distribution.

The mass in the system with age

## 3. Moments of Age Distributions

For any nonnegative integer **15**.

### A. Moments of Compartment Ages.

#### A.1. Semiexplicit formula for compartment age moments.

To circumvent this problem, we can use the McKendrick–von Foerster Eq. **8** to compute (*S3. The Semiexplicit Formula for Compartment Age Moments*) the

#### A.2. Compartment age moment system.

Another way to compute the age moments is to set up and solve an appropriate system of first-order differential equations which we call the compartment age moment system. This system is a straightforward *S4. The Compartment Age Moment System*)**17** has the advantage of solving the compartments’ age moments through time alongside the compartments’ contents. This procedure is both fast and numerically robust.

### B. System Age Moment.

The

## 4. Age Quantiles

In addition to moments, quantiles of the age distributions are important statistics. As a special case, the unique age

### A. Compartment Age Quantiles.

For *S5. The Age Quantiles*) that

### B. System Age Quantiles.

Likewise, the

## 5. Transit-Time Distributions

### A. Backward Transit Time.

Following ref. 16, we define the backward transit time **15** we obtain for the **15**, yields

### B. Forward Transit Time.

For a particle entering the system at its arrival time

If we want to compute the moments of **15** and deal with an integral from zero to infinity. Unfortunately, we cannot profit from the close link (Eq. **28**) between FTT and BTT, since the exit time

## 6. Application to a Simple Global Carbon Cycle Model

We consider the simple global carbon cycle model introduced in ref. 3 and depicted in Fig. 1. It consists of three compartments: atmosphere (*i*) *ii*) *i* is from the original publication (3) and describes a nonlinear scenario. Parameter set *ii* makes the model become linear and we use this scenario as a reference measure for the nonlinear version (*i*). A detailed description and how the notation from the original publication (3) can be transformed to fit Eq. **1** is given in *S7. The Detailed Model Description*. In *S8. The Derivation of the Results from the Example Application* we explain in detail how our derived formulas can be used to produce the following results.

We consider the system in equilibrium in the year 1765 and observe different age densities in the different compartments (Fig. 2). After the year 1765, we perturb the system by an additional external input flux _{2} concentrations after the year 2250 achieved by linear adjustment of emissions after the year 2150 (21). The perturbations make the age densities change with time such that they can be depicted by 2D surfaces in a 3D space (Fig. 4).

To obtain useful information from these density functions, we address two climate-relevant questions inspired by O’Neill et al. (22):

### How Old Is Atmospheric Carbon?

The entire time evolutions of the atmospheric carbon’s age density derived from the two versions of the model are depicted in Fig. 4 (*Left*, nonlinear; *Center*, linear), and so we can answer the question of age of atmospheric carbon for all years between 1765 and 2500. In the year 2017, its mean age is

In these numbers we recognize only very little differences between the nonlinear and the linear model. Nevertheless, we can observe important differences in the entire evolution of the age distributions depicted in Fig. 4, *Left* and *Center*. The differences are twofold. First, the pure amount of atmospheric carbon is much higher in the nonlinear model. Second, the age distributions of atmospheric carbon show also different shapes for the two scenarios. This results in the nonflat surface shown in Fig. 4, *Right*, depicting the difference between the densities of atmospheric carbon in the nonlinear and the linear version of the model.

### How Long Will a Significant Fraction of a Pulse of Fossil Fuel Carbon, Emitted to the Atmosphere Today, Remain in the System?

We consider carbon entering directly into the atmosphere at specific times *Left* for the nonlinear model the forward transit-time distribution of mass injected between 1800 and 2170 constantly shifts to older ages, while it shifts back to younger ages after 2170. The medians of the forward transit time of mass injected in the years 1800, 1990, 2015 (Paris Agreement), 2170, and 2300 are given by *Right* shows, the situation is very different in the linear scenario. Here, the forward transit-time distribution does not depend at all on the injection time and remains the same as in the steady state in the year 1765, because the coefficients of

## 7. Summary and Conclusions

We obtained transit-time and age distributions for well-mixed compartmental models. Our results are not restricted to linear models or systems in steady state, but hold even for nonlinear time-dependent models. This fundamental advance allows us to drop the assumption that the system is in equilibrium, an assumption which is unreasonable for most natural systems.

The derivation of the formulas for the age densities relies only on the general solution formula for linear time-dependent systems (Eq. **4**). In nonlinear systems, known solution trajectories are interpreted linearly and then the systems can be treated as if they were linear. This approach also allows us to consider age densities of subsystems such as all mass that entered the system through a specific compartment (*S8. The Derivation of the Results from the Example Application*).

Additionally, we obtained ODEs to compute means, higher-order moments, and quantiles (e.g., the median) of ages. This leads, by very fast computations, to much more precise characterizations of age distributions than were possible before by looking only at the means.

The power of these results is shown in an application to a simple global carbon cycle model. We demonstrate how much transit-time and age distributions differ between a nonlinear and a linear version of the model. First, nonlinearities lead to a tremendously higher amount of carbon in the atmosphere. Second, these two versions of a simple model already suggest that the lifetime of fossil fuel-derived atmospheric carbon is substantially increased by nonlinear processes (23). Sizable differences in transit-time and age distributions of the two model versions might be a criterion to select one version or the other.

We stress that the model used here is very simple and used mainly to demonstrate the power and versatile applications of our mathematical framework in a comprehensible manner. It is important to emphasize that for any global carbon cycle model represented as a well-mixed compartmental system, no matter how many compartments it comprises, we could answer questions of high scientific and societal interest (e.g., the age of the current atmospheric carbon and the future exit age of carbon that now enters the system).

Our results are not restricted to carbon cycle models, of course, but can be readily applied to all possible well-mixed compartmental systems. To that end, we provide a Python package which implements all theoretical results and makes them usable by a few simple commands (https://github.com/MPIBGC-TEE/CompartmentalSystems). This package also includes a demonstration (Jupyter) notebook and an HTML file with code to reproduce the figures and to show more characteristics of the model.

## Acknowledgments

We thank S. E. Trumbore, D. Feist, C. Simon, and two anonymous reviewers for providing comments on previous versions of the manuscript. Funding was provided by the Max Planck Society and the German Research Foundation through its Emmy Noether Program (SI 1953/2–1).

## Footnotes

- ↵
^{1}To whom correspondence should be addressed. Email: hmetzler{at}bgc-jena.mpg.de.

Author contributions: C.A.S. designed research; H.M. and M.M. performed research; H.M. and M.M. programed the Python package; C.A.S. designed example application; and H.M. wrote the paper.

The authors declare no conflict of interest.

This article is a PNAS Direct Submission.

Data deposition: Jupyter (Python) notebook was compiled to HTML to reproduce the example from this paper, which is available at https://github.com/MPIBGC-TEE/CompartmentalSystems/blob/master/notebooks/PNAS. A python package that implements the proposed mathematical framework is available at https://github.com/MPIBGC-TEE/CompartmentalSystems.

This article contains supporting information online at www.pnas.org/lookup/suppl/doi:10.1073/pnas.1705296115/-/DCSupplemental.

Published under the PNAS license.

## References

- ↵.
- Anderson DH

- ↵
- ↵.
- Rodhe H,
- Björkström A

- ↵
- ↵.
- Nash J

- ↵.
- Jacquez JA,
- Simon CP

- ↵
- ↵.
- Sierra CA,
- Müller M,
- Metzler H,
- Manzoni S,
- Trumbore SE

- ↵.
- Nir A,
- Lewis S

- ↵
- ↵.
- Thompson MV,
- Randerson JT

- ↵.
- Metzler H,
- Sierra CA

- ↵
- ↵.
- Calabrese S,
- Porporato A

- ↵.
- Harman CJ

- ↵.
- Rasmussen M, et al.

- ↵
- ↵.
- von Foerster H

- ↵.
- Niemi AJ

- ↵.
- Fujino J,
- Nair R,
- Kainuma M,
- Masui T,
- Matsuoka Y

- ↵.
- Meinshausen M, et al.

- ↵.
- O’Neill BC,
- Oppenheimer M,
- Gaffin SR

- ↵.
- Archer D,
- Brovkin V

_{2}. Clim Change 90:283–297. - .
- Brockett RW

- .
- Desoer CA,
- Vidyasagar M

- .
- Engel KJ,
- Nagel R

- .
- Waugh D,
- Hall TM

- .
- Lewis S,
- Nir A

- .
- Kida H

- .
- Hall TM,
- Plumb RA

- .
- Holzer M,
- Hall TM

- .
- Strogatz SH

- .
- McDonnell JJ

- .
- Porporato A,
- Calabrese S

- .
- Asmussen S

## Citation Manager Formats

### More Articles of This Classification

### Physical Sciences

### Applied Mathematics

### Biological Sciences

### Related Content

- No related articles found.

### Cited by...

- No citing articles found.