Tutorials › Physiologically-Based Pharmacokinetics (PBPK) › Common Errors in Segmental Transit Models

Compartmental Absorption and Transit Models · Tutorial 236 of 799

Common Errors in Segmental Transit Models

Use unit checks, flux bookkeeping, and mass balance to diagnose common implementation errors in segmental transit models.

Intermediate 11 min read

What You'll Learn

  • Distinguish amount-based and concentration-based states and make their flux units consistent.
  • Write segment balances that count each dissolution and transit flux exactly once.
  • Check that segment indices match the source compartment of each transit flux.
  • Account for drug remaining in downstream segments when a simulation stops.
  • Use total-mass balance and flux continuity to locate implementation errors.

Why Segmental Models Can Go Wrong

A segmental transit model may produce smooth concentration-time curves while still representing the wrong mass flows. Errors can arise when an amount is used as though it were a concentration, when a flux is counted twice, or when the index on a transit rate does not refer to the segment the drug leaves. A further error is to treat drug still present in the gut at the simulation end as though it had already been absorbed or eliminated.

These problems are best diagnosed by writing down the meaning and units of every state and flux before interpreting a simulation. The equations below use a simple chain of \(N\) gut segments. They are a bookkeeping framework for diagnosing implementation errors, not a claim that every model must use these particular kinetics.

Definition: Let \(S_i\) be the solid drug amount and \(A_i\) the dissolved drug amount in segment \(i\), both in mg. Let \(V_i\) be the segment fluid volume in L, so the dissolved concentration is \(C_i=A_i/V_i\), in mg/L. Define the dissolution flux \(D_i\), transit flux \(J_i\), and absorption flux \(U_i\) as amounts per unit time, here mg/h. In a first-order example, \(D_i=k_{\mathrm{dis},i}S_i\), \(J_i=k_{\mathrm{tr},i}A_i\), and \(U_i=k_{\mathrm{a},i}A_i\), where each rate constant has units h\(^{-1}\). The index on \(J_i\) identifies the source segment: \(J_i\) leaves segment \(i\).

For this framework, solid drug dissolves in its current segment but does not itself transit; dissolved drug may transit, be absorbed, or remain in the segment. An input \(I_i\), if present, is an amount rate entering the dissolved state of segment \(i\). Transit from segments \(1,\ldots,N-1\) enters the next segment. \(J_N\) leaves the modeled gut chain, so it is counted as gut exit, not absorption. These assumptions need to match the model being implemented: if solid particles also transit, their states and transfers require their own explicit balances.

$$ \frac{dS_i}{dt}=-D_i $$
$$ \frac{dA_1}{dt}=I_1+D_1-J_1-U_1 $$
$$ \frac{dA_i}{dt}=I_i+D_i+J_{i-1}-J_i-U_i, \qquad i=2,\ldots,N $$

The terminal transit term \(J_N\) is an outflow from the last segment. It must either be included as a gut-exit flux, as above, or be replaced by a separately specified downstream compartment. It must not disappear from the accounting merely because there is no segment \(N+1\) in the model.

Start With Units and State Meaning

An amount and a concentration are not interchangeable. If \(A_i\) is in mg, a first-order absorption flux \(U_i=k_{\mathrm{a},i}A_i\) is in mg/h. If the model instead uses concentration, an absorption clearance \(CL_{\mathrm{a},i}\) in L/h gives the amount flux \(U_i=CL_{\mathrm{a},i}C_i\), also in mg/h. For a fixed volume, the two formulations agree when \(CL_{\mathrm{a},i}=k_{\mathrm{a},i}V_i\). The parameter units therefore depend on the state representation.

A reliable review begins by writing the units beside each state, parameter, and rate. Every term added to or subtracted from a state derivative must have units of amount per time. A concentration derivative instead has units of concentration per time, so amount fluxes cannot be inserted into it without the appropriate volume conversion. If volumes change with time, converting between amount and concentration also requires accounting for that change; simply dividing an amount derivative by the current volume may not be sufficient.

Worked Example: Detecting an Amount–Concentration Mix-Up

