Repeated dosing and drug accumulation

Illustrative drug, educational only: watch repeated doses build toward steady state and compare with the closed-form answer.

Switch to 2D

Presets

Playback

Funnel: gut depot. Blue tank: body (level = concentration). Tap: clearance. Bucket: eliminated drug. Illustrative drug, not medical advice.

Route

Dosing and drug

Camera

Layers

Quality

Model check

The science

Illustrative drug, not medical advice. This is a teaching model of a made-up drug with round-number parameters. It is not a dosing guide, and the green window is an invented range in mg/L, not a real therapeutic range. Real dosing decisions belong to a clinician or pharmacist.

Model: one compartment, first-order everything

The body is treated as one well-mixed volume V. Oral drug waits in a gut depot and moves into the body at rate ka; the body loses drug at rate k = CL/V. dAg/dt = -ka Ag, dAb/dt = ka Ag - k Ab, dAe/dt = k Ab, with concentration C = Ab/V and half-life t½ = ln2 / k. Each dose is an instantaneous event (IV: into the body; oral: F x dose into the gut).

Closed forms used as checks

  • One IV dose: C = (D/V) e^(-k t). One oral dose (Bateman): C = F D ka / (V (ka - k)) (e^(-k t) - e^(-ka t)). The sum of shifted single-dose curves is exact for a linear system, so it checks the RK4 integrator independently.
  • Accumulation factor R = 1/(1 - e^(-k tau)). IV steady peak (D/V) R, trough peak x e^(-k tau); after n doses the IV peak is (D/V) R (1 - e^(-n k tau)).
  • Oral steady state: C_ss(t) = F D ka /(V(ka-k)) [e^(-kt)/(1-e^(-k tau)) - e^(-ka t)/(1-e^(-ka tau))], peak at t = ln(ka(1-e^(-k tau)) / (k(1-e^(-ka tau)))) / (ka-k).
  • Average level F D / (CL tau), independent of the absorption rate. About 90 % of steady state is reached after ln10/k = 3.32 half-lives.

What the picture shows

Funnel = gut depot, tank = body (its level is the concentration, the gauge is in mg/L), the tap and pipe = clearance, the bucket = cumulative eliminated amount. The liquid in the funnel and bucket is scaled to the largest value reached in the run.

Simplifications

Real drugs may need several compartments, saturable (non-linear) clearance, protein binding, food effects and variable adherence. Parameters are illustrative; the half-life, volume and bioavailability ranges are typical orders of magnitude, so check a reference before relying on any number. The 3D parts were modelled and texture-baked in Blender; the physics runs in JavaScript.

Loading model...
Loading Blender model...
Concentration over time: RK4 vs closed form
Peak and trough after each dose
Steady-state level vs dosing interval
Made with 🟠 Blender · Three.js