The structural, electronic and magnetic properties of iron nanowires with different diameters