Relationship between electrical resistivity and porosity for porous metals