A finite element method for evaluating a double integral arising from a Dirichlet problem in fluid mechanics