Suppose a hypothetical segment contains \(A_1=24\) mg dissolved drug in \(V_1=0.300\) L. Its absorption rate constant is \(k_{\mathrm{a},1}=0.250\) h\(^{-1}\). Calculate the absorption flux and check the units.

First convert amount to concentration:

$$ C_1=\frac{A_1}{V_1} =\frac{24\ \mathrm{mg}}{0.300\ \mathrm{L}} =80.0\ \mathrm{mg/L}. $$

With an amount state, the flux is:

$$ U_1=k_{\mathrm{a},1}A_1 =(0.250\ \mathrm{h}^{-1})(24\ \mathrm{mg}) =6.00\ \mathrm{mg/h}. $$

The equivalent clearance is \(CL_{\mathrm{a},1}=k_{\mathrm{a},1}V_1=(0.250\ \mathrm{h}^{-1})(0.300\ \mathrm{L})=0.0750\) L/h. The concentration formulation gives \(U_1=CL_{\mathrm{a},1}C_1=(0.0750\ \mathrm{L/h})(80.0\ \mathrm{mg/L})=6.00\) mg/h.

A common coding error is to multiply \(k_{\mathrm{a},1}\) by \(C_1\). The result is \(20.0\) mg/(L·h), not an amount flux in mg/h, and it does not equal the correct uptake rate. The state and the rate parameter must be paired in a dimensionally consistent formulation.

Count Every Transfer Once

A transfer from one state to another has two appearances in the state equations: it is subtracted from the source and added to the destination. These are not two transfers; together they describe one movement of mass. Likewise, dissolution is one flux from solid to dissolved drug: it depletes \(S_i\) and supplies \(A_i\). If a model has an explicit dissolution flux \(D_i\), adding a second dissolution contribution to \(A_i\) without a distinct physical process duplicates drug.

The same rule applies to transit. For \(i<N\), the flux \(J_i\) appears as \(-J_i\) in the balance for \(A_i\) and \(+J_i\) in the balance for \(A_{i+1}\). If the receiving state gets the flux twice, or if the source loses it twice, the total modeled mass changes incorrectly.

Key check: For a closed accounting system, add the amounts in all solid and dissolved gut states to cumulative absorbed amount and cumulative gut-exit amount. Internal dissolution and transit transfers must cancel in the total derivative. A nonzero unexplained remainder signals a missing or duplicated flux, an untracked input or output, or an implementation error.

A Mass-Balance Derivation

Let \(R_{\mathrm{abs}}\) be cumulative absorbed amount and \(R_{\mathrm{exit}}\) cumulative amount exiting the last gut segment. Their rates are \(dR_{\mathrm{abs}}/dt=\sum_{i=1}^N U_i\) and \(dR_{\mathrm{exit}}/dt=J_N\). The total accounted amount is

$$ M(t)=\sum_{i=1}^{N}(S_i+A_i)+R_{\mathrm{abs}}+R_{\mathrm{exit}}. $$

To verify conservation, differentiate \(M(t)\). Each solid balance contributes \(-D_i\), and each dissolved balance contributes \(+D_i\), so dissolution cancels segment by segment. For every internal transit flux \(J_i\), \(i<N\), the source contributes \(-J_i\) and the next segment contributes \(+J_i\). Absorption losses \(-U_i\) cancel the corresponding increases in \(R_{\mathrm{abs}}\). The terminal loss \(-J_N\) cancels the increase in \(R_{\mathrm{exit}}\). Thus, if all inputs are zero, \(dM/dt=0\). With inputs, the change in \(M\) must equal the total input.

$$ \frac{dM}{dt}=\sum_{i=1}^{N} I_i $$

This derivation also gives a practical diagnostic: compute the residual between the change in total accounted amount and the integrated input. It should be close to zero apart from numerical integration error. A steadily growing residual is not explained by a plausible absorption profile; it points to inconsistent bookkeeping or a numerical implementation problem.

Worked Example: Finding a Duplicated Transit Contribution

Consider two hypothetical segments at one instant. Segment 1 has \(D_1=4\) mg/h, \(J_1=6\) mg/h, and \(U_1=3\) mg/h. Segment 2 has \(D_2=2\) mg/h, \(J_2=4\) mg/h, and \(U_2=1\) mg/h. There is no input. Calculate the state derivatives and verify mass balance.

