Modelling thermodynamics in a high-temperature superconducting dipole magnet: an inverse problem based approach