Surface energy and magnetism of the 3d metals