Drag models in OpenFOAM

OpenFOAM is a great tool, however the public documentation is not exhaustive and there is a lot to find out on your own if you are trying to master the tool.1

So today, I am trying to give an overview of the drag models available in OpenFOAM v11. In the forums out there you can find information about the models but it is quite scattered. I hope this will save some time.

[Read More]

Parametrizing an OpenFOAM case

It is quite common to run simulations of models for different values of parameters. For example, running mesh studies to see what mesh size is necessary to get good solutions, or testing how the solution varies with physical properties (e.g. sensitivity analysis, emulation, etc.), or modifying the domain geometry to optimize some design.

In this post I describe a very simple way to parametrize an OpenFOAM (version 8) case folder using python (specifically template string). This allows to configure the simulation using the power of python.

UPDATE: (10.2023) In OpenFOAM v10 and later the notation for macros in dictionary files has changed. In the versions posterios to v8 you need to use ! instead of : (used herein) to refer to the highest level in the file; and / instead of . (used herein) for fields inside a file or dictionary. For a description of the new macrop expansions visit the official documentation

[Read More]