Three-dimensional electromagnetic model of the pulsed-powerZ-pinch accelerator