Compartmental models are composed of sets of interconnected mixing chambers or stirred tanks. Each component of the system is considered to be homogeneous, instantly mixed, with uniform concentration. The state variables are concentrations or molar amounts of chemical species. Chemical reactions, transmembrane transport, and binding processes, determined in reality by electrochemical driving forces and constrained by thermodynamic laws, are generally treated using first-order rate equations. This fundamental simplicity makes them easy to compute since ordinary differential equations (ODEs) are readily solved numerically and often analytically. While compartmental systems have a reputation for being merely descriptive they can be developed to levels providing realistic mechanistic features through refining the kinetics. Generally, one is considering multi-compartmental systems for realistic modeling. Compartments can be used as “black” box operators without explicit internal structure, but in pharmacokinetics compartments are considered as homogeneous pools of particular solutes, with inputs and outputs defined as flows or solute fluxes, and transformations expressed as rate equations.
Descriptive models providing no explanation of mechanism are nevertheless useful in modeling of many systems. In pharmacokinetics (PK), compartmental models are in widespread use for describing the concentration–time curves of a drug concentration following administration. This gives a description of how long it remains available in the body, and is a guide to defining dosage regimens, method of delivery, and expectations for its effects. Pharmacodynamics (PD) requires more depth since it focuses on the physiological response to the drug or toxin, and therefore stimulates a demand to understand how the drug works on the biological system; having to understand drug response mechanisms then folds back on the delivery mechanism (the PK part) since PK and PD are going on simultaneously (PKPD).
Many systems have been developed over the years to aid in modeling PKPD systems. Almost all have solved only ODEs, while allowing considerable conceptual complexity in the descriptions of chemical transformations, methods of solving the equations, displaying results, and analyzing systems behavior. Systems for compartmental analysis include Simulation and Applied Mathematics, CoPasi (enzymatic reactions), Berkeley Madonna (physiological systems), XPPaut (dynamical system behavioral analysis), and a good many others. JSim, a system allowing the use of both ODEs and partial differential equations (that describe spatial distributions), is used here. It is an open source system, meaning that it is available for free and can be modified by users. It offers a set of features unique in breadth of capability that make model verification surer and easier, and produces models that can be shared on all standard computer platforms.