Entrance and exit effects on flow through metallic foams