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]

Model Order Reduction and Emulation

So you have your nifty numerical simulator that captures all the details of the complex device you want to model, everything! You got your digital twin, and for a while everything is OK.

There comes the day in which you want to use your simulator in ways that go beyond the constraints imposed by the physical world … well, isn’t that the reason why we build simulators?

[Read More]

Polyonymous Algorithms

One core idea of emulation is to represent the ensemble of outputs of a complicated simulator in a reduced basis. The battle-horse algorithm to do this is the famous PCA, a.k.a POD, a.k.a SVD, a.k.a EOF, a.k.a. EBD, a.k.a. KLD, a.k.a. …

[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]