Modeling the compressive fracture behavior of foams for energy absorption