Tutorials › Nonlinear Mixed-Effects Models (NLME) › Three-Compartment Amount-Balance Equations

One-, Two- and Three-Compartment Structural Models · Tutorial 36 of 797

Three-Compartment Amount-Balance Equations

Learn to construct and check the three-compartment amount equations from the model’s input, exchange, and elimination flows.

Beginner 9 min read

What You'll Learn

  • Define central and peripheral amounts and the first-order rate constants used in the model.
  • Derive each amount-balance equation by adding incoming flows and subtracting outgoing flows.
  • Include an external input correctly and represent an intravenous bolus through initial conditions.
  • Verify the equations using total-amount balance and unit checks.
  • Diagnose common sign, pathway, and elimination-location errors.

From the Model Structure to Amount Changes

A three-compartment mammillary model has one central compartment connected to two peripheral compartments. Drug enters the system through the central compartment, can exchange between the central and either peripheral compartment, and is eliminated from the central compartment. The amount in any compartment changes according to a simple accounting rule: add the rates of all flows into it and subtract the rates of all flows out of it.

The equations describe how amounts change over time; they are not themselves concentration-time curves. The central concentration is related to central amount by \(C_c(t)=A_c(t)/V_c\), where \(V_c\) is the central volume. This tutorial focuses on the amount balances that determine the amounts.

Definition: Let \(A_c(t)\), \(A_1(t)\), and \(A_2(t)\) denote the drug amounts in the central compartment and the two peripheral compartments, respectively. Let \(k_{10}\) be the first-order elimination rate constant from the central compartment; let \(k_{12}\) and \(k_{21}\) describe exchange from central to peripheral 1 and from peripheral 1 to central; and let \(k_{13}\) and \(k_{31}\) describe exchange from central to peripheral 2 and from peripheral 2 to central. Each rate constant has units of inverse time. Let \(R(t)\) be the external input rate into the central compartment, in amount per unit time.

With this notation, the three coupled amount-balance equations are

$$ \begin{aligned} \frac{dA_c}{dt} &=R(t)-(k_{10}+k_{12}+k_{13})A_c+k_{21}A_1+k_{31}A_2,\\ \frac{dA_1}{dt} &=k_{12}A_c-k_{21}A_1,\\ \frac{dA_2}{dt} &=k_{13}A_c-k_{31}A_2. \end{aligned} $$

All rate constants are nonnegative. The equations assume that each exchange or elimination flow is first order in the amount in its source compartment. In particular, the flow from central to peripheral 1 is \(k_{12}A_c\), while the reverse flow is \(k_{21}A_1\). The model has no direct connection between the two peripheral compartments, and it includes no elimination from either peripheral compartment.

Deriving Each Balance

The central compartment receives external input at rate \(R(t)\), plus return flows from the two peripheral compartments. It loses drug through elimination and through both outward exchange pathways. Those flows are \(k_{10}A_c\), \(k_{12}A_c\), and \(k_{13}A_c\). Adding the incoming rates and subtracting the outgoing rates gives

$$ \frac{dA_c}{dt} =R(t)+k_{21}A_1+k_{31}A_2 -k_{10}A_c-k_{12}A_c-k_{13}A_c. $$

Collecting the central-amount terms gives the first equation. Peripheral 1 receives \(k_{12}A_c\) from the central compartment and returns \(k_{21}A_1\) to it. Peripheral 2 receives \(k_{13}A_c\) and returns \(k_{31}A_2\). Since neither peripheral compartment has another incoming or outgoing pathway in this model, their balances contain just these two terms each.

Key check: The first subscript identifies the compartment from which a transfer originates, and the second identifies the compartment it enters. Thus \(k_{12}A_c\) leaves central and enters peripheral 1, while \(k_{21}A_1\) leaves peripheral 1 and enters central. Elimination \(k_{10}A_c\) leaves the modeled system; it is not an exchange flow to another modeled compartment.

Worked Equations in Context

Worked Example: Constant-Rate Infusion

