The effects of microstructural characteristics and casting defects on the mechanical failure of Al-based alloys