Data-driven modeling of nonlinear materials in normal-conducting magnets