Solving corrosion problems with surface analysis