Hydrodynamics of dispersive systems interacting with an electromagnetic field