We investigate the blood flow inside idealized left ventricles with prescribed wall movement by defining a formulation of boundary conditions for the Navier-Stokes equations accounting for the valves. Specifically, we consider an extended Nitsche’s method for the treatment of general boundary conditions modelling the mitral and aortic valves. The proposed weak formulation includes boundary terms which provide a stabilizing effect for numerical instabilities occurring due to backflow regimes. We present and discuss numerical results for blood flows in left ventricles, both under healthy conditions and in dilatated cardiomyopathy, for which we highlight the effectiveness of the proposed method.