Text this: On the thermodynamic equilibrium of thermal casting processes