dimanche 21 octobre 2012

Fun with OpenFOAM and turbulence models

Creation of these movies was a part of sudden teaching assistance duties. In the beginning the idea was to just reproduce Kármán vortex street. And then it evolved to the comparison of vortex street simulation results with different turbulence models. Case files for the LES simulations can be found at https://bitbucket.org/mrklein/openfoam-ravings.

Channels and meshes

We have simple straight channel with two bodies of different shape put inside the channels. Simple schemes of the channels are shown on the figures below.


"Circle" channel scheme

jeudi 11 octobre 2012

This saved my evening ;)

Initially I've got points from OpenFOAM sample in the plane, then I collected all Xes and Ys, and then (cause there was also fluid with channel involved and velocities was not available at every point and when data is not available then it's zero)...

>> vels = importdata('vels.dat');
>> I = ~(vels(:, 3) == 0 & vels(:, 4) == 0);
>> quiver(vels(I, 1), vels(I, 2), vels(I, 3), vels(I, 4))


As all these points for zero values gone, figures look much clearer.