OpenFOAM is a general purpose open-source CFD code. OpenFOAM is written in C++ and uses an object oriented approach which makes it easy to extend. The package includes modules for a wide range of applications. FOAM was written by Henry Weller, dr. Hrvoje Jasak and others at Imperial College. For a few years FOAM was commercialised with limited success by their company Nabla Ltd, based in the UK. However, in 2004 they decided to release the code under GPL and rename it to OpenFOAM. OpenFOAM is a very capable code which you definitely should check out if you are looking for a state-of-the-art CFD code with source-code access.
The numrics implemented in OpenFOAM uses the Finite Volume Method on unstructured meshes and is the first example of polyhedral mesh support implemented in CFD software. OpenFOAM also provides many other capabilities, including free-surface and multi-phase flow modelling, lagrangian spray model and automatic mesh motion.