Consider a hypothetical infusion at \(R(t)=10\) mg/h. At one instant, suppose \(A_c=80\) mg, \(A_1=15\) mg, and \(A_2=5\) mg. Let \(k_{10}=0.12\), \(k_{12}=0.30\), \(k_{21}=0.15\), \(k_{13}=0.20\), and \(k_{31}=0.08\) h\(^{-1}\). Calculate the instantaneous rates of change.

The central rate is

$$ \begin{aligned} \frac{dA_c}{dt} &=10-(0.12+0.30+0.20)(80)+(0.15)(15)+(0.08)(5)\\ &=10-49.6+2.25+0.40\\ &=-36.95\ \text{mg/h}. \end{aligned} $$

For peripheral 1,

$$ \frac{dA_1}{dt}=(0.30)(80)-(0.15)(15)=24-2.25=21.75\ \text{mg/h}. $$

For peripheral 2,

$$ \frac{dA_2}{dt}=(0.20)(80)-(0.08)(5)=16-0.40=15.60\ \text{mg/h}. $$

At this instant the central amount is decreasing, while both peripheral amounts are increasing. The central decrease does not mean that input is absent: the combined outward central flows exceed the infusion and the return flows at this particular state.

Input and Initial Conditions

The input function and the initial conditions describe different features of the dosing situation. A constant-rate infusion over a time interval is represented by a constant \(R(t)\) during that interval, and \(R(t)=0\) outside it. An intravenous bolus is usually represented by an instantaneous increase in central amount: if the dose is \(D\), set \(A_c(0^+)=A_c(0^-)+D\). For a bolus into an initially drug-free system, this means \(A_c(0^+)=D\), \(A_1(0^+)=0\), and \(A_2(0^+)=0\). The ordinary differential equations govern the evolution after the jump; a bolus is not a constant infusion.

Worked Example: Initial Rates After a Bolus

Suppose a hypothetical 120 mg intravenous bolus is given to a drug-free system. Immediately after the bolus, let \(A_c=120\) mg and \(A_1=A_2=0\) mg. Use the rate constants from the infusion example, and set \(R(t)=0\) after the bolus. Find the initial rates just after dosing.

For the central compartment,

$$ \frac{dA_c}{dt} =-(0.12+0.30+0.20)(120) =-74.4\ \text{mg/h}. $$

For the two peripheral compartments,

$$ \frac{dA_1}{dt}=(0.30)(120)-(0.15)(0)=36.0\ \text{mg/h}, $$
$$ \frac{dA_2}{dt}=(0.20)(120)-(0.08)(0)=24.0\ \text{mg/h}. $$

These are instantaneous rates at \(t=0^+\), not amounts at a later time. The central amount initially falls because of elimination and outward exchange; both peripheral amounts initially rise because they receive drug from central.

Total-Amount Balance as a Check

Let \(A_{\mathrm{tot}}=A_c+A_1+A_2\) be the total amount in the three modeled compartments. Adding the three differential equations makes each exchange term cancel: an exchange flow removes exactly the amount per unit time that it adds to the other compartment. The only remaining contributions are external input and elimination.

$$ \begin{aligned} \frac{dA_{\mathrm{tot}}}{dt} &=\frac{dA_c}{dt}+\frac{dA_1}{dt}+\frac{dA_2}{dt}\\ &=R(t)-k_{10}A_c. \end{aligned} $$

This identity is a useful derivation check. Exchange redistributes drug within the modeled system but cannot change the total amount. Only input adds drug to the total, and only the specified elimination removes it.

Worked Example: Checking the Exchange Terms by Summation

Suppose there is no external input, and at a particular instant \(A_c=50\) mg, \(A_1=20\) mg, and \(A_2=10\) mg. Let \(k_{10}=0.05\), \(k_{12}=0.40\), \(k_{21}=0.10\), \(k_{13}=0.25\), and \(k_{31}=0.05\) h\(^{-1}\). Calculate all three rates and check their sum.

The central rate is

$$ \frac{dA_c}{dt} =-(0.05+0.40+0.25)(50)+(0.10)(20)+(0.05)(10) =-35+2+0.5=-32.5\ \text{mg/h}. $$

