  We study the energy stability of pressure-driven laminar magnetohydrodynamic
flow in a rectangular duct with transverse homogeneous magnetic field and
electrically insulating walls. For sufficiently strong fields, the laminar
velocity distribution has a uniform core and convex Hartmann and Shercliff
boundary layers on the walls perpendicular and parallel to the magnetic field.
The problem is discretized by a double expansion in Chebyshev polynomials in
the cross-stream coordinates. The linear eigenvalue problem for the critical
Reynolds number depends on the streamwise wavenumber, Hartmann number and the
aspect ratio. We consider the limits of small and large aspect ratios in order
to compare with stability models based on one-dimensional base flows. For large
aspect ratios we find good numerical agreement with results based on the
quasi-two-dimensional approximation. The lift-up mechanism dominates in the
limit of zero streamwise wavenumber and provides a linear dependence between
the critical Reynolds and Hartmann number in the duct. The duct results for
small aspect ratio converge to Orr's original energy stability result for
spanwise uniform perturbations imposed on the plane Poiseuille base flow. We
also examine different possible symmetries of eigenmodes as well as the purely
hydrodynamic case in the duct geometry.
