modelPK_3M_9C
Extends from Icons.Compound.
Information
PK_3M_9C
Generic template for drugs whose PK is reported as parent → metabolite 1, parent → metabolite 2. Each of the three molecules has a central, a peripheral and a second peripheral compartment (9 compartments in total). Both metabolites are formed one way from the parent central compartment. A concrete drug model extends this class and only sets parameters; covariate and genotype effects are ordinary parameter expressions in the extending model, e.g. q1_m11 = fm1*CLtot, CL1 = (1 - fm1 - fm2)*CLtot.
Compare PK_3M_3C, where the dose and the metabolite formation go through a hepatic (first-pass) compartment.
Naming. Compartments are numbered as in popPK: 1 = central, 2 = peripheral, 3 = peripheral 2; m1Y / m2Y are compartment Y of metabolite 1 / 2. qXY is the clearance moving drug from X to Y. q1_m11 and q1_m21 are the formation clearances; CL1 eliminates the parent by all other routes, so the parent's total clearance is CL1 + q1_m11 + q1_m21. A popPK model reported with micro-constants converts as clearance = k · V of the source compartment (e.g. q12 = k12*Vd1).
Reducing the structure — every PK parameter defaults to 0 and an unused compartment simply stays empty:
- no metabolite 2 (parent + one metabolite):
q1_m21 = 0; - a parent or metabolite with fewer compartments: leave the clearances to its unused peripheral compartments at 0 (e.g. a 1-compartment metabolite 1:
qm11_m12 = qm12_m11 = qm11_m13 = qm13_m11 = 0); - parent only: both formation clearances 0 — then the model equals
PK_1C/PK_2C/PK_3C.
Dosing enters the parent central compartment through two sources sharing one schedule (adminTime, adminPeriod, adminCount): oral adminMass (ka, Tlag, F, adminDuration — by default a 1 s bolus into the gut) and IV / parenteral infusionMass (bioavailability 1, infused over infusionDuration). Use one and set the other to 0: adminMass defaults to 100 mg, so an IV-only model sets adminMass = 0; infusionMass defaults to 0. Both may be non-zero for a regimen that combines the routes.
Molar masses. Formation is molar: 1 mol of parent forms 1 mol of metabolite, so with the molar masses set (MW, MW_m1, MW_m2, kg/mol) the metabolite gains MW_m/MW kg per kg of parent converted (TransferMetabolicConversion). Every compartment then also reports its molar concentration C_molar (mol/m3). A molar mass left at 0 means "not supplied": formation falls back to mass-conserving (ratio 1) and C_molar is 0.
Assumptions and limits. Metabolites are formed only from the parent central compartment (no pre-systemic / first-pass formation — use PK_3M_3C for that), metabolites do not convert back, and there is no metabolite-to-metabolite formation (M1 → M2).
Outputs: C_central, C_M1, C_M2, and the connectors centralCPort, centralM1CPort, centralM2CPort for driving PD models.
Simulating as a co-simulation FMU
The dose is a rectangular pulse adminMass/adminDuration wide adminDuration. An OpenModelica co-simulation FMU (CVODE, no root finding) sees that pulse only at communication points, so the communication step must resolve it: use at most adminDuration/50 and keep dose times on the step grid. Measured on PK_3M_3C (single 75 mg dose): with a 60 s step a 1 s pulse was either missed (0× the dose) or held for the whole step (60×); with adminDuration/50 the mass balance closes to 1.0000. A pulse that starts at t = 0 or between grid points is held one step too long (+2% at adminDuration/50), which is why the templates start at adminTime = 60. In FMPy the communication step is output_interval, not step_size.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | massRatio_m1 | if MW > 0 and MW_m1 > 0 then MW_m1/MW else 1 | |
| Real | massRatio_m2 | if MW > 0 and MW_m2 > 0 then MW_m2/MW else 1 | |
| Pharmacolibrary.Types.Mass | adminMass | 1e-4 | oral dose mass (0 = no oral dose; an IV-only model sets 0) |
| Pharmacolibrary.Types.Mass | infusionMass | 0 | IV / parenteral dose mass into the parent central compartment (0 = no IV dose); bioavailability 1 |
| Integer | adminCount | 1 | number of doses (-1 = unlimited) |
| Modelica.Units.SI.Time | adminPeriod | 8*3600 | period of administration |
| Modelica.Units.SI.Time | adminDuration | 1 | oral administration duration (a 1 s bolus into the gut) |
| Modelica.Units.SI.Time | infusionDuration | adminDuration | IV infusion duration (default: adminDuration, i.e. a bolus) |
| Modelica.Units.SI.Time | adminTime | 60 | first administration time (s); 60 as in PK_1C, not 0 — a co-simulation FMU starting a dose pulse at t = 0 doses one communication step too long |
| Modelica.Units.SI.MassFraction | F | 1 | bioavailability (0-1) |
| Pharmacolibrary.Types.TransferRate | ka | 0.016666666666666666 | first order absorption rate (oral dosing only) |
| Modelica.Units.SI.Time | Tlag | 0 | delay between oral administration and absorption (oral dosing only) |
| Types.Volume | Vd1 | 0 | parent: central volume |
| Types.Volume | Vd2 | 0 | parent: peripheral volume |
| Types.Volume | Vd3 | 0 | parent: peripheral 2 volume |
| Types.Volume | Vd1m1 | 0 | metabolite 1: central volume |
| Types.Volume | Vd2m1 | 0 | metabolite 1: peripheral volume |
| Types.Volume | Vd3m1 | 0 | metabolite 1: peripheral 2 volume |
| Types.Volume | Vd1m2 | 0 | metabolite 2: central volume |
| Types.Volume | Vd2m2 | 0 | metabolite 2: peripheral volume |
| Types.Volume | Vd3m2 | 0 | metabolite 2: peripheral 2 volume |
| Types.Clearance | q12 | 0 | parent: central -> peripheral (0 = no peripheral) |
| Types.Clearance | q21 | 0 | parent: peripheral -> central |
| Types.Clearance | q13 | 0 | parent: central -> peripheral 2 (0 = no peripheral 2) |
| Types.Clearance | q31 | 0 | parent: peripheral 2 -> central |
| Types.Clearance | CL1 | 0 | parent: elimination from central by routes other than M1/M2 formation |
| Types.Clearance | q1_m11 | 0 | formation of metabolite 1 from parent central (0 = no metabolite 1) |
| Types.Clearance | q1_m21 | 0 | formation of metabolite 2 from parent central (0 = no metabolite 2) |
| Types.Clearance | qm11_m12 | 0 | metabolite 1: central -> peripheral |
| Types.Clearance | qm12_m11 | 0 | metabolite 1: peripheral -> central |
| Types.Clearance | qm11_m13 | 0 | metabolite 1: central -> peripheral 2 |
| Types.Clearance | qm13_m11 | 0 | metabolite 1: peripheral 2 -> central |
| Types.Clearance | CLm1 | 0 | metabolite 1: elimination from central |
| Types.Clearance | qm21_m22 | 0 | metabolite 2: central -> peripheral |
| Types.Clearance | qm22_m21 | 0 | metabolite 2: peripheral -> central |
| Types.Clearance | qm21_m23 | 0 | metabolite 2: central -> peripheral 2 |
| Types.Clearance | qm23_m21 | 0 | metabolite 2: peripheral 2 -> central |
| Types.Clearance | CLm2 | 0 | metabolite 2: elimination from central |
| Info › Molar masses | |||
| Modelica.Units.SI.MolarMass | MW | 0 | parent molar mass [kg/mol]; 0 = not supplied |
| Modelica.Units.SI.MolarMass | MW_m1 | 0 | metabolite 1 molar mass [kg/mol]; 0 = not supplied |
| Modelica.Units.SI.MolarMass | MW_m2 | 0 | metabolite 2 molar mass [kg/mol]; 0 = not supplied |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Interfaces.ConcentrationPort_b | centralCPort | parent central compartment | |
| Interfaces.ConcentrationPort_b | centralM1CPort | metabolite 1 central compartment | |
| Interfaces.ConcentrationPort_b | centralM2CPort | metabolite 2 central compartment | |
| Types.ConcentrationOutput | C_central | parent concentration, central compartment | |
| Types.ConcentrationOutput | C_M1 | metabolite 1 concentration, central compartment | |
| Types.ConcentrationOutput | C_M2 | metabolite 2 concentration, central compartment |