5 OpenFOAM Features We Love

Over the past few years we have been studying the open source solver OpenFOAM and have really been impressed. We thought we would share short list of our favorite features that we believe make it a viable option for many who are searching for a cost effective tool to use for their CFD models.

1. Easy to install and use on Ubuntu

If you are comfortable with the Ubuntu flavor of linux, then you will be happy to hear that there are images available that make it very easy and straight forward to download the most recent stable build of OpenFOAM and start using it with very little effort on your part. That is not to say you can’t use it on other platforms and other versions of linux, but on some of those you might have to compile the code. So, if you are planning on buying hardware to run OpenFOAM on, we would suggest looking at a computer with Ubuntu on it.

2. Ready to use out of the box

Some have a misconception that OpenFOAM requires you to be able to write C++ code to be able to use it for your CFD models. That is not the case. There are a number of solvers that come with the installed files that are compiled and ready to use. Writing C++ code only comes into the picture if and when you reach the point where you need to write a specialized boundary condition or source term. You may find it necessary to write your own solver using the OpenFOAM framework if your problem is very unique and far different from the standard set of problems normally encountered, but chances are you will find that one of the solvers that come with the installation will be suitable for you at the start at least.

3. Comes with a meshing tool

OpenFOAM is not the only open source CFD solver we have come across, but it is the only one we have seen that has taken the extra steps to provide a meshing tool as well. Most open source solvers leave it up to you to find a way to build a mesh, but OpenFOAM comes with blockMesh and snappyHexMesh, two meshing tools that make it possible to build body conforming meshes with boundary layer mesh included. Together these two tools make it possible to build a mesh that is acceptable for a large number of applications.

4. Provides a complete analysis system

In addition to providing a good meshing tool, OpenFOAM provides a way to easily post process your CFD results using ParaView, an open source visualization tool. Once your OpenFOAM case has converged, you can run a simple command to have that case file open in ParaView. This, combined with the meshing tools mentioned above, provides a complete CFD analysis system that is completely open source from start to finish. This is very rare and very impressive.

5. Can be extended to meet your needs

We made the point of stressing at the beginning that there is a misconception that one needs to know C++ in order to use OpenFOAM. Again, this is not the case. Out of the box, one can begin using OpenFOAM as is by using one of the compiled solvers that comes with the installation. One does have to learn how to correctly set up your input files, but this in no way involves writing C++ code. However, having said that, one can extend OpenFOAM to meet your specific modeling needs if your problem requires it. Using a well structured and documented process, you can develop your own boundary conditions and source terms. You can also develop your own solver if needed but this would be more rare then the first case as most problems can be addressed using one of the compiled solvers that come with the installation. Once you learn the process to develop a new boundary condition type or source term, you will find the amount of code required to do so is very reasonable and most would find it something they can handle.