Determination of the partial enthalpies of trivalent rare earth or transition metals in liquid aluminium or silicon