Tutorials › Quantitative Systems Pharmacology (QSP) › Worked Conservation and Unit Audit of a Compartmental Pathway Model

Conservation Laws and Dimensional Consistency · Tutorial 70 of 799

Worked Conservation and Unit Audit of a Compartmental Pathway Model

Work through a dimensional and conservation audit that checks each pathway term and distinguishes genuine external inputs and losses from internal transfers.

Intermediate 11 min read

What You'll Learn

  • Assign consistent units to compartment amounts, concentrations, fluxes, and rate parameters.
  • Check a permeability-driven intercompartment flux and a saturable conversion rate.
  • Derive parent-species and total-moiety balances by summing model equations.
  • Detect transfer-sign errors through a balance residual.
  • Diagnose a source term whose declared parameter units are incompatible with its formula.
  • Compare amount-based audits with concentration-based and stoichiometric checks.

Why Audit a Complete Pathway Model?

Checking a single equation is not enough to establish that a pathway model is internally consistent. A rate can have the right units but the wrong sign; two equations can each look plausible while their transfer terms create a spurious loss when summed. A worked audit therefore follows each species through the model, checking both the dimensions of every term and the balance of material across the full pathway.

Consider a pathway with a parent species \(A\) in two well-mixed compartments and a product \(B\) in compartment 2. The parent can transfer between compartments, convert to product, and be cleared. External inputs and product elimination make this an open system. We will track the amount of the shared conserved moiety in \(A\) and \(B\), assuming the conversion is one-to-one and the product retains that moiety.

Audit setup: Let \(A_1\) and \(A_2\) be parent amounts in compartments 1 and 2, and \(B_2\) the product amount in compartment 2. Amounts are measured in nmol, concentrations in nmol/L, and time in min. The compartment volumes \(V_1\) and \(V_2\) are fixed, so \(C_1=A_1/V_1\) and \(C_2=A_2/V_2\).

The audit assumes each compartment is well mixed, the stated amounts represent all modeled material in the moiety, and all rates use the same time unit. Inputs are external additions; clearance and product elimination are exits from the modeled moiety. These assumptions define what should balance. A dimensional check alone cannot establish them.

Write the Model as a Flux Ledger

Define \(J\) as positive transfer of \(A\) from compartment 1 to compartment 2, \(v\) as conversion of \(A_2\) to \(B_2\), and \(u_1,u_2\) as external inputs. A representative model is

$$ \begin{aligned} J &= PS(C_1-C_2),\\ v &= \frac{V_{\max}C_2}{K_m+C_2},\\ \frac{dA_1}{dt} &= u_1-CL_1C_1-J,\\ \frac{dA_2}{dt} &= u_2+J-CL_2C_2-v,\\ \frac{dB_2}{dt} &= v-k_BB_2. \end{aligned} $$

Here \(PS\) is a transfer coefficient, \(CL_1\) and \(CL_2\) are clearances, \(V_{\max}\) is a maximum conversion rate, \(K_m\) is a concentration constant, and \(k_B\) is a first-order product-elimination rate constant. A positive \(J\) reduces \(A_1\) and increases \(A_2\); if \(C_2>C_1\), then \(J<0\), and the same signed terms describe transfer in the opposite direction.

The flux ledger is the first useful check: each internal process must appear with opposite signs in the equations for the material it moves or transforms. The transfer moves \(A\) between compartments, while conversion removes \(A\) and adds \(B\). Inputs and exits appear only in the equation for the species they directly affect.

Worked Example: Checking Units and Evaluating Every Rate

Use hypothetical values \(V_1=2\) L, \(V_2=1\) L, \(A_1=20\) nmol, \(A_2=6\) nmol, and \(B_2=4\) nmol. Let \(PS=0.40\) L/min, \(CL_1=0.10\) L/min, \(CL_2=0.050\) L/min, \(V_{\max}=3.0\) nmol/min, \(K_m=2.0\) nmol/L, and \(k_B=0.10\) min\(^{-1}\). Take \(u_1=0.50\) nmol/min and \(u_2=0.20\) nmol/min.

First convert amounts to concentrations: \(C_1=(20\ \mathrm{nmol})/(2\ \mathrm{L})=10\) nmol/L and \(C_2=(6\ \mathrm{nmol})/(1\ \mathrm{L})=6\) nmol/L. The transfer rate has units \( ( \mathrm{L/min})(\mathrm{nmol/L})=\mathrm{nmol/min}\), and its value is

$$ J=(0.40\ \mathrm{L/min})(10-6\ \mathrm{nmol/L}) =1.6\ \mathrm{nmol/min}. $$

The saturable conversion rate also has units of amount per time: \(V_{\max}\) supplies nmol/min, and \(C_2/(K_m+C_2)\) is dimensionless. Numerically,

