Text this: Phased thermodynamic reduction rate model of continuous magnesium smelting process