Ion flows and heating at a contracting polar-cap boundary