setOla: new utility added to olaFlow

Wednesday, Jul 1, 2020| Tags: olaFlow suite, setOla, Utility, Tool

The olaFlow CFD suite welcomes today a new utility: setOla.

setOla works almost exactly like setFields, it helps you to set your initial conditions for VOF and velocity according to the wave conditions that you have defined as usual in the waveDict file. This utility can be very helpful when you want to save some time (the time that it takes for waves to propagate across the domain) and get the waves into your simulation straightaway.

We have also released a tutorial (setOlaFlume) for you to test the utility and understand the additional parameters that you need to define.

What has changed?

There is a new utility in the olaFlow CFD suite called setOla. The source code can be found in the applications/setOla folder.

There is also a new tutorial called setOlaFlume that you can find with the rest of tutorials.

What are the limitations?

This utility is compatible with the most recent versions of OpenFOAM and OpenFOAM+.

setOla might not compile with rather old versions. In that case you will get a message on your terminal prompting you to update your OpenFOAM version.

How to access the new utility?

To access the new utility, you just need to perform a code update as usual to download the latest olaFlow version:

git checkout
git pull

Finally, recompile the code normally.

./allMake

How to use the new utility?

We have prepared a new tutorial called setOlaFlume so that you can experience and learn how to use this utility as soon as you compile it.

The tutorial features the usual runCase script which features all the instructions to run the case, including running setOla to set the initial conditions.

The shape of this wave flume is quite unique in order to illustrate how setOla works and how to set the additional parameters that it requires. As can be seen in the image above, the bottom of the flume starts at Z = 0 m (X = 0 m, inlet), then it goes down to Z = -0.10 m (X = 5 m) and it ends at Z = 0.05 m (X = 10 m, outlet). The top of the mesh is set at Z = 0.70 m and the water level is supposed to be at Z = 0.40 m.

To set the water level, we need to define one or two additional parameters within waveDict:

// Parameters for setOla
setWaterLevel   0.4; // Still water level (Z, in m)
setWaterDepth   0.4; // Water depth to use in calculations (if irregular bottom)

The first parameter, setWaterLevel, will fix the initial water level at the given height. In this case the initial water level is supposed to be at Z = 0.40 m, therefore setWaterLevel = 0.4.

The second parameter, setWaterDepth, is optional and fixes the water depth used to calculate the free surface elevation and velocities according to the wave theory, height, period… defined within waveDict.

Important notes:

  • If setWaterDepth is not defined, its value is calculated automatically as the difference between the given setWaterLevel and the lowest level (Z coordinate) of the points that form the mesh. In this case it would be h = 0.40 - (-0.10) = 0.50 m.
  • The water depth at the wave generation boundary (X = 0 m, inlet) is h = 0.40 m = (0.40 - 0), and this will be the value that will be used by olaFlow wave generation boundary condition, so we need to fix setWaterDepth to 0.40 to prevent any discordances. This will only happen when the bottom of the domain is irregular, or more generally when the lowest point of the bottom is below the lowest point of the wave generation boundary.
  • Note that setOla works independently from the wave generation and absorption boundary conditions. This is why you should expect a water depth at the wave generation boundary of 0.40 m and an initial water depth for absorption of 0.35 m at the outlet boundary.