Separation of particles from hot gases using metallic foams