How to add a new turbulence model, revisited


In this post, my old tutorial on how to implement a new turbulence model in OpenFOAM-3.0 is revisited. The old post is over two years old and since then a lot of changes in OpenFOAM have been introduced by OpenFOAM foundation. Fortunately, implementing a new model in OpenFOAM-5.0 upwards is much easier now. Therefore, this will be a very short post since all the basics has been covered in the previous post.

click to read the rest of the article …

How to add a turbulence model in OpenFOAM-3.0.0


In OpenFOAM-3.0.0 [1], the turbulence models library had major facelift. Actually, it had major operation not just a facelift. Now, all models are based on one base template class including RANS, LES, incompressible and compressible. Therefore, if you followed most of the available tutorials on how to modify/implement turbulence model, it will not work. You will face many compiler errors from the first step. This post shows how to overcome this problem step-by-step. Moreover, it discusses briefly the reasons causing these errors.

click to read the rest of the article …

How to solve ODE in OpenFOAM

OpenFOAM [1] has a library designed to solve ordinary differential equations (ODEs). It is widely used for solving chemistry in OpenFOAM. This post focuses on how to solve any ODE in OpenFOAM. it is not intended to be a complete review or explaining every ODE solver, however, this post shows step-by-step how to define an ODE and how to write a small program to solve it. Finally, the results will be compared and plotted aginst the extract solution using Gnuplot.

click to read the rest of the article …

My First Post


Welcome to my blog, here, I will share with you some tips and ideas about OpenFOAM in particular and other open source code which I use regularly. I thought many times before about creating a blog about OpenFOAM but I never had a chance. Today, there are many resources and blogs available online about OpenFOAM which were not available when I started using it six years ago.

click to read the rest of the article …