Each tank is an ideal continuous stirred-tank reactor (CSTR): perfectly mixed, constant volume, constant volumetric flow Q. A mass balance on tank i gives a first-order ODE driven by the tank upstream of it:
dC_i/dt = (1/τ)·(C_(i-1) − C_i), τ = V/Q (per-tank residence time)
C_0(t) = feed concentration, shaped by the disturbance you trigger
This 2D view solves those ODEs independently of any 3D scene and renders the result two ways that a spatial 3D render cannot show at once: a kymograph (top) — a scrolling strip chart with tank index on the x-axis and time flowing downward, colour-coded by concentration — and a response chart (bottom) plotting every tank's concentration against time directly. For a step disturbance, the exact closed-form outlet response is overlaid as a dashed reference curve:
C_N(t)/ΔC_in = 1 − e^(−t/τ)·Σ_(k=0)^(N−1) (t/τ)^k / k! (regularized incomplete gamma function)
- N (tanks in series) — with N = 1 the outlet jumps and relaxes exponentially (classic CSTR lag). As N grows, the response sigmoid-delays and sharpens toward the sharp, pure-delay step of an ideal plug-flow reactor (PFR) — the numbering-up-vs-size-up trade-off in continuous manufacturing.
- τ per tank — sets how fast each stage relaxes toward its inlet; total plant residence time is N·τ.
- Disturbance type — Step models a sustained feed-composition upset; Pulse models a transient slug that clears after roughly one tank residence time; Sine models a periodic feed-pump ripple, testing whether the cascade damps or amplifies an oscillating input. Only Step has a closed form, so the dashed overlay only appears for it.
- Analytic vs numeric gap — the live numerical difference between the sub-stepped ODE integrator and the exact gamma-cascade formula for the outlet tank during an active step disturbance; it stays near zero, confirming the integrator is solving the right equations.