A mechanical model of cellular solids for energy absorption