Calculation of metallurgical phase diagrams