Residence Time Distribution (RTD) Simulator Back
Reaction Engineering

Residence Time Distribution (RTD) Simulator

Compute the residence time distribution E(t) that describes how long fluid elements stay inside a flow reactor. Switch between an ideal CSTR, PFR, tanks-in-series or laminar reactor and see the mean residence time, variance, equivalent number of tanks and first-order conversion update in real time.

Parameters
Reactor model
Flow model that sets the shape of the RTD
Mean residence time τ
s
Reactor volume ÷ volumetric flow rate. τ = V/Q
Number of tanks N (tanks-in-series)
Used only with the tanks-in-series model. N=1 is a CSTR, N→∞ is a PFR
Reaction rate constant k (first-order)
1/s
Rate constant of the first-order reaction A→product
Results
Mean residence time τ (s)
Variance σ² (s²)
Dimensionless variance σ²/τ²
Equivalent tanks N_eq
First-order conversion X (%)
Peak time t_peak (s)
Tracer-pulse response — animation

A tracer pulse injected at the inlet flows through the reactor and emerges at the outlet, building up the E(t) curve below. A CSTR disperses it widely, a PFR keeps a tight plug, and tanks-in-series spreads it through N stages.

RTD function E(t)
Cumulative distribution F(t)
Theory & Key Formulas

$$E_{CSTR}(t)=\frac{1}{\tau}e^{-t/\tau},\qquad E_{tanks}(t)=\frac{N}{\tau}\frac{(Nt/\tau)^{N-1}}{(N-1)!}e^{-Nt/\tau}$$

RTD function E(t). τ: mean residence time, N: number of tanks. E(t)·dt is the fraction of fluid with residence times between t and t+dt, and the full integral is 1.

$$\sigma^2_{tanks}=\frac{\tau^2}{N},\qquad X=1-\int_0^\infty E(t)\,e^{-kt}\,dt$$

Variance σ² of the tanks-in-series model and the first-order conversion X from the segregated-flow model. k: first-order rate constant. A narrow RTD (large N) approaches plug flow.

What is the Residence Time Distribution (RTD)?

🙋
"Residence time distribution" came up in my reaction-engineering class — but a distribution of what, exactly?
🎓
Put simply, it is the spread of "how many seconds a fluid element spent inside the reactor". In a continuous reactor, fluid enters at the inlet and leaves at the outlet — but not every molecule spends the same time inside. Some take a shortcut and leave fast; others get caught in a stagnant corner and linger. The histogram of those residence times is E(t), the residence time distribution.
🙋
How can you possibly measure the time of each individual molecule?
🎓
That is the neat part. At the inlet you inject a tracer — say a slug of salt solution or dye — in a quick "blip". That is called a pulse input. Then you just measure the outlet concentration versus time. Normalize that outlet curve and it is E(t) itself. Pick "Ideal CSTR" in the animation above: the tracer mixes into the whole tank the instant it enters, so the outlet concentration jumps to a peak and then decays exponentially. That is the signature of perfect mixing.
🙋
So what shape does E(t) take if I pick "Ideal PFR"?
🎓
A PFR — plug flow — is like everyone marching in a single file. No overtaking and no mixing, so the tracer you injected comes back out all together, exactly τ seconds later. E(t) becomes a sharp needle-like pulse at t=τ, and the variance is zero. CSTR and PFR are the two extremes: the CSTR mixes too much, the PFR not at all. Treating a real reactor as somewhere in between is the starting point of RTD analysis.
🙋
"Somewhere in between" — how do you put a number on that?
🎓
A common choice is the "tanks-in-series" model. You treat a real reactor as N small perfectly mixed tanks (CSTRs) connected in series. N=1 is a plain CSTR; raise N and the RTD gets sharper, and at N→∞ it matches a PFR. Measure the variance σ² from a tracer test and N_eq=τ²/σ² instantly tells you "this reactor mixes like how many CSTRs". Move the N slider on the left and watch the E(t) peak sharpen.
🙋
Once I know the RTD, what do I actually gain? Just a prettier graph?
🎓
No — that is where the real payoff begins. Combine the RTD with a reaction-rate model and you can predict "how far the conversion will go in this reactor". For a first-order reaction, treat each fluid element as an independent little batch reactor: depending on its residence time t, a fraction exp(−k·t) stays unreacted. Average that with E(t) as the weight and you get the outlet conversion X. Even at the same mean residence time, a PFR gives a higher conversion than a CSTR — quantifying that gap is the most useful thing the RTD does.

Frequently Asked Questions

The residence time distribution (RTD) E(t) is the probability density function of how long each fluid element stays inside a flow reactor. If you inject a pulse of tracer (dye or salt) at the inlet and measure the outlet concentration versus time, the normalized response curve is exactly E(t). The quantity E(t)·dt is the fraction of fluid elements with residence times between t and t+dt, and ∫E(t)dt equals 1. The RTD tells you quantitatively how close a real reactor is to ideal plug flow (PFR) or to perfect mixing (CSTR).
In an ideal CSTR (perfectly mixed tank) the incoming fluid mixes instantly into the whole volume, so E(t)=(1/τ)·exp(−t/τ), a decaying exponential. Some elements leave immediately and others linger, giving a very broad distribution with variance σ²=τ². In an ideal PFR (plug flow) every element stays exactly τ, so E(t) is a sharp pulse at t=τ with σ²=0 ideally. Real reactors lie between these two limits, and the number of tanks N in the tanks-in-series model spans the range between them.
The tanks-in-series model approximates a real reactor as N equal ideal CSTRs connected in series. N=1 is a single CSTR and N→∞ converges to a PFR. The variance is σ²=τ²/N, so from a measured σ² you can back out N_eq=τ²/σ², a single number stating how many CSTRs the reactor mixes like. The larger N is, the sharper the RTD and the closer the reactor is to plug flow; the smaller N is, the more intense the mixing and the lower the conversion.
In the segregated-flow model each fluid element is treated as an independent little batch reactor, and the reaction it undergoes during its residence time is averaged using the RTD as the weight. For a first-order reaction each element leaves a fraction exp(−k·t) unreacted, so the outlet unreacted fraction is ∫E(t)·exp(−k·t)dt and the conversion is X=1−∫E(t)·exp(−k·t)dt. For tanks-in-series this integral has the closed form X=1−(1+k·τ/N)^(−N). Because segregated flow and maximum micromixing give identical results for a first-order reaction, this formula is exact regardless of the mixing model.