$$ v=(3.0\ \mathrm{nmol/min})\frac{6\ \mathrm{nmol/L}}{2.0\ \mathrm{nmol/L}+6\ \mathrm{nmol/L}} =3.0\left(\frac{6}{8}\right) =2.25\ \mathrm{nmol/min}. $$

The clearance losses are \(CL_1C_1=(0.10)(10)=1.0\) nmol/min and \(CL_2C_2=(0.050)(6)=0.30\) nmol/min. Product elimination is \(k_BB_2=(0.10\ \mathrm{min}^{-1})(4\ \mathrm{nmol})=0.40\) nmol/min. Substituting the rates into the equations gives

$$ \begin{aligned} \frac{dA_1}{dt}&=0.50-1.0-1.6=-2.10\ \mathrm{nmol/min},\\ \frac{dA_2}{dt}&=0.20+1.6-0.30-2.25=-0.75\ \mathrm{nmol/min},\\ \frac{dB_2}{dt}&=2.25-0.40=1.85\ \mathrm{nmol/min}. \end{aligned} $$

These are instantaneous rates of change at the stated amounts, not amounts accumulated over a finite time interval. Their signs are consistent with the specified fluxes: \(A_1\) is declining, \(A_2\) is also declining despite inward transfer, and \(B_2\) is increasing.

Derive the Balances Before Interpreting Them

A balance for a chosen total is obtained by adding the equations for all included states. This is a direct accounting argument: a term that moves material between included states should cancel, while a term that crosses the boundary of the chosen total should remain. For the total parent amount \(A_{\mathrm{tot}}=A_1+A_2\), add the two parent equations:

$$ \begin{aligned} \frac{dA_{\mathrm{tot}}}{dt} &=\frac{dA_1}{dt}+\frac{dA_2}{dt}\\ &=u_1+u_2-CL_1C_1-CL_2C_2-v. \end{aligned} $$

The \(-J\) and \(+J\) terms cancel because transfer changes the location of parent material, not its total amount. Conversion remains as a loss from the parent pool because it moves material from \(A\) into \(B\).

Now include the product and define the total modeled moiety \(M=A_1+A_2+B_2\). Adding the product equation cancels conversion as well:

$$ \frac{dM}{dt} =u_1+u_2-CL_1C_1-CL_2C_2-k_BB_2. $$

The conversion rate does not appear in this total-moiety balance because it is an internal transformation under the one-to-one moiety assumption. The total can still change through external input, parent clearance, or product elimination. If all such inputs and exits are set to zero, then \(dM/dt=0\), so the model conserves \(M\).

Worked Example: Using the Total Balance to Cross-Check the Derivatives

Use the rates calculated above. Summing the parent derivatives gives \(-2.10+(-0.75)=-2.85\) nmol/min. Independently, the parent balance predicts

$$ u_1+u_2-CL_1C_1-CL_2C_2-v =0.50+0.20-1.0-0.30-2.25 =-2.85\ \mathrm{nmol/min}. $$

The two calculations agree. For the total moiety, add the product rate: \(-2.85+1.85=-1.00\) nmol/min. The balance for \(M\) gives the same result:

$$ u_1+u_2-CL_1C_1-CL_2C_2-k_BB_2 =0.50+0.20-1.0-0.30-0.40 =-1.00\ \mathrm{nmol/min}. $$

The conversion rate \(2.25\) nmol/min has disappeared from the total balance, as it should. If the summed state derivatives did not agree with the independently derived balance, at least one equation, sign, or included species would need to be rechecked.

Locate Errors by Separating Dimensions from Balance

Dimensional consistency and conservation accounting detect different problems. A dimensional mismatch means a formula cannot be added to the other terms in the same equation. A balance mismatch means the represented flows do not agree with the intended movement of material. A term may pass one check and fail the other, so both are necessary.

Worked Example: Finding a Transfer-Sign Error and a Source-Unit Error

Suppose an implementation uses \(J=PS(C_1-C_2)\) but writes the compartment-2 equation as \(\frac{dA_2}{dt}=k_{\mathrm{in}}C_{\mathrm{ext}}-J-CL_2C_2-v\). The external concentration is \(C_{\mathrm{ext}}=5\) nmol/L, and the declared units of \(k_{\mathrm{in}}\) are nmol/min. The compartment-2 transfer sign is also negative.

Source-unit check. As written, \(k_{\mathrm{in}}C_{\mathrm{ext}}\) has units \((\mathrm{nmol/min})(\mathrm{nmol/L})=\mathrm{nmol^2/(L\,min)}\), not nmol/min. It cannot be added to the other rates. One valid repair is to define \(k_{\mathrm{in}}\) as a clearance-like influx coefficient in L/min. With \(k_{\mathrm{in}}=0.20\) L/min, the source is \(0.20\times5=1.0\) nmol/min. Alternatively, represent the input directly as \(u_2=1.0\) nmol/min.

