Thermodynamic analysis of the refining of technical boron nitride