Refrigeration using magnetic materials has emerged as a promising new, energy efficient and environmentally friendly solid state cooling technology. Cooling cycles are designed to manipulate the changes of entropy and temperature that happen when a magnetic field is applied to align randomly oriented magnetic moments. This project will use a computational approach that models the material at the sub-nanoscale to account for the interactions among the moments and their statistical mechanics to describe the cooling properties quantitatively. We will investigate the effect of compositional heterogeneities, nanostructuring and disorder on the changes of magnetic and structural state of a material, i.e. phase transitions, where the cooling effects are largest.