Direct magnetocaloric characterization and simulation of thermomagnetic cycles