Fast transient cooling in thermomagnetic devices