The solid-state derivatives are \(dS_1/dt=-4\) mg/h and \(dS_2/dt=-2\) mg/h. The dissolved-state derivatives are:

$$ \frac{dA_1}{dt}=4-6-3=-5\ \mathrm{mg/h}, \qquad \frac{dA_2}{dt}=2+6-4-1=3\ \mathrm{mg/h}. $$

The cumulative absorption rate is \(U_1+U_2=3+1=4\) mg/h, and the gut-exit rate is \(J_2=4\) mg/h. Therefore the total derivative is \(-4-2-5+3+4+4=0\) mg/h, as required.

If an implementation mistakenly adds \(2J_1\) to the second balance, it calculates \(dA_2/dt=2+12-4-1=9\) mg/h. The total derivative then becomes \(6\) mg/h instead of zero: exactly one extra \(J_1=6\) mg/h has been created. A similar check catches duplicated dissolution: each \(D_i\) must appear once as solid loss and once as dissolved gain, not as two dissolved gains.

Check the Segment Index

In a sequential chain, the index on a transit flux should identify where the drug leaves. With \(J_i=k_{\mathrm{tr},i}A_i\), the outflow from segment \(i\) is a loss from \(A_i\) and, for \(i<N\), an inflow to \(A_{i+1}\). This convention prevents a frequent off-by-one error: using the receiving segment’s transit rate to calculate the incoming flux.

Worked Example: Auditing a Three-Segment Chain

Suppose a hypothetical chain has dissolved amounts \(A_1=10\) mg, \(A_2=20\) mg, and \(A_3=30\) mg. The source-segment transit rates are \(k_{\mathrm{tr},1}=0.200\) h\(^{-1}\), \(k_{\mathrm{tr},2}=0.500\) h\(^{-1}\), and \(k_{\mathrm{tr},3}=0.100\) h\(^{-1}\). There is no dissolution or absorption at this instant. Calculate each transit flux and the contribution of transit to each dissolved-state derivative.

The fluxes are \(J_1=(0.200)(10)=2.00\) mg/h, \(J_2=(0.500)(20)=10.0\) mg/h, and \(J_3=(0.100)(30)=3.00\) mg/h. Thus the transit contributions are \(-J_1=-2.00\) mg/h to segment 1, \(J_1-J_2=2.00-10.0=-8.00\) mg/h to segment 2, and \(J_2-J_3=10.0-3.00=7.00\) mg/h to segment 3.

The total change across the three gut states is \(-2.00-8.00+7.00=-3.00\) mg/h. That loss equals the terminal exit flux \(J_3=3.00\) mg/h. If the inflow to segment 2 were mistakenly calculated with \(k_{\mathrm{tr},2}A_1\), it would be \(5.00\) mg/h rather than \(J_1=2.00\) mg/h. The outgoing flux from segment 1 and the incoming flux to segment 2 would no longer match, revealing the indexing error.

Do Not Discard Drug Still Downstream

A simulation reports states at its chosen stopping time, not necessarily the ultimate fate of every dose. At that time, drug may remain as solid or dissolved amount in one or more gut segments. The observed cumulative absorption up to that time is not automatically the total amount that will eventually be absorbed. Likewise, drug that has not yet left the modeled gut is not gut exit.

To compare eventual absorption across simulations, either simulate long enough that relevant residual states are negligible, extend the model to track downstream drug, or explicitly account for remaining drug using a justified continuation of the model. Merely adding all residual gut amount to cumulative absorption is incorrect: some residual amount may later exit the gut or remain undissolved under the model assumptions.

Worked Example: Interpreting Residual Drug at Simulation End

At the end of a hypothetical simulation, the terminal segment contains \(40.0\) mg dissolved drug. Assume from that time onward that absorption and gut exit are competing first-order processes with \(k_{\mathrm{a}}=0.100\) h\(^{-1}\) and \(k_{\mathrm{tr}}=0.200\) h\(^{-1}\). There is no further input or dissolution. How much of this residual amount is absorbed after the stopping time if the model is continued indefinitely?

