A computational fluid dynamics study based on the application of the finite element method has been performed to investigate the local hemodynamics of the total cavopulmonary connection. This operation is used to treat congenital malformations of the right heart and consists of a by-pass of the right ventricle. In this paper the adopted methodology is presented, together with some of the preliminary results. A three-dimensional parametric model of the connection and a lumped-parameter mechanical model of the pulmonary circulation have been developed. The three-dimensional model has been used to simulate the local fluid dynamics for different designs of the connection, allowing a quantitative evaluation of the dissipated energy in each of the examined configurations. The pulmonary afterload of the three-dimensional model has been reproduced by coupling it with the pulmonary mechanical model. The results show that, from a comparative point of view, the energetic losses can be greatly reduced if a proper hydraulic design of the connection is adopted, which also allows control of the blood flow distribution into the lungs.