A comparative study of magnesium-rich rare-earth-based alloys for hydrogen storage