Phase transitions in one-dimensional mechanical models of thermodynamics and the physics of the Hall bar system