The energetics of heterogeneous deformation in open-cell solid foams