Modeling and optimization of uniaxial magnetic pulse compaction of nanopowders