A proton exchange membrane (PEM) fuel cell is an electrolytic cell that can convert chemical energy of hydrogen reacting with oxygen into electrical energy with no greenhouse gases generated in the process. To satisfy increasingly demanding application needs, providing fuel cells with better performance and higher efficiency are of paramount importance. Computational fluid dynamics (CFD) analysis is an ideal method for fuel cell design optimization. In this paper, a comprehensive CFD-based numerical tool that can accurately simulate multiphase flow and the major transport phenomena occurring in a PEM fuel cell is presented. The tool is developed using the Open Source Field Operation and Manipulation (OpenFOAM) software (a free open-source CFD code). This makes it flexible and suitable for use by fuel cell manufacturers and researchers to get an in-depth understanding of the cell working processes to optimize the design. The distributions of velocity, pressure, chemical species, Nernst potential, current density, and temperature at case study conditions are as expected. The polarization curve follows the same trend as those of the I-V curves from numerical model and experimental data taken from the literature. Furthermore, a parametric study showed thekey role played by the concentration constant in shaping the cell polarization curve. The developed toolbox is well-suited for research and development which is not always the case with commercial code. The work therefore contributes to achieving the objectives outlined in the International Energy Agency (IEA) Advanced Fuel Cell Annex 37 which promotes open-source code modelling of fuel cells. The source code can be accessed at http://dx.doi.org/10.17632/c743sh73j8.1 .