Modeling of magnetizing processes