  It has been established that the Coulomb interactions can transform the
electron gas into a viscous fluid. This fluid is realized in a number of
platforms, including graphene and two-dimensional semiconductor
heterostructures. The defining characteristic of the electron fluid is the
formation of layers of charge carriers that are in local thermodynamic
equilibrium, as in classical fluids. In the presence of nonuniformities,
whirlpools and nontrivial flow profiles are formed, which have been directly
imaged in recent experiments. In this paper, we theoretically study the
response of the electron fluid to localized magnetic fields. We find that the
electric current is suppressed by viscous vortices in regions where magnetic
field is sharply varying, causing strong transport signatures. Experimentally,
our considerations are relevant since local magnetic fields can be applied to
the system through implanting adatoms or embedding micromagnets in the
top-gate. Our theory is essential for the characterization and future
applications of electron fluids in hydrodynamic spin transport.