Real-World Applications

Design and scale-up of continuous reactors: When designing a continuous stirred tank or a tubular reactor for a chemical plant, engineers first measure the RTD of the real unit with a tracer test and fit it to a tanks-in-series or dispersion model. If a reactor that gave N_eq=8 at bench scale drops to N_eq=3 after scale-up because of piping dead zones and bypassing, the conversion falls sharply even at the same mean residence time. The RTD is the standard tool for catching this "degradation of mixing" early during scale-up.

Diagnosing non-ideal flow and faults: When a reactor underperforms its design value, measuring the RTD reveals the cause. An earlier-than-expected peak in E(t) points to a shortcut (bypass flow); a long tail points to a dead zone (stagnation); a twin-peaked curve suggests channeling or a faulty baffle. The RTD numerically exposes real flow anomalies — impeller placement, piping layout, maldistribution in a packed bed — that drawings cannot show.

Water and wastewater treatment: In the chlorine contact basins of a waterworks or the aeration tanks of a sewage plant, regulations require a "sufficient contact time" for disinfection and biological treatment. In practice, short-circuiting lets some water escape earlier than intended, leaving that fraction untreated. By measuring the RTD — especially t10 of F(t), the time at which 10% has left — engineers verify whether a contact basin meets its required disinfection performance.

Pharmaceutical and food continuous manufacturing: In continuous crystallization, extruder compounding and continuous sterilization (HTST), product uniformity and safety depend directly on the spread of residence times. In pharmaceutical processes moving to continuous manufacturing, the RTD is used to trace drug-substance concentration and to isolate out-of-spec batches, forming the basis of quality assurance to regulators. The RTD is not just a textbook concept — it is a tool used directly in on-site quality control.

Common Misconceptions and Pitfalls

The most common mistake is "if the RTD is the same, the conversion must be the same". This is true only for a first-order reaction; it fails for second-order and complex reactions. In a first-order reaction the rate for each molecule does not depend on the concentration of other molecules, so segregated flow (each element reacting as an independent batch) and maximum micromixing (mixing at the molecular level) give identical results. In a second-order reaction, however, "did the element sit in a rich region or a lean region?" changes the amount reacted, so the conversion depends on the degree of micromixing even at the same RTD. You must understand the limit: the RTD carries only macro-mixing information, and micromixing is a separate question.

Next, "matching the mean residence time τ is enough". The value τ=V/Q describes only the "mean" of the reactor; the spread of the distribution (variance σ²) is a separate matter. At the same τ, a PFR (σ²=0) and a CSTR (σ²=τ²) give completely different conversions. For a first-order reaction the PFR always gives the highest and the CSTR the lowest conversion, and the gap widens the faster the reaction (the larger k·τ). Design must consider not just the mean but the variance — that is, "how close to plug flow" the reactor is. Switch between CSTR and PFR in this tool and confirm that the conversion changes even at the same τ and k.

Finally, the pitfalls of the tracer experiment itself. To measure the RTD correctly the tracer must not react, must not adsorb, and must flow exactly like the main fluid (an ideal tracer). A tracer with a very different density or viscosity flows differently from the main fluid and distorts the RTD. Also, if the pulse input is not truly "instantaneous" (if the injection takes time), the effect of that input width must be removed by deconvolution. Measurement lag at the outlet and dead volume in the piping inflate the apparent τ. Even a clean E(t) curve may not be the true picture of the real reactor if the input and detection system depart from the ideal.

How to Use

  1. Enter the nominal residence time τ in seconds (typical range 1–3600 s for industrial reactors)
  2. Specify the number of equivalent tanks N_eq (1 for plug flow, 10+ for well-mixed CSTR)
  3. Input the first-order reaction rate constant k in s⁻¹ if computing conversion
  4. Click Simulate to generate E(t) curve and calculate mean residence time, variance, peak time, and conversion percentage

Worked Example

A pilot-scale stirred tank with τ = 120 s and N_eq = 5 equivalent tanks (series configuration). Enter k = 0.015 s⁻¹ for a pharmaceutical synthesis reaction. The simulator outputs: mean residence time τ = 120 s, variance σ² = 2880 s², dimensionless variance σ²/τ² = 0.2, peak time t_peak ≈ 96 s, and first-order conversion X ≈ 28%. Compared to ideal CSTR (N_eq = 1) giving X ≈ 15%, the staged tanks improve selectivity.

Practical Notes

  1. Use N_eq = 1 for continuous stirred-tank reactors (CSTR) and N_eq → ∞ for plug-flow reactors (PFR); industrial columns typically range N_eq = 2–8
  2. If σ²/τ² > 0.5, expect significant mixing delay and potential dead zones; validate with tracer experiments (lithium chloride pulse, thermal imaging)
  3. Conversion X depends on reaction kinetics; for competing parallel reactions, RTD broadness favors secondary products in homogeneous systems