Standard organ¶
Every organ is a comp submodel built from the standard organ, unless the definition selects a variant. It is the 4-compartment organ of PK-Sim (Willmann 2005, Schmitt 2008, Kuepfer 2016): plasma, blood cells, interstitial and intracellular space, of which only the parts a substance needs are built. The organ owns its blood flows and its chemistry, and reads everything of the body (volume, flow, hematocrit, fractions, the parameters of the substances, the pool and sink species) through ports.
Parts¶
| part | compartment | volume | species | built for a substance |
|---|---|---|---|---|
| plasma | Vpl |
V<o>*f_vas*(1 - HCT) |
Cpl_<s> |
always, but not in a flow-limited organ |
| blood cells | Vbc |
V<o>*f_vas*HCT |
Cbc_<s> |
with kinetic erythrocytes |
| interstitial | Vis |
V<o>*f_int |
Cis_<s> |
in the full form |
| intracellular | Vic |
V<o>*(1 - f_vas - f_int) |
Cic_<s> |
in the full form |
| tissue | Vti |
V<o>*(1 - f_vas) |
Cti_<s> |
in the merged tissue (interstitial and intracellular) |
| organ | Vor |
V<o> |
Cor_<s> |
in the flow-limited organ (vascular and tissue) |
Every species is a concentration (mmole/l), every reaction an amount per time (mmole/min). The ids are local to the organ and prefixed by its submodel in the flat model (MU__Cpl_api); the inputs of the body keep the ids of the body (Qmu, HCT, fu_api, Car_api). The equations below are those of the muscle mu (<o>) for a substance <s>, copied from the generator; tests/docs/test_pbpk_equations.py builds toy models and checks every equation of this page against them.
Vpl = V<o> * f_vas_<o> * (1 - HCT)
Vbc = V<o> * f_vas_<o> * HCT
Vis = V<o> * f_int_<o>
Vic = V<o> * (1 - f_vas_<o> - f_int_<o>)
Vti = V<o> * (1 - f_vas_<o>)
Vor = V<o>
Blood flows¶
The organ takes the plasma of the arterial pool (the venous pool for the lung, the hepatic artery and the portal vein for the liver) and returns the plasma leaving it, Cout_<s>, into the venous pool (the portal vein for the portal organs, the arterial pool for the lung). The outflow concentration is an output of the organ which replaces Cout_<o>_<s> of the top model, where the observers read it.
J_in_ar_pl_<s>: Car_<s> -> Cpl_<s> = Q<o> * (1 - HCT) * Car_<s>
J_out_pl_<s>: Cpl_<s> -> Cve_<s> = Q<o> * (1 - HCT) * Cout_<s>
Cout_<s> = Cpl_<s>
With kinetic erythrocytes the blood cells flow alongside and exchange with the plasma; with erythrocytes in equilibrium the plasma species carries the blood, Q*BP*C_p, in the capacity V_vas*BP, and no blood cell species is built.
J_in_ar_bc_<s>: Car_bc_<s> -> Cbc_<s> = Q<o> * HCT * Car_bc_<s>
J_out_bc_<s>: Cbc_<s> -> Cve_bc_<s> = Q<o> * HCT * Cout_bc_<s>
J_bc_<s>: Cpl_<s> -> Cbc_<s> = kex_bc_<s> * Vbc * (Cpl_<s> - Cbc_<s> / Kbc_<s>)
Cout_bc_<s> = Cbc_<s>
Collapsing¶
The flags of a substance and the chemistry of the organ decide which parts are built for the substance in the organ (parts_for), so a simple drug has about as many species as in the hand-written models:
| situation | parts built for the substance in the organ |
|---|---|
| no erythrocyte distribution | no blood cell species; the flows carry plasma only, BP = 1 - HCT |
| erythrocytes in equilibrium | no blood cell species; the flows carry Q*BP*C_p, the capacity is V_vas*BP |
| erythrocytes kinetic | blood cell species with exchange |
| no tissue distribution, or an organ the substance does not enter | plasma (and blood cells) only |
Mode.PERFUSION |
one species for the whole organ, flow-limited, the outflow C_organ/K_organ |
Mode.TISSUE (the default with a Kp) |
plasma and one tissue species with the exchange PS*fu*(C_p - C_t/Kp) |
Mode.PERMEABILITY, or an active transport of the substance in the organ |
interstitial and intracellular species |
A transport of a substance in an organ (basolateral, or an apical process) builds the full form there, also for a substance without distribution. The product of a metabolism is placed into the equivalent tissue part of the product, else into the plasma.
The collapsed forms are the limiting cases of the full form, not other models: tests/pbpk/test_equivalence.py shows that the merged tissue with a large exchange is the flow-limited organ, the full form with a large PS_vas the merged tissue, and fast kinetic erythrocytes the erythrocytes in equilibrium.
Merged tissue¶
The default with a Kp: the interstitial and the intracellular space are one tissue species with the whole-tissue Kp. The exchange of the organ is its share of the whole-body exchange ftissue_<s> by its tissue volume, relative to the reference tissue volume of the organs the substance enters (a ps of the organ replaces it: per litre of organ PS_<s> = kps_<s> * V<o>, or with ps_per_volume=False the exchange of the whole organ, in the liver PS_<s> = PS_ref_<s> * f_functional).
J_ti_<s>: Cpl_<s> -> Cti_<s> = PS_<s> * fu_<s> * (Cpl_<s> - Cti_<s> / Kp_<s>)
PS_<s> = ftissue_<s> * V<o> * (1 - f_vas_<o>) / Vti_total_ref_<s>
Cu_ti_<s> = fu_<s> / Kp_<s> * Cti_<s>
Flow-limited organ¶
One species for the vascular space and the tissue together, in equilibrium with the blood leaving the organ: the outflow is the organ concentration over the organ to plasma coefficient K_or_<s>, exactly flow-limited, without a fast rate constant (no stiffness). The coefficient of adipose is its override Kp_ad_<s> if the substance gives one.
J_in_ar_pl_<s>: Car_<s> -> Cor_<s> = Q<o> * BP_<s> * Car_<s>
J_out_pl_<s>: Cor_<s> -> Cve_<s> = Q<o> * BP_<s> * Cout_<s>
K_or_<s> = f_vas_<o> * BP_<s> + (1 - f_vas_<o>) * Kp_<s>
Cout_<s> = Cor_<s> / K_or_<s>
Cu_or_<s> = fu_<s> / K_or_<s> * Cor_<s>
Full form¶
Interstitial and intracellular species (PK-Sim 4-compartment structure, in the form of the OSP report, section 2.1). The exchange between plasma and interstitium crosses the endothelium, PS_vas = k_vas*V<o> with k_vas 1000 1/min, a choice of the library: the endothelium is not limiting for small molecules, as in the default of PK-Sim. The exchange between interstitium and cells is the share of ftissue_<s> (or the ps of the organ). The interstitial to plasma coefficient follows from fu (Schmitt 2008), and the intracellular one is derived so that both together are the Kp of the substance, (f_int*K_int_pls + f_cell*K_cell_pls)/(f_int + f_cell) = Kp; its floor 1e-6 keeps it positive should a fit or another individual reach the interstitial share.
J_is_<s>: Cpl_<s> -> Cis_<s> = PS_vas * fu_<s> * (Cpl_<s> - Cis_<s> / K_int_pls_<s>)
J_ic_<s>: Cis_<s> -> Cic_<s> = PS_<s> * (fu_<s> / K_int_pls_<s> * Cis_<s> - fu_<s> / K_cell_pls_<s> * Cic_<s>)
PS_vas = k_vas * V<o>
K_int_pls_<s> = (f_water_int + r_protein_int_pls * (1 / fu_<s> - f_water_pls)) * fu_<s>
K_cell_pls_<s> = piecewise((Kp_<s> * (f_int_<o> + (1 - f_vas_<o> - f_int_<o>)) - f_int_<o> * K_int_pls_<s>) / (1 - f_vas_<o> - f_int_<o>), (Kp_<s> * (f_int_<o> + (1 - f_vas_<o> - f_int_<o>)) - f_int_<o> * K_int_pls_<s>) / (1 - f_vas_<o> - f_int_<o>) > 1e-6, 1e-6)
Cu_is_<s> = fu_<s> / K_int_pls_<s> * Cis_<s>
Cu_ic_<s> = fu_<s> / K_cell_pls_<s> * Cic_<s>
The water fractions of interstitium and plasma and the protein ratio of the interstitial fluid (f_water_int 0.93049, f_water_pls 0.93049, r_protein_int_pls 0.37) are those of the implementation of Schmitt 2008 in httk 2.7.4 (MIT), read in its code and data: the water fraction of plasma is one minus the plasma protein volume fraction 0.06951, the interstitial fluid has the same water fraction and 37 % of the protein of plasma (data/distribution.toml).
Kp and fu¶
The Kp of a substance (or the override of an organ, or the value of a Kp method) is the whole-tissue (interstitial and intracellular) to plasma coefficient in every form, so a fitted Kp means the same in every mode. Every rate acts on unbound concentrations: fu*C_p in plasma, fu/Kp*C_t in the merged tissue, fu/K_or*C_or in the flow-limited organ, fu/K_int_pls*C_is and fu/K_cell_pls*C_ic in the full form. These unbound concentrations are the observers Cu_<part>_<s> of the organ (LI__Cu_ti_api in the flat model).
Liver¶
The liver is fed by the hepatic artery (Qha) and the portal vein (Qpo) and drains into the venous pool. Two parameters of the top model, healthy 0 and 1, carry the cirrhosis of the impairment: the portosystemic shunt f_shunt, the fraction of the arterial and portal inflow which flows past the liver into the venous pool, and the functional fraction f_functional, which scales the tissue volumes of the liver and the capacity of its processes. An experiment may set both directly. The bile is a sink (Cbile_<s>) which drains into the duodenum of the intestine.
J_in_ar_pl_<s>: Car_<s> -> Cpl_<s> = (1 - f_shunt) * Qha * (1 - HCT) * Car_<s>
J_in_po_pl_<s>: Cpo_<s> -> Cpl_<s> = (1 - f_shunt) * Qpo * (1 - HCT) * Cpo_<s>
J_shunt_ar_pl_<s>: Car_<s> -> Cve_<s> = f_shunt * Qha * (1 - HCT) * Car_<s>
J_shunt_po_pl_<s>: Cpo_<s> -> Cve_<s> = f_shunt * Qpo * (1 - HCT) * Cpo_<s>
J_out_pl_<s>: Cpl_<s> -> Cve_<s> = (1 - f_shunt) * Qh * (1 - HCT) * Cout_<s>
Vti = Vli * (1 - f_vas_li) * f_functional
PS_<s> = ftissue_<s> * Vli * (1 - f_vas_li) * f_functional / Vti_total_ref_<s>
The hepatic venous concentration is an observer of the top model, the outflow of the liver mixed with the shunt (see Observers).
Kidney¶
The kidney filters the unbound plasma concentration of a substance with urinary excretion into the urine, with the GFR of the physiology (scaled with the individual and the renal function). The glomerulus is upstream of the peritubular capillaries: it filters the afferent plasma, the arterial plasma Car_<s> of the inflow, and the plasma which flows on past the tubule (peritubular capillaries) and leaves the kidney lacks the filtrate, at the outflow concentration; the fraction reabsorbed stays in the plasma. This holds for every form of the kidney (vascular, merged tissue, full form, flow-limited with Q*BP*Cout) and every erythrocyte mode, and for the nephron kidney.
J_gfr_<s>: Cpl_<s> -> Aurine_<s> = fu_<s> * GFR * Car_<s> * (1 - f_reabsorbed_<s>)
J_out_pl_<s>: Cpl_<s> -> Cve_<s> = Qki * (1 - HCT) * Cout_<s> - fu_<s> * GFR * Cout_<s> * (1 - f_reabsorbed_<s>)
Rurine_<s> = J_gfr_<s>
With the net filtered plasma flow CL_gfr = fu*GFR*(1 - f_reabsorbed) and the plasma flow Qpl = Qki*(1-HCT) (Qki*BP with erythrocytes in equilibrium) the plasma of the kidney is in balance when (Qpl - CL_gfr)*(Car - Cpl) is what the other processes of the kidney take out. Without them the kidney plasma is the arterial plasma at steady state and the filtration clearance of the arterial plasma is CL_gfr, as in the hand-written models; it follows the GFR exactly. A secretion with the clearance CL_sec of the kidney plasma (unbound, through the cells into the urine) acts on the plasma flow less the filtrate, glomerulus and tubule in series: the renal clearance of the arterial plasma is CL_gfr + (Qpl - CL_gfr)*CL_sec/(Qpl - CL_gfr + CL_sec).
Tubular secretion is an apical efflux of the kidney into the urine (see Chemistry); the standard kidney refuses an uptake from the urine, which is cumulative. Every metabolism and transport of the kidney runs with the tubular capacity 1 - f_tubular + f_tubular*f_renal_function, which follows the renal function (the intact nephron hypothesis, see Impairment). The nephron kidney has the tubule with its segments, for secretion into and reabsorption from the tubular fluid.
Threshold reabsorption¶
A reabsorption limited by a renal threshold, as that of creatine or glucose, replaces the constant fraction: Excretion(urine=True, reabsorption=ThresholdReabsorption(threshold, n)). The reabsorbed fraction of the filtrate at the plasma concentration C is f(C) = 1/(1 + (fu*|C|/reab_threshold)^reab_n)^(1/reab_n), of the unbound concentration of the filtrate fu*C (|C| keeps the power defined for a concentration a little below 0, an undershoot of the integrator): below the threshold almost all of the filtrate is reabsorbed (the excreted fraction is about (fu*C/reab_threshold)^reab_n/reab_n), above it the reabsorption fu*GFR*C*f(C) approaches the transport maximum GFR*reab_threshold, and since f(C) is at most 1 the reabsorption never exceeds the filtration. The fraction takes the place of f_reabsorbed_<s> in both terms, at the arterial plasma in the filtration (the filtered load) and at the outflow concentration in the outflow, so without another process the kidney plasma is the arterial plasma at steady state, as with the constant fraction; the substance has reab_threshold_<s> (mM) and reab_n_<s> instead of f_reabsorbed_<s>, both fittable.
J_gfr_<s>: Cpl_<s> -> Aurine_<s> = fu_<s> * GFR * Car_<s> * (1 - 1 / (1 + (fu_<s> * abs(Car_<s>) / reab_threshold_<s>)^reab_n_<s>)^(1 / reab_n_<s>))
J_out_pl_<s>: Cpl_<s> -> Cve_<s> = Qki * (1 - HCT) * Cout_<s> - fu_<s> * GFR * Cout_<s> * (1 - 1 / (1 + (fu_<s> * abs(Cout_<s>) / reab_threshold_<s>)^reab_n_<s>)^(1 / reab_n_<s>))
The law is that of the reabsorption of creatine of the creatinine model (GFR*C/(1 + (C/ct)^n)^(1/n), unbound), which a custom reaction from the urine wrote before; a custom reaction leaves the guarantee to the model. The nephron kidney returns the same fraction of the afferent plasma at the end of the collecting duct, of the flow leaving it up to the filtered load, so a drug secreted into the tubule is not reabsorbed beyond the filtration. steady_state.renal_filtration and renal_clearance give the net filtrate at the arterial plasma and kidney_plasma the arterial plasma; with another process of the kidney the balance of its plasma is not linear and they raise NotImplementedError (see Substances).
Validity of the outflow¶
The outflow is valid while the filtered plasma water is below the plasma flow of the kidney, GFR < Qki*(1-HCT) (the glomeruli filter the water of the plasma which flows through them, whatever the substances; a PD component which filters the water at the GFR, the fluid model of hctz, leans on it), and the net filtered plasma flow of every substance is below the flow of its carrier, fu*GFR*(1 - f_reabsorbed) < Qki*(1-HCT) (Qki*BP with erythrocytes in equilibrium, fu*GFR with a saturable reabsorption, whose fraction falls to 0 at a high concentration). With fu <= 1 and BP >= 1 - HCT the water is the tighter bound: hctz (BP 1.7, fu 0.6) reaches the plasma flow with its water at renal function 6.08 and with itself only at 18.1. A model without a filtered substance has no outflow of the kidney to check and is not simulated. This holds for every physiological GFR (about 0.125 against 0.76 l/min in the reference individual), hyperfiltration and the classes of impairment included. GFR, flow and hematocrit are parameters which an experiment changes before the simulation, so the build cannot check it; PBPKSimulationExperiment checks it for every individual it simulates at the start of a simulation, each task on its model (pkpdsim.pbpk.kidney_validity, see Impairment, which lists what is not checked: a change during a simulation, a dimension with a time, a scan over models, the draws of the fitted parameters) and derives the range of the renal function from it.
Urinary excretion rate¶
The urinary excretion rate Rurine_<s> (mmole/min) is the net flux of the kidney into the urine: the sum of the fluxes into the urine, the filtration and every apical efflux (J_gfr_<s> + SEC with a secretion SEC), less the fluxes out of it, a custom reaction which returns a part of the filtrate into the plasma (J_gfr_<s> - REABS, whose rate reads the filtered load GFR*Car_<s>, not the cumulative urine; the saturable reabsorption is the library's form of it), for every substance with urinary excretion or an apical transport of the kidney; it is an output of the kidney which replaces Rurine_<s> of the top model, so experiments and observers read it there.
Boundary¶
The organ declares its boundary (Boundary): every input (Qmu, HCT, fu_api, Car_api, ...) with the element of the body which replaces it, and its outputs (Cout_<s> replaces Cout_<o>_<s> of the top model, the kidney's Rurine_<s> replaces Rurine_<s>). The builder generates the ports and the replacements from it. A variant has the same boundary, so the circulation sees nothing else and swapping a variant changes nothing outside the organ (see Organ variants).