The total removal rate constant is \(k_{\mathrm{a}}+k_{\mathrm{tr}}=0.300\) h\(^{-1}\). The fraction of the initial amount eventually absorbed is \(k_{\mathrm{a}}/(k_{\mathrm{a}}+k_{\mathrm{tr}})\), because the absorption flux is \(k_{\mathrm{a}}A(t)\) and \(A(t)=40.0e^{-(k_{\mathrm{a}}+k_{\mathrm{tr}})t}\) mg after the stopping time. Integrating that flux gives:

$$ \int_0^\infty k_{\mathrm{a}}40.0e^{-(k_{\mathrm{a}}+k_{\mathrm{tr}})t}\,dt =40.0\frac{0.100}{0.300} =13.3\ \mathrm{mg}. $$

The remaining \(26.7\) mg eventually exits the gut under these assumptions. At the original stopping time, however, none of this residual amount has yet been counted as post-stop absorption or exit. Reporting the simulated cumulative absorption as though it already included the additional \(13.3\) mg would overstate what the simulation actually calculated.

Diagnostics, Alternatives, and Limitations

Several checks complement inspection of the concentration-time profile. First, verify dimensions for every equation term. Second, inspect each transfer in both its source and destination balances. Third, compare source outflows and destination inflows for every internal link. Fourth, calculate the total-mass residual over time and inspect residual segment amounts at the simulation end. A sudden residual jump often points to an incorrect flux or index; a gradual drift may indicate repeated small errors or numerical integration error.

Amount-state and concentration-state formulations are both valid when implemented consistently. Amount states make conservation accounting direct; concentration states can be convenient when rates are naturally expressed using concentrations and clearances. They should not be mixed casually: conversion requires the relevant volume and consistent treatment of volume changes. Similarly, cumulative absorbed and exit amounts can be represented as explicit model states or calculated by integrating their fluxes after simulation. Either approach is valid if each flux is counted once and the reported totals use the same time horizon as the simulated states.

Mass balance is a powerful diagnostic but does not establish that the chosen transit structure or parameter values adequately describe physiology. A model can conserve mass perfectly and still use inappropriate assumptions, inputs, or rates. Conversely, a small numerical balance residual should be judged relative to solver tolerances and the scale of the dose. If residual amounts are substantial at the endpoint, the simulation duration is inadequate for an interpretation of eventual disposition, even when the numerical solution itself is accurate.

Common pitfall: “The model’s terminal gut state is small relative to the dose, so I can count the entire dose not yet absorbed as eliminated.” This reasoning confuses residual drug with a modeled exit. The correction is to report the residual separately, continue the simulation, or calculate its subsequent fate using an explicitly stated and justified model.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. A segment contains \(12\) mg dissolved drug at \(0.400\) L, with \(k_{\mathrm{a}}=0.150\) h\(^{-1}\). What is the absorption flux, and what clearance gives the equivalent concentration-based expression?
  2. For an internal transit link, what must happen to \(J_i\) in the balances for segments \(i\) and \(i+1\)?
  3. With \(A_1=8\) mg and \(k_{\mathrm{tr},1}=0.250\) h\(^{-1}\), what is the flux into segment 2? Which transit rate determines it?
  4. At simulation end, \(25\) mg remains in the last segment. Is it correct to report this as already absorbed? What additional information would help determine its eventual fate?

Solutions. (1) \(U=k_{\mathrm{a}}A=(0.150)(12)=1.80\) mg/h. The equivalent clearance is \(CL_{\mathrm{a}}=k_{\mathrm{a}}V=(0.150)(0.400)=0.0600\) L/h, and \(CL_{\mathrm{a}}C=(0.0600)(12/0.400)=1.80\) mg/h. (2) Subtract \(J_i\) once from segment \(i\) and add the same \(J_i\) once to segment \(i+1\); it is one internal transfer. (3) \(J_1=k_{\mathrm{tr},1}A_1=(0.250)(8)=2.00\) mg/h. The source segment’s rate determines the flux. (4) No. It is residual amount, not absorption already recorded. The future absorption and exit rates, plus any further dissolution or other modeled processes, are needed to estimate its eventual fate.