This Demonstration uses the pharmacokinetic one- and two-compartment models to simulate hemodialysis.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


In the one-compartment model, the patient's body fluid is considered as one unit; toxins, here represented by creatinine, are removed to the dialyzer by diffusion. The two-compartment model assumes the body fluids are divided into two compartments, one directly accessible to the dialyzer (extracellular) and the other indirectly accessible (intracellular); creatinine is generated in the extracellular compartment [1]. Assuming constant volume and no residual kidney function, the one-compartment model is described by an ordinary differential equation:
and the two-compartment model by a pair of coupled ordinary differential equations:
Here , , and are the creatinine concentrations in the total, extracellular, and intracellular compartments; is the mass transfer coefficient; is the dialyzer clearance; and , , and are the total, extracellular, and intracellular volumes. Total body volume in liters is taken as 57% of body weight in kilograms, and the intracellular and extracellular volumes as 2/3 and 1/3 of total body volume [2]. is the rate of creatinine generation and is time. The initial condition for the dialysis time period is , a constant, in the recovery period (no dialysis) , and the initial values of , , and are equal to the values of , , and at the end of dialysis. These equations are solved using Mathematica's built-in function NDSolve. The solution to the two-compartment model exhibits the phenomena of post-dialysis rebound, the observed fast increase in creatinine concentration after dialysis caused by disequilibrium between the compartments.
[1] J. Waniewski, "Mathematical Modeling of Fluid and Solute Transport in Hemodialysis and Peritoneal Dialysis," Journal of Membrane Science, 274(1–2), 2006 pp. 24–37. doi:10.1016/j.memsci.2005.11.038.
[2] K. B. G. Sprenger, W. Kratz, A. E. Lewis, and U. Stadtmüller, "Kinetic Modeling of Hemodialysis, Hemofiltration, and Hemodiafiltration," Kidney International, 24, 1983 pp. 143–151. doi:10.1038/ki.1983.138.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+