Transfer-sign check. With the direct input repair, the faulty transfer terms are \(-J\) in both parent equations. Summing them gives \(-2J\), so a transfer of \(1.6\) nmol/min out of compartment 1 is incorrectly counted as an additional loss of \(3.2\) nmol/min from the two-compartment parent total. The compartment-2 term must be \(+J\).

For a numerical cross-check, retain the other hypothetical values from the first example and use \(u_1=0.50\) nmol/min and the repaired \(u_2=1.0\) nmol/min. The correct total-moiety rate is \(0.50+1.0-1.0-0.30-0.40=-0.20\) nmol/min. With the incorrect transfer sign, the state derivatives sum to \(-3.40\) nmol/min, which is \(3.20\) nmol/min below the correct result. This discrepancy is exactly \(-2J\). Fixing the source units does not fix the transfer sign; each error requires its own check.

Practical Checks, Alternatives, and Limits

A reliable audit can be performed in a small number of explicit passes. Writing each flux once and then placing it in the affected state equations helps prevent sign changes or duplicated flows. A separate sum for each biologically meaningful total then shows which terms cancel and which cross the system boundary.

1
Declare states and units.
State whether each variable is an amount or concentration, specify the time unit, and record the volume used to convert between amount and concentration.
2
Audit rate dimensions.
Check every term in an equation has units of state amount per time. For example, clearance times concentration has units \((\mathrm{L/min})(\mathrm{nmol/L})=\mathrm{nmol/min}\).
3
Trace each flux to its destination.
For an internal transfer, verify that the donor loses exactly the amount rate the recipient gains. For a reaction, verify that the reactant and product terms match the assumed moiety stoichiometry.
4
Sum the intended totals.
Derive the parent and total-moiety balances independently of the individual numerical derivatives, then compare the two results.

Several diagnostic checks follow directly. When \(C_1=C_2\), the specified permeability flux is zero; a nonzero calculated transfer indicates a formula or implementation error. When \(C_1<C_2\), \(J\) is negative and the signed equations should reverse the direction of transfer without changing their structure. In a closed model with no inputs or exits, a changing total moiety signals an inconsistency in the equations, the species included in the total, or the assumed reaction stoichiometry.

An amount-based audit is often clearest when compartments have unequal volumes because each state equation tracks the amount gained or lost. A concentration-based formulation can also be used, but its rates must be converted consistently: for a fixed volume, \(dC_i/dt=(1/V_i)dA_i/dt\). The stoichiometric-matrix approach provides a systematic way to identify conserved combinations in reaction networks; the hand-summed flux ledger here makes the transfer and open-system terms explicit. These approaches are complementary rather than competing.

The audit has limits. Correct units and a correct balance do not prove that a mechanism, rate law, parameter value, or compartment structure is biologically appropriate. Conversely, an apparent failure may indicate an omitted species or an incorrectly chosen total rather than a sign error. The audit also relies on fixed compartment volumes; if a volume changes, amount and concentration rates are not interchangeable by simple division alone. Its purpose is to test internal consistency against declared states, units, and pathway assumptions.

Common pitfall: “Both transfer terms have units of nmol/min, so they must be correct.” Dimensional agreement does not check direction. The correction is to define a signed flux direction, place the flux with opposite signs in donor and recipient equations, and verify that it cancels when those equations are summed.

Check Your Understanding

Answer each question, then compare with the concise solutions below.

  1. If \(PS\) is in L/min and both concentrations are in nmol/L, what are the units of \(PS(C_1-C_2)\)?
  2. For the stated model, which terms remain in the derivative of \(A_1+A_2\), and why does \(J\) disappear?
  3. If conversion changes one molecule of \(A\) into two molecules of \(B\), can \(A_1+A_2+B_2\) be treated as a conserved moiety total without further adjustment?
  4. A source is written as \(kC_{\mathrm{ext}}\), where \(C_{\mathrm{ext}}\) is in mg/L and \(k\) is declared in mg/min. Identify the dimensional problem and give one possible repair.
  5. In a closed version of the one-to-one pathway, what should happen to \(M=A_1+A_2+B_2\), and which model terms must be removed for this check?

Solutions. (1) The units are nmol/min. (2) The remaining terms are \(u_1+u_2-CL_1C_1-CL_2C_2-v\); \(J\) cancels because it removes parent from one compartment at exactly the rate it adds parent to the other. (3) Not as an unweighted molecule count: the conversion creates two product molecules per reactant molecule, so the proposed sum changes during conversion. A conserved quantity would need to reflect the actual conserved moiety stoichiometry. (4) The product has units mg\(^{2}\)/(L min), not mg/min. One repair is to give \(k\) units L/min, or instead use a direct input rate with units mg/min. (5) \(M\) should remain constant. Set external inputs \(u_1,u_2\), parent clearances, and product elimination to zero; the internal transfer and one-to-one conversion cancel in the total balance.

Clinical Biostats