I am recently starting with OpenFoam. I have a Mac as my personal laptop, but I would have to use OpenFoam on linux in my lab. So my questions are:

1) Is the OpenFoam software independent of OS, so that I can use interchangeably on both Mac and linux.

2)I am fairly good with C programming(I am not really comfortable with the OOPS concept). So is that sufficient or would I have to get better at it?

3)I have taken a fluid mechanics course and a basic numerical course that deals with solving matrices. So is that sufficient or would I have to take a basic CFD course online?

Thank you for your time.

Note: I do know the choice of installing VM or BootCamp. But I want to keep that option as last resort.

  • $\begingroup$ OpenFoam is strictly object oriented programming with heavy use of templates. You will need to learn some of that. It is most definitely a C++ code and not C in C++. $\endgroup$
    – BlaB
    Mar 25, 2019 at 11:13
  • $\begingroup$ @BlaB , Thanks for your comment but could you also please answer the rest of the question. Thanks in advance. $\endgroup$
    – Tyrion
    Mar 25, 2019 at 14:19

1 Answer 1


You can install OpenFOAM on a variety on operating systems, see e.g. here.

If you set up a simulation on your private computer, running macOS, and copy it to your lab computer, running Linux, there should be no problem, as OpenFOAM cases are largely based on ASCII text files. Only the big data files, such as fields and certain files of the mesh can be written in a binary format to save disk space.

When working on different machines, remove any run-time compiled files from the case. They are likely to cause trouble when they were compiled on machine A and you try to run them on machine B.

  1. Yes, the cases are independent of the OS.
  2. Depending on what you want to do, you should get familiar with C++ and the OOP concepts as well as templates. OpenFOAM makes heavy use of these, and knowledge about them is vital if you want to understand OpenFOAM's source code
  3. Having attended a CFD course, when you want to do CFD is never a bad thing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.