Hi Vinay,
You would have to make sure the above openfoam script runs on 2 nodes without using openpbs.
If that scripts works , then it can be integrated with the PBS Pro, so that pbs will take care of dynamically providing the host details for the job to spread across the computational resources.
Please refer the below links and scripts and give it a try.
Ref:
https://opus.nci.org.au/display/Help/OpenFOAM
https://wiki.chpc.ac.za/howto:openfoam