We investigate with the help of a magnetohydrodynamic (MHD) model how the large-scale topology of the magnetosphere develops for a constant interplanetary magnetic field (IMF) with different IMF clock angles and for an IMF $B_y$ sign change during northward IMF. A detailed examination of the topological changes in the tail and the ionosphere for different IMF conditions shows a good agreement with observational results. The MHD simulations for different constant IMF clock angle cases show the expected field-line bending and tail twisting for nonzero IMF $B_y$. The tail becomes longer and at its tailward end stronger twisted for IMF $B_z>|B_y|$ than for IMF $B_z<|B_y|$. The field lines originating in the high-latitude flank of the far-tail plasma sheet map into the near-Earth tail lobes and to a strongly poleward displaced polar cap boundary. A comparison with observations suggests that an oval-aligned arc may occur on the high-latitude part of the polar cap boundary. An IMF $B_y$ sign change causes large deformations of the tail. After the IMF $B_y$ flip the near-Earth and far-tail plasma sheet regions are oppositely twisted which causes in the near-Earth tail a bifurcation of the closed field line region that moves from one flank to the other. The bifurcated part of the closed field line region maps to a bridge of closed field lines moving over the entire polar cap. This moving bridge may be interpreted as the mapped region of a moving transpolar arc. Based on earlier observations, such a type of polar arcs are expected to occur after an IMF $B_y$ sign change.