A tank holds 100 litres of water. Salt water at 2 grams per litre runs in at 5 litres per minute, and well-stirred solution runs out at the same 5 litres per minute, so the volume stays at 100. Let y be the grams of salt in the tank. The question the equation answers is how y changes.
Definition · A well-stirred tankA tank of constant volume V with a stream of concentration c flowing in at the flow rate r, and the same flow r leaving. The well-stirred assumption is that the concentration inside is y/V everywhere at once.
The balance is y′ = r·c − r·y/V: grams in per minute, minus grams out per minute.
in: r·c = 5 × 2 = 10 grams per minute
out: r·y/V = 5 × y/100 = y/20 grams per minute
y′ = 10 − y/20
= −(1/20)·(y − 200)
The second line is the first rewritten by taking out −1/20: 10 − y/20 = −(1/20)·(y − 200). It is Newton's law with k = 1/20 and a steady amount A = 200 grams, and it is the equation of “Newton's Law of Cooling” with the salt's gap y − 200 in the place of the coffee's gap y − 20. The steady amount is where the rates balance: 10 = y/20 at y = 200, which is c·V = 2·100.
Solving it, and stepping it
With the tank starting as pure water, y(0) = 0, the solution is y = 200 + (0 − 200)·e^(−t/20) = 200·(1 − e^(−t/20)). The lab steps it with h = 1 minute. The factor is 1 − 1/20 = 19/20, and the first two steps are y₁ = 200·(1 − 19/20) = 10 and y₂ = 200·(1 − 361/400) = 39/2. After ten steps the exact value is a fraction with a long denominator, which the lab prints in full beside ≈ 78.6939, the rounded closed form at t = 10.
n yₙ = 200·(1 − (19/20)ⁿ)
0 0
1 10
2 39/2
3 1141/40
closed form at t = 10: 200·(1 − e^(−1/2)) ≈ 78.6939
Never reaching the inflow concentration
The tank's concentration is y/V, which starts at 0 and has the inflow's concentration 2 as its limit. Does it get there? The gap 200·e^(−t/20) is positive at every time, so y is under 200 at every time, and the exact sequence has the same property, because (19/20)ⁿ is positive for every n. The gap halves every ln 2/(1/20) ≈ 13.8629 minutes, which is quick, and still never zero.
Example · A tank being flushedFill the tank with 50 grams of salt and run pure water through it at 10 litres per minute into 100 litres: y′ = −y/10, steady amount 0. The factor with h = 1 is 9/10, so the exact amounts are 50, 45, 81/2, 729/20, …. They fall towards 0 and no step is 0. The third preset is a tank that already holds 100 grams and is fed by a stream whose steady amount is 300: y′ = 6 − y/50, which is 5 litres per minute at 1.2 grams per litre into 250 litres. It rises towards 300 and stays under it.
What the equation assumes is part of the problem. The volume does not change; the tank is perfectly mixed; the inflow concentration is constant. If the outflow differed from the inflow the volume would change, and V would become a function of time in the equation. That is a different problem and not one this course solves.