Phase diagrams and thermodynamics of rare-earth-doped zirconia ceramics