The peripheral rates are

$$ \frac{dA_1}{dt}=(0.40)(50)-(0.10)(20)=20-2=18.0\ \text{mg/h}, $$
$$ \frac{dA_2}{dt}=(0.25)(50)-(0.05)(10)=12.5-0.5=12.0\ \text{mg/h}. $$

Their sum is \(-32.5+18.0+12.0=-2.5\) mg/h. The total-balance equation gives the same result directly: \(R-k_{10}A_c=0-(0.05)(50)=-2.5\) mg/h. The numerical agreement confirms that the internal exchange terms cancel.

Assumptions, Diagnostics, and Alternatives

The equations apply when the compartment amounts are well-defined, exchange and elimination rates are proportional to source-compartment amounts, and the rate constants are fixed over the time interval being modeled. The external input is specified separately. For a physically meaningful amount model, initial amounts and input rates are nonnegative, and the rate constants are nonnegative. Under these conditions, the equations do not drive an amount below zero: when a compartment amount is zero, its outflow terms are zero, while its possible inflows are nonnegative.

Several checks can reveal an incorrectly written equation:

  • Check source amounts. Every first-order flow must multiply the amount in the compartment it leaves. For example, central-to-peripheral-2 flow is \(k_{13}A_c\), not \(k_{13}A_2\).
  • Check signs. An outgoing flow is subtracted from its source and added to its destination. The same exchange flow must therefore appear with opposite signs in the two relevant equations.
  • Check units. A rate constant in h\(^{-1}\) multiplied by an amount in mg gives mg/h. It can be added to other terms in an amount-rate equation, but not directly to an amount.
  • Check total balance. Adding the equations must leave \(R(t)-k_{10}A_c\). A remaining exchange term usually indicates a missing term, a wrong sign, or a wrong pathway.

The amount equations are often the clearest way to express the model’s flows. Concentration equations can instead be written by dividing each amount by its compartment volume, but the exchange terms then involve the relationships between amounts and concentrations as well as the volumes. The amount formulation makes conservation of drug during exchange especially transparent. It is also important to recognize what this model does not represent: direct exchange between the peripheral compartments, peripheral elimination, and nonlinear or time-varying rates are not included. If the intended system has one of those features, the corresponding balance equations must be changed rather than silently using these equations unchanged.

Common mistake: Writing a central loss term such as \(-k_{12}A_1\) because the peripheral amount appears in the return term. This assigns the wrong source to the outward exchange. The central-to-peripheral-1 flow is proportional to \(A_c\), so it is \(-k_{12}A_c\) in the central balance and \(+k_{12}A_c\) in the peripheral-1 balance. The reverse flow is separately proportional to \(A_1\).

Check Your Understanding

Use the stated model and show the sign and unit reasoning in your answers.

  1. With no external input, write the rate of change in total amount across all three compartments.
  2. If \(A_c=0\) but \(A_1>0\), which flow can add drug to the central compartment? State its rate.
  3. A constant infusion supplies 5 mg/h. If the central amount is 30 mg and \(k_{10}=0.10\) h\(^{-1}\), what is the total-amount rate of change, regardless of the exchange rates?
  4. Explain why a bolus is represented by an initial amount jump rather than by leaving a positive \(R(t)\) in the equations indefinitely.

Solutions. (1) Adding the equations cancels all exchange flows, so \(dA_{\mathrm{tot}}/dt=-k_{10}A_c\) when \(R(t)=0\). (2) The peripheral-1-to-central return flow is \(k_{21}A_1\), and the peripheral-2-to-central return flow is \(k_{31}A_2\); either is nonzero if its source amount is positive. With \(A_c=0\), the outward central exchange and elimination terms are zero. (3) The total rate is input minus elimination: \(5-(0.10)(30)=2.0\) mg/h. (4) A bolus is delivered over an idealized instantaneous time, producing a jump in the initial central amount. A continuing positive input rate instead represents ongoing drug delivery and would add drug after the bolus was given.