Main code for OpenFOAM