  We consider the influence of a transverse magnetic field on the transient
growth of perturbations in a liquid-metal circular pipe flow with an
electrically insulating or conducting wall. In this configuration, the mean
flow profile and the amplification of perturbations are strongly affected by
the applied magnetic field, leading to a rich dynamical landscape depending on
its intensity. The analysis is performed for Reynolds numbers 5000 and 10 000,
close to the transitional regime for moderate values of the Hartmann number, a
non-dimensional parameter proportional to the applied magnetic field's
intensity. Aside from a slight modification of hydrodynamic optimal
perturbations at very small Hartmann numbers, we observe three other
characteristic topologies of optimal perturbations depending on the intensity
of the magnetic field. Their growth mechanisms differ, with the lift-up effect
dominating at low Hartmann numbers and the Orr-mechanism becoming increasingly
important as the magnetic field intensity is increased. In particular, we show
in the intermediate regime of Hartmann numbers how transient growth occurs in
two stages, with initial growth through the lift-up effect followed by a
further increase of energy through the Orr-mechanism. We also conduct
three-dimensional nonlinear simulations to track the time evolution of optimal
perturbations, illustrating their nonlinear growth and eventual breakdown to a
sustained turbulent state or the return of the system to a laminar state.
