Thermodynamics of corrosion in fused sulphates