A simple model of energy confinement in tokamaks