A Hydrodynamic Contact Algorithm