Stress and recovery: two tanks

A hydraulic toy model of how daily load builds up and how sleep, breaks and support drain it away.

Educational toy, not medicine. This is not a diagnostic tool and gives no health advice. It does not measure or predict anyone's mental health. If you are struggling, talk to a trusted adult or a qualified professional.
Strain tank S
Reserve tank R
Day / time
Mode
What to try
  • Pick "Deadline crunch" and watch the reserve sink week after week.
  • Then add sleep or short breaks: strain falls faster because the recovery rate rises.
  • Set support to 0 and 1 and compare the peak strain.
  • Turn weekends off and see the reserve refill on days 6 and 7.
The science

Time t is in hours. Two coupled first-order equations:

dS/dt = L(t) - k(t) S strain S builds with load L and relaxes at rate k.
dR/dt = -c S R + b rho(t) (1 - R) reserve R (0..1) is drained in proportion to strain and refilled by rest.

k = (k0 + k1 rho)(1 + s Sp), with rest level rho = 1 asleep, 0.12 + 0.3 x breaks awake, and Sp the support level. Constants: k0=0.05/h, k1=0.5/h, s=0.6, c=0.02, b=0.12/h.

It is the same structure as sleep-debt and fitness-fatigue (Banister) impulse-response models: a quantity that charges with input and discharges exponentially, plus a slower resource it consumes. Real psychology is far more complex and individual; the numbers here are illustrative, not fitted to data.

Integration: RK4, step 0.25 h. Workdays 09:00-17:00; waking at 07:00.

3D version: Open the 3D hydraulic rig