CFD-Training

CFD-Training is a blog dedicated to CFD (Computational Fluid Dynamic) and more specifically to open-source open source such as the OpenFOAM toolbox code. The goal of CFD-Training is to provide free resources and tutorials (our articles) as well as more advanced non-free content (visit the cfd-shop).

Numerical simulation

CFD (Computational Fluid Dynamic) is a set of numerical methods used to solve the Navier-Stokes equation. Many processes or systems in industry and research involve a fluid (heat exchangers, ship, mixers …). The development of CFD codes and softwares is growing since the 1980s. Numerical simulation has become today a major tool for the engineer when studying a system. During the design of the process, numerical simulation can limit the use of prototyping phases (often expensive). In addition, with the development of computing powers and optimization algorithms, the engineer can determine and refine his design to achieve a performance objective (heat exchanger efficiency, hydrodynamic resistance of a boat hull, homogenization of a mixer application…).

There is a large number of software and CFD codes. Each with its own strengths and weaknesses. This blog is especially dedicated to the use of OpenFOAM® open-source code. The development of OpenFOAM® (Open Field Operation And Manipulation, originally called FOAM) began in the late 1980s at Imperial College London by Henry Weller. Today the code is distributed by ESI-OpenCFD (www.openfoam.com) and OpenFOAM Foundation (http://www.openfoam.org). A third version of the code named foam-extend is also distributed by Wikki Ltd (Hrvoje Jasak) https://sourceforge.net/projects/foam-extend/.

  • Sizing

  • Optimization

  • Robustness

  • Cost reduction

OpenFoam - CFD numerical model of a propeller in open-water – velocity field

CFD numerical model of a propeller in open-water – velocity field

Why OpenFOAM ® ?

The code

OpenFOAM® is an open-source toolkit code written in C ++ (more than a million lines). It is compatible with the Linux environment, Windows (Docker or BASH) and Mac (Docker). The code is used in practice via commands and the Linux terminal. OpenFOAM® does not have a universal solver applicable to any engineering problem. Instead, the code is distributed with more than 90 solvers (located in the $ FOAM_SOLVERS directory of the source code) appropriate to different cases (steady one-phase incompressible flow, compressible two-phases flow, combustion, Lagragian particle tracking, DNS, etc.). The code is also provided with numerous libraries (dynamic mesh, real gas, turbulence models, etc.) and pre and post-processing utilities (mesh manipulation, field initialization, force calculations, source terms…). Visualization of the results can be done with the version of Paraview® provided with the code or using a separately installed version. It is also possible to use Blender® or other tools.

Meshing

Although it is possible to convert meshes generated with commercial tools, OpenFOAM® has 4 different meshers: blockMesh (structured mesh), snappyHexMesh (unstructured Cartesian mesh with boundary layer insertion), cfMesh (unstructured tetrahedral mesh, Cartesian and hexahedral with boundary layer insertion) and foamyHexMesh (hexa-dominated meshing suitable for mechanical problems or heat conduction – the latter being marginally used). With enough experience it is possible to generate (and with little effort) meshes relatively similar to those produced by commercial meshers.

GNU licence

OpenFOAM® is distributed under GNU license – so free with accessible source files. At a time when CFD needs are growing in the industry and numerical models are more and more complex, a free code fully parallelized is a significant advantage. OpenFOAM® is among the three most used CFD codes in the world. As the sources are accessible, the advanced user can (with knowledge in C ++) develop its own libraries, solvers etc … Although for the beginner, commercial codes are easier when starting they are not as trainers because the user does not really takes part at all stages of the CFD workflow. For example, on the choice of discretization schemes OpenFOAM® has a significant number of choice (VAN LEER, SUPERBEE, QUICK, LUST etc.) or linear solvers compared to ANSYS CFX®. In addition, many commercial codes use convergence artifices to the detriment of the results accuracy.

GUI ?

The absence of graphical user interface (GUI) is not necessarily a disadvantage. Indeed, with a little experience it is possible to set up a case of calculation almost as quickly as with a commercial tool. It is also sometimes much easier to restart a calculation by simply changing the value of a parameter in a .txt file (density of a fluid for example) than having to use a graphical interface that can be heavy and sometimes unstable. In addition, the use of code through commands makes it easy to write Linux scripts (for example to run calculations in batch).

No licence fee

No licensing costs

No cost of parallelization

Open-source code

OpenFOAM is a GNU-licensed code.

Tool-box code

OpenFOAM is a code toolbox customizable and very flexible.

World class solver

OpenFOAM® is the 3rd most used CFD code in the world !

 

A large community

OpenFOAM® has a large community of users who participate in maintaining and developing the code.

A question ?

You can address any question or request by completing the form below:

    This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM®  and OpenCFD®  trade marks.