adapted for magnetic entropy change by magnetocaloric effect