Magnetocombustion: A Thermodynamic Analysis