Numerical simulation of heat transfer in metal foams