We present adaptive finite element methods to compute weak solutions to the Navier-Stokes equations, which are used to simulate turbulent fluid flow. The mesh is adaptively refined with respect to output functionals of the weak solutions, such as lift or drag of an airplane, and we observe convergence in such functionals as the mesh is refined. The adaptive method is based on the computation of an adjoint (or dual) problem to derive a posteriori estimates of the error in a functional, which guides the mesh refinement algorithms. We also present a monolithic method for solving fluid-structure interaction problems. The numerical methods are implemented as part of the open source software FEniCS, and we show applications of the technology including the aerodynamics of airplanes and biomechanics of the human voice and the human heart.