Effects of grain size on the corrosion resistance of pure magnesium by cooling rate-controlled solidification